Add `if' condition on (org-find-exact-headline-in-buffer query) return nil.
This commit is contained in:
parent
b7d176dcfb
commit
bb4032eb12
1 changed files with 3 additions and 2 deletions
|
@ -1318,8 +1318,9 @@ Each element has the form (NAME . (FILE . POSITION))."
|
|||
;; jump to exact contact headline directly
|
||||
(t
|
||||
(with-current-buffer buf
|
||||
(let ((position (org-find-exact-headline-in-buffer query)))
|
||||
(goto-char (marker-position position))))
|
||||
(if-let ((position (org-find-exact-headline-in-buffer query)))
|
||||
(goto-char (marker-position position))
|
||||
(user-error "[org-contacts] Can't find <%s> in your `org-contacts-files'." query)))
|
||||
(display-buffer buf '(display-buffer-below-selected))
|
||||
|
||||
;; FIXME:
|
||||
|
|
Loading…
Reference in a new issue