[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-contacts-rebased ee973b2 087/118: Deprecate `org-find
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/org-contacts-rebased ee973b2 087/118: Deprecate `org-find-if' in favor of `cl-find-if' |
Date: |
Fri, 12 Nov 2021 15:37:09 -0500 (EST) |
branch: scratch/org-contacts-rebased
commit ee973b262e177eb47be9e80f2918b72d36c85847
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Deprecate `org-find-if' in favor of `cl-find-if'
* lisp/org.el (org-find-if): Remove function.
(org-key):
* contrib/lisp/org-contacts.el (org-contacts-db-need-update-p):
(org-contacts-filter):
(org-contacts-test-completion-prefix):
(org-contacts-remove-ignored-property-values): Use `cl-find-if'
* lisp/org-compat.el (org-find-if): Mark function as an obsolete alias
for `cl-find-if'.
---
org-contacts.el | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index 13fbf27..797aa29 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -232,7 +232,7 @@ A regexp matching strings of whitespace, `,' and `;'.")
(defun org-contacts-db-need-update-p ()
"Determine whether `org-contacts-db' needs to be refreshed."
(or (null org-contacts-last-update)
- (org-find-if (lambda (file)
+ (cl-find-if (lambda (file)
(or (time-less-p org-contacts-last-update
(elt (file-attributes file) 5))))
(org-contacts-files))
@@ -320,12 +320,12 @@ cell corresponding to the contact properties.
(org-string-match-p name-match
(first contact)))
(and prop-match
- (org-find-if (lambda (prop)
+ (cl-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)
+ (cl-find-if (lambda (tag)
(org-string-match-p tags-match tag))
(org-split-string
(or (cdr (assoc-string "ALLTAGS" (caddr
contact))) "") ":"))))
@@ -487,13 +487,10 @@ prefixes rather than just the beginning of the string."
completions))
(defun org-contacts-test-completion-prefix (string collection predicate)
- ;; Prevents `org-find-if' from redefining `predicate' and going into
- ;; an infinite loop.
- (lexical-let ((predicate predicate))
- (org-find-if (lambda (el)
- (and (or (null predicate) (funcall predicate el))
- (string= string el)))
- collection)))
+ (cl-find-if (lambda (el)
+ (and (or (null predicate) (funcall predicate el))
+ (string= string el)))
+ collection))
(defun org-contacts-boundaries-prefix (string collection predicate suffix)
(list* 'boundaries (completion-boundaries string collection predicate
suffix)))
@@ -592,7 +589,7 @@ description."
"Remove all ignore-list's elements from list and you can use
regular expressions in the ignore list."
(cl-remove-if (lambda (el)
- (org-find-if (lambda (x)
+ (cl-find-if (lambda (x)
(string-match-p x el))
ignore-list))
list))
- [elpa] scratch/org-contacts-rebased 7d47f48 062/118: contrib/lisp/org-contacts.el: Various formatting improvements and bug fixes, (continued)
- [elpa] scratch/org-contacts-rebased 7d47f48 062/118: contrib/lisp/org-contacts.el: Various formatting improvements and bug fixes, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased a452869 067/118: un-hexify TEL links in vCard export, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased e6e9fd8 071/118: Merge branch 'maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased dc57e62 058/118: org-contacts: Fix org-contacts-gnus-article-from-goto, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 19baaca 073/118: Merge branch 'maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 5be58f1 075/118: contrib/lisp/org-contacts.el: Factorize the construction of the database, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 5e05b4d 077/118: contrib/lisp/org-contacts.el: Fix a bug when contacts don't have an email address, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 9c27250 078/118: contrib/lisp/org-contacts.el: Allow the user to customize interactively the vcard export, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 3b371ff 080/118: org-contacts.el: Catch `nextfile' in `org-contacts-db', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased cfa1db0 081/118: Remove some home-grown copies of cl-lib functions., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased ee973b2 087/118: Deprecate `org-find-if' in favor of `cl-find-if',
Stefan Monnier <=
- [elpa] scratch/org-contacts-rebased 204548b 092/118: Fix function declarations, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 79d7a88 096/118: org-contacts.el: Add support for org-id generated link., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased a603ab3 099/118: org-contacts.el: replace obsolete alias `loop' with `cl-loop', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 38f7b80 100/118: org-contacts.el: Only use org-id-store-link if org-id is loaded, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 3d068b7 104/118: org-contacts.el: Display contacts buffer result., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased fd660ce 111/118: Tidy up whitespace, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7b87e73 106/118: Prefer HTTPS to HTTP in most links, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 03dc64d 110/118: Change how completion is done, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 18ba907 114/118: Try to support different type of AVATAR property., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 45bc95a 083/118: org-contacts: Fix org-contacts-matcher for BIRTHDAYs, Stefan Monnier, 2021/11/12