From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: org-bbdb link completion fix Date: Mon, 28 Apr 2014 17:31:18 +0800 Message-ID: <87a9b5ssux.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WehrQ-0003Gb-Kc for emacs-orgmode@gnu.org; Mon, 28 Apr 2014 05:28:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WehrJ-0000Vs-66 for emacs-orgmode@gnu.org; Mon, 28 Apr 2014 05:28:28 -0400 Received: from plane.gmane.org ([80.91.229.3]:34212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WehrI-0000Vl-Ui for emacs-orgmode@gnu.org; Mon, 28 Apr 2014 05:28:21 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WehrI-0005aK-9K for emacs-orgmode@gnu.org; Mon, 28 Apr 2014 11:28:20 +0200 Received: from 114.248.19.153 ([114.248.19.153]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Apr 2014 11:28:20 +0200 Received: from eric by 114.248.19.153 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Apr 2014 11:28:20 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=org-bbdb-fix.patch 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." --=-=-=--