diff options
| author | Ihor Radchenko <yantar92@posteo.net> | 2023-12-15 13:52:07 +0100 |
|---|---|---|
| committer | Ihor Radchenko <yantar92@posteo.net> | 2023-12-15 13:52:07 +0100 |
| commit | cb71bde7cb04551bc60e61b7782692ce93f0a416 (patch) | |
| tree | 036cc6524df9155bb8ed838e2a5fa4898b0cdc74 | |
| parent | 5c543cd9d92a85879742f88e5a9bd3184c761e5f (diff) | |
| download | org-mode-cb71bde7c.tar.gz | |
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.
| -rw-r--r-- | lisp/org-macro.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/org-macro.el b/lisp/org-macro.el index e694118..f9707d0 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. |
