[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote b3443ca6ff 02/13: Add denote-file-prompt instead
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote b3443ca6ff 02/13: Add denote-file-prompt instead of private function |
Date: |
Wed, 14 Sep 2022 00:57:40 -0400 (EDT) |
branch: externals/denote
commit b3443ca6ffd0e499648e201bd56a26f4b4ec034a
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add denote-file-prompt instead of private function
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.
---
denote.el | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/denote.el b/denote.el
index bd1d8640f9..b998f34edc 100644
--- a/denote.el
+++ b/denote.el
@@ -533,6 +533,18 @@ include files that are not implied by `denote-file-types'."
'denote-directory-files-matching-regexp
"1.0.0")
+(defun denote-file-prompt ()
+ "Prompt for file with identifier in variable `denote-directory'."
+ (read-file-name "Select note: " (denote-directory) nil nil nil
+ (lambda (f)
+ (or (denote--file-has-identifier-p f)
+ (file-directory-p f)))))
+
+(define-obsolete-function-alias
+ 'denote--retrieve-read-file-prompt
+ 'denote-file-prompt
+ "1.0.0")
+
;;;; Keywords
(defun denote--extract-keywords-from-path (path)
@@ -946,13 +958,6 @@ contain the newline."
(denote-retrieve-title-value file type)
(denote-retrieve-filename-title file)))
-(defun denote--retrieve-read-file-prompt ()
- "Prompt for regular file in variable `denote-directory'."
- (read-file-name "Select note: " (denote-directory) nil nil nil
- (lambda (f)
- (or (denote--file-has-identifier-p f)
- (file-directory-p f)))))
-
(defun denote--retrieve-xrefs (identifier)
"Return xrefs of IDENTIFIER in variable `denote-directory'.
The xrefs are returned as an alist."
@@ -2049,7 +2054,7 @@ With optional ID-ONLY, such as a universal prefix
argument (\\[universal-argument]), insert links with just the
identifier and no further description. In this case, the link
format is always [[denote:IDENTIFIER]]."
- (interactive (list (denote--retrieve-read-file-prompt) current-prefix-arg))
+ (interactive (list (denote-file-prompt) current-prefix-arg))
(let ((beg (point)))
(insert
(denote-link--format-link
@@ -2144,7 +2149,7 @@ The established link will then be targeting that new file.
With optional ID-ONLY as a prefix argument create a link that
consists of just the identifier. Else try to also include the
file's title. This has the same meaning as in `denote-link'."
- (interactive (list (denote--retrieve-read-file-prompt) current-prefix-arg))
+ (interactive (list (denote-file-prompt) current-prefix-arg))
(if (file-exists-p target)
(denote-link target id-only)
(call-interactively #'denote-link-after-creating)))
@@ -2469,7 +2474,7 @@ This lets the user complete a link through the
`org-insert-link'
interface by first selecting the `denote:' hyperlink type."
(concat
"denote:"
- (denote-retrieve-filename-identifier (denote--retrieve-read-file-prompt))))
+ (denote-retrieve-filename-identifier (denote-file-prompt))))
(declare-function org-link-store-props "ol.el" (&rest plist))
(defvar org-store-link-plist)
- [elpa] externals/denote updated (c74eea19a9 -> 459294c84b), ELPA Syncer, 2022/09/14
- [elpa] externals/denote b3443ca6ff 02/13: Add denote-file-prompt instead of private function,
ELPA Syncer <=
- [elpa] externals/denote 582b50ab13 03/13: Make denote-title-prompt public, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 505dae7f4f 05/13: Make denote-date-prompt public, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 7ce102b206 06/13: Make denote-subdirs-prompt public, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 1e14370c6f 07/13: Make denote-template-prompt public, ELPA Syncer, 2022/09/14
- [elpa] externals/denote e938e65950 01/13: Make denote-keywords-prompt public, ELPA Syncer, 2022/09/14
- [elpa] externals/denote c197c7167d 04/13: Make denote-file-type-prompt public, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 9cec3a16d4 10/13: Refine doc string of denote-date-prompt, ELPA Syncer, 2022/09/14
- [elpa] externals/denote fa01663063 11/13: Refine doc string of denote-template-prompt, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 459294c84b 13/13: Refine doc string of denote-directory-files, ELPA Syncer, 2022/09/14
- [elpa] externals/denote 4e4d8cf50e 08/13: Rename denote-subdirs-prompt to denote-subdirectory-prompt, ELPA Syncer, 2022/09/14