From f80123bb3e701548ee80928d3fe210652a286000 Mon Sep 17 00:00:00 2001 From: "Stephen J. Eglen" Date: Tue, 13 Apr 2021 17:29:18 +0100 Subject: [PATCH] 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. --- mu4e/mu4e.texi | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index 04cdaed7..f310e5e8 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -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