Add denote-org-capture (WORK-IN-PROGRESS)

This commit is contained in:
Protesilaos Stavrou 2022-06-04 08:55:16 +03:00
parent 3c06d7d119
commit 2aed386b84
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -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'