[Top][All Lists]

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

[elpa] externals/gnorb bdbc96f 195/449: Rename gnorb-gnus-sending-messag

From: Stefan Monnier
Subject: [elpa] externals/gnorb bdbc96f 195/449: Rename gnorb-gnus-sending-message-info
Date: Fri, 27 Nov 2020 23:15:37 -0500 (EST)

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

    Rename gnorb-gnus-sending-message-info
    To plain old gnorb-gnus-message-info, we're going to be using it for
    both incoming and outgoing messages.
    * lisp/gnorb-gnus.el: global rename
    * lisp/gnorb-org.el: global rename
    * lisp/gnorb-utils.el: global rename
 lisp/gnorb-gnus.el  | 30 +++++++++++++++---------------
 lisp/gnorb-org.el   |  2 +-
 lisp/gnorb-utils.el |  8 ++++----
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/lisp/gnorb-gnus.el b/lisp/gnorb-gnus.el
index 49863a6..0c21346 100644
--- a/lisp/gnorb-gnus.el
+++ b/lisp/gnorb-gnus.el
@@ -247,7 +247,7 @@ save them into `gnorb-tmp-dir'."
 ;;; Storing, removing, and acting on Org headers in messages.
-(defvar gnorb-gnus-sending-message-info nil
+(defvar gnorb-gnus-message-info nil
   "Place to store the To, Subject, Date, and Message-ID headers
   of the currently-sending or last-sent message.")
@@ -255,10 +255,10 @@ save them into `gnorb-tmp-dir'."
   "Save the value of the `gnorb-mail-header' for the current
 message; multiple header values returned as a string. Also save
 information about the outgoing message into
-    (setq gnorb-gnus-sending-message-info nil)
+    (setq gnorb-gnus-message-info nil)
     (let* ((org-ids (mail-fetch-field gnorb-mail-header nil nil t))
           (msg-id (mail-fetch-field "Message-ID"))
           (refs (mail-fetch-field "References"))
@@ -278,7 +278,7 @@ information about the outgoing message into
       ;; we can fake it.
       (when refs
        (setq refs (split-string refs "[ ,]+")))
-      (setq gnorb-gnus-sending-message-info
+      (setq gnorb-gnus-message-info
            `(:subject ,subject :msg-id ,msg-id
                       :to ,to :from ,from
                       :link ,link :date ,date :refs ,refs
@@ -333,12 +333,12 @@ work."
     (if (not (eq major-mode 'message-mode))
        ;; The message is already sent, so we're relying on whatever was
-       ;; stored into `gnorb-gnus-sending-message-info'.
+       ;; stored into `gnorb-gnus-message-info'.
        (if arg
              (push (car rel-headings) gnorb-message-org-ids)
-         (setq ref-ids (plist-get gnorb-gnus-sending-message-info :refs))
+         (setq ref-ids (plist-get gnorb-gnus-message-info :refs))
          (if ref-ids
              ;; the message might be relevant to some TODO
              ;; heading(s). But if there had been org-id
@@ -413,9 +413,9 @@ work."
 (defun gnorb-gnus-outgoing-make-todo-1 ()
   (unless gnorb-gnus-new-todo-capture-key
     (error "No capture template key set, customize 
-  (let* ((link (plist-get gnorb-gnus-sending-message-info :link))
-        (group (plist-get gnorb-gnus-sending-message-info :group))
-        (date (plist-get gnorb-gnus-sending-message-info :date))
+  (let* ((link (plist-get gnorb-gnus-message-info :link))
+        (group (plist-get gnorb-gnus-message-info :group))
+        (date (plist-get gnorb-gnus-message-info :date))
         (date-ts (and date
@@ -426,9 +426,9 @@ work."
                             (org-time-stamp-format t t)
                             (date-to-time date)))))
-        (msg-id (plist-get gnorb-gnus-sending-message-info :msg-id))
-        (sender (plist-get gnorb-gnus-sending-message-info :from))
-        (subject (plist-get gnorb-gnus-sending-message-info :subject))
+        (msg-id (plist-get gnorb-gnus-message-info :msg-id))
+        (sender (plist-get gnorb-gnus-message-info :from))
+        (subject (plist-get gnorb-gnus-message-info :subject))
         ;; Convince Org we already have a link stored, even if we
         ;; don't.
         (org-capture-link-is-already-stored t))
@@ -442,8 +442,8 @@ work."
         :date-timestamp-inactive date-ts-ia
         :annotation link)
-       :subject (plist-get gnorb-gnus-sending-message-info :subject)
-       :to (plist-get gnorb-gnus-sending-message-info :to)
+       :subject (plist-get gnorb-gnus-message-info :subject)
+       :to (plist-get gnorb-gnus-message-info :to)
        :date date
        :date-timestamp date-ts
        :date-timestamp-inactive date-ts-ia
@@ -489,7 +489,7 @@ to t (it is, by default)."
         (org-refile-targets gnorb-gnus-trigger-refile-targets)
         ;; otherwise `gnorb-trigger-todo-action' will think we
         ;; started from an outgoing message
-        (gnorb-gnus-sending-message-info nil)
+        (gnorb-gnus-message-info nil)
          (with-current-buffer gnus-original-article-buffer
diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index fedf61f..0967ccd 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -200,7 +200,7 @@ might have been in the outgoing message's headers and call
   (dolist (id gnorb-message-org-ids)
     (gnorb-trigger-todo-action nil id))
   ;; this is a little unnecessary, but it may save grief
-  (setq gnorb-gnus-sending-message-info nil)
+  (setq gnorb-gnus-message-info nil)
   (setq gnorb-message-org-ids nil))
 (defun gnorb-org-extract-mail-stuff (strategy &optional region)
diff --git a/lisp/gnorb-utils.el b/lisp/gnorb-utils.el
index 97817c2..b26ef23 100644
--- a/lisp/gnorb-utils.el
+++ b/lisp/gnorb-utils.el
@@ -139,14 +139,14 @@ the prefix arg."
          ret-dest-todo (org-entry-get
                         root-marker "TODO"))
-    (let ((sent-id (plist-get gnorb-gnus-sending-message-info :msg-id)))
+    (let ((sent-id (plist-get gnorb-gnus-message-info :msg-id)))
       (when sent-id
-        (plist-get gnorb-gnus-sending-message-info :from)
-        (plist-get gnorb-gnus-sending-message-info :subject)
+        (plist-get gnorb-gnus-message-info :from)
+        (plist-get gnorb-gnus-message-info :subject)
-        (plist-get gnorb-gnus-sending-message-info :group)))
+        (plist-get gnorb-gnus-message-info :group)))
       (setq action (cond ((not
                           (or (and ret-dest-todo
                                    (null gnorb-org-mail-todos))

reply via email to

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