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

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

[elpa] externals/ebdb 7040cad 247/350: Expand ebdb-helm to complete on m


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 7040cad 247/350: Expand ebdb-helm to complete on mails as well
Date: Mon, 14 Aug 2017 11:46:47 -0400 (EDT)

branch: externals/ebdb
commit 7040cad81cc669ed43cbc246bab02d9aafe74512
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Expand ebdb-helm to complete on mails as well
    
    * helm-ebdb.el (helm-ebdb-candidates): Strings in the candidate list
      should also include record email addresses.
      (helm-ebdb-compose-mail): For records with multiple email addresses,
      prompt for the address to use.
---
 helm-ebdb.el | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/helm-ebdb.el b/helm-ebdb.el
index 9d9acf8..2a7e50b 100644
--- a/helm-ebdb.el
+++ b/helm-ebdb.el
@@ -33,7 +33,18 @@
 (defun helm-ebdb-candidates ()
   "Return a list of all records in the database."
   (mapcar (lambda (rec)
-           (cons (ebdb-string rec) rec))
+           (let* ((rec-string (ebdb-string rec))
+                  (mails (ebdb-record-mail-canon rec))
+                  (mail-list (when mails
+                               (mapconcat #'identity
+                                          mails
+                                          " "))))
+             (cons (if mail-list
+                       (concat rec-string
+                               " => "
+                               mail-list)
+                     rec-string)
+                   rec)))
          (ebdb-records)))
 
 (defun helm-ebdb-display-records (candidate)
@@ -45,7 +56,7 @@
 (defun helm-ebdb-compose-mail (candidate)
   "Compose mail to CANDIDATE or marked candidates."
   (let ((recs (or (helm-marked-candidates) (list candidate))))
-    (ebdb-mail recs)))
+    (ebdb-mail recs nil t)))
 
 (defun helm-ebdb-cite-records (candidate)
   "Insert Name <email> string for CANDIDATE or marked candidate."



reply via email to

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