GNU bug report logs - #74944
31.0.50; Double TAB does not pop up *Completions* buffer when completing filename with dashes

Previous Next

Package: emacs;

Reported by: Visuwesh <visuweshm <at> gmail.com>

Date: Wed, 18 Dec 2024 12:51:01 UTC

Severity: normal

Found in version 31.0.50

Full log


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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: "Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>, 74944 <at> debbugs.gnu.org
Subject: Re: bug#74944: 31.0.50; Double TAB does not pop up *Completions*
 buffer when completing filename with dashes
Date: Tue, 07 Jan 2025 16:01:32 +0100
Visuwesh <visuweshm <at> gmail.com> writes:

[...]

> The second call which moves the before the first '-' makes sense to me
> since to complete further one, one has to insert text before that
> character.  This happens elsewhere too so I am not exactly surprised.
> However, I think this is where the capf gets stuck since Emacs thinks it
> has to complete an option / a flag and the completion engine stops.

Hi Visuwesh,

I was down the rabbit hole on this one and now, I need some fresh air
and, hopefully, advices from experts here.

The culprit seems to be that `shell-filename-completion' does not know
how to complete the filename when the point is on '-' with the following
input in the *shell* buffer:

      $ rm -pos1.xyz

And it is due to the fact that `comint-word' is only looking for a word
*backward*.  I don't understand why is that so I tried to make
`comint-word' also looking for a word forward.  But then the following
assertion in `completion-in-region' is violated:

  (cl-assert (<= start (point)) (<= (point) end))

Does anyone could help me here?
-- 
Manuel Giraud




This bug report was last modified 157 days ago.

Previous Next


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