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

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

[elpa] externals/gnorb 8246cd4 064/449: Restore from mails more reliably


From: Stefan Monnier
Subject: [elpa] externals/gnorb 8246cd4 064/449: Restore from mails more reliably
Date: Fri, 27 Nov 2020 23:15:09 -0500 (EST)

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

    Restore from mails more reliably
    
    * gnorb-gnus.el: gnorb-gnus-check-org-header
    
    gnorb-org-setup-message adds the restore function to
    message-exit-actions, but in case we're working from a saved draft or
    buffer-local vars have otherwise been wiped, we add the restore
    function here as well.
---
 lisp/gnorb-gnus.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/gnorb-gnus.el b/lisp/gnorb-gnus.el
index b000d8b..a18de33 100644
--- a/lisp/gnorb-gnus.el
+++ b/lisp/gnorb-gnus.el
@@ -227,7 +227,14 @@ current message; multiple header values returned as a 
string."
     (message-narrow-to-headers)
     (let ((org-ids (mail-fetch-field gnorb-mail-header nil nil t)))
       (if org-ids
-         (setq gnorb-message-org-ids org-ids)
+         (progn
+           (require 'gnorb-org)
+           (setq gnorb-message-org-ids org-ids)
+           ;; `gnorb-org-setup-message' may have put this here, but
+           ;; if we're working from a draft or whatever, it might not
+           ;; be there yet
+           (add-to-list 'message-exit-actions
+                        'gnorb-org-restore-after-send t))
        (setq gnorb-message-org-ids nil)))))
 
 (add-hook 'message-send-hook 'gnorb-gnus-check-org-header)



reply via email to

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