[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-contacts 36c6b30ec2 077/154: contrib/lisp/org-conta
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-contacts 36c6b30ec2 077/154: contrib/lisp/org-contacts.el: Add a hook to allow users to plug completion functions |
Date: |
Fri, 9 Sep 2022 15:58:30 -0400 (EDT) |
branch: externals/org-contacts
commit 36c6b30ec2d410b8a8c8e6df4542b73496ac0917
Author: Grégoire Jadi <gregoire.jadi@gmail.com>
Commit: Grégoire Jadi <gregoire.jadi@gmail.com>
contrib/lisp/org-contacts.el: Add a hook to allow users to plug completion
functions
* contrib/lisp/org-contacts.el (org-contacts-complete-functions): A
hook that contains the list of functions used to complete contacts.
(org-contacts-message-complete-function): Use the new hook.
Suggested by John Kitchin.
---
org-contacts.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index 7cc42fc6ec..ac43f9d93b 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -183,6 +183,12 @@ This overrides `org-email-link-description-format' if set."
:group 'org-contacts
:type 'boolean)
+(defcustom org-contacts-complete-functions
+ '(org-contacts-complete-group org-contacts-complete-name)
+ "List of functions used to complete contacts in `message-mode'."
+ :group 'org-contacts
+ :type 'hook)
+
;; Decalre external functions and variables
(declare-function org-reverse-string "org")
(declare-function diary-ordinal-suffix "ext:diary-lib")
@@ -512,7 +518,6 @@ A group FOO is composed of contacts with the tag FOO."
(completion-table-case-fold completion-list
(not
org-contacts-completion-ignore-case))))))))
-
(defun org-contacts-remove-ignored-property-values (ignore-list list)
"Remove all ignore-list's elements from list and you can use
regular expressions in the ignore list."
@@ -570,8 +575,8 @@ A group FOO is composed of contacts with the tag FOO."
(goto-char (match-end 0))
(point))))
(string (buffer-substring start end)))
- (or (org-contacts-complete-group start end string)
- (org-contacts-complete-name start end string))))))
+ (run-hook-with-args-until-success
+ 'org-contacts-complete-functions start end string)))))
(defun org-contacts-gnus-get-name-email ()
"Get name and email address from Gnus message."
- [elpa] externals/org-contacts ad7f57a603 023/154: Fix error messages: don't use a dot at the end, (continued)
- [elpa] externals/org-contacts ad7f57a603 023/154: Fix error messages: don't use a dot at the end, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 81129c4c07 046/154: org-contacts.el: Fix or add docstrings, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts f6d87ee7f3 044/154: contrib/lisp/org-contacts.el: Fix compiler warnings., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts b789764458 047/154: contrib/lisp/*el: Fix license information and add "This file is not part...", ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 58afa03d8c 050/154: Let org-contacts.el has the ability which can export email-address list, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts ea8cbe4ca1 013/154: Fix copyright years for elisp files in core and contrib., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts fb87d0eac0 032/154: contrib/lisp/org-contacts.el: Delete trailing whitespaces, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 43d2cdde45 057/154: contrib/lisp/org-contacts: Fix two typos in comments, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 271ec25b43 062/154: contrib/lisp/org-contacts.el: Permit to unload properly `org-contacts', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 4d41ad256d 074/154: Merge branch 'maint', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 36c6b30ec2 077/154: contrib/lisp/org-contacts.el: Add a hook to allow users to plug completion functions,
ELPA Syncer <=
- [elpa] externals/org-contacts 2ec03e18b8 086/154: org-contacts: Fix org-contacts-matcher for BIRTHDAYs, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 33c5e0582c 085/154: contrib: move a few libraries to cl-lib in place of compile-time cl., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 27bec00a60 089/154: org-agenda: Remove unnecessary visibility modification, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts f07048b75d 092/154: Use `string-match-p' instead of `org-string-match-p', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 4e3f139857 095/154: Fix function declarations, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts eedaff3498 103/154: org-contacts.el: Only use org-id-store-link if org-id is loaded, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 4540f987ec 111/154: Clean up some more headers, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts c98281fcfe 113/154: Remove compatibility code, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts c1d2b6dfbc 122/154: prototype of org-contacts contact complete, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 1991ef0ecd 106/154: Fix typo in 304fd01fe, ELPA Syncer, 2022/09/09