[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-contacts fa4869123d 065/154: contrib/lisp/org-conta
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-contacts fa4869123d 065/154: contrib/lisp/org-contacts.el: Various formatting improvements and bug fixes |
Date: |
Fri, 9 Sep 2022 15:58:27 -0400 (EDT) |
branch: externals/org-contacts
commit fa4869123de76d5651186caa6663b2b07ed33f4c
Author: Grégoire Jadi <gregoire.jadi@gmail.com>
Commit: Grégoire Jadi <gregoire.jadi@gmail.com>
contrib/lisp/org-contacts.el: Various formatting improvements and bug fixes
* contrib/lisp/org-contacts.el (org-contacts-ignore-property): Improve
formatting and spelling.
(org-contacts-complete-name): Improve formatting.
(org-contacts-vcard-format): Improve formatting and silent byte compiler.
(org-contacts-split-property): Fix a bug where `omit-nulls' were not
forced to `t' when `separators' was nil.
---
org-contacts.el | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index 2aee0f69bf..ffd17a19cc 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -87,7 +87,8 @@ When set to nil, all your Org files will be used."
:group 'org-contacts)
(defcustom org-contacts-ignore-property "IGNORE"
- "Name of the property, which values will be ignored when complete or export
to vcard."
+ "Name of the property, which values will be ignored when
+completing or exporting to vcard."
:type 'string
:group 'org-contacts)
@@ -502,14 +503,15 @@ A group FOO is composed of contacts with the tag FOO."
;; Build the list of the email addresses which has
;; been expired
- for ignore-list = (org-contacts-split-property (or
- (cdr
(assoc-string org-contacts-ignore-property
-
(caddr contact))) ""))
+ for ignore-list = (org-contacts-split-property
+ (or (cdr (assoc-string
org-contacts-ignore-property
+ (caddr contact))) ""))
;; Build the list of the user email addresses.
- for email-list = (org-contacts-remove-ignored-property-values
ignore-list
-
(org-contacts-split-property (or
-
(cdr (assoc-string org-contacts-email-property
-
(caddr contact))) "")))
+ for email-list = (org-contacts-remove-ignored-property-values
+ ignore-list
+ (org-contacts-split-property
+ (or (cdr (assoc-string
org-contacts-email-property
+ (caddr contact)))
"")))
;; If the user has email addresses…
if email-list
;; … append a list of USER <EMAIL>.
@@ -890,14 +892,15 @@ to do our best."
(name (org-contacts-vcard-escape (car contact)))
(n (org-contacts-vcard-encode-name name))
(email (cdr (assoc-string org-contacts-email-property properties)))
- (tel (cdr (assoc-string org-contacts-tel-property properties)))
- (ignore (cdr (assoc-string org-contacts-ignore-property properties)))
+ (tel (cdr (assoc-string org-contacts-tel-property properties)))
+ (ignore-list (cdr (assoc-string org-contacts-ignore-property
properties)))
+ (ignore-list (when ignore-list
+ (org-contacts-split-property ignore-list)))
(note (cdr (assoc-string org-contacts-note-property properties)))
(bday (org-contacts-vcard-escape (cdr (assoc-string
org-contacts-birthday-property properties))))
(addr (cdr (assoc-string org-contacts-address-property properties)))
(nick (org-contacts-vcard-escape (cdr (assoc-string
org-contacts-nickname-property properties))))
(head (format "BEGIN:VCARD\nVERSION:3.0\nN:%s\nFN:%s\n" n name))
- (ignore-list (when ignore (setq ignore-list
(org-contacts-split-property ignore))))
emails-list result phones-list)
(concat head
(when email (progn
@@ -995,12 +998,12 @@ normally \"[,; \f\t\n\r\v]+\", and OMIT-NULLS is forced
to t.
If OMIT-NULLS is t, zero-length substrings are omitted from the list \(so
that for the default value of SEPARATORS leading and trailing whitespace
are effectively trimmed). If nil, all zero-length substrings are retained."
-(let* ((keep-nulls (or nil omit-nulls))
- (rexp (or separators org-contacts-property-values-separators))
- (inputlist (split-string string rexp keep-nulls))
- (linkstring "")
- (bufferstring "")
- (proplist (list "")))
+ (let* ((omit-nulls (if separators omit-nulls t))
+ (rexp (or separators org-contacts-property-values-separators))
+ (inputlist (split-string string rexp omit-nulls))
+ (linkstring "")
+ (bufferstring "")
+ (proplist (list "")))
(while inputlist
(setq bufferstring (pop inputlist))
(if (string-match "\\[\\[" bufferstring)
- [elpa] externals/org-contacts fb5c9dcec9 043/154: orgcontacts.el: Fix `date' being broken in `org-contacts-anniversaries'., (continued)
- [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, 2022/09/09
- [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 <=
- [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
- [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