[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 90cb02a 068/350: Remove ebdb-mail-address
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 90cb02a 068/350: Remove ebdb-mail-address |
Date: |
Mon, 14 Aug 2017 11:46:05 -0400 (EDT) |
branch: externals/ebdb
commit 90cb02adf46f85716d00b752f81df2f5e2728ff2
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Remove ebdb-mail-address
* ebdb-com.el: We have `ebdb-copy-mail-as-kill' for that purpose, and
`ebdb-mail' doesn't need it.
---
ebdb-com.el | 66 +++++++++++++------------------------------------------------
1 file changed, 14 insertions(+), 52 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index ec66793..770c460 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -310,7 +310,6 @@ With ARG a negative number do not append."
(define-key km (kbd "#") 'ebdb-toggle-record-mark)
(define-key km (kbd "o") 'ebdb-omit-record)
(define-key km (kbd "m") 'ebdb-mail)
- (define-key km (kbd "M") 'ebdb-mail-address)
(define-key km (kbd "M-d") 'ebdb-dial)
(define-key km (kbd "h") 'ebdb-info)
(define-key km (kbd "?") 'ebdb-help)
@@ -863,7 +862,6 @@ If DELETE-P is non-nil RECORD is removed from the EBDB
buffers."
["Invert search" ebdb-search-invert t])
("Mail"
["Send mail" ebdb-mail t]
- ["Save mail address" ebdb-mail-address t]
"--"
["(Re-)Build mail aliases" ebdb-mail-aliases t])
("Use database"
@@ -2103,60 +2101,24 @@ If MAIL is nil use RECORD's primary mail address."
(apply 'compose-mail args))
;;;###autoload
-(defun ebdb-mail (records &optional subject n verbose)
+(defun ebdb-mail (records &optional subject arg)
"Compose a mail message to RECORDS (optional: using SUBJECT).
-By default, the first mail addresses of RECORDS are used.
-If prefix N is a number, use Nth mail address of RECORDS (starting from 1).
-If prefix N is C-u (t noninteractively) use all mail addresses of RECORDS.
-If VERBOSE is non-nil (as in interactive calls) be verbose."
+
+If ARG (interactively, the prefix arg) is nil, use the first mail
+address of each record. If it is t, prompt the user for which
+address to use.
+
+Another approach is to put point on a mail field and press \"a\",
+for `ebdb-field-action'."
(interactive (list (ebdb-do-records) nil
(or (consp current-prefix-arg)
- current-prefix-arg)
- t))
- (setq records (ebdb-record-list records))
- (if (not records)
- (if verbose (message "No records"))
- (let ((to (ebdb-mail-address records n nil verbose)))
- (unless (string= "" to)
- (ebdb-compose-mail to subject)))))
-
-(defun ebdb-mail-address (records &optional n kill-ring-save verbose)
- "Return mail addresses of RECORDS as a string.
-By default, the first mail addresses of RECORDS are used.
-If prefix N is a number, use Nth mail address of RECORDS (starting from 1).
-If prefix N is C-u (t noninteractively) use all mail addresses of RECORDS.
-If KILL-RING-SAVE is non-nil (as in interactive calls), copy mail addresses
-to kill ring. If VERBOSE is non-nil (as in interactive calls) be verbose."
- (interactive (list (ebdb-do-records)
- (or (consp current-prefix-arg)
- current-prefix-arg)
- t t))
+ current-prefix-arg)))
(setq records (ebdb-record-list records))
- (if (not records)
- (progn (if verbose (message "No records")) "")
- (let ((good "") bad)
- (dolist (record records)
- (let ((mails (ebdb-record-mail record t)))
- (cond ((not mails)
- (push record bad))
- ((eq n t)
- (setq good (ebdb-concat ",\n\t"
- good
- (mapcar (lambda (mail)
- (ebdb-dwim-mail record
mail))
- mails))))
- (t
- (setq good (ebdb-concat ",\n\t" good
- (ebdb-dwim-mail record (and (numberp n)
- (nth (1- n)
mails)))))))))
- (when (and bad verbose)
- (message "No mail addresses for %s."
- (mapconcat 'ebdb-string (nreverse bad) ", "))
- (unless (string= "" good) (sit-for 2)))
- (when (and kill-ring-save (not (string= good "")))
- (kill-new good)
- (if verbose (message "%s" good)))
- good)))
+ (let ((to (mapconcat
+ (lambda (r) (ebdb-dwim-mail r (when arg (ebdb-prompt-for-mail r))))
+ records ", ")))
+ (unless (string= "" to)
+ (ebdb-compose-mail to subject))))
;; Is there better way to yank selected mail addresses from the EBDB
;; buffer into a message buffer? We need some kind of a link between
- [elpa] externals/ebdb 8eb2262 036/350: Add object-print method for records, (continued)
- [elpa] externals/ebdb 8eb2262 036/350: Add object-print method for records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 20785a1 029/350: Additions to README and manual, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 8537076 052/350: Improvements to the gnorb-ebdb-org-tags field, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 6568bbf 053/350: Straighten out ebdb-separator-alist, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 9791ed5 030/350: Merge branch 'buff', Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 49b422e 035/350: Remove mentions and bindings for ebdb-do-all-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 11fe701 047/350: Name classes now inherit from ebdb-field-user, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 784f45c 060/350: New function ebdb-prompt-for-mail, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a712f52 050/350: Update ebdb-pgp, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 118f567 062/350: Add a "defunct" arg to ebdb-record-mail, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 90cb02a 068/350: Remove ebdb-mail-address,
Eric Abrahamsen <=
- [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, 2017/08/14