Fix company-mode `company-show-location' support
This commit is contained in:
parent
8f008e1b70
commit
18d4945fcc
1 changed files with 7 additions and 3 deletions
|
@ -656,9 +656,13 @@ description."
|
||||||
|
|
||||||
(defun org-contacts-org-complete--location-function (candidate)
|
(defun org-contacts-org-complete--location-function (candidate)
|
||||||
"Return org-contacts location of contact candidate."
|
"Return org-contacts location of contact candidate."
|
||||||
(let ((name (plist-get candidate :name))
|
(let* ((candidate (substring-no-properties candidate 1 nil))
|
||||||
(file (plist-get candidate :file))
|
(contact (seq-find
|
||||||
(position (plist-get candidate :position)))
|
(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)
|
(with-current-buffer (find-file-noselect file)
|
||||||
(goto-char position)
|
(goto-char position)
|
||||||
(cons (current-buffer) position))))
|
(cons (current-buffer) position))))
|
||||||
|
|
Loading…
Reference in a new issue