GNU bug report logs - #8197
24.0.50; completion-substring-try-completion bug ?

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> fh-trier.de>

Date: Mon, 7 Mar 2011 18:40:02 UTC

Severity: minor

Tags: notabug

Found in version 24.0.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8197 in the body.
You can then email your comments to 8197 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8197; Package emacs. (Mon, 07 Mar 2011 18:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Politz <politza <at> fh-trier.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 07 Mar 2011 18:40:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Politz <politza <at> fh-trier.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; completion-substring-try-completion bug ?
Date: Mon, 07 Mar 2011 19:38:33 +0100
(completion-substring-try-completion
        "foo" '("bar-foo" "baz-foo") nil 2)
=> ("ba-foo" . 6)

I would expect this to return ("ba-foo" . 2) .

-ap



In GNU Emacs 24.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2010-06-13 on raven
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
Important settings: [..]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8197; Package emacs. (Fri, 07 Oct 2011 02:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 8197 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Andreas Politz <politza <at> fh-trier.de>
Cc: 8197 <at> debbugs.gnu.org
Subject: Re: bug#8197: 24.0.50; completion-substring-try-completion bug ?
Date: Thu, 06 Oct 2011 22:09:05 -0400
Andreas Politz wrote:

> (completion-substring-try-completion
>         "foo" '("bar-foo" "baz-foo") nil 2)
> => ("ba-foo" . 6)
>
> I would expect this to return ("ba-foo" . 2) .

Now it returns ("-foo" . 4).
Is this progress?
I don't know, because the function is undocumented
(I guess I have to look it up in completion-styles-alist?).





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8197; Package emacs. (Fri, 07 Oct 2011 06:44:02 GMT) Full text and rfc822 format available.

Message #11 received at 8197 <at> debbugs.gnu.org (full text, mbox):

From: "Andreas Politz, INF|INF-I" <politza <at> fh-trier.de>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 8197 <at> debbugs.gnu.org
Subject: Re: bug#8197: 24.0.50; completion-substring-try-completion bug ?
Date: Fri, 7 Oct 2011 08:42:33 +0200
On Thu, 06 Oct 2011 22:09:05 -0400, Glenn Morris wrote
> Andreas Politz wrote:
> 
> > (completion-substring-try-completion
> >         "foo" '("bar-foo" "baz-foo") nil 2)
> > => ("ba-foo" . 6)
> >
> > I would expect this to return ("ba-foo" . 2) .
> 
> Now it returns ("-foo" . 4).
> Is this progress?
> I don't know, because the function is undocumented
> (I guess I have to look it up in completion-styles-alist?).

That was a while ago, but in my understanding the function should
return a partial substring completion (matching *ba*-foo* in this case) 
and the index of the ambiguous part.

-ap





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8197; Package emacs. (Fri, 07 Oct 2011 12:54:01 GMT) Full text and rfc822 format available.

Message #14 received at 8197 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Andreas Politz\, INF|INF-I" <politza <at> fh-trier.de>
Cc: Glenn Morris <rgm <at> gnu.org>, 8197 <at> debbugs.gnu.org
Subject: Re: bug#8197: 24.0.50; completion-substring-try-completion bug ?
Date: Fri, 07 Oct 2011 08:53:27 -0400
>> > (completion-substring-try-completion
>> >         "foo" '("bar-foo" "baz-foo") nil 2)
>> > => ("ba-foo" . 6)
>> > I would expect this to return ("ba-foo" . 2) .
>> Now it returns ("-foo" . 4).
>> Is this progress?

I think this is the correct answer, yes.

> That was a while ago, but in my understanding the function should
> return a partial substring completion (matching *ba*-foo* in this case) 
> and the index of the ambiguous part.

No, completion styles should not presume that they are used in
conjunction with some other style.  "completion-*-try-completion" should
return a string which matches (using the same style) the same set
of elements.


        Stefan




bug closed, send any further explanations to 8197 <at> debbugs.gnu.org and Andreas Politz <politza <at> fh-trier.de> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 23 Apr 2012 15:53:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 May 2012 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.