(I posted this patch to the sourceforge site (it's request ID 597322),
but it doesn't seem like people are using that facility.)

2002-08-19  Jim Blandy  <[EMAIL PROTECTED]>

        * lisp/bbdb-migrate.el (bbdb-migrate-change-dates,
        bbdb-unmigrate-change-dates): The raw notes field isn't always an
        alist; it can also be a simple string.

Index: lisp/bbdb-migrate.el
===================================================================
RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb-migrate.el,v
retrieving revision 1.18
diff -c -r1.18 bbdb-migrate.el
*** lisp/bbdb-migrate.el        12 May 2002 22:17:03 -0000      1.18
--- lisp/bbdb-migrate.el        19 Aug 2002 19:02:26 -0000
***************
*** 306,316 ****
  Formats are changed in timestamp and creation-date fields from
  \"dd mmm yy\" to \"yyyy-mm-dd\".  Assumes the notes are passed in as an
  argument."
!   (bbdb-mapc (lambda (rr)
!              (when (memq (car rr) '(creation-date timestamp))
!                (bbdb-migrate-change-dates-change-field rr)))
!            rec)
!   rec)
  
  (defun bbdb-migrate-change-dates-change-field (field)
    "Migrate the date field (the cdr of FIELD) from \"dd mmm yy\" to
--- 306,317 ----
  Formats are changed in timestamp and creation-date fields from
  \"dd mmm yy\" to \"yyyy-mm-dd\".  Assumes the notes are passed in as an
  argument."
!   (unless (stringp rec)
!     (bbdb-mapc (lambda (rr)
!                  (when (memq (car rr) '(creation-date timestamp))
!                    (bbdb-migrate-change-dates-change-field rr)))
!                rec)
!     rec))
  
  (defun bbdb-migrate-change-dates-change-field (field)
    "Migrate the date field (the cdr of FIELD) from \"dd mmm yy\" to
***************
*** 375,385 ****
  Formats are changed in timestamp and creation-date fields from
  \"yyyy-mm-dd\" to \"dd mmm yy\".  Assumes the notes list is passed in
  as an argument."
!   (bbdb-mapc (lambda (rr)
!              (when (memq (car rr) '(creation-date timestamp))
!                (bbdb-unmigrate-change-dates-change-field rr)))
!            rec)
!   rec)
  
  (defun bbdb-unmigrate-change-dates-change-field (field)
    "Unmigrate the date field (the cdr of FIELD) from \"yyyy-mm-dd\" to
--- 376,387 ----
  Formats are changed in timestamp and creation-date fields from
  \"yyyy-mm-dd\" to \"dd mmm yy\".  Assumes the notes list is passed in
  as an argument."
!   (unless (stringp rec)
!     (bbdb-mapc (lambda (rr)
!                  (when (memq (car rr) '(creation-date timestamp))
!                    (bbdb-unmigrate-change-dates-change-field rr)))
!                rec)
!     rec))
  
  (defun bbdb-unmigrate-change-dates-change-field (field)
    "Unmigrate the date field (the cdr of FIELD) from \"yyyy-mm-dd\" to
----------



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to