[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 38db90d 063/350: Improve ebdb-copy-mail-as-kill
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 38db90d 063/350: Improve ebdb-copy-mail-as-kill |
Date: |
Mon, 14 Aug 2017 11:46:04 -0400 (EDT) |
branch: externals/ebdb
commit 38db90d02f5dc5f91c80aa33936e8de9edd4ce7f
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Improve ebdb-copy-mail-as-kill
* ebdb-com.el (ebdb-copy-mail-as-kill): Now takes a prefix argument,
which prompts for which record mail address to use.
---
ebdb-com.el | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index 6cc2116..e9afcf6 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -2955,14 +2955,29 @@ is a list, copy only the NUMth list element."
(message "%s" str))))
;;;###autoload
-(defun ebdb-copy-mail-as-kill (records)
+(defun ebdb-copy-mail-as-kill (records &optional arg)
"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)))
+Ie, looks like \"John Doe <address@hidden>\".
+
+With prefix argument ARG, prompt for which mail address to use."
+ (interactive (list (ebdb-do-records)
+ current-prefix-arg))
+ (let* (mail-list mail result)
+ (dolist (r records)
+ (setq mail (if arg
+ (ebdb-prompt-for-mail r)
+ (car-safe (ebdb-record-mail r t))))
+ (when mail
+ (push (cons r mail) mail-list)))
+ (setq result
+ (mapconcat
+ (lambda (e)
+ (ebdb-dwim-mail
+ (car e) (cdr e)))
+ (reverse mail-list) ", "))
+ (kill-new result)
+ (message result)))
- [elpa] externals/ebdb 90cb02a 068/350: Remove ebdb-mail-address, (continued)
- [elpa] externals/ebdb 90cb02a 068/350: Remove ebdb-mail-address, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb decfc94 073/350: Update company-ebdb to work, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 47ac653 066/350: Fix autoload for ebdb-org-field-tags definition, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b2fdb42 064/350: Include record name when prompting for mail, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 41bc859 084/350: Still need to hash newly-added records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb dc517a1 067/350: More fixes to merging logic in ebdb-db-load, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b9d7727 087/350: Fill out the ebdb-parse process, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a5b00bd 074/350: Re-init mail fields after moving them to a role, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 76621c7 091/350: Clean up keymap bindings, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e159e3a 070/350: Yet another method definition in the wrong place, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 38db90d 063/350: Improve ebdb-copy-mail-as-kill,
Eric Abrahamsen <=
- [elpa] externals/ebdb f397e3d 092/350: Add missing require statement, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ae23a9b 095/350: Fix to ebdb-parse with field-name-simple, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 6197578 107/350: Change default separator of org tags, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f1edaed 075/350: Prevent eieio-persistent-save from changing db file slot, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb c7d378b 071/350: Autoload eieio-customize-object, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 31bf2cf 117/350: No, that's not the proper way to create a &context catchall, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a2de313 110/350: Install ebdb-save as a kill-emacs-hook, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ab1480b 078/350: Remove ebdb-this-buffer-name, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 1c4fadd 080/350: Make ebdb-record-name a get-or-get-and-set operation, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 9aab682 088/350: Add a generic for ebdb-db-editable, Eric Abrahamsen, 2017/08/14