Fix can't get-buffer when file is not opened which caused buf
is nil.
This commit is contained in:
parent
fe466ab2ae
commit
7ed94bcf72
1 changed files with 1 additions and 1 deletions
|
@ -1300,8 +1300,8 @@ Each element has the form (NAME . (FILE . POSITION))."
|
||||||
;; jump to contact headline directly
|
;; jump to contact headline directly
|
||||||
(t
|
(t
|
||||||
(let* ((f (car org-contacts-files))
|
(let* ((f (car org-contacts-files))
|
||||||
|
(_ (find-file f))
|
||||||
(buf (get-buffer (file-name-nondirectory f))))
|
(buf (get-buffer (file-name-nondirectory f))))
|
||||||
(unless (buffer-live-p buf) (find-file f))
|
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(goto-char (marker-position (org-find-exact-headline-in-buffer query))))
|
(goto-char (marker-position (org-find-exact-headline-in-buffer query))))
|
||||||
(display-buffer buf '(display-buffer-below-selected)))
|
(display-buffer buf '(display-buffer-below-selected)))
|
||||||
|
|
Loading…
Reference in a new issue