[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb a0eada8 128/350: Change some of the EBDB buffer fo
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb a0eada8 128/350: Change some of the EBDB buffer formatting defaults |
Date: |
Mon, 14 Aug 2017 11:46:20 -0400 (EDT) |
branch: externals/ebdb
commit a0eada88b9420213268a1e362a6bd724caf7f98b
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Change some of the EBDB buffer formatting defaults
* ebdb-format.el: By default, add ebdb-field-address to the :collapse
slot of the formatters. Also, by default format fields using the
'normal style rather than the 'oneline style.
What this means, practically, is that most fields are just output
using `ebdb-string'. Previously, everything was output as 'oneline,
which meant a bunch of spurious `split-strings', now they just dump
their whole strings. Nothing actually specializes on 'normal, but it
will hit the catch-all.
Addresses are now 'collapse, which is re-routed to 'oneline by
default, which means addresses are the only fields that get
`split-string'ed, but it's also possible to catch 'collapse and do
something different.
---
ebdb-format.el | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/ebdb-format.el b/ebdb-format.el
index 1fcc5b9..b674a1a 100644
--- a/ebdb-format.el
+++ b/ebdb-format.el
@@ -47,9 +47,8 @@
:type list
:initarg :include
:initform nil
- :documentation "A list of field classes to include. If both
- \"include\" and \"exclude\" are given, the \"exclude\" slot
- will be ignored.")
+ :documentation "A list of field classes to include. If
+ \"include\" and \"exclude\" conflict, \"exclude\" loses.")
(exclude
:type list
:initarg :exclude
@@ -58,7 +57,10 @@
(sort
:type list
:initarg :sort
- :initform '(ebdb-field-mail ebdb-field-phone ebdb-field-address "_"
ebdb-field-notes))
+ :initform '(ebdb-field-mail ebdb-field-phone ebdb-field-address "_"
ebdb-field-notes)
+ :documentation "How field instances should be sorted. Field
+ classes should be listed in their proper sort order. A \"_\"
+ placeholder indicates where all other fields should go." )
(primary
:type boolean
:initarg :primary
@@ -79,7 +81,7 @@
(collapse
:type list
:initarg :collapse
- :initform nil
+ :initform '(ebdb-field-address)
:documentation "A list of field classes which should be
\"collapsed\". What this means is up to the formatter, but it
generally indicates that most of the field contents will
@@ -216,6 +218,13 @@ which formats them appropriately."
(cl-defmethod ebdb-fmt-field ((fmt ebdb-formatter)
(field ebdb-field)
+ (style (eql collapse))
+ (record ebdb-record))
+ "For now, treat collapse the same as oneline."
+ (ebdb-fmt-field fmt field 'oneline record))
+
+(cl-defmethod ebdb-fmt-field ((fmt ebdb-formatter)
+ (field ebdb-field)
_style
(record ebdb-record))
"The base implementation for FIELD simply returns the value of
@@ -368,7 +377,7 @@ grouped by field class."
:style
(cond
((ebdb-class-in-list-p cls collapse) 'collapse)
- (t 'oneline)))
+ (t 'normal)))
outlist)))
outlist)))
- [elpa] externals/ebdb 4cd4a0c 123/350: Simplify searching, (continued)
- [elpa] externals/ebdb 4cd4a0c 123/350: Simplify searching, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 5b24d54 126/350: Special-case mail symbol in ebdb-record-field, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 5613bc2 137/350: Fix bug in ebdb-record-field-slot-query, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 86b386d 141/350: Compiler-inspired fixes, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 05f67d6 081/350: Fix merging procedure, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 1ded570 086/350: Note new database-related commands in manual, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ef673e2 094/350: Improve organization searching, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb bc71bda 099/350: Many fixes to migration routine, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 548e05d 106/350: Tweaks to MUA interactive commands, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb dd83c7e 115/350: Short-circuit ebdb-info, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a0eada8 128/350: Change some of the EBDB buffer formatting defaults,
Eric Abrahamsen <=
- [elpa] externals/ebdb 20906ae 131/350: ebdb-prompt-for-record should load if necessary, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 1bc78ab 133/350: Add helm-ebdb file, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ed3e270 119/350: Reverse order of args in return value of ebdb-popup-window, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ed6e228 136/350: Make ebdb-annotate-message more class agnostic, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb aa2d973 147/350: Allow optional records argument to ebdb-initialize, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 42f6dce 130/350: Add "Hacking EBDB" section to manual, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 5dda311 118/350: Force mode line update after renaming EBDB buffers, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a94483d 122/350: Refinements to snarfing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb d9b4865 146/350: More tweaks to snarfing process, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b635b4e 155/350: First stab at article snarfing, Eric Abrahamsen, 2017/08/14