branch: externals/org-contacts
commit 03a563b471e731a980476f2219a194382a2f8e58
Author: stardiviner <[email protected]>
Commit: stardiviner <[email protected]>
Add autoload cookies for org-link functions
---
org-contacts.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/org-contacts.el b/org-contacts.el
index 72ea8f93c4..0513df76ee 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -1236,6 +1236,7 @@ are effectively trimmed). If nil, all zero-length
substrings are retained."
(setq proplist (cons bufferstring proplist))))
(cdr (reverse proplist))))
+;;;###autoload
;;; Add an Org link type `org-contact:' for easy jump to or searching
org-contacts headline.
;;; link spec: [[org-contact:query][desc]]
(org-link-set-parameters "org-contact"
@@ -1244,6 +1245,7 @@ are effectively trimmed). If nil, all zero-length
substrings are retained."
:store #'org-contacts-link-store
:face 'org-contacts-link-face)
+;;;###autoload
(defun org-contacts-link-store ()
"Store the contact in `org-contacts-files' with a link."
(when (and (eq major-mode 'org-mode)
@@ -1260,6 +1262,7 @@ are effectively trimmed). If nil, all zero-length
substrings are retained."
(org-link-add-props :link link :description headline-str)
link)))))
+;;;###autoload
(defun org-contacts--all-contacts ()
"Return a list of all contacts in `org-contacts-files'.
Each element has the form (NAME . (FILE . POSITION))."
@@ -1276,6 +1279,7 @@ Each element has the form (NAME . (FILE . POSITION))."
`(:name ,name :file ,file :position ,position))))))
org-contacts-files)))
+;;;###autoload
(defun org-contacts-link-open (path)
"Open contacts: link type with jumping or searching."
(let ((query path))
@@ -1306,6 +1310,7 @@ Each element has the form (NAME . (FILE . POSITION))."
;; (with-current-buffer buf (goto-char position)))
))))
+;;;###autoload
(defun org-contacts-link-complete (&optional _arg)
"Create a org-contacts link using completion."
(let ((name (completing-read "org-contact Name: "