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

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

[elpa] externals/gnorb f3acab5 345/449: Handle forwarding from gnorb-mod


From: Stefan Monnier
Subject: [elpa] externals/gnorb f3acab5 345/449: Handle forwarding from gnorb-mode summary buffers
Date: Fri, 27 Nov 2020 23:16:08 -0500 (EST)

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

    Handle forwarding from gnorb-mode summary buffers
    
    * nngnorb.el (gnorb-summary-reply-hook): `message-repy-headers' is only
      populated for replies. When forwarding, simply get the message-id from
      the text of the forwarded message below. If the user has added
      message-id to `message-forward-ignored-headers' then s/he is out of
      luck.
---
 nngnorb.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/nngnorb.el b/nngnorb.el
index 0c1ca35..732254e 100644
--- a/nngnorb.el
+++ b/nngnorb.el
@@ -269,7 +269,14 @@ continue to provide tracking of sent messages."
 (defun gnorb-summary-reply-hook (&rest args)
   "Function that runs after any command that creates a reply."
   ;; Not actually a "hook"
-  (let* ((msg-id (aref message-reply-headers 4))
+  (let* ((msg-id (if message-reply-headers
+                    (aref message-reply-headers 4)
+                  ;; When forwarding messages,
+                  ;; `message-reply-headers' is nil.
+                  (save-excursion
+                    (let ((case-fold-search t))
+                      (when (re-search-forward "message-id: +\\(.*\\)$" 
(point-max) t)
+                        (match-string 1))))))
         (org-id (car-safe (gnus-registry-get-id-key msg-id 'gnorb-ids)))
         (compose-marker (make-marker))
         (attachments (buffer-local-value



reply via email to

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