From 55f41f66cd51ed27c396c3e7c805d83d894eb987 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Tue, 29 Apr 2014 08:59:13 +0800 Subject: [PATCH] Fix BBDB link completion lisp/org-bbdb.el: org-bbdb-complete-link Newer versions of BBDB seem to be returning atomic values from `bbdb-completing-read-record', we should be prepared for both atoms and lists. --- lisp/org-bbdb.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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." -- 1.9.2