GNU bug report logs - #61037
28.1; mml-attach-buffer on archive-mode

Previous Next

Package: emacs;

Reported by: Al Haji-Ali <abdo.haji.ali <at> gmail.com>

Date: Tue, 24 Jan 2023 10:41:01 UTC

Severity: normal

Found in version 28.1

To reply to this bug, email your comments to 61037 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#61037; Package emacs. (Tue, 24 Jan 2023 10:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Al Haji-Ali <abdo.haji.ali <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 24 Jan 2023 10:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Al Haji-Ali <abdo.haji.ali <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.1; mml-attach-buffer on archive-mode
Date: Tue, 24 Jan 2023 10:33:48 +0000
Hi,

When calling `mml-attach-buffer` to attach an `archive-mode` buffer, the "wrong" attachment is sent (the archive is not sent). This is because archive-mode adds a file summary to the top of the buffer and restricts the buffer to that summary.

Then in mml.el:645 the line

(insert-buffer-substring (cdr (assq 'buffer cont)))

inserts the buffer content (which is just the summary)

and similarly in mml.el:725
(insert (with-current-buffer (cdr (assq 'buffer cont))
			  (buffer-string)))
                          
(incidentally, I am not sure why `insert-buffer-substring` is not used in mml.el:725)

I can hack my way around this by advising `buffer-string` and `insert-buffer-substring` to handle archive-mode correctly by widening and narrowing to (archive-file-list-start (point-max)), at least when called from `mml-generate-mime-1`, but I was wondering if this should also be fixed somewhere upstream.

Cheers,
-- Al




This bug report was last modified 1 year and 303 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.