[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb 1024a81 037/449: New gnorb-org-capture-collect-li
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb 1024a81 037/449: New gnorb-org-capture-collect-link-p option |
Date: |
Fri, 27 Nov 2020 23:15:03 -0500 (EST) |
branch: externals/gnorb
commit 1024a81fc49010cda68cb3f9b0c0fc24f8896ef7
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
New gnorb-org-capture-collect-link-p option
gnorb-org.el: Set to t to make the capture process always store a link
to the Gnus message or BBDB record under point.
---
README.org | 6 ++++++
lisp/gnorb-org.el | 18 ++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/README.org b/README.org
index f248abf..ca4e7ee 100644
--- a/README.org
+++ b/README.org
@@ -96,6 +96,12 @@ happen to want to email that content to someone.
I need to think about merging these functions, or else making them
more distinct.
+*** User Options
+**** gnorb-org-capture-collect-link-p
+When this is set to t, the capture process will always store a link to
+the Gnus message or BBDB record under point, even when the link isn't
+part of the capture template. It can then be added to the captured
+heading with org-insert-link, as usual.
*** Suggested Keybindings
#+BEGIN_SRC emacs-lisp
(eval-after-load "gnorb-org"
diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index df9825c..1ea2e04 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -243,5 +243,23 @@ default set of parameters."
attachments
'("file" "files" "attach"))))
+(defcustom gnorb-org-capture-collect-link-p t
+ "Should the capture process store a link to the gnus message or
+ BBDB record under point, even if it's not part of the
+ template?"
+ :group 'gnorb-org)
+
+(defun gnorb-org-capture-collect-link ()
+ (when gnorb-org-capture-collect-link-p
+ (let ((buf (org-capture-get :original-buffer)))
+ (when buf
+ (with-current-buffer buf
+ (when (memq major-mode '(gnus-summary-mode
+ gnus-article-mode
+ bbdb-mode))
+ (call-interactively 'org-store-link)))))))
+
+(add-hook 'org-capture-mode-hook 'gnorb-org-capture-collect-link)
+
(provide 'gnorb-org)
;;; gnorb-org.el ends here
- [elpa] externals/gnorb e183272 055/449: Think about merging mail commands, (continued)
- [elpa] externals/gnorb e183272 055/449: Think about merging mail commands, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a680c42 058/449: Moving the mail header stuff to a different file, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8519593 060/449: Rework Org BBDB popups, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 97c0d41 045/449: Place point somewhere useful after setting up message, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c9e4dfb 056/449: Limit to TODOs only in BBDB tag searches, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 210851e 065/449: That's not broken anymore., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 72a98bd 020/449: README.org: Document new capture attachment thingy., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e2617e0 030/449: gnorb-org.el: That's not how return-actions look, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c5e3459 033/449: README.org: Fixed keybinding for mime map, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 0e75c71 035/449: Note future mail-search-from-agenda function, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 1024a81 037/449: New gnorb-org-capture-collect-link-p option,
Stefan Monnier <=
- [elpa] externals/gnorb ee8b595 036/449: Merge gnorb-org-handle-mail functions, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5b9e163 047/449: Allow attaching in all captures., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 3a95a07 049/449: First go at `gnorb-org-agenda-popup-bbdb', Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb cf975f5 048/449: Refactor gnorb-org mail-related stuff., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb ac3a4d2 050/449: Change README.org wording, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 78f625b 052/449: Documentation and whitespace changes, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb ac392c0 053/449: Leave point in body of message replies, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e05fafe 054/449: `gnorb-org-popup-agenda-popup-bbdb' keybinding, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 32a88b8 061/449: Wishlist item for outgoing messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5ba5ce4 062/449: Rework gnorb-org-restore-after-send, Stefan Monnier, 2020/11/27