From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.devel Subject: Re: Comint-like history search for Eshell? Date: Mon, 04 Nov 2024 07:28:24 +0800 Message-ID: <87cyjbzylj.fsf@melete.silentflame.com> References: <878qu01mfc.fsf@pengjiz.com> <4fca840c-f6f3-53af-a020-11427efc07e7@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33420"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Pengji Zhang , emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 04 00:29:16 2024 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 1t7k1z-0008bA-9u for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Nov 2024 00:29:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7k1L-0007oK-9R; Sun, 03 Nov 2024 18:28:35 -0500 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 1t7k1I-0007nt-TH for emacs-devel@gnu.org; Sun, 03 Nov 2024 18:28:32 -0500 Original-Received: from sendmail.purelymail.com ([34.202.193.197]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7k1H-0005WR-4I for emacs-devel@gnu.org; Sun, 03 Nov 2024 18:28:32 -0500 DKIM-Signature: a=rsa-sha256; b=DH3/zwto7iKXThn5gtwSVzqk/t8fa2/DI/3YpXumrIRVK86yka61xCjciZYpywUVi1apAms9RiRIa+Nxhz6zrtP30x9cxmawVg1r1IVRj96HDUg93aoMNJ/srL1oalBDtsDpBhy3yA0qaOP8bV2DGnHfViHa0OyoCvI0fVFwVBfRBpJFVOuZK1c6dJCu67fKNd2o4mJCrXHDSEd7fhi1XIPz/ASF31M1yMKGZNBLsdrgjg+7ymTiLzsX3RrpO80BeJ2doHdxJe3ZpB5tIjNzzIrQTjANRhlusovdPINmCzEkk3mjuQ360tuE5FZ24JjJWdcnoFJW7/8KB/R/NYKAqA==; s=purelymail3; d=spwhitton.name; v=1; bh=QLOHW+JZ32HDImA12LCq5CCaLSxa5gIuR6qsYMiCKic=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=Jo2o2XYVKlrMcIIpHkghq4VanFGfwRC6CMwiHyHUbz6S7INpQC+jO+VgR6r7nidfa7isgtCpSNvZYK0Rg9PxPa/gERhyBcCBwnsfVpLX2C6yWCrzOuSXv9FjoB8HZoed1xRcbsWaunz18Q0WMmVVUMj5WjrCvB8eeZRv2/nVVxuwj0nJPLJYhpolTJPCGO0fcLJrPY/qGognYINvcsyviOHDLW2bjx8hMFKPzdekDs/wcYXwvluJO/Pa0cndI5XhAump5kCBRBenkXjZxr0H99ZdvJuDaV81mz5hfSNSSv0XTVtG0d9YRNt4agd8Dhny/8P1dzv1QLExDzceuA+9ww==; s=purelymail3; d=purelymail.com; v=1; bh=QLOHW+JZ32HDImA12LCq5CCaLSxa5gIuR6qsYMiCKic=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: emacs-devel@gnu.org Original-Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1487264632; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 03 Nov 2024 23:28:28 +0000 (UTC) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id 4C6177E686B; Mon, 4 Nov 2024 07:28:24 +0800 (CST) In-Reply-To: <4fca840c-f6f3-53af-a020-11427efc07e7@gmail.com> (Jim Porter's message of "Sun, 3 Nov 2024 15:09:57 -0800") Received-SPF: pass client-ip=34.202.193.197; envelope-from=spwhitton@spwhitton.name; helo=sendmail.purelymail.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325070 Archived-At: Hello, On Sun 03 Nov 2024 at 03:09pm -08, Jim Porter wrote: > On 11/3/2024 5:23 AM, Pengji Zhang wrote: >> I hacked a small patch (attached) implementing a comint-like interface >> for history search in Eshell, and I would like to know what people think >> about it. You may type 'M-r' in Eshell to try the interface. > > Thanks for the patch! > > Just some general thoughts before I do a more-thorough review: as I see it, > there are two competing ideas for how a user might look up a prior command: > using Isearch (as in this patch) or using completion. Both have some > similarities, but the latter has the advantage of letting you use the various > completion frameworks for filtering/displaying the results. > > I don't know if one or the other is "better" overall; I imagine which one a > user would prefer just depends on individual preference. (That said, I think > I'd probably use a completion-based command history if I had the option.) > > For this patch in particular, I think it would probably make sense to at least > see about leaving the door open for a completion-based history lookup in > Eshell. I haven't thought very hard about what that would look like yet > though... I came up with one a few months ago in my init.el: -- Sean Whitton