fixup! org-capture-set-target-location: Improve error reporting for malformed target

Reported-by: Zhitao <zhitaao.gong@gmail.com>
Link: https://orgmode.org/list/CACcmFoCvtyGBKR7mTjdQOd-w82wz-xcavnpEVT=6mFOWpo1T1w@mail.gmail.com
This commit is contained in:
Ihor Radchenko 2024-02-06 20:02:38 +01:00
parent 4254a54f88
commit 8ccda1737b
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -1057,7 +1057,7 @@ Store them in the capture property list."
(org-capture-put :exact-position (point))
(setq target-entry-p
(and (derived-mode-p 'org-mode) (org-at-heading-p)))))
(`(file+olp+datetree ,(and path (pred stringp)) . ,(and outline-path (guard outline-path)))
(`(file+olp+datetree ,(and path (pred stringp)) . ,outline-path)
(let ((m (if outline-path
(org-find-olp (cons (org-capture-expand-file path)
outline-path))