bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61037: 28.1; mml-attach-buffer on archive-mode


From: Al Haji-Ali
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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]