branch: externals/ebdb commit 23cdf30fce7730e873415b7c6182d27c8c51cb11 Author: Eric Abrahamsen <e...@ericabrahamsen.net> Commit: Eric Abrahamsen <e...@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: "