emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-contacts 7ed94bcf72 140/154: Fix can't get-buffer w


From: ELPA Syncer
Subject: [elpa] externals/org-contacts 7ed94bcf72 140/154: Fix can't get-buffer when file is not opened which caused `buf` is nil.
Date: Fri, 9 Sep 2022 15:58:55 -0400 (EDT)

branch: externals/org-contacts
commit 7ed94bcf72adfbefcf4971182f056d3f856368a0
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>

    Fix can't get-buffer when file is not opened which caused `buf` is nil.
---
 org-contacts.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-contacts.el b/org-contacts.el
index d452118f90..2cff1f7dce 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -1300,8 +1300,8 @@ Each element has the form (NAME . (FILE . POSITION))."
      ;; jump to contact headline directly
      (t
       (let* ((f (car org-contacts-files))
+             (_ (find-file f))
              (buf (get-buffer (file-name-nondirectory f))))
-        (unless (buffer-live-p buf) (find-file f))
         (with-current-buffer buf
           (goto-char (marker-position (org-find-exact-headline-in-buffer 
query))))
         (display-buffer buf '(display-buffer-below-selected)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]