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:
@ -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
|
(@inforef{Dired,,emacs}), using the following steps (based on a post on the
|
||||||
@t{mu-discuss} mailing list by @emph{Stephen Eglen}).
|
@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
|
@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)
|
(add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user