From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrew Schwartzmeyer Newsgroups: gmane.emacs.devel Subject: Re: Should (icomplete-mode) explicitly disable fido-mode? Date: Fri, 5 Jun 2020 22:14:44 -0700 Message-ID: <4F21BA4E-0725-46D5-80D2-CBB96ADBF45A@schwartzmeyer.com> References: <7ADEE954-6074-4C8E-9EB7-7BF93F6F46BD@schwartzmeyer.com> <87o8pxjfi1.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_F75EE658-F3CE-4A00-A406-7C750948C032" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="96707"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 06 07:15:43 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jhRBG-000P3e-OJ for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jun 2020 07:15:42 +0200 Original-Received: from localhost ([::1]:38742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhRBF-0000SN-Nh for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jun 2020 01:15:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhRAV-0008JK-NE for emacs-devel@gnu.org; Sat, 06 Jun 2020 01:14:55 -0400 Original-Received: from mout02.posteo.de ([185.67.36.142]:49479) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhRAU-000796-KK for emacs-devel@gnu.org; Sat, 06 Jun 2020 01:14:55 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B5FEB2400FC for ; Sat, 6 Jun 2020 07:14:49 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49f7475smdz6tmG; Sat, 6 Jun 2020 07:14:47 +0200 (CEST) In-Reply-To: <87o8pxjfi1.fsf@gmail.com> X-Mailer: Apple Mail (2.3608.80.23.2.2) Received-SPF: pass client-ip=185.67.36.142; envelope-from=andrew@schwartzmeyer.com; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/06 01:14:50 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251932 Archived-At: --Apple-Mail=_F75EE658-F3CE-4A00-A406-7C750948C032 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On Jun 5, 2020, at 3:48 PM, Jo=C3=A3o T=C3=A1vora = wrote: >=20 > But isn't the end result what icomplete-vertical is after? > i.e. icomplete with some kind of verticality added? Or were you > expecting icomplete-vertical to add verticality to fido-mode? Since fido-mode is just icomplete-mode with nice defaults, = icomplete-vertical just becomes fido-vertical. With that patch they = took, it works like a charm. I get all the semantics and keybindings of = fido-mode, and use the icomplete-vertical-do macro for my yank-pop+ and = recentf-list+ functions based on completing-read (the content in these = completions tables is better suited to a vertical representation, = whereas most of the time I want the default horizontal representation). > The only thing that might be worth investigating is why > icomplete-vertical needs to call icomplete-mode when it's > already enabled. Maybe we could arrange for this not to be needed at > all and avoid the problem. I patched icomplete-vertical with (unless icomplete-mode = (icomplete-mode)), but it felt like a work-around. I don=E2=80=99t know = of any other instance where calling foo-mode non-interactively will = break things if it=E2=80=99s already enabled. I thought they were = usually idempotent. Cheers, Andy= --Apple-Mail=_F75EE658-F3CE-4A00-A406-7C750948C032 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 On = Jun 5, 2020, at 3:48 PM, Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> wrote:

But isn't the end result what = icomplete-vertical is after?
i.e. icomplete with some kind of verticality added?  Or = were you
expecting = icomplete-vertical to add verticality to = fido-mode?

Since fido-mode is just icomplete-mode with nice defaults, = icomplete-vertical just becomes fido-vertical. With that patch they = took, it works like a charm. I get all the semantics and keybindings of = fido-mode, and use the icomplete-vertical-do macro for my yank-pop+ and = recentf-list+ functions based on completing-read (the content in these = completions tables is better suited to a vertical representation, = whereas most of the time I want the default horizontal = representation).

The = only thing that might be worth investigating is why
icomplete-vertical needs to call icomplete-mode when = it's
already enabled.  Maybe we could arrange for this = not to be needed at
all and avoid the = problem.

I = patched icomplete-vertical with (unless icomplete-mode = (icomplete-mode)), but it felt like a work-around. I don=E2=80=99t know = of any other instance where calling foo-mode non-interactively will = break things if it=E2=80=99s already enabled. I thought they were = usually idempotent.

Cheers,

Andy
= --Apple-Mail=_F75EE658-F3CE-4A00-A406-7C750948C032--