[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb 15a38e9 423/449: gnorb: More guards for visiting
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb 15a38e9 423/449: gnorb: More guards for visiting an original Org capture buffer |
Date: |
Fri, 27 Nov 2020 23:16:25 -0500 (EST) |
branch: externals/gnorb
commit 15a38e9253a1df9d238b4f11fefd0bfb15eb90ca
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
gnorb: More guards for visiting an original Org capture buffer
* packages/gnorb/gnorb-registry.el (gnorb-registry-capture): Chances
are good the buffer is no longer live.
---
gnorb-registry.el | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/gnorb-registry.el b/gnorb-registry.el
index f50890c..e626009 100644
--- a/gnorb-registry.el
+++ b/gnorb-registry.el
@@ -80,17 +80,19 @@ sent. Save the relevant Org ids in the 'gnorb-ids key."
(defun gnorb-registry-capture ()
"When capturing from a Gnus message, add our new Org heading id
-to the message's registry entry, under the 'gnorb-ids key."
- (when (and (with-current-buffer
- (org-capture-get :original-buffer)
- (memq major-mode '(gnus-summary-mode gnus-article-mode)))
- (not org-note-abort))
- (let* ((msg-id
- (gnorb-bracket-message-id
- (plist-get org-store-link-plist :message-id)))
- (org-id (org-id-get-create)))
- (plist-put org-capture-plist :gnorb-id org-id)
- (gnorb-registry-make-entry msg-id nil nil org-id nil))))
+to the message's registry entry, under the `gnorb-ids' key."
+ (let ((orig-buff (org-capture-get :original-buffer)))
+ (when (and (buffer-live-p orig-buff)
+ (with-current-buffer
+ orig-buff
+ (memq major-mode '(gnus-summary-mode gnus-article-mode)))
+ (not org-note-abort))
+ (let* ((msg-id
+ (gnorb-bracket-message-id
+ (plist-get org-store-link-plist :message-id)))
+ (org-id (org-id-get-create)))
+ (plist-put org-capture-plist :gnorb-id org-id)
+ (gnorb-registry-make-entry msg-id nil nil org-id nil)))))
(defun gnorb-find-visit-candidates (ids &optional include-zombies)
"For all message-ids in IDS (which should be a list of
- [elpa] externals/gnorb 8c2fb15 329/449: nngnorb.el: Handle non-existent nnir-tmp-buffer, (continued)
- [elpa] externals/gnorb 8c2fb15 329/449: nngnorb.el: Handle non-existent nnir-tmp-buffer, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 9da022f 366/449: Fix creation of nngnorb/nnir groups, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 632b03d 367/449: Add gnorb-version command, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 7908f75 371/449: Update Gnus summary article line after trigger process, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e865a8b 381/449: Odd bug in gnorb-org-handle-mail, bump to 1.3.1, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb af3521f 385/449: When responding, let a blank sender pass, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5d59ba6 392/449: Gnorb: Bump version to 1.3.3, tiny manual fix, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 40fe377 391/449: Gnorb: Try harder to find the nngnorb server, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 30a6171 404/449: Factor out function for finding nngnorb server, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb ccf7847 443/449: [gnorb] Check for live Gnus before searching messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 15a38e9 423/449: gnorb: More guards for visiting an original Org capture buffer,
Stefan Monnier <=
- [elpa] externals/gnorb 5261d2f7 407/449: New gnorb-helm file, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5fbc25e 395/449: Gnorb: Re-work the capture hook functions., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 1f71a97 408/449: Update copyright notices, bump to version 1.5, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 0b503b4 436/449: [gnorb] Update copyright years, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 03ba6e5 412/449: [gnorb] Don't use make-temp-name for registry searches, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5bac9a7 428/449: [gnorb] Compiler-complaint fixes, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 0856e48 446/449: [gnorb] Add code path for users with nnselect available, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8623bd0 439/449: [gnorb] Further avoid creating registry entries, bump to 1.6.7, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb bd97393 420/449: gnorb: Fix bug in post-message-send action triggering, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 71cf0ef 403/449: Allow short-circuiting the nnir search, Stefan Monnier, 2020/11/27