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

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

[elpa] externals/denote 2aed386b84 006/355: Add denote-org-capture (WORK


From: ELPA Syncer
Subject: [elpa] externals/denote 2aed386b84 006/355: Add denote-org-capture (WORK-IN-PROGRESS)
Date: Sun, 26 Jun 2022 23:57:55 -0400 (EDT)

branch: externals/denote
commit 2aed386b844ba026603ac4a346fb07b11da4f09e
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Add denote-org-capture (WORK-IN-PROGRESS)
---
 denote.el | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/denote.el b/denote.el
index a4addc0a4b..0b86f509d5 100644
--- a/denote.el
+++ b/denote.el
@@ -284,8 +284,22 @@ alphabetically."
   (denote--prepare-note title keywords)
   (denote--keywords-add-to-history keywords))
 
-;; TODO 2022-06-04: Integrate with org-capture.  Is it possible without
-;; a lot of extra code?  How?
+(defun denote-org-capture ()
+  "Like `denote', but for integration with `org-capture'.
+WORK-IN-PROGRESS."
+  (interactive)
+  (let ((title (denote--title-prompt))
+        (keywords (denote--keywords-prompt)))
+    (denote--prepare-note title keywords)
+    (denote--keywords-add-to-history keywords)))
+
+;; Sample of an `org-capture-templates' entry:
+;;
+;; ("n" "Note" plain
+;;  (file ,(denote--directory))
+;;  (function denote-org-capture)
+;;  :no-save t
+;;  :immediate-finish t)
 
 ;; TODO 2022-06-04: `denote-rename-file'
 



reply via email to

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