unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43222: 28.0.50; fido-mode selects wrong buffer to kill when no input
@ 2020-09-05 15:39 Sean Whitton
  2020-09-05 22:47 ` Lars Ingebrigtsen
  2020-09-06  7:03 ` João Távora
  0 siblings, 2 replies; 5+ messages in thread
From: Sean Whitton @ 2020-09-05 15:39 UTC (permalink / raw)
  To: 43222; +Cc: larsi, joaotavora

This is orthogonal to #43120 so far as I can tell.

1. emacs -q
2. M-x fido-mode RET
3. C-x C-f ~/src/emacs/lisp/icomplete.el RET
4. M-: (find-file (locate-library "icomplete.el.gz")) RET
5. C-x b icomplete.el RET
6. C-x k [wait for completions] RET|M-j

This should kill the buffer visiting icomplete.el (right?) but in fact
it kills the buffer visiting icomplete.el.gz.  The first completion
offered by fido-mode is different from the default value shown in the
minibuffer prompt.

-- 
Sean Whitton





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

* bug#43222: 28.0.50; fido-mode selects wrong buffer to kill when no input
  2020-09-05 15:39 bug#43222: 28.0.50; fido-mode selects wrong buffer to kill when no input Sean Whitton
@ 2020-09-05 22:47 ` Lars Ingebrigtsen
  2020-09-06  7:03 ` João Távora
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-05 22:47 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 43222, joaotavora

Sean Whitton <spwhitton@spwhitton.name> writes:

> This is orthogonal to #43120 so far as I can tell.
>
> 1. emacs -q
> 2. M-x fido-mode RET
> 3. C-x C-f ~/src/emacs/lisp/icomplete.el RET
> 4. M-: (find-file (locate-library "icomplete.el.gz")) RET
> 5. C-x b icomplete.el RET
> 6. C-x k [wait for completions] RET|M-j
>
> This should kill the buffer visiting icomplete.el (right?) but in fact
> it kills the buffer visiting icomplete.el.gz.  The first completion
> offered by fido-mode is different from the default value shown in the
> minibuffer prompt.

Yup.  This bug is present in Emacs 27, too...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#43222: 28.0.50; fido-mode selects wrong buffer to kill when no input
  2020-09-05 15:39 bug#43222: 28.0.50; fido-mode selects wrong buffer to kill when no input Sean Whitton
  2020-09-05 22:47 ` Lars Ingebrigtsen
@ 2020-09-06  7:03 ` João Távora
  2020-09-06  7:39   ` João Távora
  1 sibling, 1 reply; 5+ messages in thread
From: João Távora @ 2020-09-06  7:03 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 43222, larsi

Sean Whitton <spwhitton@spwhitton.name> writes:

> This is orthogonal to #43120 so far as I can tell.
>
> 1. emacs -q
> 2. M-x fido-mode RET
> 3. C-x C-f ~/src/emacs/lisp/icomplete.el RET
> 4. M-: (find-file (locate-library "icomplete.el.gz")) RET
> 5. C-x b icomplete.el RET
> 6. C-x k [wait for completions] RET|M-j

Followed your report and confirmed it.  Notice that the problem only
happens because the file names share a common prefix: "icomplete.el"

Maybe the title (and the severity) of this bug should be changed to
reflect that.  Do you know how to do that, Lars?

> The first completion offered by fido-mode is different from the
> default value shown in the minibuffer prompt.

This sentence indeed describes it.  There code is fido-mode to "bubble"
up the default to the first result, but it isn't working for some
reason.  I'd say the problem lies somewhere in
icomplete--sorted-completions.

João








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

* bug#43222: 28.0.50; fido-mode selects wrong buffer to kill when no input
  2020-09-06  7:03 ` João Távora
@ 2020-09-06  7:39   ` João Távora
  2020-09-06 18:27     ` Sean Whitton
  0 siblings, 1 reply; 5+ messages in thread
From: João Távora @ 2020-09-06  7:39 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 43222-done, larsi

João Távora <joaotavora@gmail.com> writes:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>> This is orthogonal to #43120 so far as I can tell.
>>
>> 1. emacs -q
>> 2. M-x fido-mode RET
>> 3. C-x C-f ~/src/emacs/lisp/icomplete.el RET
>> 4. M-: (find-file (locate-library "icomplete.el.gz")) RET
>> 5. C-x b icomplete.el RET
>> 6. C-x k [wait for completions] RET|M-j
>
> Followed your report and confirmed it.  Notice that the problem only
> happens because the file names share a common prefix: "icomplete.el"
>
> Maybe the title (and the severity) of this bug should be changed to
> reflect that.  Do you know how to do that, Lars?
>
>> The first completion offered by fido-mode is different from the
>> default value shown in the minibuffer prompt.
>
> This sentence indeed describes it.  There code is fido-mode to "bubble"
> up the default to the first result, but it isn't working for some
> reason.  I'd say the problem lies somewhere in
> icomplete--sorted-completions.

I've fixed this in 6fc502c1ef327ab357c971b9bffbbd7cb6a436f1.

Author: João Távora <joaotavora@gmail.com>
Date:   Sun Sep 6 08:35:53 2020 +0100

  Don't resort Icomplete candidates when default already on top
  
  Fixes: bug#43222
  
  Icomplete mode re-sorts candidates, bubbling the default to top if
  it's found somewhere down the list.  This is done according to two
  criteria: exact match and prefix match.  Before this fix, it didn't
  take into account the possibility that the exact match for the default
  would already be on top, and would incorrectly bubble a prefixing
  completion down the list to the top.  This commit fixes that.
  
  * lisp/icomplete.el (icomplete--sorted-completions):
  Rework. Recomment.





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

* bug#43222: 28.0.50; fido-mode selects wrong buffer to kill when no input
  2020-09-06  7:39   ` João Távora
@ 2020-09-06 18:27     ` Sean Whitton
  0 siblings, 0 replies; 5+ messages in thread
From: Sean Whitton @ 2020-09-06 18:27 UTC (permalink / raw)
  To: João Távora; +Cc: 43222

Hello,

On Sun 06 Sep 2020 at 08:39AM +01, João Távora wrote:

> I've fixed this in 6fc502c1ef327ab357c971b9bffbbd7cb6a436f1.

Thank you for this fix!

-- 
Sean Whitton





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

end of thread, other threads:[~2020-09-06 18:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05 15:39 bug#43222: 28.0.50; fido-mode selects wrong buffer to kill when no input Sean Whitton
2020-09-05 22:47 ` Lars Ingebrigtsen
2020-09-06  7:03 ` João Távora
2020-09-06  7:39   ` João Távora
2020-09-06 18:27     ` Sean Whitton

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).