unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Fido and ido and completion or not completion
@ 2024-03-12 22:48 Tomas Nordin
  2024-03-13 18:13 ` Philip Kaludercic
  0 siblings, 1 reply; 3+ messages in thread
From: Tomas Nordin @ 2024-03-12 22:48 UTC (permalink / raw)
  To: help-gnu-emacs

Hello

When using fido as completion help, I get enhanced completion using
project and C-x p p (project-switch-project). With ido I dont get that.
Fido also tries to complete for me when entering a mail search with
notmuch, this I dont want.

How do I get about tuning things so either Fido stops completing my
notmuch searches or get ido to complete for me when switching projects
with C-x p p?

GNU Emacs 29.1.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38,
cairo version 1.16.0) of 2023-11-18



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

* Re: Fido and ido and completion or not completion
  2024-03-12 22:48 Fido and ido and completion or not completion Tomas Nordin
@ 2024-03-13 18:13 ` Philip Kaludercic
  2024-03-14 20:52   ` Tomas Nordin
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Kaludercic @ 2024-03-13 18:13 UTC (permalink / raw)
  To: Tomas Nordin; +Cc: help-gnu-emacs

Tomas Nordin <tomasn@posteo.net> writes:

> Hello
>
> When using fido as completion help, I get enhanced completion using
> project and C-x p p (project-switch-project). With ido I dont get that.
> Fido also tries to complete for me when entering a mail search with
> notmuch, this I dont want.
>
> How do I get about tuning things so either Fido stops completing my
> notmuch searches or get ido to complete for me when switching projects
> with C-x p p?

The issue is that ido and fido take different approaches.  Ido rebinds
commands like find-file to ido-find-file, switch-to-buffer to
iso-switch-to-buffer, etc. (see ido-minor-mode-map-entry).  Fido or
rather Icomplete work by hooking into the completion system, so that any
time a function uses a function like `completing-read', it provides
interactive narrowing.

Looking at the implementation, I could imagine that you could advise
`icomplete--in-region-setup' to check for `this-command', and depending
on what you want, to either call or not the call the actual function.

I don't have the notmuch source code lying around, but perhaps you could
ask the notmuch maintainers why they are doing what they do.

> GNU Emacs 29.1.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38,
> cairo version 1.16.0) of 2023-11-18
>
>

-- 
	Philip Kaludercic on peregrine



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

* Re: Fido and ido and completion or not completion
  2024-03-13 18:13 ` Philip Kaludercic
@ 2024-03-14 20:52   ` Tomas Nordin
  0 siblings, 0 replies; 3+ messages in thread
From: Tomas Nordin @ 2024-03-14 20:52 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: help-gnu-emacs

Philip Kaludercic <philipk@posteo.net> writes:

> Tomas Nordin <tomasn@posteo.net> writes:
>
>> Hello
>>
>> When using fido as completion help, I get enhanced completion using
>> project and C-x p p (project-switch-project). With ido I dont get that.
>> Fido also tries to complete for me when entering a mail search with
>> notmuch, this I dont want.
>>
>> How do I get about tuning things so either Fido stops completing my
>> notmuch searches or get ido to complete for me when switching projects
>> with C-x p p?
>
> The issue is that ido and fido take different approaches.  Ido rebinds
> commands like find-file to ido-find-file, switch-to-buffer to
> iso-switch-to-buffer, etc. (see ido-minor-mode-map-entry).  Fido or
> rather Icomplete work by hooking into the completion system, so that any
> time a function uses a function like `completing-read', it provides
> interactive narrowing.
>
> Looking at the implementation, I could imagine that you could advise
> `icomplete--in-region-setup' to check for `this-command', and depending
> on what you want, to either call or not the call the actual function.
>
> I don't have the notmuch source code lying around, but perhaps you could
> ask the notmuch maintainers why they are doing what they do.

Thanks for the insights. I noticed when using icomplete, the completion
attempts did not happen with notmuch searches. But for now I put on Ido
mode plus set completion-cycle-threshold to some low number. Then
vanilla completion do what I need with C-x p p and I get nice completion
with ido doing files and buffers.



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

end of thread, other threads:[~2024-03-14 20:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-12 22:48 Fido and ido and completion or not completion Tomas Nordin
2024-03-13 18:13 ` Philip Kaludercic
2024-03-14 20:52   ` Tomas Nordin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).