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

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

[elpa] externals/org-contacts 18d4945fcc 132/154: Fix company-mode `comp


From: ELPA Syncer
Subject: [elpa] externals/org-contacts 18d4945fcc 132/154: Fix company-mode `company-show-location' support
Date: Fri, 9 Sep 2022 15:58:54 -0400 (EDT)

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

    Fix company-mode `company-show-location' support
---
 org-contacts.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index 8d8c48e297..44eb0163ae 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -656,9 +656,13 @@ description."
 
 (defun org-contacts-org-complete--location-function (candidate)
   "Return org-contacts location of contact candidate."
-  (let ((name (plist-get candidate :name))
-        (file (plist-get candidate :file))
-        (position (plist-get candidate :position)))
+  (let* ((candidate (substring-no-properties candidate 1 nil))
+         (contact (seq-find
+                   (lambda (contact) (string-equal (plist-get contact :name) 
candidate))
+                   (org-contacts--all-contacts)))
+         (name (plist-get contact :name))
+         (file (plist-get contact :file))
+         (position (plist-get contact :position)))
     (with-current-buffer (find-file-noselect file)
       (goto-char position)
       (cons (current-buffer) position))))



reply via email to

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