unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tomas Nordin <tomasn@posteo.net>
To: Philip Kaludercic <philipk@posteo.net>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Fido and ido and completion or not completion
Date: Thu, 14 Mar 2024 20:52:13 +0000	[thread overview]
Message-ID: <87frwso7sy.fsf@posteo.net> (raw)
In-Reply-To: <87v85qyp80.fsf@posteo.net>

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.



      reply	other threads:[~2024-03-14 20:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87frwso7sy.fsf@posteo.net \
    --to=tomasn@posteo.net \
    --cc=help-gnu-emacs@gnu.org \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).