[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 1b2d4319bd 4/7: Refactor denote command to prepa
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 1b2d4319bd 4/7: Refactor denote command to prepare all arguments for denote--prepare-note |
Date: |
Thu, 11 Aug 2022 02:57:33 -0400 (EDT) |
branch: externals/denote
commit 1b2d4319bd5ee0753f907c2c7a780c4abf285c1c
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Refactor denote command to prepare all arguments for denote--prepare-note
---
denote.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/denote.el b/denote.el
index 611caa39be..2e9e690133 100644
--- a/denote.el
+++ b/denote.el
@@ -835,7 +835,7 @@ and TEMPLATE should be valid for note creation."
file-type)))
(with-current-buffer buffer
(insert header)
- (when template (insert template)))))
+ (insert template))))
(defun denote--dir-in-denote-directory-p (directory)
"Return DIRECTORY if in variable `denote-directory', else nil."
@@ -950,7 +950,8 @@ When called from Lisp, all arguments are optional.
('date (aset args 4 (denote--date-prompt)))
('template (aset args 5 (denote--template-prompt)))))
(append args nil)))
- (let* ((file-type (denote--file-type-symbol (or file-type denote-file-type)))
+ (let* ((title (or title ""))
+ (file-type (denote--file-type-symbol (or file-type denote-file-type)))
(date (if (or (null date) (string-empty-p date))
(current-time)
(denote--valid-date date)))
@@ -958,9 +959,11 @@ When called from Lisp, all arguments are optional.
(directory (if (denote--dir-in-denote-directory-p subdirectory)
(file-name-as-directory subdirectory)
(denote-directory)))
- (template (if (stringp template) template (alist-get template
denote-templates))))
+ (template (if (stringp template)
+ template
+ (or (alist-get template denote-templates) ""))))
(denote--barf-duplicate-id id)
- (denote--prepare-note (or title "") keywords date id directory file-type
template)
+ (denote--prepare-note title keywords date id directory file-type template)
(denote--keywords-add-to-history keywords)))
(defvar denote--title-history nil
- [elpa] externals/denote updated (465a093893 -> 4bb79fe89f), ELPA Syncer, 2022/08/11
- [elpa] externals/denote 8256c85df9 5/7: Rename denote--file-type-symbol to denote--valid-file-type, ELPA Syncer, 2022/08/11
- [elpa] externals/denote 73ba47e832 1/7: Add comments for denote--only-note-p, ELPA Syncer, 2022/08/11
- [elpa] externals/denote 1b2d4319bd 4/7: Refactor denote command to prepare all arguments for denote--prepare-note,
ELPA Syncer <=
- [elpa] externals/denote 3748ac5f6d 6/7: Simplify denote--format-file, ELPA Syncer, 2022/08/11
- [elpa] externals/denote 1bdd0eb5e7 3/7: Fix argument in denote--writable-and-supported-p, ELPA Syncer, 2022/08/11
- [elpa] externals/denote 4bb79fe89f 7/7: Remove fallback value in denote--file-extension, ELPA Syncer, 2022/08/11
- [elpa] externals/denote 64c5b74dbd 2/7: Relax conditionality in denote--retrieve-search, ELPA Syncer, 2022/08/11