[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-contacts 75021a1fc2 080/154: contrib/lisp/org-conta
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-contacts 75021a1fc2 080/154: contrib/lisp/org-contacts.el: Fix a bug when contacts don't have an email address |
Date: |
Fri, 9 Sep 2022 15:58:33 -0400 (EDT) |
branch: externals/org-contacts
commit 75021a1fc2bd8bd4b56cae2fdb43a600aac8b516
Author: Grégoire Jadi <gregoire.jadi@gmail.com>
Commit: Grégoire Jadi <gregoire.jadi@gmail.com>
contrib/lisp/org-contacts.el: Fix a bug when contacts don't have an email
address
* contrib/lisp/org-contacts.el (org-contacts-complete-tags-props,
org-contacts-complete-group): Fix a bug when contacts don't have an
email address.
---
org-contacts.el | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index 9ddf28d472..583da4ab10 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -516,11 +516,12 @@ A group FOO is composed of contacts with the tag FOO."
;; returned by `org-contacts-filter'.
for contact-name = (car contact)
;; Grab the first email of the contact
- for email = (org-contacts-strip-link
(car (org-contacts-split-property
- (or
- (cdr (assoc-string
org-contacts-email-property
-
(caddr contact)))
- ""))))
+ for email = (org-contacts-strip-link
+ (or (car
(org-contacts-split-property
+ (or
+ (cdr
(assoc-string org-contacts-email-property
+
(caddr contact)))
+ ""))) ""))
;; If the user has an email address,
append USER <EMAIL>.
if email collect
(org-contacts-format-email contact-name email))
", ")))
@@ -528,7 +529,7 @@ 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-complete-tags-props (start end matcher)
+(defun org-contacts-complete-tags-props (start end string)
"Insert emails that match the tags expression.
For example: FOO-BAR will match entries tagged with FOO but not
@@ -538,25 +539,28 @@ See (org) Matching tags and properties for a complete
description."
(let* ((completion-ignore-case org-contacts-completion-ignore-case)
(completion-p (org-string-match-p
- (concat "^" org-contacts-tags-props-prefix)
string)))
+ (concat "^" org-contacts-tags-props-prefix) string)))
(when completion-p
(let ((result
(mapconcat
'identity
(loop for contact in (org-contacts-db)
for contact-name = (car contact)
- for email = (org-contacts-strip-link (car
(org-contacts-split-property
+ for email = (org-contacts-strip-link (or (car
(org-contacts-split-property
(or
(cdr
(assoc-string org-contacts-email-property
(caddr contact)))
- ""))))
+ ""))) ""))
for tags = (cdr (assoc "TAGS" (nth 2 contact)))
for tags-list = (if tags
(split-string (substring (cdr (assoc
"TAGS" (nth 2 contact))) 1 -1) ":")
'())
- if (let ((todo-only nil))
- (eval (cdr (org-make-tags-matcher matcher))))
-
+ for marker = (second contact)
+ if (with-current-buffer (marker-buffer marker)
+ (save-excursion
+ (goto-char marker)
+ (let (todo-only)
+ (eval (cdr (org-make-tags-matcher (subseq string
1)))))))
collect (org-contacts-format-email contact-name email))
",")))
(when (not (string= "" result))
- [elpa] externals/org-contacts 50d8ec9752 031/154: Improve `completion-at-point' for `org-contacts.el' in mail, (continued)
- [elpa] externals/org-contacts 50d8ec9752 031/154: Improve `completion-at-point' for `org-contacts.el' in mail, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts b34f505d38 042/154: contrib/lisp/org-contacts.el (org-contacts-complete-name): Prevent an error when there is no completion available, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 7fcd20bcff 025/154: contrib/lisp/org-contacts.el: Docstring fixes and small code clean up, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts cb941d4023 052/154: org-contacts.el, add tel property, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 68a0286a8f 056/154: org-contacts.el, add name alias property., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 6f1a63da03 067/154: org-contacts: Provide ordering when using cycle completion, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts bb08fb96ab 071/154: Update copyright years., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 8829fb451a 073/154: Revert "Update copyright years.", ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts c32dbab114 081/154: contrib/lisp/org-contacts.el: Allow the user to customize interactively the vcard export, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 3fa42fb53f 084/154: Remove some home-grown copies of cl-lib functions., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 75021a1fc2 080/154: contrib/lisp/org-contacts.el: Fix a bug when contacts don't have an email address,
ELPA Syncer <=
- [elpa] externals/org-contacts 0ec6917ed8 091/154: Deprecate `org-no-warnings' in favor of `with-no-warnings', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 304fd01fe3 101/154: org-contacts.el: Add usage comments, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts c8ceb5290e 099/154: org-contacts.el: Add support for org-id generated link., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 0107e8ecdb 100/154: org-contacts.el: Inherit face from org-link, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts af3a5cb6fa 102/154: org-contacts.el: replace obsolete alias `loop' with `cl-loop', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 2c0bb90259 097/154: contrib/lisp/org-contacts.el: Add stardiviner as the maintainer, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts ca3b10d5a8 098/154: org-contacts.el: Fix org-store-link error caused by org-contacts, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 0e33f05c4e 105/154: org-contacts.el: Fix store link function does not return link., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 3d9181c0c4 104/154: org-contacts.el: Use `bound-and-true-p' to check (unbound) var, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 3fa6b4c36b 120/154: Add package introduction in README, ELPA Syncer, 2022/09/09