[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 3bf66d6 2/2: Don't automatically migrate from BBDB
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 3bf66d6 2/2: Don't automatically migrate from BBDB, bump to 0.6.10 |
Date: |
Sat, 29 Jun 2019 13:19:22 -0400 (EDT) |
branch: externals/ebdb
commit 3bf66d6fb5e7b75028c6d0df1b70e5d9477111c7
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Don't automatically migrate from BBDB, bump to 0.6.10
Fixes #78
Thanks to George Hartzell for reporting.
* ebdb.el (ebdb-load): First of all, migration is something the user
should explicitly initiate. Second of all, if the user called
`ebdb-migrate-from-bbdb' before calling any of the top-level ebdb
commands, they would enter a double-migration loop, where
`ebdb-prompt-for-db' would call `ebdb-load', and we'd go through the
migration again. Don't be so clever.
* ebdb-migrate.el (ebdb-migrate-from-bbdb): Duplicate records and
blank org strings can lead to incorrect arg types when adding role
relationships.
* ebdb.org (Record Migration): Note this change in the docs.
---
ebdb-migrate.el | 6 ++-
ebdb.el | 9 +---
ebdb.info | 125 +++++++++++++++++++++++++++-----------------------------
ebdb.org | 13 +++---
ebdb.texi | 12 ++----
5 files changed, 75 insertions(+), 90 deletions(-)
diff --git a/ebdb-migrate.el b/ebdb-migrate.el
index 808df74..585e578 100644
--- a/ebdb-migrate.el
+++ b/ebdb-migrate.el
@@ -25,6 +25,7 @@
;;; Code:
(require 'ebdb)
+(require 'subr-x)
(autoload 'calendar-absolute-from-gregorian "calendar")
(autoload 'calendar-gregorian-from-absolute "calendar")
(autoload 'org-time-string-to-absolute "org")
@@ -446,10 +447,11 @@ BBDB sets the default of that option."
(when orgs
(dolist (o orgs)
;; Make all the orgs into real records.
- (unless (string= o "") ; There are many of these.
+ (unless (string-blank-p o) ; There are many of these.
(setq org (or (seq-find
(lambda (r)
- (string= o (ebdb-record-name r)))
+ (and (ebdb-record-organization-p r)
+ (string= o (ebdb-record-name r))))
c-records)
(let ((time (current-time)))
(ebdb-db-add-record
diff --git a/ebdb.el b/ebdb.el
index c65f417..3f8872f 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2016-2019 Free Software Foundation, Inc.
-;; Version: 0.6.9
+;; Version: 0.6.10
;; Package-Requires: ((emacs "25.1") (cl-lib "0.5") (seq "2.15"))
;; Maintainer: Eric Abrahamsen <address@hidden>
@@ -5041,13 +5041,6 @@ All the important work is done by the `ebdb-db-load'
method."
(sit-for 2))
(cl-pushnew s ebdb-db-list))
- (when (and
- (null ebdb-record-tracker)
- (or (and (bound-and-true-p bbdb-file)
- (file-exists-p bbdb-file))
- (file-exists-p (locate-user-emacs-file "bbdb" ".bbdb"))))
- ;; We're migrating from a version of BBDB.
- (ebdb-migrate-from-bbdb))
(message "Initializing EBDB records...")
(if (fboundp 'make-thread)
(let ((thread (make-thread #'ebdb-initialize-threadwise)))
diff --git a/ebdb.info b/ebdb.info
index 22e2773..e9da690 100644
--- a/ebdb.info
+++ b/ebdb.info
@@ -220,14 +220,11 @@ File: ebdb.info, Node: Record Migration, Next:
Variables and Options, Up: Mig
It’s possible to migrate records from a BBDB database. The ‘bbdb-file’
variable should point to your current BBDB file; alternately EBDB will
look in the default location, found using ‘(locate-user-emacs-file
-"bbdb" ".bbdb)’. Then set ‘ebdb-sources’ to a non-existent file name,
-and then run ‘ebdb-load’ (or any of the other EBDB entry commands).
-You’ll be prompted to create the new database, and upgrade from BBDB.
-If any records could not be upgraded, they will be displayed in an *EBDB
+"bbdb" ".bbdb)’. Then call ‘ebdb-migrate-from-bbdb’. You’ll be
+prompted to create the new database, and upgrade from BBDB. If any
+records could not be upgraded, they will be displayed in an *EBDB
Migration Errors* buffer. Migration bug reports are very welcome.
- You can also call the command ‘ebdb-migrate-from-bbdb’ at any time.
-
File: ebdb.info, Node: Variables and Options, Prev: Record Migration, Up:
Migration from BBDB
@@ -2400,7 +2397,7 @@ File: ebdb.info, Node: Index, Prev: Hacking EBDB, Up:
Top
(line 54)
* ebdb-message-clean-name-function: Sender name display. (line 14)
* ebdb-message-mail-as-name: Sender name display. (line 18)
-* ebdb-migrate-from-bbdb: Record Migration. (line 15)
+* ebdb-migrate-from-bbdb: Record Migration. (line 6)
* ebdb-migrate-from-org-contacts: Migration from Org Contacts.
(line 6)
* ebdb-mua-article-body: Article snarfing. (line 13)
@@ -2576,63 +2573,63 @@ Node: Getting Started2635
Node: Starting a New Database3964
Node: Migration from BBDB4788
Node: Record Migration5031
-Node: Variables and Options5834
-Node: Migration from Org Contacts6321
-Node: The EBDB Database7081
-Node: Creating Records11069
-Node: Record classes12150
-Node: Record names12495
-Node: Record Fields13170
-Node: Inserting New Fields13414
-Node: Editing Existing Fields14210
-Node: Deleting Records and Fields14810
-Node: Field Types15206
-Node: Role fields17492
-Node: Tag field19473
-Node: Mail folder field20117
-Node: MUA Interaction20445
-Node: Loading MUA Code20998
-Node: Display and Updating21711
-Node: Pop-up Buffers22477
-Node: Auto-Updating Records24397
-Node: Noticing and Automatic Rules26797
-Node: Interactive Commands28130
-Node: EBDB and MUA summary buffers30605
-Node: Sender name display31123
-Node: Summary buffer marks32350
-Node: Mail Address Completion33529
-Node: A Note on Completion36038
-Node: Specific MUAs36661
-Node: Gnus36809
-Node: Posting Styles37031
-Node: EBDB Buffers38606
-Node: Searching39817
-Node: Changing Search Behavior41479
-Node: The Basics of ebdb-mode42726
-Node: Customizing Record Display47035
-Node: Marking51355
-Node: Exporting/Formatting51782
-Node: Completion52717
-Node: Snarfing53513
-Node: Internationalization55530
-Node: Diary Integration58231
-Node: Mail Aliases59096
-Node: vCard Support59810
-Node: Org Integration60309
-Node: Citing Records62207
-Node: Hacking EBDB62965
-Node: Field Classes65556
-Node: Init and Delete Methods68692
-Node: The Labeled Field Class70199
-Node: The Singleton Field Class71053
-Node: Actions71491
-Node: Custom Field Searching72163
-Node: Fast Lookups75030
-Node: Formatting in the EBDB Buffer76840
-Node: Writing Internationalization Libraries78916
-Node: Writing Integration For New MUAs83330
-Node: Article snarfing86778
-Node: Index87496
+Node: Variables and Options5671
+Node: Migration from Org Contacts6158
+Node: The EBDB Database6918
+Node: Creating Records10906
+Node: Record classes11987
+Node: Record names12332
+Node: Record Fields13007
+Node: Inserting New Fields13251
+Node: Editing Existing Fields14047
+Node: Deleting Records and Fields14647
+Node: Field Types15043
+Node: Role fields17329
+Node: Tag field19310
+Node: Mail folder field19954
+Node: MUA Interaction20282
+Node: Loading MUA Code20835
+Node: Display and Updating21548
+Node: Pop-up Buffers22314
+Node: Auto-Updating Records24234
+Node: Noticing and Automatic Rules26634
+Node: Interactive Commands27967
+Node: EBDB and MUA summary buffers30442
+Node: Sender name display30960
+Node: Summary buffer marks32187
+Node: Mail Address Completion33366
+Node: A Note on Completion35875
+Node: Specific MUAs36498
+Node: Gnus36646
+Node: Posting Styles36868
+Node: EBDB Buffers38443
+Node: Searching39654
+Node: Changing Search Behavior41316
+Node: The Basics of ebdb-mode42563
+Node: Customizing Record Display46872
+Node: Marking51192
+Node: Exporting/Formatting51619
+Node: Completion52554
+Node: Snarfing53350
+Node: Internationalization55367
+Node: Diary Integration58068
+Node: Mail Aliases58933
+Node: vCard Support59647
+Node: Org Integration60146
+Node: Citing Records62044
+Node: Hacking EBDB62802
+Node: Field Classes65393
+Node: Init and Delete Methods68529
+Node: The Labeled Field Class70036
+Node: The Singleton Field Class70890
+Node: Actions71328
+Node: Custom Field Searching72000
+Node: Fast Lookups74867
+Node: Formatting in the EBDB Buffer76677
+Node: Writing Internationalization Libraries78753
+Node: Writing Integration For New MUAs83167
+Node: Article snarfing86615
+Node: Index87333
End Tag Table
diff --git a/ebdb.org b/ebdb.org
index 099654a..e4b7438 100644
--- a/ebdb.org
+++ b/ebdb.org
@@ -70,18 +70,15 @@ Currently EBDB only knows about migrating from BBDB and Org
Contacts.
** Migration from BBDB
#+CINDEX: Migration from BBDB
*** Record Migration
+#+FINDEX: ebdb-migrate-from-bbdb
It's possible to migrate records from a BBDB database. The
~bbdb-file~ variable should point to your current BBDB file;
alternately EBDB will look in the default location, found using
-~(locate-user-emacs-file "bbdb" ".bbdb)~. Then set ~ebdb-sources~ to
-a non-existent file name, and then run ~ebdb-load~ (or any of the
-other EBDB entry commands). You'll be prompted to create the new
+~(locate-user-emacs-file "bbdb" ".bbdb)~. Then call
+~ebdb-migrate-from-bbdb~. You'll be prompted to create the new
database, and upgrade from BBDB. If any records could not be
-upgraded, they will be displayed in an {{{buf(EBDB Migration Errors)}}}
-buffer. Migration bug reports are very welcome.
-
-#+FINDEX: ebdb-migrate-from-bbdb
-You can also call the command ~ebdb-migrate-from-bbdb~ at any time.
+upgraded, they will be displayed in an {{{buf(EBDB Migration
+Errors)}}} buffer. Migration bug reports are very welcome.
*** Variables and Options
Many of the old BBDB customization options have been changed or
removed entirely in EBDB. It's probably best to put your BBDB
diff --git a/ebdb.texi b/ebdb.texi
index 7d484bb..a2878f0 100644
--- a/ebdb.texi
+++ b/ebdb.texi
@@ -233,18 +233,14 @@ Currently EBDB only knows about migrating from BBDB and
Org Contacts.
@node Record Migration
@subsection Record Migration
+@findex ebdb-migrate-from-bbdb
It's possible to migrate records from a BBDB database. The
@code{bbdb-file} variable should point to your current BBDB file;
alternately EBDB will look in the default location, found using
-@code{(locate-user-emacs-file "bbdb" ".bbdb)}. Then set @code{ebdb-sources} to
-a non-existent file name, and then run @code{ebdb-load} (or any of the
-other EBDB entry commands). You'll be prompted to create the new
+@code{(locate-user-emacs-file "bbdb" ".bbdb)}. Then call
+@code{ebdb-migrate-from-bbdb}. You'll be prompted to create the new
database, and upgrade from BBDB@. If any records could not be
-upgraded, they will be displayed in an *EBDB Migration Errors*
-buffer. Migration bug reports are very welcome.
-
-@findex ebdb-migrate-from-bbdb
-You can also call the command @code{ebdb-migrate-from-bbdb} at any time.
+upgraded, they will be displayed in an *EBDB Migration Errors* buffer.
Migration bug reports are very welcome.
@node Variables and Options
@subsection Variables and Options