[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 0467500 2/4: Fix to ebdb-read method for tag field
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 0467500 2/4: Fix to ebdb-read method for tag field |
Date: |
Thu, 9 Jan 2020 18:05:08 -0500 (EST) |
branch: externals/ebdb
commit 046750093275092db4c2407b22482d6d0d702453
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Fix to ebdb-read method for tag field
Mistake in c0e7c2dA
* ebdb.el (ebdb-read): Only prompt for tags if the slots plist doesn't
already contain it. The org tags field class will pass slots down to
this method (this guard is a good idea even though we're going to get
rid of the org tags field class).
---
ebdb.el | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index 002033c..23240ca 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2350,13 +2350,17 @@ See `ebdb-url-valid-schemes' for a list of acceptable
schemes."
(ebdb-concat 'ebdb-field-tags (slot-value field 'tags)))
(cl-defmethod ebdb-read ((field (subclass ebdb-field-tags)) &optional slots
obj)
- (let* ((crm-separator (cadr (assq 'ebdb-field-tags ebdb-separator-alist)))
- (val (completing-read-multiple
- (format "Tags (separate with \"%s\"): " crm-separator)
- ebdb-tags
- nil nil
- (when obj (ebdb-string obj)))))
- (cl-call-next-method field (plist-put slots :tags val))))
+ (let ((crm-separator (cadr (assq 'ebdb-field-tags ebdb-separator-alist))))
+ (cl-call-next-method
+ field
+ (if (plist-member slots :tags)
+ slots
+ (plist-put slots :tags
+ (completing-read-multiple
+ (format "Tags (separate with \"%s\"): " crm-separator)
+ ebdb-tags
+ nil nil
+ (when obj (ebdb-string obj))))))))
(cl-defmethod ebdb-search-read ((_class (subclass ebdb-field-tags)))
(let ((search-string (ebdb-read-string