GNU bug report logs - #53935
27.2; [PATCH] ecomplete.el: Auto-select when there is only a single option

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Fri, 11 Feb 2022 02:48:01 UTC

Severity: wishlist

Tags: patch

Found in version 27.2

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Phil Sainty <psainty <at> orcon.net.nz>
Cc: "53935 <at> debbugs.gnu.org" <53935 <at> debbugs.gnu.org>
Subject: bug#53935: [External] : bug#53935: 27.2; [PATCH] ecomplete.el: Auto-select when there is only a single option
Date: Sun, 13 Feb 2022 17:24:18 +0000
> > I probably didn't pick a good name for the option, though.  In
> > hindsight something like `ecomplete-display-matches-auto-choose' is
> > probably better.  Or `ecomplete-display-matches-choose-dwim', given
> > that it's a DWIM-ish behaviour?
> 
> The latter sounds better to me.

FWIW:

1. Icicles has had such an option since 2007:
`icicle-top-level-when-sole-completion-flag'

 Non-nil means to return to top level if only
 one matching completion.  The sole completion
 is accepted.

And there's a companion option:
`icicle-top-level-when-sole-completion-delay'

 Number of secs to wait to return to top level
 if only one completion.  This has no effect if
 `icicle-top-level-when-sole-completion-flag' is
 nil.  Editing the completion (typing or deleting
 a character) before the delay expires prevents
 its automatic acceptance.

 Do not set this to 0.0.  Set it to slightly
 more than zero if you want instant action.

Maybe something like "accept-sole-completion"
would be a good name for your option?  (Emacs
no longer respects RMS's convention of `-flag'
for Boolean-valued vars).

2. Drop "-dwim-" from the name of your option.
That adds nothing but noise.  Meaningless, if
not misleading.

And does this really have anything to do with
_displaying matches_?  IIUC, it doesn't.

So far, the names proposed don't seem to
convey what (I think) this option does.




This bug report was last modified 2 years and 252 days ago.

Previous Next


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