emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/gnorb babfa5c 393/449: Fix to after capture function, b


From: Stefan Monnier
Subject: [elpa] externals/gnorb babfa5c 393/449: Fix to after capture function, bump to 1.3.4
Date: Fri, 27 Nov 2020 23:16:18 -0500 (EST)

branch: externals/gnorb
commit babfa5c26614d59ef558d12a914b627b2cce6ed2
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Fix to after capture function, bump to 1.3.4
    
    * packages/gnorb/gnorb-gnus.el (gnorb-gnus-after-capture-function):
      The order was incorrect, the attachment stuff needs to happen in the
      capture buffer, the rest of it in the Gnus buffer.
    * packages/gnorb/gnorb.el: Flush changes.
---
 gnorb-gnus.el | 29 +++++++++++++++--------------
 gnorb.el      |  2 +-
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/gnorb-gnus.el b/gnorb-gnus.el
index dfef37a..df50bb2 100644
--- a/gnorb-gnus.el
+++ b/gnorb-gnus.el
@@ -259,6 +259,21 @@ captured from onto the Org heading being captured.
   (when (with-current-buffer
            (org-capture-get :original-buffer)
          (memq major-mode '(gnus-summary-mode gnus-article-mode)))
+    ;; This part needs to happen in the capture buffer.
+    (when (or gnorb-gnus-capture-always-attach
+             (org-capture-get :gnus-attachments))
+      (require 'org-attach)
+      (setq gnorb-gnus-capture-attachments nil)
+      (gnorb-gnus-collect-all-attachments t)
+      (map-y-or-n-p
+       (lambda (a)
+        (format "Attach %s to capture heading? "
+                (file-name-nondirectory a)))
+       (lambda (a) (org-attach-attach a nil 'mv))
+       gnorb-gnus-capture-attachments
+       '("file" "files" "attach"))
+      (setq gnorb-gnus-capture-attachments nil))
+    ;; This part happens in the original summary/article buffer.
     (save-window-excursion
       (set-buffer (org-capture-get :original-buffer))
       (let ((art-no (gnus-summary-article-number)))
@@ -276,20 +291,6 @@ captured from onto the Org heading being captured.
              (kill-new (buffer-substring (point) (point-max)))
              (message "Message text copied to kill ring"))))
 
-       (when (or gnorb-gnus-capture-always-attach
-                 (org-capture-get :gnus-attachments))
-         (require 'org-attach)
-         (setq gnorb-gnus-capture-attachments nil)
-         (gnorb-gnus-collect-all-attachments t)
-         (map-y-or-n-p
-          (lambda (a)
-            (format "Attach %s to capture heading? "
-                    (file-name-nondirectory a)))
-          (lambda (a) (org-attach-attach a nil 'mv))
-          gnorb-gnus-capture-attachments
-          '("file" "files" "attach"))
-         (setq gnorb-gnus-capture-attachments nil))
-
        (when gnorb-gnus-tick-all-tracked-messages
          (gnus-summary-mark-article art-no gnus-ticked-mark))
 
diff --git a/gnorb.el b/gnorb.el
index d6f247f..9b23748 100644
--- a/gnorb.el
+++ b/gnorb.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014  Free Software Foundation, Inc.
 
-;; Version: 1.3.3
+;; Version: 1.3.4
 ;; Package-Requires: ((cl-lib "0.5"))
 
 ;; Maintainer: Eric Abrahamsen <eric@ericabrahamsen.net>



reply via email to

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