As of a few days ago, completion doesn't work anymore. I get the message (wrong-number-of-arguments (1 . 2) 4) Any ideas ? Julien. ,---- | Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 2) 4) | completion-table-case-fold((#("Cubizolles Julien <j.cubizolles@free.fr>" 0 17 (org-category "contacts" fontified nil))) "cubizolles" nil metadata) | apply(completion-table-case-fold (#("Cubizolles Julien <j.cubizolles@free.fr>" 0 17 (org-category "contacts" fontified nil))) ("cubizolles" nil metadata)) | (closure (t) (&rest args) (apply (quote completion-table-case-fold) (quote (#("Cubizolles Julien <j.cubizolles@free.fr>" 0 17 (org-category "contacts" fontified nil)))) args))("cubizolles" nil metadata) | completion-metadata("cubizolles" (closure (t) (&rest args) (apply (quote completion-table-case-fold) (quote (#("Cubizolles Julien <j.cubizolles@free.fr>" 0 17 (org-category "contacts" fontified nil)))) args)) nil) | completion--field-metadata(5) | completion--do-completion() | minibuffer-complete() | call-interactively(minibuffer-complete) | #[1028 "\x01\304\x06\x06\305\211\306%\x18\305\262\x02\305\262\307\310\311#\210\n\203,\312\313!\210p\a\a\aF\314\315\316\317\320\321\x06!\322\"\323\324%DC\216\325\326!+\207" [minibuffer-completion-predicate minibuffer-completion-table completion-in-region-mode-predicate completion-in-region--data make-overlay nil t overlay-put field completion completion-in-region-mode 1 funcall make-byte-code 0 "\301\300!\207" vconcat vector [delete-overlay] 2 "\n\n(fn)" call-interactively minibuffer-complete] 14 "\n\n(fn START END COLLECTION PREDICATE)"](5 15 (closure (t) (&rest args) (apply (quote completion-table-case-fold) (quote (#("Cubizolles Julien <j.cubizolles@free.fr>" 0 17 (org-category "contacts" fontified nil)))) args)) nil) | apply(#[1028 "\x01\304\x06\x06\305\211\306%\x18\305\262\x02\305\262\307\310\311#\210\n\203,\312\313!\210p\a\a\aF\314\315\316\317\320\321\x06!\322\"\323\324%DC\216\325\326!+\207" [minibuffer-completion-predicate minibuffer-completion-table completion-in-region-mode-predicate completion-in-region--data make-overlay nil t overlay-put field completion completion-in-region-mode 1 funcall make-byte-code 0 "\301\300!\207" vconcat vector [delete-overlay] 2 "\n\n(fn)" call-interactively minibuffer-complete] 14 "\n\n(fn START END COLLECTION PREDICATE)"] (5 15 (closure (t) (&rest args) (apply (quote completion-table-case-fold) (quote (#("Cubizolles Julien <j.cubizolles@free.fr>" 0 17 (org-category "contacts" fontified nil)))) args)) nil)) | #[771 ":\2030\x02@\301=\203\0\300@\302\x05A\"\303#\207\304@\305\306\307\310\311\312\300!\313\"\314\315%\x06A\x06##\207\304\316\"\207" [(#0) t append nil apply apply-partially make-byte-code 642 "\300@\x03#\207" vconcat vector [] 7 "\n\n(fn FUNS GLOBAL &rest ARGS)" #[1028 "\x01\304\x06\x06\305\211\306%\x18\305\262\x02\305\262\307\310\311#\210\n\203,\312\313!\210p\a\a\aF\314\315\316\317\320\321\x06!\322\"\323\324%DC\216\325\326!+\207" [minibuffer-completion-predicate minibuffer-completion-table completion-in-region-mode-predicate completion-in-region--data make-overlay nil t overlay-put field completion completion-in-region-mode 1 funcall make-byte-code 0 "\301\300!\207" vconcat vector [delete-overlay] 2 "\n\n(fn)" call-interactively minibuffer-complete] 14 "\n\n(fn START END COLLECTION PREDICATE)"]] 12 "\n\n(fn FUNS GLOBAL ARGS)"](nil nil (5 15 (closure (t) (&rest args) (apply (quote completion-table-case-fold) (quote (#("Cubizolles Julien <j.cubizolles@free.fr>" 0 17 (org-category "contacts" fontified nil)))) args)) nil)) | completion-in-region(5 15 (closure (t) (&rest args) (apply (quote completion-table-case-fold) (quote (#("Cubizolles Julien <j.cubizolles@free.fr>" 0 17 (org-category "contacts" fontified nil)))) args)) nil) | completion-at-point() | message-tab() | call-interactively(message-tab nil nil) `----
Julien Cubizolles <j.cubizolles@free.fr> writes:
Hi Julien,
> As of a few days ago, completion doesn't work anymore. I get the
> message (wrong-number-of-arguments (1 . 2) 4)
>
> Any ideas ?
No, but you are not alone. :-)
I use a very recent emacs 24 bzr checkout and org master from git. Not
sure who's the culprit.
Bye,
Tassilo
Hi, > No, but you are not alone. > > 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 But I don't think I could be able to find a fix by myself. -- Julien
julien Barnier <julien@nozav.org> 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 <tassilo@member.fsf.org> 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'." -- 1.7.7 --8<---------------cut here---------------end--------------->8---
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 <tassilo@member.fsf.org> > X-Patchwork-Id: 988 > Message-Id: <87wrc9hqyg.fsf_-_@thinkpad.tsdh.de> > To: emacs-orgmode@gnu.org > > julien Barnier <julien@nozav.org> 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 <tassilo@member.fsf.org> > 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'." >
On Thu, Oct 13, 2011 at 12:50 AM, Tassilo Horn <tassilo@member.fsf.org> wrote:
> Julien Cubizolles <j.cubizolles@free.fr> writes:
>
> Hi Julien,
>
>> As of a few days ago, completion doesn't work anymore. I get the
>> message (wrong-number-of-arguments (1 . 2) 4)
>>
>> Any ideas ?
>
> No, but you are not alone. :-)
>
> I use a very recent emacs 24 bzr checkout and org master from git. Not
> sure who's the culprit.
>
You have to get more recent version. There is signature change.
I also faced similar issue, git pull and compilation helped.
Thanks and Regards
Noorul