[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb fc1a480 191/350: Fix ebdb-delete-redundant-mails
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb fc1a480 191/350: Fix ebdb-delete-redundant-mails |
Date: |
Mon, 14 Aug 2017 11:46:34 -0400 (EDT) |
branch: externals/ebdb
commit fc1a4809e1cbc16ca74837b4ad51beefc3c8729c
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Fix ebdb-delete-redundant-mails
Fixes #22
* ebdb-com.el (ebdb-delete-redundant-mails): Had not been updated to
use classes, etc.
---
ebdb-com.el | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index 01bc801..689ed7f 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1360,7 +1360,7 @@ query before deleting the redundant mail addresses.
Noninteractively, this may be used as an element of `ebdb-notice-record-hook'
or `ebdb-change-hook'. However, see also `ebdb-ignore-redundant-mails',
which is probably more suited for your needs."
- (interactive (list (ebdb-do-records) (not current-prefix-arg) t))
+ (interactive (list (ebdb-do-records) (not current-prefix-arg)))
(dolist (record (ebdb-record-list records))
(let (mails redundant okay)
;; We do not look at the canonicalized mail addresses of RECORD.
@@ -1370,22 +1370,24 @@ which is probably more suited for your needs."
;; address@hidden, "Joe Smith <address@hidden>", "Jonathan Smith
<address@hidden>"
;; we do not know which address to keep and which ones to throw.
(dolist (mail (ebdb-record-mail record))
- (if (assoc-string mail mails t) ; duplicate mail address
+ (if (member mail mails) ; duplicate mail address
(push mail redundant)
(push mail mails)))
- (let ((mail-re (delq nil (mapcar 'ebdb-mail-redundant-re mails)))
+ (let ((mail-re (delq nil (mapcar (lambda (m)
+ (ebdb-mail-redundant-re
+ (ebdb-string m)))
+ mails)))
(case-fold-search t))
(if (not (cdr mail-re)) ; at most one mail-re address to consider
(setq okay (nreverse mails))
- (setq mail-re (concat "\\`\\(?:" (mapconcat 'identity mail-re "\\|")
- "\\)\\'"))
+ (setq mail-re (regexp-opt mail-re))
(dolist (mail mails)
- (if (string-match mail-re mail) ; redundant mail address
+ (if (string-match mail-re (ebdb-string mail)) ; redundant mail
address
(push mail redundant)
(push mail okay)))))
(let ((form (format "redundant mail%s %s"
(if (< 1 (length redundant)) "s" "")
- (ebdb-concat 'mail (nreverse redundant)))))
+ (mapconcat #'ebdb-string (nreverse redundant) ",
"))))
(when (and redundant
(or (not query)
(y-or-n-p (format "Delete %s: " form))))
- [elpa] externals/ebdb 10c1e76 185/350: When replying to messages, start with a populated EBDB buffer, (continued)
- [elpa] externals/ebdb 10c1e76 185/350: When replying to messages, start with a populated EBDB buffer, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b9e6034 187/350: Increase base field indentation in *EBDB* buffers, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a19ff0a 168/350: Simplify pop-up window splitting, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 4c6b6f5 190/350: Protect gnus stuff behind eval-after-load, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e0c3311 177/350: Fix parsing of suffixes in names, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 429cdb0 183/350: Add safety check to ebdb-undisplay-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 744c829 182/350: Clear *EBDB-Message* buffers when composing new message, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 8ebba5d 178/350: Very basic test setup, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 927c2ac 188/350: Be more careful about name formatting, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e52e17e 192/350: Pop up EBDB buffer when using company to complete, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb fc1a480 191/350: Fix ebdb-delete-redundant-mails,
Eric Abrahamsen <=
- [elpa] externals/ebdb 61dcb8c 148/350: Re-initialize database records after reloading, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 8694194 150/350: Use string-match-p for searching on Org tags, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e4c0442 162/350: Fix up actions and EBDB buffer menus, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 09e421f 156/350: Rework anniversary/diary integration, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a8e44ee 175/350: Update company-ebdb for new search behavior, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ece91cb 176/350: Remove spurious ebdb-record-search implementation, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 86a3aa9 180/350: Change signature of ebdb-undisplay-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 05cf7ec 184/350: New ebdb-message-buffer-name subst, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ae377c1 199/350: Use ebdb-field-search in notes-type record searches, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 54bb078 200/350: Remove final references to ebdb-print, Eric Abrahamsen, 2017/08/14