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

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

[elpa] externals/org-contacts bb4032eb12 2/2: Add `if' condition on (org


From: ELPA Syncer
Subject: [elpa] externals/org-contacts bb4032eb12 2/2: Add `if' condition on (org-find-exact-headline-in-buffer query) return nil.
Date: Tue, 20 Dec 2022 23:57:58 -0500 (EST)

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

    Add `if' condition on (org-find-exact-headline-in-buffer query) return nil.
---
 org-contacts.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index 004b826803..2724dc9a3b 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -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:



reply via email to

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