Simplify the code for using dired to attach messages

I originally sent some code to the mailing list in 2012 to use dired
for marking attachments.

https://groups.google.com/g/mu-discuss/c/OPwdNZbB5GE/m/hnjNlNoLIu8J

As the function in gnus.el has since been fixed, the version of
gnus-dired-mail-buffers now works fine with mu4e (and has done for
many years).  I suggest deleting the old code to make the
documentation simpler assuming that people are no longer on Emacs from
9 years ago.
This commit is contained in:
Stephen J. Eglen 2021-04-13 17:29:18 +01:00
parent 8a4a0e9a1c
commit f80123bb3e
1 changed files with 0 additions and 18 deletions

View File

@ -3786,26 +3786,8 @@ It is possible to attach files to @t{mu4e} messages using @t{dired}
(@inforef{Dired,,emacs}), using the following steps (based on a post on the
@t{mu-discuss} mailing list by @emph{Stephen Eglen}).
To prepare for this, you need a special version of the
@code{gnus-dired-mail-buffers} function so it understands @t{mu4e} buffers as
well; so put in your configuration:
@lisp
(require 'gnus-dired)
;; make the `gnus-dired-mail-buffers' function also work on
;; message-mode derived modes, such as mu4e-compose-mode
(defun gnus-dired-mail-buffers ()
"Return a list of active message buffers."
(let (buffers)
(save-current-buffer
(dolist (buffer (buffer-list t))
(set-buffer buffer)
(when (and (derived-mode-p 'message-mode)
(null message-sent-message-via))
(push (buffer-name buffer) buffers))))
(nreverse buffers)))
(setq gnus-dired-mail-mode 'mu4e-user-agent)
(add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
@end lisp