[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [Accepted] Fix org-contacts completion at point (was: org-contacts c
From: |
Carsten Dominik |
Subject: |
[O] [Accepted] Fix org-contacts completion at point (was: org-contacts completion stopped working) |
Date: |
Mon, 17 Oct 2011 16:00:04 +0200 (CEST) |
Patch 988 (http://patchwork.newartisans.com/patch/988/) is now "Accepted".
Maintainer comment: none
This relates to the following submission:
http://mid.gmane.org/%3C87wrc9hqyg.fsf_-_%40thinkpad.tsdh.de%3E
Here is the original message containing the patch:
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Fix org-contacts completion at point (was: org-contacts
> completion stopped working)
> Date: Thu, 13 Oct 2011 20:05:43 -0000
> From: Tassilo Horn <address@hidden>
> X-Patchwork-Id: 988
> Message-Id: <address@hidden>
> To: address@hidden
>
> julien Barnier <address@hidden> writes:
>
> Hi Julien,
>
> >> I use a very recent emacs 24 bzr checkout and org master from git.
> >> Not sure who's the culprit.
> >
> > Same problem here. After a quick look it seems that there has been a
> > recent change in the arguments taken by the completion-table-case-fold
> > function in minibuffer.el :
> >
> > http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/105991
>
> Thanks for the pointer!
>
> > But I don't think I could be able to find a fix by myself.
>
> But I was able, so good teamwork, mate. :-)
>
> --8<---------------cut here---------------start------------->8---
> >From d89ca3ce39cd7436e5205744adcf468d9619180f Mon Sep 17 00:00:00 2001
> From: Tassilo Horn <address@hidden>
> Date: Thu, 13 Oct 2011 17:02:07 +0200
> Subject: [PATCH 2/2] Fix org-contacts completion at point.
>
> ---
> contrib/lisp/org-contacts.el | 11 +++++------
> 1 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
> index 167caa0..74d68dc 100644
> --- a/contrib/lisp/org-contacts.el
> +++ b/contrib/lisp/org-contacts.el
> @@ -169,9 +169,10 @@ If both match values are nil, return all contacts."
>
> (when (not (fboundp 'completion-table-case-fold))
> ;; That function is new in Emacs 24...
> - (defun completion-table-case-fold (table string pred action)
> - (let ((completion-ignore-case t))
> - (complete-with-action action table string pred))))
> + (defun completion-table-case-fold (table &optional dont-fold)
> + (lambda (string pred action)
> + (let ((completion-ignore-case (not dont-fold)))
> + (complete-with-action action table string pred)))))
>
> (defun org-contacts-complete-name (&optional start)
> "Complete text at START with a user name and email."
> @@ -226,9 +227,7 @@ If both match values are nil, return all contacts."
> ;; If the user has an email
> address, append USER <EMAIL>.
> if email collect
> (org-contacts-format-email contact-name email))
> ", ")))))
> - (list start end (if org-contacts-completion-ignore-case
> - (apply-partially #'completion-table-case-fold
> completion-list)
> - completion-list))))
> + (list start end (completion-table-case-fold completion-list (not
> org-contacts-completion-ignore-case)))))
>
> (defun org-contacts-message-complete-function ()
> "Function used in `completion-at-point-functions' in `message-mode'."
>