branch: externals/ebdb
commit 8694194258bf5d5a81c8a2a797105793a4128e89
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
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)))