GNU bug report logs - #38476
27.0.50; substring completion feature request

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Tue, 3 Dec 2019 19:34:02 UTC

Severity: wishlist

Found in version 27.0.50

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 38476 <at> debbugs.gnu.org
Subject: bug#38476: 27.0.50; substring completion feature request
Date: Fri, 20 May 2022 14:34:16 +0200
Stephen Berman <stephen.berman <at> gmx.net> writes:

> 0. $ mkdir /tmp/test; touch /tmp/test/{file1test,file2test}
> 1. $ emacs-master -Q --eval "(setq completion-category-overrides
>      '((buffer (styles substring)) (file (styles substring))))"
> 2. Type `C-x C-f /tmp/test/te TAB'
> => The minibuffer displays the following, with point at the end of the line:
>
> Find file: /tmp/test/test

Thanks.  With that recipe, I can reproduce the behaviour.

> Typing TAB a second time pops up a the *Completions* buffer showing
> file1test and file2test as the two possible completions.  But to
> complete either of these in the minibuffer you have to move point.
> That's the bug (or feature request).

Yeah, that doesn't seem like the best place to put point.

>> With "*te TAB" it completes to file*test with point after *, which seems
>> correct, too.
>
> Yes, that input didn't occur to me when I filed the report.  I just now
> scrolled through the Completion node of the Emacs manual and didn't see
> a reference to it; is it documented?  If not, perhaps it should be.

I think I've learned about * through osmosis -- perhaps it isn't
documented?  But it definitely should be.

> Anyway, using * comes close to satisfying the feature request, so if
> it's too hard to make it work without the *, I can live with having to
> use *.

It'd be nice if `substring' placed point where the * thing does, but
perhaps there are reasons for the current behaviour...

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




This bug report was last modified 3 years and 86 days ago.

Previous Next


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