bug#81535: 32.0.50; Bug fix: bodiless articles w/plain text as the only attachment always get attachment inlined & never buttonized
Nickolai Dobrynin <[email protected]> Sun, 02 Aug 2026 05:02:18 +0200
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
--=-=-= Content-Type: text/plain Attached is a patch that fixes the following problem: 1. In violations of RFC2183, bodiless articles whose only attachment is a plain text file always get the attachment inlined despite Content-Disposition: attachment; filename=attachment.txt being present. 2. The attachment is never buttonized, no matter the value of the variables like `gnus-buttonized-mime-types'. Extracting unbuttonized attachments is problematic. Since this is _not_ a multipart/* article, `mm-dissect-singlepart' in mm-decode.el disregards this corner case and thinks that the attachment is not a MIME element, so this element is left unprocessed. In GNU Emacs 32.0.50 (build 11, x86_64-pc-linux-gnu, GTK+ Version 3.24.52, cairo version 1.18.4) of 2026-08-01 built on nova-laptop.dobrynin.net Repository revision: d9218edb3efedb98434f6db33b2ddde8d4a085c3 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12401013 System Description: 'Gentoo Linux' Configured using: 'configure --prefix=/home/nick/main/dev/emacs-build --enable-checking=all --with-gif=ifavailable 'CFLAGS=-O0 -g3'' Configured features: ACL CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LCMS2 LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB Important settings: value of $LANG: en_US.utf8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Message Minor modes in effect: gnus-message-citation-mode: t mml-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-nonselected-mode: t minibuffer-regexp-mode: t line-number-mode: t auto-fill-function: message-do-auto-fill transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t abbrev-mode: t Load-path shadows: None found. Features: (flyspell ispell shadow emacsbug lisp-mnt utf-7 epa-file network-stream nsm qp diff-mode track-changes easy-mmode jka-compr gnus-cite smiley ansi-color mm-archive textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check gnus-async gnus-bcklg byte-opt bytecomp byte-compile sort mail-extr gnus-ml disp-table format-spec face-remap nnagent nnml nnmaildir nnnil gnus-draft nndraft nnmh cl-extra help-mode gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig nntp gnus-cache gnus-sum shr pixel-fill kinsoku url-file svg xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail browse-url xdg url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core cl-macs gv json map url-vars mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message sendmail mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util text-property-search time-date subr-x mule-util mail-utils range mm-util mail-prsvr cus-edit pp cus-start cus-load icons wid-edit cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process tty-child-frames emacs) Memory information: ((conses 16 807159 183970) (symbols 48 16891 14) (strings 32 563879 85478) (string-bytes 1 30612574) (vectors 16 217875) (vector-slots 8 1763567 145576) (floats 8 220 581) (intervals 56 17290 334) (buffers 984 26)) --=-=-= Content-Type: application/mads+xml Content-Disposition: attachment; filename=gnus-20260802021631.patch Content-Transfer-Encoding: base64 Content-Description: This patch fixes unwanted inlining of plain text attachments ZGlmZiAtLWdpdCBhL2xpc3AvZ251cy9tbS1kZWNvZGUuZWwgYi9saXNwL2dudXMvbW0tZGVjb2Rl LmVsCmluZGV4IDcxN2M4YTAyMmVmLi41Mjk4ZGM5OTQyZiAxMDA2NDQKLS0tIGEvbGlzcC9nbnVz L21tLWRlY29kZS5lbAorKysgYi9saXNwL2dudXMvbW0tZGVjb2RlLmVsCkBAIC03MzUsMTAgKzcz NSwxMSBAQCBtbS1kaXNzZWN0LWJ1ZmZlcgogCXJlc3VsdCkpKSkKIAogKGRlZnVuIG1tLWRpc3Nl Y3Qtc2luZ2xlcGFydCAoY3RsIGN0ZSAmb3B0aW9uYWwgZm9yY2UgY2RsIGRlc2NyaXB0aW9uIGlk KQotICAod2hlbiAob3IgZm9yY2UKLQkgICAgKGlmIChlcXVhbCAidGV4dC9wbGFpbiIgKGNhciBj dGwpKQotCQkoYXNzb2MgJ2Zvcm1hdCBjdGwpCi0JICAgICAgdCkpCisgIChjb25kCisgICAoKG9y IGZvcmNlCisgICAgICAgIChpZiAoZXF1YWwgInRleHQvcGxhaW4iIChjYXIgY3RsKSkKKwkgICAg KGFzc29jICdmb3JtYXQgY3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