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

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

[elpa] externals/ebdb 23cdf30 3/3: Add completion support when searching


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 23cdf30 3/3: Add completion support when searching on mail addresses
Date: Fri, 8 Jan 2021 17:35:15 -0500 (EST)

branch: externals/ebdb
commit 23cdf30fce7730e873415b7c6182d27c8c51cb11
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Add completion support when searching on mail addresses
    
    * ebdb.el (ebdb-search-read): Dipping our toes in the water for
    providing more completion support throughout the search process.
    Annoying that most of Emacs' completion "frameworks" make it difficult
    to enter an exact (non-completion) string.
---
 ebdb.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ebdb.el b/ebdb.el
index 38b2917..e303b67 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -5805,6 +5805,13 @@ prompt users for more complex search criteria, if 
necessary.")
                       (ebdb-field-readable-name cls)
                       (if ebdb-search-invert "not " ""))))
 
+(cl-defmethod ebdb-search-read ((_cls (subclass ebdb-field-mail)))
+  (let ((ebdb-completion-list '(mail)))
+    (completing-read
+     (format "Search records with mail %smatching regexp: "
+            (if ebdb-search-invert "not " ""))
+     ebdb-hashtable #'ebdb-completion-predicate)))
+
 (cl-defmethod ebdb-search-read ((field string))
   "Read regexp to search FIELD values of records."
   (read-string (format "Search records with %s %smatching regexp: "



reply via email to

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