From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: org-bbdb link completion fix Date: Tue, 29 Apr 2014 09:03:12 +0800 Message-ID: <87r44hq75b.fsf@ericabrahamsen.net> References: <87a9b5ssux.fsf@ericabrahamsen.net> <87ha5dpkqe.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WewP9-0006C0-Vt for emacs-orgmode@gnu.org; Mon, 28 Apr 2014 21:00:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WewP3-0004Cs-P7 for emacs-orgmode@gnu.org; Mon, 28 Apr 2014 21:00:15 -0400 Received: from plane.gmane.org ([80.91.229.3]:49527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WewP3-0004Cm-Id for emacs-orgmode@gnu.org; Mon, 28 Apr 2014 21:00:09 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WewP2-0006wQ-7b for emacs-orgmode@gnu.org; Tue, 29 Apr 2014 03:00:08 +0200 Received: from 114.248.18.67 ([114.248.18.67]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Apr 2014 03:00:08 +0200 Received: from eric by 114.248.18.67 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Apr 2014 03:00:08 +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 Nicolas Goaziou writes: > Hello, > > Eric Abrahamsen writes: > >> 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. > > Thank you for the patch. Would you mind providing a proper commit > message and send it again? Yup, sorry about that. Hey, on this subject... How do you all handle these situations with one-time commits being sent to the list? It's kind of a pain making the commit, then waiting for the same or equivalent commit to come back via upstream, then reverting the local commit. Does everyone use throwaway branches for this? E --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-BBDB-link-completion.patch >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 --=-=-=--