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

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

[elpa] externals/denote 4651a880d6 10/32: Rename the function that retur


From: ELPA Syncer
Subject: [elpa] externals/denote 4651a880d6 10/32: Rename the function that returns an Org heading ID
Date: Sat, 20 Jan 2024 00:57:41 -0500 (EST)

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

    Rename the function that returns an Org heading ID
---
 denote.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/denote.el b/denote.el
index ea3e27fcd8..5cecff2ed2 100644
--- a/denote.el
+++ b/denote.el
@@ -4002,9 +4002,10 @@ interface by first selecting the `denote:' hyperlink 
type."
 (declare-function org-entry-get "org" (pom property &optional inherit 
literal-nil))
 (declare-function org-id-new "org-id" (&optional prefix))
 
-(defun denote--link-ol-id-get-create ()
-  "Create a CUSTOM_ID for current entry under POSITION and return it.
-If the entry already has a CUSTOM_ID, return it as-is."
+(defun denote-link-ol-get-id ()
+  "Get the CUSTOM_ID of the current entry.
+If the entry already has a CUSTOM_ID, return it as-is, else
+create a new one."
   (let* ((pos (point))
          (id (org-entry-get pos "CUSTOM_ID")))
     (if (and id (stringp id) (string-match-p "\\S-" id))
@@ -4024,8 +4025,8 @@ If the entry already has a CUSTOM_ID, return it as-is."
     (org-link-store-props
      :type "denote"
      :description file-title
-               (format "denote:%s::#%s" file-id 
(denote--link-ol-id-get-create))
      :link (if (and denote-link-to-org-headings (derived-mode-p 'org-mode))
+               (format "denote:%s::#%s" file-id (denote-link-ol-get-id))
              (concat "denote:" file-id)))
     org-store-link-plist))
 



reply via email to

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