all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Show all completions based on substring search
@ 2022-11-09 21:54 Rudolf Adamkovič
  2022-11-09 22:29 ` Stephen Berman
  2022-11-18 17:49 ` Rudolf Adamkovič
  0 siblings, 2 replies; 3+ messages in thread
From: Rudolf Adamkovič @ 2022-11-09 21:54 UTC (permalink / raw)
  To: help-gnu-emacs

Howdy smart folks!

I noticed that Emacs (v29, 5b9b393c61) does not always show all
completions, the way I would like.

Given

  1. emacs -Q
  2. C-h f
  3. warning TAB,

I get the following 3 completions:

  warning-numeric-level
  warning-suppress-p
  warnings-suppress

Instead, I would like to see all candidates that contain the substring
`warning', such as `display-warning'.

I noticed that if I move the point to the beginning of the word
`warning' and type `TAB' there, then I get all candidates that contain
the substring `warning', including `display-warning'.

How can make the completion system *always* do this on `TAB', without
moving the point?  (Or using word completion, or typing the Orderless
separator, or anything else like that.)

I tried to set the `completion-styles' to the various documented values,
but I never seem to get all candidates I expect.

Thank you in advance for any help!

Rudy
-- 
"Logic is a science of the necessary laws of thought, without which no
employment of the understanding and the reason takes place."
-- Immanuel Kant, 1785

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Show all completions based on substring search
  2022-11-09 21:54 Show all completions based on substring search Rudolf Adamkovič
@ 2022-11-09 22:29 ` Stephen Berman
  2022-11-18 17:49 ` Rudolf Adamkovič
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Berman @ 2022-11-09 22:29 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: help-gnu-emacs

On Wed, 09 Nov 2022 22:54:04 +0100 Rudolf Adamkovič <salutis@me.com> wrote:

> Howdy smart folks!
>
> I noticed that Emacs (v29, 5b9b393c61) does not always show all
> completions, the way I would like.
>
> Given
>
>   1. emacs -Q
>   2. C-h f
>   3. warning TAB,
>
> I get the following 3 completions:
>
>   warning-numeric-level
>   warning-suppress-p
>   warnings-suppress
>
> Instead, I would like to see all candidates that contain the substring
> `warning', such as `display-warning'.
>
> I noticed that if I move the point to the beginning of the word
> `warning' and type `TAB' there, then I get all candidates that contain
> the substring `warning', including `display-warning'.
>
> How can make the completion system *always* do this on `TAB', without
> moving the point?  (Or using word completion, or typing the Orderless
> separator, or anything else like that.)

Typing `*warning TAB' works for me - after setting
`completion-category-overrides' to ((buffer (styles substring)) (file
(styles substring))).  With -Q that variable's value is nil, and there
typing `*warning TAB' immediately completes to `*-warning', so another
TAB does not show function names beginning with `warning-'.  That
setting overrides for buffer and file name completion is apparently
needed for function name completion is not something I expected...

Steve Berman



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Show all completions based on substring search
  2022-11-09 21:54 Show all completions based on substring search Rudolf Adamkovič
  2022-11-09 22:29 ` Stephen Berman
@ 2022-11-18 17:49 ` Rudolf Adamkovič
  1 sibling, 0 replies; 3+ messages in thread
From: Rudolf Adamkovič @ 2022-11-18 17:49 UTC (permalink / raw)
  To: help-gnu-emacs

Rudolf Adamkovič <salutis@me.com> writes:

> I tried to set the `completion-styles' to the various documented
> values, but I never seem to get all candidates I expect.

[Answering my own question.]

I asked @oantolin (Omar Antolín Camarena) on GitHub [1].

His insightful reply solved my problem instantly:

> My first instinct is that it doesn't sound like orderless is doing the
> matching here, but some other completion style is getting first crack
> instead. What values of completion-category-defaults and
> completion-category-overrides are you using?

Rudy

[1] https://github.com/oantolin/orderless/issues/128

-- 
"Simplicity is complexity resolved."
-- Constantin Brâncuși, 1876-1957

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-18 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-09 21:54 Show all completions based on substring search Rudolf Adamkovič
2022-11-09 22:29 ` Stephen Berman
2022-11-18 17:49 ` Rudolf Adamkovič

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.