[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 562c189614: Make denote-org-extras--get-file-id-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 562c189614: Make denote-org-extras--get-file-id-and-heading-id FILE parameter optional |
Date: |
Wed, 28 Aug 2024 12:57:54 -0400 (EDT) |
branch: externals/denote
commit 562c189614d0549c2c21fc40c909bfe144d10067
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Make denote-org-extras--get-file-id-and-heading-id FILE parameter optional
---
denote-org-extras.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/denote-org-extras.el b/denote-org-extras.el
index cc4cf5b1dd..14386f0419 100644
--- a/denote-org-extras.el
+++ b/denote-org-extras.el
@@ -130,10 +130,11 @@ Also see `denote-org-extras-backlinks-for-heading'."
;;;; Heading backlinks
-(defun denote-org-extras--get-file-id-and-heading-id (file)
- "Return IDENTIFIER::#ORG-HEADING-CUSTOM-ID string for FILE heading at point."
+(defun denote-org-extras--get-file-id-and-heading-id (&optional file)
+ "Return IDENTIFIER::#ORG-HEADING-CUSTOM-ID string for FILE heading at point.
+If FILE is nil, use the variable `buffer-file-name'."
(if-let ((heading-id (org-entry-get (point) "CUSTOM_ID")))
- (concat (denote-retrieve-filename-identifier-with-error file) "::#"
heading-id)
+ (concat (denote-retrieve-filename-identifier-with-error (or file
buffer-file-name)) "::#" heading-id)
(error "No CUSTOM_ID for heading at point in file `%s'" file)))
(defun denote-org-extras--get-backlinks-buffer-name (text)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/denote 562c189614: Make denote-org-extras--get-file-id-and-heading-id FILE parameter optional,
ELPA Syncer <=