[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote bde60acd80 04/12: Make denote-get-path-by-id pub
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote bde60acd80 04/12: Make denote-get-path-by-id public |
Date: |
Wed, 14 Sep 2022 05:57:39 -0400 (EDT) |
branch: externals/denote
commit bde60acd802ae4e46cb69d03aa69d4f4f2df013e
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Make denote-get-path-by-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 | 15 ++++++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index 82f1d054e6..5b1de85e62 100644
--- a/README.org
+++ b/README.org
@@ -2045,6 +2045,9 @@ might change them without further notice.
=FILE= relative to the variable ~denote-directory~. =FILE= must be an
absolute path.
++ ~denote-get-path-by-id~ :: Return absolute path of =ID= string in
+ ~denote-directory-files~.
+
+ ~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 79e08719af..6898867820 100644
--- a/denote.el
+++ b/denote.el
@@ -569,13 +569,18 @@ value, as explained in its doc string."
'denote-directory-files
"1.0.0")
-(defun denote--get-note-path-by-id (id)
- "Return the absolute path of ID note in variable `denote-directory'."
+(defun denote-get-path-by-id (id)
+ "Return absolute path of ID string in `denote-directory-files'."
(seq-find
(lambda (f)
(string-prefix-p id (file-name-nondirectory f)))
(denote-directory-files)))
+(define-obsolete-function-alias
+ 'denote--get-note-path-by-id
+ 'denote-get-path-by-id
+ "1.0.0")
+
(defun denote-directory-files-matching-regexp (regexp)
"Return list of files matching REGEXP in `denote-directory-files'."
(seq-filter
@@ -2218,7 +2223,7 @@ format is always [[denote:IDENTIFIER]]."
(if-let* ((regexp (denote-link--file-type-regexp (buffer-file-name)))
(files (denote-link--expand-identifiers regexp)))
(find-file ; TODO 2022-09-05: Revise for possible refinement
- (denote--get-note-path-by-id
+ (denote-get-path-by-id
(denote-link--id-from-string
(denote-link--find-file-prompt files))))
(user-error "No links found in the current buffer")))
@@ -2319,7 +2324,7 @@ file's title. This has the same meaning as in
`denote-link'."
(buffer-substring-no-properties
(button-start button)
(button-end button))))
- (file (denote--get-note-path-by-id id)))
+ (file (denote-get-path-by-id id)))
(funcall denote-link-button-action file)))
;;;###autoload
@@ -2554,7 +2559,7 @@ and the identifier."
(id (if (and (stringp search) (not (string-empty-p search)))
(substring link 0 (match-beginning 0))
link))
- (path (denote--get-note-path-by-id id)))
+ (path (denote-get-path-by-id id)))
(cond
(path-id
(cons (format "%s" path) (format "%s" id)))
- [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, 2022/09/14
- [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 <=
- [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