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

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

[elpa] externals/gnorb 9e95e90 387/449: Gnorb: New option gnorb-gnus-tic


From: Stefan Monnier
Subject: [elpa] externals/gnorb 9e95e90 387/449: Gnorb: New option gnorb-gnus-tick-all-tracked-messages
Date: Fri, 27 Nov 2020 23:16:17 -0500 (EST)

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

    Gnorb: New option gnorb-gnus-tick-all-tracked-messages
    
    Fixes #34
    
    * packages/gnorb/gnorb-gnus.el (gnorb-gnus-tick-all-tracked-messages):
      New option, does what it says.
    * packages/gnorb/gnorb-gnus.el (gnorb-gnus-incoming-do-todo): Maybe
      tick messages here.
      (gnorb-gnus-quick-reply): And here.
    * packages/gnorb/gnorb.info: Document.
---
 gnorb-gnus.el | 28 ++++++++++++++++++++--------
 gnorb.info    | 10 +++++++---
 gnorb.org     |  3 +++
 gnorb.texi    |  4 ++++
 4 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/gnorb-gnus.el b/gnorb-gnus.el
index 0c21b58..abf0739 100644
--- a/gnorb-gnus.el
+++ b/gnorb-gnus.el
@@ -110,6 +110,13 @@ register."
   :group 'gnorb-gnus
   :type 'boolean)
 
+(defcustom gnorb-gnus-tick-all-tracked-messages nil
+  "When non-nil, add the tick mark to all tracked messages.
+This happens only once, at the time the association is created.
+Ticks can be safely removed later."
+  :group 'gnorb-gnus
+  :type 'boolean)
+
 (defcustom gnorb-gnus-summary-mark-format-letter "g"
   "Format letter to be used as part of your
   `gnus-summary-line-format', to indicate in the *Summary* buffer
@@ -528,14 +535,14 @@ work."
 
 ;;;###autoload
 (defun gnorb-gnus-incoming-do-todo (arg &optional id)
-  "Call this function from a received gnus message to store a
-link to the message, prompt for a related Org heading, visit the
-heading, and trigger an action on it \(see
-`gnorb-org-trigger-actions'\).
-
-If you've set up message tracking \(with
-`gnorb-tracking-initialize'\), Gnorb can guess which Org heading
-you probably want to trigger, which can save some time. It does
+  "Use the message under point to trigger an action on an Org heading.
+This function stores a link to the message, prompts for a related
+Org heading, visits the heading, and triggers an action on
+it (see `gnorb-org-trigger-actions').
+
+If you've set up message tracking (with
+`gnorb-tracking-initialize'), Gnorb can guess which Org heading
+you probably want to trigger, which can save some time.  It does
 this by looking in the References header, and seeing if any of
 the messages referenced there are already being tracked by any
 headings.
@@ -646,6 +653,8 @@ you'll stay in the Gnus summary buffer."
                (message "Message text copied to kill ring"))))
          (with-current-buffer buf
            (dolist (a articles)
+             (when gnorb-gnus-tick-all-tracked-messages
+               (gnus-summary-mark-article a gnus-ticked-mark))
              (gnus-summary-update-article a))))
       (error
        ;; If these are left populated after an error, it plays hell
@@ -686,6 +695,9 @@ reply."
        (let ((ret (make-marker)))
          (setq gnorb-window-conf (current-window-configuration))
          (move-marker gnorb-return-marker (point))
+         (when gnorb-gnus-tick-all-tracked-messages
+           (gnus-summary-mark-article art-no gnus-ticked-mark))
+         (gnus-summary-update-article art-no)
          ;; Assume the first heading is the one we want.
          (gnorb-registry-make-entry
           msg-id from subject targ group)
diff --git a/gnorb.info b/gnorb.info
index c1a54f3..0d848db 100644
--- a/gnorb.info
+++ b/gnorb.info
@@ -663,6 +663,10 @@ File: gnorb.info,  Node: User Options 2,  Up: Misc Gnus
      Treat all capture templates as if they had the :gnus-attachments
      key set to “t”.  This only has any effect if you’re capturing from
      a Gnus summary or article buffer.
+‘gnorb-gnus-tick-all-tracked-messages’
+     When non-nil, always add the tick mark to messages when they are
+     first associated with an Org heading.  The mark can be safely
+     deleted afterwards.
 ‘gnorb-trigger-todo-default’
      Set to either ’note or ’todo to tell ‘gnorb-gnus-incoming-do-todo’
      what to do by default.  You can reach the non-default behavior by
@@ -775,9 +779,9 @@ Node: User Options22106
 Node: Misc Org23629
 Node: Inserting BBDB links23804
 Node: User Options 124060
-Node: Misc Gnus26958
-Node: User Options 227120
-Node: Default Keybindings30057
+Node: Misc Gnus26774
+Node: User Options 226936
+Node: Default Keybindings30078
 
 End Tag Table
 
diff --git a/gnorb.org b/gnorb.org
index b3f71fd..1d77eae 100644
--- a/gnorb.org
+++ b/gnorb.org
@@ -464,6 +464,9 @@ insert an Org link to that record at point.
      if they had the :gnus-attachments key set to "t". This only has
      any effect if you're capturing from a Gnus summary or article
      buffer.
+- `gnorb-gnus-tick-all-tracked-messages' :: When non-nil, always add
+     the tick mark to messages when they are first associated with an
+     Org heading. The mark can be safely deleted afterwards.
 - `gnorb-trigger-todo-default' :: Set to either 'note or 'todo to tell
      `gnorb-gnus-incoming-do-todo' what to do by default. You can
      reach the non-default behavior by calling that function with a
diff --git a/gnorb.texi b/gnorb.texi
index a4b3f09..6c6485c 100644
--- a/gnorb.texi
+++ b/gnorb.texi
@@ -653,6 +653,10 @@ Treat all capture templates as
 if they had the :gnus-attachments key set to ``t''. This only has
 any effect if you're capturing from a Gnus summary or article
 buffer.
+@item `gnorb-gnus-tick-all-tracked-messages'
+When non-nil, always add
+the tick mark to messages when they are first associated with an
+Org heading. The mark can be safely deleted afterwards.
 @item `gnorb-trigger-todo-default'
 Set to either 'note or 'todo to tell
 `gnorb-gnus-incoming-do-todo' what to do by default. You can



reply via email to

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