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

Full log


View this message in rfc822 format

From: Al Haji-Ali <abdo.haji.ali <at> gmail.com>
To: 61037 <at> debbugs.gnu.org
Subject: bug#61037: 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 2 years and 197 days ago.

Previous Next


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