[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 3cba3d7 01/13: Rejigger insertion of newlines in r
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 3cba3d7 01/13: Rejigger insertion of newlines in record formatting |
Date: |
Tue, 15 Jan 2019 11:15:50 -0500 (EST) |
branch: externals/ebdb
commit 3cba3d7405127169034d226aad95dc21654fbffc
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Rejigger insertion of newlines in record formatting
* ebdb-com.el (ebdb-fmt-record, ebdb-fmt-record-header,
ebdb-fmt-compose-fields): Fairly classic error re making sure there
are always newlines in the right place.
---
ebdb-com.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index 471786b..82c42f9 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -688,7 +688,8 @@ Print the first line, add an ellipsis, and add a tooltip."
fmt record))))))
(concat
(ebdb-fmt-record-header fmt record header-fields)
- (ebdb-fmt-compose-fields fmt record body-fields 1))))
+ (ebdb-fmt-compose-fields fmt record body-fields 1)
+ "\n")))
(cl-defmethod ebdb-fmt-record-header ((fmt ebdb-formatter-ebdb)
(record ebdb-record)
@@ -716,6 +717,11 @@ Print the first line, add an ellipsis, and add a tooltip."
inst " "))
header-fields " "))))))
+(cl-defmethod ebdb-fmt-record-header :around ((fmt
ebdb-formatter-ebdb-multiline)
+ (record ebdb-record)
+ &optional header-fields)
+ (concat (cl-call-next-method) "\n"))
+
(cl-defmethod ebdb-fmt-compose-fields ((fmt ebdb-formatter-ebdb-multiline)
(record ebdb-record)
&optional
@@ -760,7 +766,6 @@ string."
(fill-column (window-body-width)))
(with-current-buffer (get-buffer-create "format test")
(erase-buffer)
- (insert "\n")
(mapc
(pcase-lambda (`(,label . ,fields))
(let ((start (point)))
@@ -784,7 +789,6 @@ string."
(when ebdb-fill-field-values
(fill-region start (point))))))
field-pairs)
- (insert "\n")
(buffer-string)))))
(cl-defmethod ebdb-fmt-compose-fields ((fmt ebdb-formatter-ebdb-oneline)
@@ -797,8 +801,7 @@ string."
(mapconcat (pcase-lambda ((map inst style))
(mapconcat (lambda (f) (ebdb-fmt-field fmt f style record))
inst " "))
- field-list ", ")))
- "\n"))
+ field-list ", ")))))
(cl-defgeneric ebdb-make-buffer-name (&context (major-mode t))
"Return the buffer to be used by EBDB.
- [elpa] externals/ebdb updated (3289ad4 -> 753c049), Eric Abrahamsen, 2019/01/15
- [elpa] externals/ebdb 3cba3d7 01/13: Rejigger insertion of newlines in record formatting,
Eric Abrahamsen <=
- [elpa] externals/ebdb f133aef 03/13: Docstring fix for ebdb-mail, Eric Abrahamsen, 2019/01/15
- [elpa] externals/ebdb 5ef1773 04/13: Allow overwriting of previous formatting buffers, Eric Abrahamsen, 2019/01/15
- [elpa] externals/ebdb eec63c8 07/13: Provide basic HTML5 freeform formatter, Eric Abrahamsen, 2019/01/15
- [elpa] externals/ebdb 980927f 02/13: Switch from cond to pcase in ebdb-record-field, Eric Abrahamsen, 2019/01/15
- [elpa] externals/ebdb 6dad4c1 09/13: Allow 'mail-primary as an argument to ebdb-record-field, Eric Abrahamsen, 2019/01/15
- [elpa] externals/ebdb 4625970 11/13: Move map require from ebdb-com.el to ebdb.el, Eric Abrahamsen, 2019/01/15
- [elpa] externals/ebdb 753c049 13/13: Bump to 0.6.3, flush recent changes, Eric Abrahamsen, 2019/01/15
- [elpa] externals/ebdb 65247f6 08/13: Make csv-mode dependency optional, Eric Abrahamsen, 2019/01/15
- [elpa] externals/ebdb cbaa04b 10/13: Fix compose fields for the HTML5 freeform formatter, Eric Abrahamsen, 2019/01/15
- [elpa] externals/ebdb adb60dd 05/13: Refactor formatter classes, add tabular formatters, Eric Abrahamsen, 2019/01/15