[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org cb71bde7cb 3/5: lisp/org-macro.el (org-macro--get-p
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org cb71bde7cb 3/5: lisp/org-macro.el (org-macro--get-property): Ignore narrowing |
Date: |
Fri, 15 Dec 2023 09:58:27 -0500 (EST) |
branch: externals/org
commit cb71bde7cb04551bc60e61b7782692ce93f0a416
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
lisp/org-macro.el (org-macro--get-property): Ignore narrowing
It is implied that we ignore narrowing when searching for property
value. But `org-link-search' does not. Widen around its call.
---
lisp/org-macro.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index e694118fc9..f9707d0218 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -333,14 +333,14 @@ Return a list of arguments, as strings. This is the
opposite of
"Find PROPERTY's value at LOCATION.
PROPERTY is a string. LOCATION is a search string, as expected
by `org-link-search', or the empty string."
- (save-excursion
- (when (org-string-nw-p location)
- (condition-case _
- (let ((org-link-search-must-match-exact-headline t))
- (org-link-search location nil t))
- (error
- (error "Macro property failed: cannot find location %s" location))))
- (org-entry-get nil property 'selective)))
+ (org-with-wide-buffer
+ (when (org-string-nw-p location)
+ (condition-case _
+ (let ((org-link-search-must-match-exact-headline t))
+ (org-link-search location nil t))
+ (error
+ (error "Macro property failed: cannot find location %s" location))))
+ (org-entry-get nil property 'selective)))
(defun org-macro--find-keyword-value (name &optional collect)
"Find value for keyword NAME in current buffer.