On Thursday, February 15, 2001, at 08:57 AM, Ronan Waide wrote:

> On February 14, [EMAIL PROTECTED] said: 
> > Hmm, I'll look into this.  Unfortunately, I suspect that something will 
> > only accept "" and not 'nil'.  Which means I'll need to seriously uglify  
> > (TM) the code to what wants what :( 
>  
> If this is the case, let me know, and I'll see about patching BBDB. It 
> shouldn't be the case. 

  Well, in initial testing I found the address formatting code has this
problem, attached is a patch to protect against nil fields.  I'm sure
I have more testing to do before all these are tracked down.  But this
is at least a good start (lets me list my whole bbdb), as well as some
basic operations.

--- /Users/tdeweese/emacs/bbdb/bbdb.el~ Tue Nov 28 03:00:25 2000
+++ /Users/tdeweese/emacs/bbdb/bbdb.el  Wed Feb 21 19:31:22 2001
@@ -1064,12 +1064,15 @@
             (> (length s) 0))
         (progn
           (indent-to 17)
-          (insert z (if (and (> (length z) 0)
-                             (> (length c) 0)) " " "")
-                  c (if (and (or (> (length z) 0)
-                                 (> (length c) 0))
-                             (> (length s) 0)) ", " "")
-                  s "\n"))))
+          (insert (if (> (length z) 0) z "")
+                 (if (and (> (length z) 0)
+                          (> (length c) 0)) " " "")
+                  (if (> (length c) 0) c "")
+                 (if (and (or (> (length z) 0)
+                              (> (length c) 0))
+                          (> (length s) 0)) ", " "")
+                  (if (> (length s) 0) s "")
+                  "\n"))))
   (let ((str (bbdb-address-country addr)))
     (if (= 0 (length str)) nil
       (indent-to 17) (insert str "\n"))))
@@ -1097,12 +1100,15 @@
             (> (length s) 0))
         (progn
           (indent-to 17)
-          (insert c (if (and (> (length c) 0)
-                             (> (length s) 0)) ", " "")
-                  s (if (and (or (> (length c) 0)
-                                 (> (length s) 0))
-                             (> (length z) 0)) "  " "")
-                  z "\n"))))
+          (insert (if (> (length c) 0) c "")
+                 (if (and (> (length c) 0)
+                          (> (length s) 0)) ", " "")
+                  (if (> (length s) 0) s "")
+                 (if (and (or (> (length c) 0)
+                              (> (length s) 0))
+                          (> (length z) 0)) "  " "")
+                  (if (> (length z) 0) z "") 
+                 "\n"))))
   (let ((str (bbdb-address-country addr)))
     (if (= 0 (length str)) nil
       (indent-to 17) (insert str "\n"))))

_______________________________________________
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to