The most recent versions of BBDB return single records from
`bbdb-completing-read-record'. That currently breaks completion on bbdb:
links -- possibly earlier versions of BBDB always returned list values.

We should probably check for this in `org-bbdb-complete-link', I propose
the attached patch.

Thanks,
Eric

diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el
index b9841a6..cfd5b3b 100644
--- a/lisp/org-bbdb.el
+++ b/lisp/org-bbdb.el
@@ -400,8 +400,11 @@ This is used by Org to re-create the anniversary hash table."
 (defun org-bbdb-complete-link ()
   "Read a bbdb link with name completion."
   (require 'bbdb-com)
-  (concat "bbdb:"
-	  (bbdb-record-name (car (bbdb-completing-read-record "Name: ")))))
+  (let ((rec (bbdb-completing-read-record "Name: ")))
+    (concat "bbdb:"
+	    (bbdb-record-name (if (listp rec)
+				  (car rec)
+				rec)))))
 
 (defun org-bbdb-anniv-export-ical ()
   "Extract anniversaries from BBDB and convert them to icalendar format."

Reply via email to