diff options
author | Eric Abrahamsen <eric@ericabrahamsen.net> | 2014-04-29 08:59:13 +0800 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2014-04-29 11:36:16 +0200 |
commit | ea50ad41bee8a813fd7c172574fd3c600c6b34f0 (patch) | |
tree | 29f01758bac39c984d7eb8fc7aa686c8a8bdf6f2 | |
parent | ae8fd7a1391b3ffa54a981735cb091a266769c13 (diff) | |
download | org-mode-ea50ad41bee8a813fd7c172574fd3c600c6b34f0.tar.gz |
Fix BBDB link completion
lisp/org-bbdb.el (org-bbdb-complete-link): Fix link completion with
newer versions of BBDB.
Newer versions of BBDB seem to be returning atomic values from
`bbdb-completing-read-record', we should be prepared for both atoms
and lists.
-rw-r--r-- | lisp/org-bbdb.el | 7 |
1 files 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." |