[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb bf51b58 161/350: Fix ebdb-delete-redundant-mails
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb bf51b58 161/350: Fix ebdb-delete-redundant-mails |
Date: |
Mon, 14 Aug 2017 11:46:27 -0400 (EDT) |
branch: externals/ebdb
commit bf51b589cbd4d9f697e263b057189d53ce00d66e
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Fix ebdb-delete-redundant-mails
* ebdb-com.el (ebdb-delete-redundant-mails): Possibly the last old
code in EBDB.
---
ebdb-com.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index 7c4dc6d..2ffa1c7 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1364,14 +1364,12 @@ In particular, ignore addresses \"Joe Smith
<address@hidden>\"."
(if (and name host)
(concat (regexp-quote name) "@.*\\." (regexp-quote host)))))
-(defun ebdb-delete-redundant-mails (records &optional query update)
+(defun ebdb-delete-redundant-mails (records &optional query)
"Delete redundant or duplicate mails from RECORDS.
For example, \"address@hidden" is redundant w.r.t. \"address@hidden".
Duplicates may (but should not) occur if we feed EBDB automatically.
If QUERY is non-nil (as in interactive calls, unless we use a prefix arg)
query before deleting the redundant mail addresses.
-If UPDATE is non-nil (as in interactive calls) update the database.
-Otherwise, this is the caller's responsiblity.
Noninteractively, this may be used as an element of `ebdb-notice-record-hook'
or `ebdb-change-hook'. However, see also `ebdb-ignore-redundant-mails',
@@ -1406,9 +1404,10 @@ which is probably more suited for your needs."
(or (not query)
(y-or-n-p (format "Delete %s: " form))))
(unless query (message "Deleting %s" form))
- (ebdb-record-set-field record 'mail okay)
- (when update
- (ebdb-change-record record)))))))
+ (dolist (m okay)
+ (ebdb-record-insert-field record 'mail m))
+ (dolist (m redundant)
+ (ebdb-record-delete-field record 'mail m)))))))
(defun ebdb-touch-records (records)
"Touch RECORDS by calling `ebdb-change-hook' unconditionally."
- [elpa] externals/ebdb 0910ddd 105/350: Change default of ebdb-default-user-field, (continued)
- [elpa] externals/ebdb 0910ddd 105/350: Change default of ebdb-default-user-field, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b495e29 083/350: Omnibus changes to display and redisplay, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 29bf304 101/350: Rework MUA window popups, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 81e23c3 134/350: Simplify record mail citing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b661aac 124/350: First generalized version of snarfing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb aae57ff 139/350: Ensure that extra name field instances go in 'aka slot, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 057c4c0 144/350: Have ebdb-snarf accept optional records argument, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 8d81a19 132/350: Add EBDB record citation, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 7662133 140/350: Simplify ebdb-dwim-mail, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 0cfe1ec 164/350: Provide keybinding for ebdb-format-all-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb bf51b58 161/350: Fix ebdb-delete-redundant-mails,
Eric Abrahamsen <=
- [elpa] externals/ebdb 279eb56 169/350: Tweaks and additions to manual, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb eea0abf 165/350: VCard export is good enough, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 64b5e43 170/350: Fix autoloads in ebdb.el, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a968dd3 143/350: First actually-working version of snarfing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a8e0221 179/350: Missing local variable binding, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e71548d 172/350: Allow for characters before mail addresses when snarfing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 14b03b5 186/350: Fix menu entry of ebdb-create-record, Eric Abrahamsen, 2017/08/14
- [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