[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-contacts 43d6571612 061/154: org-contacts: Fix org-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-contacts 43d6571612 061/154: org-contacts: Fix org-contacts-gnus-article-from-goto |
Date: |
Fri, 9 Sep 2022 15:58:27 -0400 (EDT) |
branch: externals/org-contacts
commit 43d657161292199ba8a219a8a39eed89f9f361e2
Author: Rodney Lorrimar <rodney@rodney.id.au>
Commit: Carsten Dominik <carsten.dominik@gmail.com>
org-contacts: Fix org-contacts-gnus-article-from-goto
* contrib/lisp/org-contacts.el (org-contacts-filter): Add a PROP-MATCH
argument.
(org-contacts-gnus-article-from-get-marker): Search for email as a
property not a tag.
`org-contacts-gnus-article-from-get-marker' seems to assume that the
contact properties exist within the contact's tags as colon-separated
KEY={VALUE} entries. This isn't the case for me, using org-mode from
git master.
This commit adds a PROP-MATCH argument to `org-contacts-filter' so
that `org-contacts-gnus-article-from-get-marker` can filter by the
EMAIL property.
---
org-contacts.el | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index c72e6c0960..c84f1f2f99 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -233,10 +233,15 @@ A regexp matching strings of whitespace, `,' and `;'.")
(progress-reporter-done progress-reporter)))
org-contacts-db))
-(defun org-contacts-filter (&optional name-match tags-match)
- "Search for a contact matching NAME-MATCH and TAGS-MATCH.
-If both match values are nil, return all contacts."
+(defun org-contacts-filter (&optional name-match tags-match prop-match)
+ "Search for a contact matching any of NAME-MATCH, TAGS-MATCH, PROP-MATCH.
+If all match values are nil, return all contacts.
+
+The optional PROP-MATCH argument is a single (PROP . VALUE) cons
+cell corresponding to the contact properties.
+"
(if (and (null name-match)
+ (null prop-match)
(null tags-match))
(org-contacts-db)
(loop for contact in (org-contacts-db)
@@ -244,6 +249,11 @@ If both match values are nil, return all contacts."
(and name-match
(org-string-match-p name-match
(first contact)))
+ (and prop-match
+ (org-find-if (lambda (prop)
+ (and (string= (car prop-match) (car prop))
+ (org-string-match-p (cdr prop-match)
(cdr prop))))
+ (caddr contact)))
(and tags-match
(org-find-if (lambda (tag)
(org-string-match-p tags-match tag))
@@ -523,7 +533,8 @@ A group FOO is composed of contacts with the tag FOO."
(email (cadr address)))
(cadar (or (org-contacts-filter
nil
- (concat org-contacts-email-property "={\\b" (regexp-quote
email) "\\b}"))
+ nil
+ (cons org-contacts-email-property (concat "\\b" (regexp-quote
email) "\\b")))
(when name
(org-contacts-filter
(concat "^" name "$")))))))
- [elpa] externals/org-contacts c297cb009f 020/154: Merge branch 'maint', (continued)
- [elpa] externals/org-contacts c297cb009f 020/154: Merge branch 'maint', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 1b6cff5ac7 026/154: contrib/lisp/org-contacts.el: Fix indentation of the file, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 8bf8565c46 027/154: Update copyright years., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts fb5c9dcec9 043/154: orgcontacts.el: Fix `date' being broken in `org-contacts-anniversaries'., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts dcd313e66d 021/154: Tags/properties matcher: Fixed issues with todo-only matches, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 72d2cafa36 022/154: add a missing require for gnus-util, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 4b368d7709 045/154: Fix typo., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 6723942283 048/154: contrib/lisp/org-contacts.el: Remove calls to cl functions, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 1d70236144 054/154: org-contacts.el (org-contacts-matcher): Better matcher, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 1b44df7267 058/154: contrib/lisp/org-contacts: Allow org links in properties, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 43d6571612 061/154: org-contacts: Fix org-contacts-gnus-article-from-goto,
ELPA Syncer <=
- [elpa] externals/org-contacts a3c24bc7c8 063/154: contrib/lisp/org-contacts.el (org-contacts-vcard-format): Silence byte-compiler, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts e6b5811004 064/154: contrib/lisp/org-contacts.el: Add a feature, which can ignore emails or phones with property, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts fa4869123d 065/154: contrib/lisp/org-contacts.el: Various formatting improvements and bug fixes, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 25211e8066 068/154: org-contacts: Ensure contacts cache is updated if it contains markers with no buffer, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts dcd8af90c9 028/154: Merge branch 'maint', ELPA Syncer, 2022/09/09
- [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