From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Nordin Newsgroups: gmane.emacs.help Subject: Re: Fido and ido and completion or not completion Date: Thu, 14 Mar 2024 20:52:13 +0000 Message-ID: <87frwso7sy.fsf@posteo.net> References: <87il1rnk28.fsf@posteo.net> <87v85qyp80.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38968"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Philip Kaludercic Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 14 21:53:09 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rks4a-0009wo-Id for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 14 Mar 2024 21:53:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rks3t-0002FA-3e; Thu, 14 Mar 2024 16:52:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rks3r-0002Eo-Lp for help-gnu-emacs@gnu.org; Thu, 14 Mar 2024 16:52:23 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rks3p-0005Bm-G7 for help-gnu-emacs@gnu.org; Thu, 14 Mar 2024 16:52:23 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4F4B4240101 for ; Thu, 14 Mar 2024 21:52:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710449535; bh=c+sBXWyPSJ/9dRamiDCuzhZWudTGtv1lrOcRD/7fG00=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=WtQ4bE931Nh9fO/RN7RUCduxCuyHIXwgbeiX2iPEtlAaIQvsLw3AQALkMOa/rU52D AHPNBJdVisReHdjph4zn6qGyVQT+jD+IvW6xiMojRcMyodUN5hOaib2pkMamSsdo8+ jsj8bkqtIYS9HhO9J42AKNxETUmA96L0Vh/Dr17lNzALJ0ft4KmFxVBjBc/WyKnEyC bAG5YmapqnmBjCCYNBa85WJeWqvhHq3UXBAN9GF4GVkA0+mpiBSbIlfpMTRjwSxoGX loh/a5DuV3ilz0Vdoovp9BeU1cqSmy9cWdGvsMd0XQeaRIOnD7u1mOR5mqh5Q8/IMN HwB06WBqjaDmQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TwfhG6DhCz9rxM; Thu, 14 Mar 2024 21:52:14 +0100 (CET) In-Reply-To: <87v85qyp80.fsf@posteo.net> Received-SPF: pass client-ip=185.67.36.66; envelope-from=tomasn@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146096 Archived-At: Philip Kaludercic writes: > Tomas Nordin 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.