[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote f39b517428 08/12: Make denote-barf-duplicate-id
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote f39b517428 08/12: Make denote-barf-duplicate-id public |
Date: |
Wed, 14 Sep 2022 05:57:40 -0400 (EDT) |
branch: externals/denote
commit f39b51742844287f5575d3617ab777695390e5ef
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Make denote-barf-duplicate-id public
We are working towards version 1.0.0. The idea is to provide functions
that users/developers can rely on. By making them public (removing the
double hyphens) we signify that those forms are (i) in a stable
state, and (ii) any change to them will be handled with care and
documented accordingly.
---
README.org | 3 +++
denote.el | 13 +++++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index 1c732bf54c..780d8c3926 100644
--- a/README.org
+++ b/README.org
@@ -2048,6 +2048,9 @@ might change them without further notice.
+ ~denote-get-path-by-id~ :: Return absolute path of =ID= string in
~denote-directory-files~.
++ ~denote-barf-duplicate-id~ :: Throw a ~user-error~ if =IDENTIFIER=
+ already exists.
+
+ ~denote-sluggify~ :: Make =STR= an appropriate slug for file names and
related ([[#h:ae8b19a1-7f67-4258-96b3-370a72c43f4e][Sluggified title and
keywords]]).
diff --git a/denote.el b/denote.el
index b830c40467..88fd20110e 100644
--- a/denote.el
+++ b/denote.el
@@ -1202,7 +1202,7 @@ where the former does not read dates without a time
component."
;; In normal usage, this should only be relevant for `denote-date',
;; otherwise the identifier is always unique (we trust that no-one
;; writes multiple notes within fractions of a second). Though the
-;; `denote' command does call `denote--barf-duplicate-id'.
+;; `denote' command does call `denote-barf-duplicate-id'.
(defun denote--id-exists-p (identifier)
"Return non-nil if IDENTIFIER already exists."
(seq-some (lambda (file)
@@ -1210,11 +1210,16 @@ where the former does not read dates without a time
component."
(append (denote-directory-files)
(denote--buffer-file-names))))
-(defun denote--barf-duplicate-id (identifier)
- "Throw a user-error if IDENTIFIER already exists."
+(defun denote-barf-duplicate-id (identifier)
+ "Throw a `user-error' if IDENTIFIER already exists."
(when (denote--id-exists-p identifier)
(user-error "`%s' already exists; aborting new note creation" identifier)))
+(define-obsolete-function-alias
+ 'denote--barf-duplicate-id
+ 'denote-barf-duplicate-id
+ "1.0.0")
+
(defun denote--subdirs ()
"Return list of subdirectories in variable `denote-directory'."
(seq-remove
@@ -1282,7 +1287,7 @@ When called from Lisp, all arguments are optional.
(template (if (stringp template)
template
(or (alist-get template denote-templates) ""))))
- (denote--barf-duplicate-id id)
+ (denote-barf-duplicate-id id)
(denote--prepare-note title keywords date id directory file-type template)
(denote--keywords-add-to-history keywords)))
- [elpa] externals/denote updated (fb92d22a57 -> 7218f6be4e), ELPA Syncer, 2022/09/14
- [elpa] externals/denote 76d8c2eba6 02/12: Add TODO for denote--current-file-is-note-p, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 7f475adff8 09/12: Tweak denote-directory-files doc string, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 382d890e85 01/12: Fix typo in doc string, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 6395e69a76 06/12: Tweak spacing in some doc strings, ELPA Syncer, 2022/09/14
- [elpa] externals/denote f39b517428 08/12: Make denote-barf-duplicate-id public,
ELPA Syncer <=
- [elpa] externals/denote 7c701890c4 11/12: Document API of denote-keywords, denote-directory, ELPA Syncer, 2022/09/14
- [elpa] externals/denote a02f768b63 03/12: BREAKING: Rename to denote-get-file-name-relative-to-denote-directory, ELPA Syncer, 2022/09/14
- [elpa] externals/denote bde60acd80 04/12: Make denote-get-path-by-id public, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 03902ba812 05/12: Clarify doc strings of Markdown front matter vars, ELPA Syncer, 2022/09/14
- [elpa] externals/denote d13bb705ff 10/12: Make denote-directory-subdirectories public, ELPA Syncer, 2022/09/14
- [elpa] externals/denote c1c06e8897 07/12: Include functions of denote-file-types in the API, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 7218f6be4e 12/12: Annotate for indices all API forms, ELPA Syncer, 2022/09/14