[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb 471883d 394/449: Gnorb: Only add one registry-rel
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb 471883d 394/449: Gnorb: Only add one registry-related hook to the Org capture process |
Date: |
Fri, 27 Nov 2020 23:16:18 -0500 (EST) |
branch: externals/gnorb
commit 471883d1ca4d3ec463efe2ca8e155ad073d901f6
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Gnorb: Only add one registry-related hook to the Org capture process
* packages/gnorb/gnorb-utils.el (gnorb-tracking-initialize): Delete
`gnorb-registry-capture-abort-cleanup'. Instead of creating the
association when the capture process begins, and then deleting the
association if the capture is aborted, simply don't create the
association unless we know that the capture process isn't aborted.
---
gnorb-registry.el | 16 ----------------
gnorb-utils.el | 3 +--
2 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/gnorb-registry.el b/gnorb-registry.el
index 91910aa..375a5b5 100644
--- a/gnorb-registry.el
+++ b/gnorb-registry.el
@@ -92,22 +92,6 @@ to the message's registry entry, under the 'gnorb-ids key."
(plist-put org-capture-plist :gnorb-id org-id)
(gnorb-registry-make-entry msg-id nil nil org-id nil))))
-
-(defun gnorb-registry-capture-abort-cleanup ()
- (when (and (org-capture-get :gnorb-id)
- org-note-abort)
- (with-no-warnings ; For `abort-note'
- (condition-case nil
- (let* ((msg-id (format "<%s>" (plist-get org-store-link-plist
:message-id)))
- (existing-org-ids (gnus-registry-get-id-key msg-id 'gnorb-ids))
- (org-id (org-capture-get :gnorb-id)))
- (when (member org-id existing-org-ids)
- (gnus-registry-set-id-key msg-id 'gnorb-ids
- (remove org-id existing-org-ids)))
- (setq abort-note 'clean))
- (error
- (setq abort-note 'dirty))))))
-
(defun gnorb-find-visit-candidates (ids &optional include-zombies)
"For all message-ids in IDS (which should be a list of
Message-ID strings, with angle brackets, or a single string of
diff --git a/gnorb-utils.el b/gnorb-utils.el
index 8810a18..050c3e3 100644
--- a/gnorb-utils.el
+++ b/gnorb-utils.el
@@ -617,8 +617,7 @@ registry be in use, and should be called after the call to
(require 'gnorb-gnus)
(unless (gnus-registry-install-p)
(user-error "Gnorb tracking requires that the Gnus registry be
installed."))
- (add-hook 'org-capture-mode-hook 'gnorb-registry-capture)
- (add-hook 'org-capture-prepare-finalize-hook
'gnorb-registry-capture-abort-cleanup)
+ (add-hook 'org-capture-prepare-finalize-hook #''gnorb-registry-capture)
(setq gnorb-tracking-enabled t))))
;;;###autoload
- [elpa] externals/gnorb 982aee9 271/449: Adjust requires and autoloads, (continued)
- [elpa] externals/gnorb 982aee9 271/449: Adjust requires and autoloads, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a55b0c0 273/449: Make gnorb-ids precious earlier in registry setup, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 3877b2d 275/449: Still didn't have incoming-do-todo logic right, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 94f6897 279/449: Don't use with-eval-after-load, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 3801ad7 280/449: Check both gnus version and emacs version., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8c333ee 281/449: Merge pull request #20 from totherme/master, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8e705ea3 380/449: Sneakily add basic EBDB support to Gnorb, bump to 1.3.0, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 4b5a5a1 389/449: Gnorb: Tweak manual a bit, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5672545 396/449: Gnorb: Typo, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 14ac82a 418/449: [gnorb] Use unwind-protect around the trigger process, bump to 1.5.4, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 471883d 394/449: Gnorb: Only add one registry-related hook to the Org capture process,
Stefan Monnier <=
- [elpa] externals/gnorb babfa5c 393/449: Fix to after capture function, bump to 1.3.4, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a6916b6 402/449: Allow gnorb-msg-id-request-head to accept a "group" argument, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a1c8f0e 417/449: [gnorb] Small gnorb-org bugs, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 034f10a 434/449: [gnorb] Use characterp, not numberp, for testing register key, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e1dae56 430/449: [gnorb] Only output summary-line info if registry exists, bump, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c3279d2 284/449: Fix tracking messages from virtual groups, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 41c6778 286/449: nngnorb should be a virtual server, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 6e6ee46 285/449: Zap another with-eval-after-load, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 09679fa 287/449: Misspelled function name, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb f585c03 290/449: condition-case the incoming trigger process, Stefan Monnier, 2020/11/27