GNU bug report logs - #47678
27.1; `completion-boundaries` assertion failure for file

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Fri, 9 Apr 2021 20:36:02 UTC

Severity: normal

Found in version 27.1

Full log


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

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 47678 <at> debbugs.gnu.org
Subject: Re: bug#47678: 27.1; `completion-boundaries` assertion failure for
 file
Date: Tue, 13 Apr 2021 16:44:42 +0200
On 4/13/21 2:46 PM, Stefan Monnier wrote:
> The problem has to do with quoting/unquoting: in `C-x C-f` we do not
> quite enter "raw file name" because the name typed by the user is passed
> through `substitute-in-file-name` which expands envvar references (and
> de-doubles dollars for those files whose name looks like an envvar
> reference) and does some truncation (like foo//bar => /bar).

I am aware of that feature and use it but for now I avoided looking into 
how this is exactly implemented :)

> So the `completion-file-name-table` (which completes raw file names) is
> wrapped via `completion-table-with-quoting` and this function has to be
> able to relate the unquoted text back to the quoted text, for example in
> order to convert the boundaries returned by `completion-file-name-table`
> (on the unquoted file name) into the corresponding boundaries that apply
> to the quoted file name.
> 
> This is in general somewhere between hard and impossible.  So if/when we
> get those boundaries wrong (for example) it may lead to misbehavior down
> the line.
> I'd rather not try and guess what those might be.
> I'm just hoping that they're minor enough and rare enough.

Thank you for the detailed explanation.

Ok, but in the case where this issue occurs we already have a somehow 
broken path, especially when moving with the point over the shadowed 
parts. So as a user I would not be worried to much if this does not work.

I hope most assumptions down the line are checked by conditions. However 
given that in this particular case we already have an error we could 
only get more errors at worst down the line?

(Btw, in Vertico I throw out the shadowed paths as soon as I get the 
opportunity (vertico--tidy-shadowed-file) in the same way as Icomplete 
does it if enabled.)

Daniel




This bug report was last modified 4 years and 8 days ago.

Previous Next


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