emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb 8694194 150/350: Use string-match-p for searching


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 8694194 150/350: Use string-match-p for searching on Org tags
Date: Mon, 14 Aug 2017 11:46:25 -0400 (EDT)

branch: externals/ebdb
commit 8694194258bf5d5a81c8a2a797105793a4128e89
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Use string-match-p for searching on Org tags
    
    * ebdb-org.el (ebdb-field-search): Don't require an exact tag match,
      allow regexps.
    
    Maybe we should still require exact tag matches, but somehow handle
    tag groups?
---
 ebdb-org.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ebdb-org.el b/ebdb-org.el
index 274e4c4..17123cc 100644
--- a/ebdb-org.el
+++ b/ebdb-org.el
@@ -154,8 +154,9 @@ potential tags for completion.")
 (cl-defmethod ebdb-field-search ((field ebdb-org-field-tags) (tag-list list))
   (catch 'found
     (dolist (tag (slot-value field 'tags) nil)
-      (when (member tag tag-list)
-       (throw 'found t)))))
+      (dolist (tt tag-list)
+       (when (string-match-p tt tag)
+        (throw 'found t))))))
 
 (cl-defmethod ebdb-init-field ((field ebdb-org-field-tags) _record)
   (let ((tags (slot-value field 'tags)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]