[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 9f4a99243c 035/355: Change how org-capture hook
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 9f4a99243c 035/355: Change how org-capture hook is added |
Date: |
Sun, 26 Jun 2022 23:57:57 -0400 (EDT) |
branch: externals/denote
commit 9f4a99243c784c8f5779c54a015df283abc0de83
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Change how org-capture hook is added
---
denote-org-capture.el | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/denote-org-capture.el b/denote-org-capture.el
index 17e5780dbc..2de9137636 100644
--- a/denote-org-capture.el
+++ b/denote-org-capture.el
@@ -59,10 +59,6 @@ sample template. We will eventually have a manual."
(denote--path title keywords)
(denote--prepare-note denote-last-title denote-last-keywords
denote-last-path)
(denote--keywords-add-to-history denote-last-keywords)
- ;; TODO 2022-06-05: Is there a better way to set up this hook?
- ;; Alternatively, can we prevent the creation of a file when the
- ;; capture is aborted?
- (add-hook 'org-capture-after-finalize-hook
#'denote-org-capture-delete-empty-file)
(concat denote-last-front-matter denote-org-capture-specifiers)))
(defun denote-org-capture-delete-empty-file ()
@@ -71,6 +67,8 @@ sample template. We will eventually have a manual."
((denote--file-empty-p file)))
(delete-file denote-last-path)))
+(add-hook 'org-capture-after-finalize-hook
#'denote-org-capture-delete-empty-file)
+
;; Samples of an `org-capture-templates' entry:
;;
;; (setq org-capture-templates
- [elpa] externals/denote 0aab5bc835 012/355: Tweak code for the sake of org-capture, (continued)
- [elpa] externals/denote 0aab5bc835 012/355: Tweak code for the sake of org-capture, ELPA Syncer, 2022/06/26
- [elpa] externals/denote d90ea28d00 013/355: Update one-line description, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 0dd4700e32 014/355: Fix typo, ELPA Syncer, 2022/06/26
- [elpa] externals/denote c3674ff813 023/355: Fix typo, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 3790125482 027/355: Remove to-do, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 5744240289 036/355: Remove needless to-do, ELPA Syncer, 2022/06/26
- [elpa] externals/denote aaa691aa15 020/355: Refine front-matter, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 153827f6c8 021/355: Add denote-link, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 21104787f7 024/355: Put link functionality in denote-link.el, ELPA Syncer, 2022/06/26
- [elpa] externals/denote b951a62245 025/355: Put capture code in denote-org-capture.el, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 9f4a99243c 035/355: Change how org-capture hook is added,
ELPA Syncer <=
- [elpa] externals/denote fa6a3315dc 047/355: Add correct group for org capture specifiers, ELPA Syncer, 2022/06/26
- [elpa] externals/denote f33f8a7040 053/355: Rewrite README as a manual, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 251b35d8f5 003/355: Add GPL, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 2aed386b84 006/355: Add denote-org-capture (WORK-IN-PROGRESS), ELPA Syncer, 2022/06/26
- [elpa] externals/denote 0e2cc10fe6 009/355: Improve integration with org-capture-templates, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 1079beb858 017/355: Add todo about file deletion post org-capture, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 27642bee14 026/355: Clarify 'denote' doc string, ELPA Syncer, 2022/06/26
- [elpa] externals/denote ec3847607b 028/355: Remove to-do about file name format, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 7fe66f43d4 030/355: Remove needless outline and empty line, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 550428cabf 037/355: Add sample org-capture-templates to Commentary, ELPA Syncer, 2022/06/26