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

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

[elpa] externals/ebdb c44b910 056/350: New ebdb-copy-mail-as-kill comman


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb c44b910 056/350: New ebdb-copy-mail-as-kill command
Date: Mon, 14 Aug 2017 11:46:02 -0400 (EDT)

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

    New ebdb-copy-mail-as-kill command
    
    * ebdb-com.el (ebdb-copy-mail-as-kill): Produces dwim-mail-style
      strings for all marked records.
---
 ebdb-com.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/ebdb-com.el b/ebdb-com.el
index 26bb1bd..47870fd 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -316,6 +316,7 @@ With ARG a negative number do not append."
     (define-key km (kbd "C-x C-t")   'ebdb-transpose-fields)
     (define-key km (kbd "w r")         'ebdb-copy-records-as-kill)
     (define-key km (kbd "w f")         'ebdb-copy-fields-as-kill)
+    (define-key km (kbd "w m")         'ebdb-copy-mail-as-kill)
     ;; (define-key km (kbd "P"       'ebdb-print)
     (define-key km (kbd "=")          'delete-other-windows)
     ;; Buffer manipulation
@@ -873,6 +874,7 @@ If DELETE-P is non-nil RECORD is removed from the EBDB 
buffers."
      ["Dial phone number" ebdb-dial t]
      ["Copy records as kill" ebdb-copy-records-as-kill t]
      ["Copy fields as kill" ebdb-copy-fields-as-kill t]
+     ["Copy mail as kill" ebdb-copy-mail-as-kill t]
      ["Follow relation" ebdb-follow-related t]
      "--"
      ["Print records" ebdb-print t])
@@ -2955,6 +2957,16 @@ is a list, copy only the NUMth list element."
       (kill-new str)
       (message "%s" str))))
 
+;;;###autoload
+(defun ebdb-copy-mail-as-kill (records)
+  "Copy dwim-style mail addresses for RECORDS.
+
+Ie, looks like \"John Doe <address@hidden>\"."
+  (interactive (list (ebdb-do-records)))
+  (let ((str (mapconcat #'ebdb-dwim-mail records ", ")))
+    (kill-new str)
+    (message str)))
+
 
 
 ;;; Help and documentation



reply via email to

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