[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnorb 5b9e163 047/449: Allow attaching in all captures.

From: Stefan Monnier
Subject: [elpa] externals/gnorb 5b9e163 047/449: Allow attaching in all captures.
Date: Fri, 27 Nov 2020 23:15:05 -0500 (EST)

branch: externals/gnorb
commit 5b9e16395894bad562f17132e99b3620a413191f
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Allow attaching in all captures.
    gnorb-gnus.el: New option gnorb-gnus-capture-always-attach
    When set to t, behave as if all capture templates had the
    :gnus-attachments key set to t.
 lisp/gnorb-gnus.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lisp/gnorb-gnus.el b/lisp/gnorb-gnus.el
index 7d862c9..5f39f00 100644
--- a/lisp/gnorb-gnus.el
+++ b/lisp/gnorb-gnus.el
@@ -31,6 +31,13 @@
   :tag "Gnorb Gnus"
   :group 'gnorb)
+(defcustom gnorb-gnus-capture-always-attach nil
+  "Always prompt about attaching attachments when capturing from
+  a Gnus message, even if the template being used hasn't
+  specified the :gnus-attachments key.
+Basically behave as if all attachments have \":gnus-attachments t\".")
 ;;; What follows is a very careful copy-pasta of bits and pieces from
 ;;; mm-decode.el and gnus-art.el. Voodoo was involved.
@@ -106,7 +113,8 @@ save them into `gnorb-tmp-dir'."
 ;;; Make the above work in the capture process
 (defun gnorb-gnus-capture-attach ()
-  (when (and (org-capture-get :gnus-attachments)
+  (when (and (or gnorb-gnus-capture-always-attach
+                (org-capture-get :gnus-attachments))
                 (org-capture-get :original-buffer)
               (memq major-mode '(gnus-summary-mode gnus-article-mode))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]