From 0cf4ae1f32cbc05183702dd0b1457996c007b647 Mon Sep 17 00:00:00 2001 From: petrucci4prez Date: Sun, 16 Sep 2018 14:45:49 -0400 Subject: [PATCH] added mu4e-dired attached functionality --- conf.org | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/conf.org b/conf.org index caccc40..ef0e472 100644 --- a/conf.org +++ b/conf.org @@ -1773,6 +1773,28 @@ make sizes human readable #+BEGIN_SRC emacs-lisp (setq dired-listing-switches "-Alh") #+END_SRC +*** mu4e attachments +By default the included gnus-dired package does not understan mu4e, so override the existing =gnus-dired-mail-buffers= function to fix. This allows going to a dired buffer, marking files, and attaching them interactively to mu4e draft buffers. +#+BEGIN_SRC emacs-lisp +;; from here: +;; https://www.djcbsoftware.nl/code/mu/mu4e/Dired.html#Dired +(require 'gnus-dired) + +(eval-after-load 'gnus-dired + '(defun gnus-dired-mail-buffers () + "Return a list of active mu4e 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_SRC ** mu4e *** basic #+BEGIN_SRC emacs-lisp