emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-contacts completion stopped working
@ 2011-10-12 10:07 Julien Cubizolles
  2011-10-12 19:20 ` Tassilo Horn
  0 siblings, 1 reply; 6+ messages in thread
From: Julien Cubizolles @ 2011-10-12 10:07 UTC (permalink / raw)
  To: emacs-orgmode


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)
`----

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

* Re: org-contacts completion stopped working
  2011-10-12 10:07 org-contacts completion stopped working Julien Cubizolles
@ 2011-10-12 19:20 ` Tassilo Horn
  2011-10-13  8:49   ` julien Barnier
  2011-12-16  5:57   ` org-contacts completion stopped working Noorul Islam
  0 siblings, 2 replies; 6+ messages in thread
From: Tassilo Horn @ 2011-10-12 19:20 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: org-contacts completion stopped working
  2011-10-12 19:20 ` Tassilo Horn
@ 2011-10-13  8:49   ` julien Barnier
  2011-10-13 15:05     ` [PATCH] Fix org-contacts completion at point (was: org-contacts completion stopped working) Tassilo Horn
  2011-12-16  5:57   ` org-contacts completion stopped working Noorul Islam
  1 sibling, 1 reply; 6+ messages in thread
From: julien Barnier @ 2011-10-13  8:49 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* [PATCH] Fix org-contacts completion at point (was: org-contacts completion stopped working)
  2011-10-13  8:49   ` julien Barnier
@ 2011-10-13 15:05     ` Tassilo Horn
  2011-10-17 14:00       ` [Accepted] " Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2011-10-13 15:05 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* [Accepted] Fix org-contacts completion at point (was: org-contacts completion stopped working)
  2011-10-13 15:05     ` [PATCH] Fix org-contacts completion at point (was: org-contacts completion stopped working) Tassilo Horn
@ 2011-10-17 14:00       ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2011-10-17 14:00 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: org-contacts completion stopped working
  2011-10-12 19:20 ` Tassilo Horn
  2011-10-13  8:49   ` julien Barnier
@ 2011-12-16  5:57   ` Noorul Islam
  1 sibling, 0 replies; 6+ messages in thread
From: Noorul Islam @ 2011-12-16  5:57 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

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

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

end of thread, other threads:[~2011-12-16  5:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-12 10:07 org-contacts completion stopped working Julien Cubizolles
2011-10-12 19:20 ` Tassilo Horn
2011-10-13  8:49   ` julien Barnier
2011-10-13 15:05     ` [PATCH] Fix org-contacts completion at point (was: org-contacts completion stopped working) Tassilo Horn
2011-10-17 14:00       ` [Accepted] " Carsten Dominik
2011-12-16  5:57   ` org-contacts completion stopped working Noorul Islam

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