unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61037: 28.1; mml-attach-buffer on archive-mode
@ 2023-01-24 10:33 Al Haji-Ali
  0 siblings, 0 replies; only message in thread
From: Al Haji-Ali @ 2023-01-24 10:33 UTC (permalink / raw)
  To: 61037

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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-24 10:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 10:33 bug#61037: 28.1; mml-attach-buffer on archive-mode Al Haji-Ali

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).