On Fri Mar 28 2014 Steven Arntson wrote:
> I think I've got an invisible organization field, somehow.  

I'd be curious to know how you succeeded to create an organization
field which appears to consist of an empty string.  This should not
happen and there seems to be a bug *somewhere*.  If you can come up
with a recipe to reproduce this, please post it here.

> I have, for instance, an short entry like:
> 
> Friendly Acquaintence - 
>          mail: frien...@provider.com

Put point somewhere in this record and run the command attached
below, which should solve your problem.  I am thinking about putting
a slightly different solution into the BBDB repository.  Yet in the
meanwhile this should work for you.

(defun bbdb-fix-records (records)
  "Fix broken RECORDS.
Interactively, use BBDB prefix \
\\<bbdb-mode-map>\\[bbdb-do-all-records], see `bbdb-do-all-records',"
  (interactive (list (bbdb-do-records)))
  (bbdb-editable)
  (dolist (record (bbdb-record-list records))
    (let (organizations)
      (dolist (organization (bbdb-record-organization record))
        (if (and organization (not (string= "" organization)))
            (push organization organizations)))
      (bbdb-record-set-field record 'organization (nreverse organizations)))
    (bbdb-change-record record)))

------------------------------------------------------------------------------
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to