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

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

[elpa] externals/org-contacts 8f008e1b70 131/154: Fix company-mode doc-b


From: ELPA Syncer
Subject: [elpa] externals/org-contacts 8f008e1b70 131/154: Fix company-mode doc-buffer support with reverse query contact element in all contacts list.
Date: Fri, 9 Sep 2022 15:58:54 -0400 (EDT)

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

    Fix company-mode doc-buffer support with reverse query contact element in 
all contacts list.
---
 org-contacts.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index 2691351b5f..8d8c48e297 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -633,9 +633,13 @@ description."
 
 (defun org-contacts-org-complete--doc-function (candidate)
   "Return org-contacts content 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)))
     (company-doc-buffer
      ;; get org-contact headline and property drawer.
      (with-current-buffer (find-file-noselect file)



reply via email to

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