branch: externals/denote commit 9549d977d5173243f5f25ccdf5051c9aa9d613ad Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make optional the parameters of denote-generate-identifier-as-{date,number} The original code was contributed by Jean-Philippe Gagné Guay in pull request 613: <https://github.com/protesilaos/denote/pull/613>. --- denote.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/denote.el b/denote.el index 9e52c2ec1e..c3c8d3d7fc 100644 --- a/denote.el +++ b/denote.el @@ -2860,7 +2860,7 @@ available id is found." (time-add (date-to-time current-id) 1)))) current-id)) -(defun denote-generate-identifier-as-date (initial-identifier date) +(defun denote-generate-identifier-as-date (&optional initial-identifier date) "Generate an identifier based on DATE. If INITIAL-IDENTIFIER is not already used, return it. Else, if it is @@ -2894,7 +2894,7 @@ If ID is already used, increment it until an available id is found." (setq current-id (number-to-string (1+ (string-to-number current-id))))) current-id)) -(defun denote-generate-identifier-as-number (initial-identifier _date) +(defun denote-generate-identifier-as-number (&optional initial-identifier _date) "Generate an increasing number identifier. If INITIAL-IDENTIFIER is not already used, return it. Else, if it is