branch: externals/gnorb
commit c13f4df09314b908462e7748dac0a51fe52d3cf7
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>

    Better check for capture cleanup
    
    * gnorb-gnus.el (gnorb-gnus-capture-abort-cleanup): If
      `gnorb-gnus-capture-always-attach' is non-nil, we should also scrub
      attachments from the aborted heading.
---
 gnorb-gnus.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnorb-gnus.el b/gnorb-gnus.el
index 2380514..0803809 100644
--- a/gnorb-gnus.el
+++ b/gnorb-gnus.el
@@ -235,8 +235,9 @@ save them into `gnorb-tmp-dir'."
 
 (defun gnorb-gnus-capture-abort-cleanup ()
   (with-no-warnings ; For `org-note-abort'
-   (when (and org-note-abort
-             (org-capture-get :gnus-attachments))
+    (when (and org-note-abort
+              (or gnorb-gnus-capture-always-attach
+                  (org-capture-get :gnus-attachments)))
      (condition-case error
         (progn (org-attach-delete-all)
                (setq abort-note 'clean)

Reply via email to