emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb 77fa3b2 1/6: New option ebdb-mua-default-formatter


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 77fa3b2 1/6: New option ebdb-mua-default-formatter
Date: Thu, 26 Jul 2018 16:26:06 -0400 (EDT)

branch: externals/ebdb
commit 77fa3b2ffe88f8bbf581d36f21905a1ecc1a1d3f
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    New option ebdb-mua-default-formatter
    
    * ebdb-mua.el (ebdb-mua-default-formatter): New customization option
      governing which formatter is used by default in MUAs.  Defaults to
      `ebdb-default-multiline-formatter'.
      (ebdb-mua-update-records, ebdb-mua-display-records,
      ebdb-mua-auto-update): Use new option here. (Why are there so many
      different functions that do pretty much the same thing?)
    * ebdb.org: Document.
---
 ebdb-mua.el | 17 +++++++++----
 ebdb.info   | 80 +++++++++++++++++++++++++++++++++----------------------------
 ebdb.org    | 11 ++++++++-
 ebdb.texi   | 10 +++++++-
 4 files changed, 75 insertions(+), 43 deletions(-)

diff --git a/ebdb-mua.el b/ebdb-mua.el
index 0869919..d8f0b4f 100644
--- a/ebdb-mua.el
+++ b/ebdb-mua.el
@@ -401,6 +401,15 @@ are not \"noticed\", nor is the timestamp updated."
   :group 'ebdb-mua
   :type 'boolean)
 
+(defcustom ebdb-mua-default-formatter ebdb-default-multiline-formatter
+  "The default formatter to use for MUA pop-up buffers.
+The value should be an instance of the `ebdb-formatter-ebdb'
+class.  Easy choices are the value of
+`ebdb-default-multiline-formatter' or
+`ebdb-default-oneline-formatter'."
+  :group 'ebdb-mua
+  :type ebdb-formatter-ebdb)
+
 
 
 (defcustom ebdb-mua-summary-unification-list
@@ -1065,7 +1074,7 @@ apply, however."
   (unless ebdb-record-tracker
     (ebdb-load))
   (let ((ebdb-message-all-addresses (or all ebdb-message-all-addresses))
-       (fmt ebdb-default-multiline-formatter)
+       (fmt ebdb-mua-default-formatter)
         records)
     (ebdb-mua-prepare-article)
     (setq records (ebdb-update-records
@@ -1077,7 +1086,6 @@ apply, however."
 ;;;###autoload
 (defun ebdb-mua-display-records (&optional header-class all)
   "Display the EBDB record(s) for the addresses in this message.
-
 This looks into the headers of a message according to
 HEADER-CLASS.  Then for the mail addresses found the
 corresponding EBDB records are displayed.  Records are not
@@ -1088,7 +1096,7 @@ use all classes in `ebdb-message-headers'.  If ALL is 
non-nil,
 bind `ebdb-message-all-addresses' to ALL."
   (interactive)
   (let ((ebdb-message-all-addresses (or all ebdb-message-all-addresses))
-       (fmt ebdb-default-multiline-formatter)
+       (fmt ebdb-mua-default-formatter)
         records)
     (ebdb-mua-prepare-article)
     (setq records (ebdb-update-records
@@ -1258,7 +1266,6 @@ buffer."
 ;;;###autoload
 (defun ebdb-mua-auto-update (&optional header-class update-p)
   "Update EBDB automatically based on incoming and outgoing messages.
-
 This looks into the headers of a message according to
 HEADER-CLASS.  Then for the mail addresses found the
 corresponding EBDB records are updated.  UPDATE-P determines
@@ -1283,7 +1290,7 @@ along with the MUA window(s), displaying the matching 
records."
                       ebdb-mua-auto-update-p)))
     (if ebdb-mua-pop-up
        (if records
-           (ebdb-display-records records ebdb-default-multiline-formatter
+           (ebdb-display-records records ebdb-mua-default-formatter
                                  nil nil (ebdb-popup-window))
          ;; If there are no records, empty the EBDB window.
          (ebdb-undisplay-records)))
diff --git a/ebdb.info b/ebdb.info
index 4d10e9e..3ad612a 100644
--- a/ebdb.info
+++ b/ebdb.info
@@ -604,11 +604,18 @@ command, or by cloning or renaming existing buffers.
      possible to manually create the buffer using interactive commands
      (see below).
 
+ -- User Option: ebdb-mua-default-formatter
+     The default formatter to use for MUA pop-up buffers.  The value of
+     this option should be an instance of ‘ebdb-formatter-ebdb’; it
+     defaults to ‘ebdb-default-multiline-formatter’.  Other likely
+     options would be the value of ‘ebdb-default-oneline-formatter’, or
+     a custom-made formatter, see *note Customizing Record Display::.
+
    EBDB can also integrate with atomic windows (*Note (elisp)Atomic
 Windows::).
 
  -- User Option: ebdb-join-atomic-windows
-     When non-nil (the defaul), EBDB buffers that are popped up within
+     When non-nil (the default), EBDB buffers that are popped up within
      existing atomic windows will become part of the atomic buffer.
      Otherwise they will be opened to one side of the atomic window.
 
@@ -2164,7 +2171,7 @@ Index
                                                               (line   6)
 * ebdb-insert-field <1>:                 The Basics of ebdb-mode.
                                                               (line  30)
-* ebdb-join-atomic-windows:              Pop-up Buffers.      (line  19)
+* ebdb-join-atomic-windows:              Pop-up Buffers.      (line  26)
 * ebdb-join-atomic-windows <1>:          Customizing Record Display.
                                                               (line  24)
 * ebdb-mail:                             The Basics of ebdb-mode.
@@ -2182,6 +2189,7 @@ Index
                                                               (line  11)
 * ebdb-mua-auto-update-p:                Auto-Updating Records.
                                                               (line  10)
+* ebdb-mua-default-formatter:            Pop-up Buffers.      (line  16)
 * ebdb-mua-display-all-recipients:       Interactive Commands.
                                                               (line  59)
 * ebdb-mua-display-all-records:          Interactive Commands.
@@ -2360,40 +2368,40 @@ Node: MUA Interaction18443
 Node: Loading MUA Code18967
 Node: Display and Updating19680
 Node: Pop-up Buffers20446
-Node: Auto-Updating Records21622
-Node: Noticing and Automatic Rules24022
-Node: Interactive Commands25355
-Node: EBDB and MUA summary buffers27830
-Node: Sender name display28316
-Node: Summary buffer marks29543
-Node: EBDB Buffers30722
-Node: Searching31935
-Node: Changing Search Behavior33597
-Node: The Basics of ebdb-mode34844
-Node: Customizing Record Display38537
-Node: Marking42857
-Node: Exporting/Formatting43284
-Node: Completion44233
-Node: Snarfing45431
-Node: Internationalization47448
-Node: Diary Integration50147
-Node: Mail Aliases51012
-Node: vCard Support51726
-Node: Org Integration52225
-Node: Citing Records54123
-Node: Hacking EBDB54881
-Node: Field Classes57200
-Node: Init and Delete Methods60331
-Node: The Labeled Field Class61838
-Node: The Singleton Field Class62692
-Node: Actions63130
-Node: Custom Field Searching63802
-Node: Fast Lookups66669
-Node: Formatting in the EBDB Buffer68479
-Node: Writing Internationalization Libraries70555
-Node: Writing Integration For New MUAs74969
-Node: Article snarfing78416
-Node: Index79134
+Node: Auto-Updating Records22029
+Node: Noticing and Automatic Rules24429
+Node: Interactive Commands25762
+Node: EBDB and MUA summary buffers28237
+Node: Sender name display28723
+Node: Summary buffer marks29950
+Node: EBDB Buffers31129
+Node: Searching32342
+Node: Changing Search Behavior34004
+Node: The Basics of ebdb-mode35251
+Node: Customizing Record Display38944
+Node: Marking43264
+Node: Exporting/Formatting43691
+Node: Completion44640
+Node: Snarfing45838
+Node: Internationalization47855
+Node: Diary Integration50554
+Node: Mail Aliases51419
+Node: vCard Support52133
+Node: Org Integration52632
+Node: Citing Records54530
+Node: Hacking EBDB55288
+Node: Field Classes57607
+Node: Init and Delete Methods60738
+Node: The Labeled Field Class62245
+Node: The Singleton Field Class63099
+Node: Actions63537
+Node: Custom Field Searching64209
+Node: Fast Lookups67076
+Node: Formatting in the EBDB Buffer68886
+Node: Writing Internationalization Libraries70962
+Node: Writing Integration For New MUAs75376
+Node: Article snarfing78823
+Node: Index79541
 
 End Tag Table
 
diff --git a/ebdb.org b/ebdb.org
index 41fa931..481fb90 100644
--- a/ebdb.org
+++ b/ebdb.org
@@ -430,12 +430,21 @@ possible to manually create the buffer using interactive 
commands (see
 below).
 #+end_defopt
 
+#+ATTR_TEXINFO: :options ebdb-mua-default-formatter
+#+begin_defopt
+The default formatter to use for MUA pop-up buffers.  The value of
+this option should be an instance of ~ebdb-formatter-ebdb~; it
+defaults to ~ebdb-default-multiline-formatter~.  Other likely options
+would be the value of ~ebdb-default-oneline-formatter~, or a
+custom-made formatter, see 
[[id:20fc7a2a-55a9-43ef-9534-9e5887682a88][Customizing Record Display]].
+#+end_defopt
+
 EBDB can also integrate with atomic windows (@@texinfo:@xref{Atomic
 Windows,,,elisp}@@).
 
 #+ATTR_TEXINFO: :options ebdb-join-atomic-windows
 #+begin_defopt
-When non-nil (the defaul), EBDB buffers that are popped up within
+When non-nil (the default), EBDB buffers that are popped up within
 existing atomic windows will become part of the atomic buffer.
 Otherwise they will be opened to one side of the atomic window.
 #+end_defopt
diff --git a/ebdb.texi b/ebdb.texi
index f8716f3..00f62ad 100644
--- a/ebdb.texi
+++ b/ebdb.texi
@@ -632,11 +632,19 @@ possible to manually create the buffer using interactive 
commands (see
 below).
 @end defopt
 
address@hidden ebdb-mua-default-formatter
+The default formatter to use for MUA pop-up buffers.  The value of
+this option should be an instance of @code{ebdb-formatter-ebdb}; it
+defaults to @code{ebdb-default-multiline-formatter}.  Other likely options
+would be the value of @code{ebdb-default-oneline-formatter}, or a
+custom-made formatter, see @ref{Customizing Record Display}.
address@hidden defopt
+
 EBDB can also integrate with atomic windows (@xref{Atomic
 Windows,,,elisp}).
 
 @defopt ebdb-join-atomic-windows
-When non-nil (the defaul), EBDB buffers that are popped up within
+When non-nil (the default), EBDB buffers that are popped up within
 existing atomic windows will become part of the atomic buffer.
 Otherwise they will be opened to one side of the atomic window.
 @end defopt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]