GNU bug report logs - #10963
24.0.94; `dabbrev-completion' and `completion-cycle-threshold'

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Tue, 6 Mar 2012 22:20:02 UTC

Severity: normal

Found in version 24.0.94

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 10963 in the body.
You can then email your comments to 10963 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 bug-gnu-emacs <at> gnu.org:
bug#10963; Package emacs. (Tue, 06 Mar 2012 22:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dani Moncayo <dmoncayo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 06 Mar 2012 22:20:02 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.94; `dabbrev-completion' and `completion-cycle-threshold'
Date: Tue, 6 Mar 2012 23:18:19 +0100
Recipe from "emacs -Q":

1. Eval: (setq completion-cycle-threshold 4)

2. Type: foo1 RET foo2 RET foo3 RET

3. Type: foo C-M-/

--> This "foo" expands to "foo3" (the first completion candidate -
ok), although the echo area shows a "Scanning for dabbrevs..." message
which remains there forever, until I send another command.  This is
confusing, because the message doesn't change even after that
"scanning" has ended.

4. Type: C-M-/

--> Expected result: the first completion candidate picked up in step
#3 ("foo3") is replaced with the next one ("foo2").
--> Observed result: the echo area shows the message
[dabbrev-completion: No dynamic expansion for "foo3" found] and thus
I'm unable to cycle through the completion candidates.


-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10963; Package emacs. (Mon, 12 Mar 2012 13:40:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 10963 <at> debbugs.gnu.org
Subject: Re: bug#10963: 24.0.94;
	`dabbrev-completion' and `completion-cycle-threshold'
Date: Mon, 12 Mar 2012 09:09:41 -0400
> Recipe from "emacs -Q":
> 1. Eval: (setq completion-cycle-threshold 4)
[...]
> 4. Type: C-M-/
> --> Expected result: the first completion candidate picked up in step
> #3 ("foo3") is replaced with the next one ("foo2").
> --> Observed result: the echo area shows the message
> [dabbrev-completion: No dynamic expansion for "foo3" found] and thus
> I'm unable to cycle through the completion candidates.

I believe this is now fixed in the trunk, please confirm,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10963; Package emacs. (Mon, 12 Mar 2012 14:12:01 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10963 <at> debbugs.gnu.org
Subject: Re: bug#10963: 24.0.94;
	`dabbrev-completion' and `completion-cycle-threshold'
Date: Mon, 12 Mar 2012 14:41:36 +0100
> I believe this is now fixed in the trunk, please confirm,

Thanks, Stefan.

It mostly works, but there is one detail that seems to need a fix:
Consider this scenario:
1. M-: (setq completion-cycle-threshold 4) RET
2. foo1 RET foo2 RET foo3 RET foo

Now, repeated `C-M-/' commands cycle like this:
  foo3/foo1/foo2

but repeated `M-/' commands cycle like this:
  foo3/foo2/foo1

I think that the cycling order should be equal in both cases, and IMO
the right order is the one followed by `M-/'  (ISTR that I've read
something about this in the manual, but right now I can't find the
place).

-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10963; Package emacs. (Mon, 12 Mar 2012 16:31:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 10963 <at> debbugs.gnu.org
Subject: Re: bug#10963: 24.0.94;
	`dabbrev-completion' and `completion-cycle-threshold'
Date: Mon, 12 Mar 2012 12:00:58 -0400
> It mostly works, but there is one detail that seems to need a fix:
> Consider this scenario:
> 1. M-: (setq completion-cycle-threshold 4) RET
> 2. foo1 RET foo2 RET foo3 RET foo

> Now, repeated `C-M-/' commands cycle like this:
>   foo3/foo1/foo2

> but repeated `M-/' commands cycle like this:
>   foo3/foo2/foo1

> I think that the cycling order should be equal in both cases, and IMO
> the right order is the one followed by `M-/'  (ISTR that I've read
> something about this in the manual, but right now I can't find the
> place).

That will require more changes: the current cycling order of C-M-/ is
completely different from the one of M-/ because the completion table
used is an obarray (a sort of hash-table), so dabbrev's ordering is
completely lost, and after that the completion code uses its default
sorting (which gives preference to shorter completions, which in this
case makes no difference).  So we'll need to stop using an obarray, and
to pass an ad-hoc sorting function to the completion code.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10963; Package emacs. (Mon, 12 Mar 2012 20:52:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 10963 <at> debbugs.gnu.org
Subject: Re: bug#10963: 24.0.94;
	`dabbrev-completion' and `completion-cycle-threshold'
Date: Mon, 12 Mar 2012 16:21:21 -0400
>> It mostly works, but there is one detail that seems to need a fix:
>> Consider this scenario:
>> 1. M-: (setq completion-cycle-threshold 4) RET
>> 2. foo1 RET foo2 RET foo3 RET foo

>> Now, repeated `C-M-/' commands cycle like this:
>> foo3/foo1/foo2

>> but repeated `M-/' commands cycle like this:
>> foo3/foo2/foo1

>> I think that the cycling order should be equal in both cases, and IMO
>> the right order is the one followed by `M-/'  (ISTR that I've read
>> something about this in the manual, but right now I can't find the
>> place).

> That will require more changes: the current cycling order of C-M-/ is
> completely different from the one of M-/ because the completion table
> used is an obarray (a sort of hash-table), so dabbrev's ordering is
> completely lost, and after that the completion code uses its default
> sorting (which gives preference to shorter completions, which in this
> case makes no difference).  So we'll need to stop using an obarray, and
> to pass an ad-hoc sorting function to the completion code.

OK, I think it's fixed now, can you confirm?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10963; Package emacs. (Mon, 12 Mar 2012 21:01:02 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10963 <at> debbugs.gnu.org
Subject: Re: bug#10963: 24.0.94;
	`dabbrev-completion' and `completion-cycle-threshold'
Date: Mon, 12 Mar 2012 21:30:19 +0100
> OK, I think it's fixed now, can you confirm?

Confirmed.

Thanks a lot.

-- 
Dani Moncayo




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Tue, 13 Mar 2012 13:14:02 GMT) Full text and rfc822 format available.

Notification sent to Dani Moncayo <dmoncayo <at> gmail.com>:
bug acknowledged by developer. (Tue, 13 Mar 2012 13:14:03 GMT) Full text and rfc822 format available.

Message #25 received at 10963-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 10963-done <at> debbugs.gnu.org
Subject: Re: bug#10963: 24.0.94;
	`dabbrev-completion' and `completion-cycle-threshold'
Date: Tue, 13 Mar 2012 08:43:45 -0400
>>>>> "Dani" == Dani Moncayo <dmoncayo <at> gmail.com> writes:

>> OK, I think it's fixed now, can you confirm?
> Confirmed.

> Thanks a lot.

> -- 
> Dani Moncayo




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

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

Previous Next


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