[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 00d95ea 2/4: New function ebdb-toggle-all-records-
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 00d95ea 2/4: New function ebdb-toggle-all-records-format, bind to "T" |
Date: |
Sat, 18 Jan 2020 14:32:52 -0500 (EST) |
branch: externals/ebdb
commit 00d95ea003dde53b2a2be7ca22845e535b014ad8
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
New function ebdb-toggle-all-records-format, bind to "T"
* ebdb-com.el (ebdb-toggle-all-records-format): New function to toggle
the format of all records displayed in the current *EBDB* buffer. Bind
this to "T", as it's a more useful command than displaying the full record.
(ebdb-toggle-records-format): Offer the full record formatter as one
of the choices in this cycle.
* ebdb-mua.el (ebdb-mua-toggle-records-format): Accept and pass on the
same prefix argument as other similar functions.
* ebdb.org (The Basics of ebdb-mode): Document change.
---
ebdb-com.el | 18 +++++++++++++-----
ebdb-mua.el | 13 ++++++++-----
ebdb.info | 58 +++++++++++++++++++++++++++++-----------------------------
ebdb.org | 8 ++++----
ebdb.texi | 8 ++++----
5 files changed, 58 insertions(+), 47 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index ba0fcbc..eeee256 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -289,7 +289,7 @@ display information."
(define-key km (kbd "s") 'ebdb-save-ebdb)
(define-key km (kbd "C-x C-s") 'ebdb-save-ebdb)
(define-key km (kbd "t") 'ebdb-toggle-records-format)
- (define-key km (kbd "T") 'ebdb-display-records-completely)
+ (define-key km (kbd "T") 'ebdb-toggle-all-records-format)
;; Marking
(define-key km (kbd "#") 'ebdb-toggle-record-mark)
(define-key km (kbd "M-#") 'ebdb-toggle-all-record-marks)
@@ -2116,7 +2116,7 @@ With prefix ARG 0, RECORDS are displayed elided.
With any other non-nil ARG, RECORDS are displayed expanded."
(interactive (list (ebdb-do-records t) current-prefix-arg))
(let* ((current-fmt (nth 1 (ebdb-current-record t)))
- (formatters (ebdb-available-ebdb-formatters))
+ (formatters (ebdb-available-ebdb-formatters 'full-okay))
(fmt
(cond ((eq arg 0)
ebdb-default-oneline-formatter)
@@ -2125,10 +2125,10 @@ With any other non-nil ARG, RECORDS are displayed
expanded."
ebdb-default-multiline-formatter)
;; layout is not the last element of layout-alist
;; and we switch to the following element of layout-alist
- ((let ((idx (cl-position current-fmt formatters)))
- (if (= (1+ idx) (length formatters))
+ ((let ((idx (1+ (cl-position current-fmt formatters))))
+ (if (= idx (length formatters))
(car formatters)
- (nth (1+ idx) formatters)))))))
+ (nth idx formatters)))))))
(message "Using %S layout" (ebdb-string fmt))
(ebdb-redisplay-records (mapcar #'car records) fmt)))
@@ -2139,6 +2139,14 @@ With any other non-nil ARG, RECORDS are displayed
expanded."
(ebdb-redisplay-records records ebdb-full-formatter))
;;;###autoload
+(defun ebdb-toggle-all-records-format (&optional arg)
+ "Call `ebdb-toggle-records-format' on all displayed records.
+See that function's docstring for use of the prefix arg ARG."
+ (interactive "p")
+ (when ebdb-records
+ (ebdb-toggle-records-format ebdb-records arg)))
+
+;;;###autoload
(defun ebdb-display-records-with-fmt (records fmt)
"Display RECORDS using FMT."
(interactive
diff --git a/ebdb-mua.el b/ebdb-mua.el
index 28fb962..534f3ff 100644
--- a/ebdb-mua.el
+++ b/ebdb-mua.el
@@ -1270,13 +1270,16 @@ where it was in the MUA, rather than quitting the EBDB
buffer."
[?q])))))))
;;;###autoload
-(defun ebdb-mua-toggle-records-format ()
- "Toggle format of all records without leaving MUA."
- (interactive)
+(defun ebdb-mua-toggle-records-format (&optional arg)
+ "Toggle format of all records without leaving MUA.
+See the docstring of `ebdb-toglge-records-format' for use of the
+prefix arg ARG."
+ (interactive "p")
(let ((buf (get-buffer (ebdb-make-buffer-name))))
(when buf
- (with-current-buffer buf
- (ebdb-toggle-records-format ebdb-records)))))
+ (with-current-buffer buf
+ (when ebdb-records
+ (ebdb-toggle-records-format ebdb-records arg))))))
;;;###autoload
(defun ebdb-mua-edit-sender-notes ()
diff --git a/ebdb.info b/ebdb.info
index b047f62..cba32f4 100644
--- a/ebdb.info
+++ b/ebdb.info
@@ -1280,13 +1280,13 @@ keybindings apply.
the ability to interpolate variables in the body text.
‘t’
- Toggle between a multi-line and one-line display (see *note
+ Toggle between a multi-line, one-line, and full display (see *note
Customizing Record Display: Customizing Record Display.)
(‘ebdb-toggle-records-format’).
‘T’
- Display all of a record’s fields
- (‘ebdb-display-records-completely’).
+ Toggle the display of all the records in the current *EBDB* buffer.
+ (‘ebdb-toggle-all-records-format’).
‘r’
Redisplay the record under point (‘ebdb-reformat-records’).
@@ -2389,8 +2389,6 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB, Up:
Top
(line 45)
* ebdb-delete-record-or-field: Deleting Records and Fields.
(line 6)
-* ebdb-display-records-completely: The Basics of ebdb-mode.
- (line 78)
* ebdb-edit-field: Editing Existing Fields.
(line 6)
* ebdb-edit-field <1>: The Basics of ebdb-mode.
@@ -2546,6 +2544,8 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB, Up:
Top
* ebdb-snarf-name-re: Snarfing. (line 31)
* ebdb-snarf-routines: Snarfing. (line 26)
* ebdb-sources: The EBDB Database. (line 11)
+* ebdb-toggle-all-records-format: The Basics of ebdb-mode.
+ (line 78)
* ebdb-toggle-records-format: The Basics of ebdb-mode.
(line 73)
* ebdb-try-speedups: The EBDB Database. (line 87)
@@ -2676,30 +2676,30 @@ Node: EBDB Buffers40651
Node: Searching41862
Node: Changing Search Behavior43576
Node: The Basics of ebdb-mode44823
-Node: Customizing Record Display49132
-Node: Marking53452
-Node: Exporting/Formatting53879
-Node: Completion54814
-Node: Snarfing55610
-Node: Internationalization57627
-Node: Diary Integration60328
-Node: Mail Aliases61193
-Node: vCard Support61907
-Node: Org Integration62406
-Node: Citing Records64304
-Node: Hacking EBDB65062
-Node: Field Classes67655
-Node: Init and Delete Methods70791
-Node: The Labeled Field Class72298
-Node: The Singleton Field Class73152
-Node: Actions73590
-Node: Custom Field Searching74262
-Node: Fast Lookups77129
-Node: Formatting in the EBDB Buffer78939
-Node: Writing Internationalization Libraries81015
-Node: Writing Integration For New MUAs85431
-Node: Article snarfing88879
-Node: Index89597
+Node: Customizing Record Display49171
+Node: Marking53491
+Node: Exporting/Formatting53918
+Node: Completion54853
+Node: Snarfing55649
+Node: Internationalization57666
+Node: Diary Integration60367
+Node: Mail Aliases61232
+Node: vCard Support61946
+Node: Org Integration62445
+Node: Citing Records64343
+Node: Hacking EBDB65101
+Node: Field Classes67694
+Node: Init and Delete Methods70830
+Node: The Labeled Field Class72337
+Node: The Singleton Field Class73191
+Node: Actions73629
+Node: Custom Field Searching74301
+Node: Fast Lookups77168
+Node: Formatting in the EBDB Buffer78978
+Node: Writing Internationalization Libraries81054
+Node: Writing Integration For New MUAs85470
+Node: Article snarfing88918
+Node: Index89636
End Tag Table
diff --git a/ebdb.org b/ebdb.org
index 65eec97..1fca929 100644
--- a/ebdb.org
+++ b/ebdb.org
@@ -1153,15 +1153,15 @@ keybindings apply.
#+KINDEX: t
#+FINDEX: ebdb-toggle-records-format
- Toggle between a multi-line and one-line display (see
[[id:20fc7a2a-55a9-43ef-9534-9e5887682a88][Customizing
+ Toggle between a multi-line, one-line, and full display (see
[[id:20fc7a2a-55a9-43ef-9534-9e5887682a88][Customizing
Record Display]]) (~ebdb-toggle-records-format~).
- T ::
#+KINDEX: T
- #+FINDEX: ebdb-display-records-completely
- Display all of a record's fields
- (~ebdb-display-records-completely~).
+ #+FINDEX: ebdb-toggle-all-records-format
+ Toggle the display of all the records in the current
+ {{{buf(EBDB)}}} buffer. (~ebdb-toggle-all-records-format~).
- r ::
diff --git a/ebdb.texi b/ebdb.texi
index 8817cb8..b713a54 100644
--- a/ebdb.texi
+++ b/ebdb.texi
@@ -1388,14 +1388,14 @@ the ability to interpolate variables in the body text.
@item t
@kindex t
@findex ebdb-toggle-records-format
-Toggle between a multi-line and one-line display (see @ref{Customizing Record
Display, , Customizing
+Toggle between a multi-line, one-line, and full display (see @ref{Customizing
Record Display, , Customizing
Record Display}) (@code{ebdb-toggle-records-format}).
@item T
@kindex T
-@findex ebdb-display-records-completely
-Display all of a record's fields
-(@code{ebdb-display-records-completely}).
+@findex ebdb-toggle-all-records-format
+Toggle the display of all the records in the current
+*EBDB* buffer. (@code{ebdb-toggle-all-records-format}).
@item r
@kindex r