emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-bbdb link completion fix
@ 2014-04-28  9:31 Eric Abrahamsen
  2014-04-28 14:55 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Abrahamsen @ 2014-04-28  9:31 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-bbdb-fix.patch --]
[-- Type: text/x-diff, Size: 660 bytes --]

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."

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-29  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-28  9:31 org-bbdb link completion fix Eric Abrahamsen
2014-04-28 14:55 ` Nicolas Goaziou
2014-04-29  1:03   ` Eric Abrahamsen
2014-04-29  9:38     ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).