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

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

[elpa] externals/gnorb 582c111 080/449: Let gnorb-gnus-check-outgoing-he


From: Stefan Monnier
Subject: [elpa] externals/gnorb 582c111 080/449: Let gnorb-gnus-check-outgoing-headers handle news
Date: Fri, 27 Nov 2020 23:15:12 -0500 (EST)

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

    Let gnorb-gnus-check-outgoing-headers handle news
    
    lisp/gnorb-gnus.el: gnorb-gnus-check-outgoing-headers needs not to choke
                    on news: use either To or Newsgroups, appropriately.
    
                    Probably this whole function should be wrapped in
                    some kind of condition-case -- it should never
                    prevent messages from being sent.
---
 lisp/gnorb-gnus.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/gnorb-gnus.el b/lisp/gnorb-gnus.el
index 7df6df1..eca0d33 100644
--- a/lisp/gnorb-gnus.el
+++ b/lisp/gnorb-gnus.el
@@ -246,14 +246,16 @@ information about the outgoing message into
     (message-narrow-to-headers)
     (let* ((org-ids (mail-fetch-field gnorb-mail-header nil nil t))
           (msg-id (mail-fetch-field "Message-ID"))
-          (to (mail-fetch-field "To"))
+          (to (if (message-news-p)
+                  (mail-fetch-field "Newsgroups")
+                (mail-fetch-field "To")))
           (toname (nth 1 (mail-extract-address-components to)))
           (toaddress (nth 2 (mail-extract-address-components to)))
           (subject (mail-fetch-field "Subject"))
           (date (mail-fetch-field "Date"))
           ;; if we can get a link, that's awesome
           (link (or (and (mail-fetch-field "Gcc")
-                         (org-store-link))
+                         (call-interactively 'org-store-link))
                     nil)))
       ;; if we can't, then save some information so we can fake it
       (setq gnorb-gnus-sending-message-info



reply via email to

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