[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 4206ccd 02/21: Don't unilaterally add to kill-emac
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 4206ccd 02/21: Don't unilaterally add to kill-emacs-hook |
Date: |
Sun, 17 Sep 2017 15:32:45 -0400 (EDT) |
branch: externals/ebdb
commit 4206ccdca5fcc1559b366d0cb19e8a53cd610128
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Don't unilaterally add to kill-emacs-hook
* ebdb.el (ebdb-install-save-hook): New option allowing users to
specify whether to add ebdb-save to the kill-emacs-hook. Defaults to t.
(ebdb-load): Check and act on option here.
* ebdb-com.el: Do not add hook at top-level here.
* ebdb.org: Note in manual.
* ebdb.info: etc
* ebdb.texi: etc
---
ebdb-com.el | 4 ---
ebdb.el | 7 +++++
ebdb.info | 103 ++++++++++++++++++++++++++++++++----------------------------
ebdb.org | 12 +++++--
ebdb.texi | 12 +++++--
5 files changed, 82 insertions(+), 56 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index 43723ea..2fe1b22 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -2710,9 +2710,5 @@ delete field: \\[ebdb-delete-field-or-record]; \
mode help: \\[describe-mode]; \
info: \\[ebdb-info]")))
-;;; Lastly, install a save hook.
-
-(add-hook 'kill-emacs-hook #'ebdb-save)
-
(provide 'ebdb-com)
;;; ebdb-com.el ends here
diff --git a/ebdb.el b/ebdb.el
index 709138f..2fa21f3 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -138,6 +138,11 @@ Future merging strategies may be smarter."
:group 'ebdb-eieio
:type 'boolean)
+(defcustom ebdb-install-save-hook t
+ "If non-nil, add `ebdb-save' to the hook `kill-emacs-hook'."
+ :group 'ebdb-eieio
+ :type 'boolean)
+
(defcustom ebdb-default-record-class 'ebdb-record-person
"The default class to use for new records."
:group 'ebdb-eieio
@@ -4824,6 +4829,8 @@ important work is done by the `ebdb-db-load' method."
(run-hooks 'ebdb-after-load-hook)
(when ebdb-use-diary
(add-hook 'diary-list-entries-hook #'ebdb-diary-add-entries))
+ (when ebdb-install-save-hook
+ (add-hook 'kill-emacs-hook #'ebdb-save))
(length ebdb-record-tracker)))
;; If we wanted to make it seem like EBDB was loading faster, we could
diff --git a/ebdb.info b/ebdb.info
index cc54899..a4c1243 100644
--- a/ebdb.info
+++ b/ebdb.info
@@ -269,6 +269,11 @@ following keys can be used to manipulate databases and
their records.
database, edit it using ‘ebdb-customize-database’, set ‘disabled’
to nil, and then reload it with ‘ebdb-reload-database’.
+ Typically, databases are saved using the ‘s’ binding in ‘ebdb-mode’
+buffers, which runs ‘ebdb-save’. By default, EBDB also installs
+‘ebdb-save’ as part of the ‘kill-emacs-hook’. Set
+‘ebdb-install-save-hook’ to nil to prevent this.
+
File: ebdb.info, Node: Creating Records, Next: Record Fields, Prev: The
EBDB Database, Up: Top
@@ -1503,7 +1508,7 @@ File: ebdb.info, Node: The Singleton Field Class, Next:
Actions, Prev: The La
15.1.3 The Singleton Field Class
--------------------------------
-Another abstract mix-in class is the ‘ebdb-field-singleton’ class. It’s
+Another abstract mix-in class is the ‘ebdb-field-singleton’ class. Its
only function is to ensure that a record only ever has one instance of
the class in question. If the user tries to add a second instance, the
existing instance is deleted.
@@ -1961,6 +1966,7 @@ Index
(line 6)
* ebdb-insert-field <1>: The Basics of ebdb-mode.
(line 30)
+* ebdb-install-save-hook: The EBDB Database. (line 78)
* ebdb-mail: The Basics of ebdb-mode.
(line 56)
* ebdb-make-buffer-name: Writing Integration For New MUAs.
@@ -2106,6 +2112,7 @@ Index
(line 33)
* s <1>: The Basics of ebdb-mode.
(line 108)
+* Saving the database: The EBDB Database. (line 78)
* Search history: Searching. (line 51)
* Searching the EBDB: Searching. (line 6)
* Snarfing text: Snarfing. (line 6)
@@ -2129,53 +2136,53 @@ Node: Migration from BBDB3009
Node: Record Migration3184
Node: Variables and Options3762
Node: The EBDB Database4248
-Node: Creating Records7539
-Node: Record classes8620
-Node: Record names8965
-Node: Record Fields9640
-Node: Inserting New Fields9884
-Node: Editing Existing Fields10680
-Node: Deleting Records and Fields11280
-Node: Field Types11676
-Node: Role fields13867
-Node: Tag field15555
-Node: Mail folder field16199
-Node: MUA Interaction16527
-Node: Loading MUA Code17051
-Node: Display and Updating17760
-Node: Pop-up Buffers18526
-Node: Auto-Updating Records19364
-Node: Noticing and Automatic Rules21764
-Node: Interactive Commands23097
-Node: EBDB and MUA summary buffers25459
-Node: Sender name display25945
-Node: Summary buffer marks27172
-Node: EBDB Buffers28351
-Node: Searching29533
-Node: Changing Search Behavior31195
-Node: The Basics of ebdb-mode32442
-Node: Marking36043
-Node: Exporting/Formatting36467
-Node: Completion37416
-Node: Snarfing38614
-Node: Internationalization40615
-Node: Diary Integration43314
-Node: Mail Aliases44179
-Node: vCard Support44893
-Node: Org Integration45392
-Node: Citing Records47290
-Node: Hacking EBDB48048
-Node: Field Classes50369
-Node: Init and Delete Methods53336
-Node: The Labeled Field Class54843
-Node: The Singleton Field Class55697
-Node: Actions56138
-Node: Custom Field Searching56810
-Node: Formatting in the EBDB Buffer59631
-Node: Writing Internationalization Libraries61654
-Node: Writing Integration For New MUAs66007
-Node: Article snarfing69426
-Node: Index70144
+Node: Creating Records7800
+Node: Record classes8881
+Node: Record names9226
+Node: Record Fields9901
+Node: Inserting New Fields10145
+Node: Editing Existing Fields10941
+Node: Deleting Records and Fields11541
+Node: Field Types11937
+Node: Role fields14128
+Node: Tag field15816
+Node: Mail folder field16460
+Node: MUA Interaction16788
+Node: Loading MUA Code17312
+Node: Display and Updating18021
+Node: Pop-up Buffers18787
+Node: Auto-Updating Records19625
+Node: Noticing and Automatic Rules22025
+Node: Interactive Commands23358
+Node: EBDB and MUA summary buffers25720
+Node: Sender name display26206
+Node: Summary buffer marks27433
+Node: EBDB Buffers28612
+Node: Searching29794
+Node: Changing Search Behavior31456
+Node: The Basics of ebdb-mode32703
+Node: Marking36304
+Node: Exporting/Formatting36728
+Node: Completion37677
+Node: Snarfing38875
+Node: Internationalization40876
+Node: Diary Integration43575
+Node: Mail Aliases44440
+Node: vCard Support45154
+Node: Org Integration45653
+Node: Citing Records47551
+Node: Hacking EBDB48309
+Node: Field Classes50630
+Node: Init and Delete Methods53597
+Node: The Labeled Field Class55104
+Node: The Singleton Field Class55958
+Node: Actions56396
+Node: Custom Field Searching57068
+Node: Formatting in the EBDB Buffer59889
+Node: Writing Internationalization Libraries61912
+Node: Writing Integration For New MUAs66265
+Node: Article snarfing69684
+Node: Index70402
End Tag Table
diff --git a/ebdb.org b/ebdb.org
index 46738cb..331a3c6 100644
--- a/ebdb.org
+++ b/ebdb.org
@@ -157,7 +157,15 @@ Other database-related commands:
unloading all of its records and essentially ignoring it from now
on. The disabled state persists between restarts. To re-enable
a database, edit it using ~ebdb-customize-database~, set
- ~disabled~ to nil, and then reload it with ~ebdb-reload-database~.
+ ~disabled~ to nil, and then reload it with
+ ~ebdb-reload-database~.
+
+#+CINDEX: Saving the database
+#+VINDEX: ebdb-install-save-hook
+Typically, databases are saved using the {{{kbd(s)}}} binding in
+~ebdb-mode~ buffers, which runs ~ebdb-save~. By default, EBDB also
+installs ~ebdb-save~ as part of the ~kill-emacs-hook~. Set
+~ebdb-install-save-hook~ to nil to prevent this.
* Creating Records
:PROPERTIES:
:ID: 692cde31-73be-4faf-b436-7eae8a5d02d1
@@ -1392,7 +1400,7 @@ used to hold labels, and pointing to it in the
class-allocated
#+END_SRC
*** The Singleton Field Class
Another abstract mix-in class is the ~ebdb-field-singleton~ class.
-It's only function is to ensure that a record only ever has one
+Its only function is to ensure that a record only ever has one
instance of the class in question. If the user tries to add a second
instance, the existing instance is deleted.
*** Actions
diff --git a/ebdb.texi b/ebdb.texi
index 95a27dd..0635ba6 100644
--- a/ebdb.texi
+++ b/ebdb.texi
@@ -299,9 +299,17 @@ This command (@code{ebdb-disable-database}) disables a
database,
unloading all of its records and essentially ignoring it from now
on. The disabled state persists between restarts. To re-enable
a database, edit it using @code{ebdb-customize-database}, set
address@hidden to nil, and then reload it with @code{ebdb-reload-database}.
address@hidden to nil, and then reload it with
address@hidden
@end table
address@hidden Saving the database
address@hidden ebdb-install-save-hook
+Typically, databases are saved using the @kbd{s} binding in
address@hidden buffers, which runs @code{ebdb-save}. By default, EBDB also
+installs @code{ebdb-save} as part of the @code{kill-emacs-hook}. Set
address@hidden to nil to prevent this.
+
@node Creating Records
@chapter Creating Records
@@ -1630,7 +1638,7 @@ used to hold labels, and pointing to it in the
class-allocated
@subsection The Singleton Field Class
Another abstract mix-in class is the @code{ebdb-field-singleton} class.
-It's only function is to ensure that a record only ever has one
+Its only function is to ensure that a record only ever has one
instance of the class in question. If the user tries to add a second
instance, the existing instance is deleted.
- [elpa] externals/ebdb updated (cec392d -> c298037), Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 6b605a9 06/21: Hash records against their tag field tags, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 4206ccd 02/21: Don't unilaterally add to kill-emacs-hook,
Eric Abrahamsen <=
- [elpa] externals/ebdb 3311fc7 10/21: Add a dir file for the Info manual, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 62fcfcf 15/21: Add ebdb-save to write-contents-functions in EBDB buffers, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb a22c983 16/21: Try different faces in EBDB buffers, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 13f680a 13/21: Part two of threaded version of ebdb-initialize, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 3a918eb 09/21: Provide better instructions for BBDB migration, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb cbb4cc1 20/21: More complete error handling for field insertion, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb c298037 21/21: Bump version for 0.3.2, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 18be9ad 04/21: Add ebdb-field-bank-account class, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb dc5d03e 01/21: Change behavior of ebdb-fmt-compose-field, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 9c0947c 05/21: Comment out some custom definitions for address field, Eric Abrahamsen, 2017/09/17