[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 6f8d59b 254/350: Fix record citation
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 6f8d59b 254/350: Fix record citation |
Date: |
Mon, 14 Aug 2017 11:46:48 -0400 (EDT) |
branch: externals/ebdb
commit 6f8d59b7e67d0e04388d38074ca8e9d4f094ce5b
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Fix record citation
* ebdb.el (ebdb-records-cite): First, rename from
ebdb-records-cite-mail. Interactive command is now called
`ebdb-cite-records', and underlying methods called
`ebdb-records-cite'. Also, fix bug in `ebdb-records-cite'.
---
ebdb.el | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index 1858529..dbf07a7 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -4704,7 +4704,7 @@ The formatting rules are defined in
`ebdb-address-format-list'."
;; "Citation" means inserting some sort of string representing the
;; record(s) into the current buffer.
-(defun ebdb-cite-records-mail (&optional records arg)
+(defun ebdb-cite-records (&optional records arg)
(interactive (list (ebdb-prompt-for-record)
current-prefix-arg))
(let ((recs (ebdb-record-list records))
@@ -4715,9 +4715,9 @@ The formatting rules are defined in
`ebdb-address-format-list'."
(push (cons r (or (object-assoc 'primary 'priority m)
(car m)))
usable)))
- (insert (ebdb-records-cite-mail style usable))))
+ (insert (ebdb-records-cite style usable))))
-(cl-defgeneric ebdb-records-cite-mail (style records)
+(cl-defgeneric ebdb-records-cite (style records)
"Insert mode-appropriate mail strings for RECORDS.
STYLE is a symbol, one of 'inline or 'list. This is interpreted
@@ -4726,19 +4726,16 @@ differently by different major modes.
This is a generic function that dispatches on the value of
`major-mode'. It only inserts names and mail addresses.")
-(cl-defmethod ebdb-records-cite-mail (style records)
+(cl-defmethod ebdb-records-cite (style records)
"The fallback catch-all method."
(when records
- (mapconcat (lambda (pair)
- (format "%s <%s>"
- (ebdb-string (car pair))
- (ebdb-string (cdr pair))))
- records
- (if (eql style 'inline)
- " "
- "\n"))))
-
-(cl-defmethod ebdb-records-cite-mail :around ((_style (eql list))
+ (mapcar (lambda (pair)
+ (format "%s <%s>"
+ (ebdb-string (car pair))
+ (ebdb-string (cdr pair))))
+ records)))
+
+(cl-defmethod ebdb-records-cite :around ((_style (eql list))
(_records list)
&context (major-mode org-mode))
(let ((list (cl-call-next-method)))
@@ -4746,7 +4743,7 @@ This is a generic function that dispatches on the value of
(format "- %s" elt))
list "\n")))
-(cl-defmethod ebdb-records-cite-mail
+(cl-defmethod ebdb-records-cite
(_style (records list) &context (major-mode org-mode))
"Insert RECORDS as a list of org links."
(mapcar (lambda (pair)
@@ -4755,7 +4752,7 @@ This is a generic function that dispatches on the value of
(ebdb-string (car pair))))
records))
-(cl-defmethod ebdb-records-cite-mail :around ((_style (eql list))
+(cl-defmethod ebdb-records-cite :around ((_style (eql list))
(_records list)
&context (major-mode html-mode))
(let ((list (cl-call-next-method)))
@@ -4763,12 +4760,12 @@ This is a generic function that dispatches on the value
of
(format "<li>%s</li>" l))
list "\n")))
-(cl-defmethod ebdb-records-cite-mail :around ((_style (eql inline))
+(cl-defmethod ebdb-records-cite :around ((_style (eql inline))
(_records list))
(let ((list (cl-call-next-method)))
(mapconcat #'identity list " ")))
-(cl-defmethod ebdb-records-cite-mail
+(cl-defmethod ebdb-records-cite
(_style (records list) &context (major-mode html-mode))
(mapcar
(lambda (pair)
- [elpa] externals/ebdb d5bec83 229/350: Fix to UUID change, (continued)
- [elpa] externals/ebdb d5bec83 229/350: Fix to UUID change, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 72aba6a 228/350: New label/field alist for vcard export, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb d0d0bbb 233/350: Shift transformation of search strings into ebdb-search, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb dc4217d 213/350: Compiler-inspired fixes, volume 5453, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ce5d9ee 242/350: Fix vCard formatting for anniversaries, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 5d7a58c 246/350: Add option for character fold searching, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e5696fa 253/350: Add counsel-ebdb.el, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb fb4d5d5 255/350: Migration should guard against unparseable emails, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb aa15250 252/350: Change newline approach in vCard handling, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 0120729 240/350: Add vcard unescaping, and some vcard tests, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 6f8d59b 254/350: Fix record citation,
Eric Abrahamsen <=
- [elpa] externals/ebdb 3106b45 256/350: Require ebdb-format in ebdb-vcard, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 7549366 259/350: New method: ebdb-db-load-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b37356a 270/350: Fix docstring of ebdb-create-record, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 5135645 260/350: Split out ebdb-notice-record and ebdb-notice-field methods, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 71a93f5 268/350: Put a load protection in ebdb-mua-update-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb cacb97b 271/350: Fix bug in MUA record creation, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e5bdee2 278/350: Rework ebdb-mail-yank, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 8dd1600 273/350: Change type of anniversary field dates, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 57b2514 276/350: Use ebdb-with-record-edits in more places, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f44a797 286/350: New function ebdb-mua-in-ebdb-buffer, Eric Abrahamsen, 2017/08/14