GNU bug report logs -
#33595
26; Have `try-completion' or `completion--done' run abnormal hook if sole completion
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Mon, 3 Dec 2018 04:08:02 UTC
Severity: wishlist
Done: Drew Adams <drew.adams <at> oracle.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Enhancement request: When `try-completion' returns `t' there is a
> "unique match which is exact". Please add an abnormal hook at this
> point, which accepts that sole completion as argument.
I'm not sure exactly what's the intention behind this: would it be an
option that influences the UI or the completion table?
More concretely, do you expect a hook function places on this variable
to apply for "any completion table" or would it be specific to
a particular completion table?
The example you give in `my-describe-function` gives me the impression
that those would inevitably be tightly linked to the completion table.
So instead of a hook variable, it would probably make more sense to add
a new `completion-extra-properties` alongside to :exit-function.
Do you have other example applications than `my-describe-function` (to
be honest, I found this example not very compelling).
> no exit function. `try-completion' is the logical place to do this, I
Definitely not: try-completion can be used in lots of other
non-completion uses, can be called many times for a single completion
operation, etc... try-completion should be renamed to `find-common-prefix`.
Stefan
PS: I'm not sure I completely understand the intended behavior of
`my-describe-function`, but I get the impression that for this
particular example, a maybe even better approach is to use
minibuffer-with-setup-hook to set a post-command-hook that calls
describe-function whenever the minibuffer names a valid function
(whether we get there via completion or plain typing, and regardless
if it's the sole completion).
This bug report was last modified 6 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.