emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote 848698c404 2/3: Refine the denote-org-extras-out


From: ELPA Syncer
Subject: [elpa] externals/denote 848698c404 2/3: Refine the denote-org-extras-outline-prompt
Date: Wed, 3 Jul 2024 06:58:56 -0400 (EDT)

branch: externals/denote
commit 848698c404b8e202d4c35ccdd0f7f05d76e095da
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Refine the denote-org-extras-outline-prompt
---
 denote-org-extras.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/denote-org-extras.el b/denote-org-extras.el
index 74f3dbacb9..0ffb2a3ea9 100644
--- a/denote-org-extras.el
+++ b/denote-org-extras.el
@@ -67,11 +67,12 @@
   "Prompt for outline among headings retrieved by 
`denote-org-extras--get-outline'.
 With optional FILE use the outline of it, otherwise use that of
 the current file."
-  (completing-read
-   (format "Select heading inside `%s': "
-           (propertize (file-name-nondirectory file) 'face 
'denote-faces-prompt-current-name))
-   (denote--completion-table-no-sort 'imenu (denote-org-extras--get-outline 
(or file buffer-file-name)))
-   nil :require-match))
+  (let ((current-file (or file buffer-file-name)))
+    (completing-read
+     (format "Select heading inside `%s': "
+             (propertize (file-name-nondirectory current-file) 'face 
'denote-faces-prompt-current-name))
+     (denote--completion-table-no-sort 'imenu (denote-org-extras--get-outline 
current-file))
+     nil :require-match)))
 
 (defun denote-org-extras--get-heading-and-id-from-line (line file)
   "Return heading text and CUSTOM_ID from the given LINE in FILE."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]