[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb f8d0b89 2/2: Give an example of more complicated a
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb f8d0b89 2/2: Give an example of more complicated auto-update-p values |
Date: |
Tue, 4 Feb 2020 13:29:33 -0500 (EST) |
branch: externals/ebdb
commit f8d0b89629bc6610a76d643889e737de15e5055a
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Give an example of more complicated auto-update-p values
* ebdb.org (Auto-Updating Records): Show how a function would work.
---
ebdb.info | 125 ++++++++++++++++++++++++++++++++++----------------------------
ebdb.org | 14 ++++++-
ebdb.texi | 14 ++++++-
3 files changed, 94 insertions(+), 59 deletions(-)
diff --git a/ebdb.info b/ebdb.info
index 089d3ed..c51b00b 100644
--- a/ebdb.info
+++ b/ebdb.info
@@ -707,7 +707,18 @@ option governing this behavior is:
records, and query about the editing and creation of new records),
and ‘create’ (automatically create new records). A value of ‘t’ is
considered equivalent to ‘create’. The option can also be set to a
- function which returns one of the above symbols.
+ function (called with no arguments) which returns one of the above
+ symbols.
+
+ For instance, say you want to automatically create records for
+addresses you send mail to, but _not_ when sending messages to
+newsgroups. If you’re using ‘message-mode’, you could use the
+following:
+
+ (setq ebdb-message-auto-update-p
+ (lambda ()
+ (unless (ebdb-mua-message-header "Newsgroups")
+ 'query)))
This option only governs what EBDB does automatically, each time a
message is displayed. The same process can be run interactively using
@@ -2322,13 +2333,13 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB,
Up: Top
* E <1>: The Basics of ebdb-mode.
(line 37)
* ebdb-accept-header-list: Auto-Updating Records.
- (line 58)
+ (line 69)
* ebdb-add-aka: Auto-Updating Records.
- (line 47)
+ (line 58)
* ebdb-add-mails: Auto-Updating Records.
- (line 51)
+ (line 62)
* ebdb-add-name: Auto-Updating Records.
- (line 43)
+ (line 54)
* ebdb-buffer-name: EBDB Buffers. (line 14)
* ebdb-case-fold-search: Changing Search Behavior.
(line 8)
@@ -2408,7 +2419,7 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB, Up:
Top
* ebdb-format-to-tmp-buffer: Exporting/Formatting.
(line 15)
* ebdb-gnus-auto-update-p: Auto-Updating Records.
- (line 37)
+ (line 48)
* ebdb-gnus-post-style-function: Posting Styles. (line 13)
* ebdb-hash-extra-predicates: Fast Lookups. (line 30)
* ebdb-hashtable: Fast Lookups. (line 10)
@@ -2419,7 +2430,7 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB, Up:
Top
* ebdb-i18n-countries-pref-scripts: Internationalization.
(line 47)
* ebdb-ignore-header-list: Auto-Updating Records.
- (line 62)
+ (line 73)
* ebdb-info: The Basics of ebdb-mode.
(line 118)
* ebdb-init-field: Init and Delete Methods.
@@ -2442,16 +2453,16 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB,
Up: Top
* ebdb-make-buffer-name: Writing Integration For New MUAs.
(line 54)
* ebdb-message-auto-update-p: Auto-Updating Records.
- (line 37)
+ (line 48)
* ebdb-message-clean-name-function: Sender name display. (line 14)
* ebdb-message-mail-as-name: Sender name display. (line 18)
* ebdb-mhe-auto-update-p: Auto-Updating Records.
- (line 37)
+ (line 48)
* ebdb-migrate-from-bbdb: Record Migration. (line 6)
* ebdb-migrate-from-org-contacts: Migration from Org Contacts.
(line 6)
* ebdb-mu4e-auto-update-p: Auto-Updating Records.
- (line 37)
+ (line 48)
* ebdb-mua-article-body: Article snarfing. (line 13)
* ebdb-mua-article-signature: Article snarfing. (line 16)
* ebdb-mua-auto-update: Writing Integration For New MUAs.
@@ -2481,9 +2492,9 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB, Up:
Top
* ebdb-mua-prepare-article: Writing Integration For New MUAs.
(line 47)
* ebdb-mua-reader-update-p: Auto-Updating Records.
- (line 34)
+ (line 45)
* ebdb-mua-sender-update-p: Auto-Updating Records.
- (line 31)
+ (line 42)
* ebdb-mua-snarf-article: Interactive Commands.
(line 33)
* ebdb-mua-summary-mark: Summary buffer marks.
@@ -2514,7 +2525,7 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB, Up:
Top
(line 6)
* ebdb-org-agenda-popup: Org Integration. (line 32)
* ebdb-permanent-ignores-file: Auto-Updating Records.
- (line 80)
+ (line 91)
* ebdb-popup-window: Writing Integration For New MUAs.
(line 60)
* ebdb-prev-field: The Basics of ebdb-mode.
@@ -2525,12 +2536,12 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB,
Up: Top
(line 50)
* ebdb-record-self: Creating Records. (line 21)
* ebdb-record-self <1>: Auto-Updating Records.
- (line 66)
+ (line 77)
* ebdb-reformat-records: The Basics of ebdb-mode.
(line 82)
* ebdb-rename-buffer: EBDB Buffers. (line 23)
* ebdb-rmail-auto-update-p: Auto-Updating Records.
- (line 37)
+ (line 48)
* ebdb-save: The Basics of ebdb-mode.
(line 121)
* ebdb-save-on-exit: The EBDB Database. (line 78)
@@ -2551,11 +2562,11 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB,
Up: Top
* ebdb-try-speedups: The EBDB Database. (line 87)
* ebdb-use-diary: Diary Integration. (line 13)
* ebdb-user-name-address-re: Auto-Updating Records.
- (line 66)
+ (line 77)
* ebdb-vm-auto-update-p: Auto-Updating Records.
- (line 37)
+ (line 48)
* ebdb-wl-auto-update-p: Auto-Updating Records.
- (line 37)
+ (line 48)
* Editing fields: Editing Existing Fields.
(line 6)
* f: Exporting/Formatting.
@@ -2604,7 +2615,7 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB, Up:
Top
* P: The Basics of ebdb-mode.
(line 19)
* Permanently ignoring mail addresses: Auto-Updating Records.
- (line 80)
+ (line 91)
* Pop-up buffers: Pop-up Buffers. (line 6)
* q: The Basics of ebdb-mode.
(line 124)
@@ -2662,44 +2673,44 @@ Node: Loading MUA Code20963
Node: Display and Updating21676
Node: Pop-up Buffers22442
Node: Auto-Updating Records24440
-Node: Noticing and Automatic Rules28846
-Node: Interactive Commands30179
-Node: EBDB and MUA summary buffers32653
-Node: Sender name display33171
-Node: Summary buffer marks34398
-Node: Mail Address Completion35577
-Node: A Note on Completion38086
-Node: Specific MUAs38709
-Node: Gnus38857
-Node: Posting Styles39079
-Node: EBDB Buffers40654
-Node: Searching41865
-Node: Changing Search Behavior43579
-Node: The Basics of ebdb-mode44826
-Node: Customizing Record Display49174
-Node: Marking53494
-Node: Exporting/Formatting53921
-Node: Completion54856
-Node: Snarfing55652
-Node: Internationalization57669
-Node: Diary Integration60370
-Node: Mail Aliases61235
-Node: vCard Support61949
-Node: Org Integration62448
-Node: Citing Records64346
-Node: Hacking EBDB65104
-Node: Field Classes67697
-Node: Init and Delete Methods70833
-Node: The Labeled Field Class72340
-Node: The Singleton Field Class73194
-Node: Actions73632
-Node: Custom Field Searching74304
-Node: Fast Lookups77171
-Node: Formatting in the EBDB Buffer78981
-Node: Writing Internationalization Libraries81057
-Node: Writing Integration For New MUAs85473
-Node: Article snarfing88921
-Node: Index89639
+Node: Noticing and Automatic Rules29234
+Node: Interactive Commands30567
+Node: EBDB and MUA summary buffers33041
+Node: Sender name display33559
+Node: Summary buffer marks34786
+Node: Mail Address Completion35965
+Node: A Note on Completion38474
+Node: Specific MUAs39097
+Node: Gnus39245
+Node: Posting Styles39467
+Node: EBDB Buffers41042
+Node: Searching42253
+Node: Changing Search Behavior43967
+Node: The Basics of ebdb-mode45214
+Node: Customizing Record Display49562
+Node: Marking53882
+Node: Exporting/Formatting54309
+Node: Completion55244
+Node: Snarfing56040
+Node: Internationalization58057
+Node: Diary Integration60758
+Node: Mail Aliases61623
+Node: vCard Support62337
+Node: Org Integration62836
+Node: Citing Records64734
+Node: Hacking EBDB65492
+Node: Field Classes68085
+Node: Init and Delete Methods71221
+Node: The Labeled Field Class72728
+Node: The Singleton Field Class73582
+Node: Actions74020
+Node: Custom Field Searching74692
+Node: Fast Lookups77559
+Node: Formatting in the EBDB Buffer79369
+Node: Writing Internationalization Libraries81445
+Node: Writing Integration For New MUAs85861
+Node: Article snarfing89309
+Node: Index90027
End Tag Table
diff --git a/ebdb.org b/ebdb.org
index eaa26c6..c4e0d24 100644
--- a/ebdb.org
+++ b/ebdb.org
@@ -516,9 +516,21 @@ and mail fields as necessary), ~query~ (find existing
records, and
query about the editing and creation of new records), and ~create~
(automatically create new records). A value of ~t~ is considered
equivalent to ~create~. The option can also be set to a function
-which returns one of the above symbols.
+(called with no arguments) which returns one of the above symbols.
#+end_defopt
+For instance, say you want to automatically create records for
+addresses you send mail to, but _not_ when sending messages to
+newsgroups. If you're using ~message-mode~, you could use the
+following:
+
+#+begin_src elisp
+ (setq ebdb-message-auto-update-p
+ (lambda ()
+ (unless (ebdb-mua-message-header "Newsgroups")
+ 'query)))
+#+end_src
+
This option only governs what EBDB does automatically, each time a
message is displayed. The same process can be run interactively using
the commands below.
diff --git a/ebdb.texi b/ebdb.texi
index 5735ae1..8c3959e 100644
--- a/ebdb.texi
+++ b/ebdb.texi
@@ -734,9 +734,21 @@ and mail fields as necessary), @code{query} (find existing
records, and
query about the editing and creation of new records), and @code{create}
(automatically create new records). A value of @code{t} is considered
equivalent to @code{create}. The option can also be set to a function
-which returns one of the above symbols.
+(called with no arguments) which returns one of the above symbols.
@end defopt
+For instance, say you want to automatically create records for
+addresses you send mail to, but _not_ when sending messages to
+newsgroups. If you're using @code{message-mode}, you could use the
+following:
+
+@lisp
+(setq ebdb-message-auto-update-p
+ (lambda ()
+ (unless (ebdb-mua-message-header "Newsgroups")
+ 'query)))
+@end lisp
+
This option only governs what EBDB does automatically, each time a
message is displayed. The same process can be run interactively using
the commands below.