From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pengji Zhang Newsgroups: gmane.emacs.bugs Subject: bug#74287: [PATCH] Rework history Isearch for Eshell Date: Tue, 12 Nov 2024 16:54:27 +0800 Message-ID: <87frnw96ik.fsf@pengjiz.com> References: <871pzjkhmm.fsf@pengjiz.com> <861pziejzd.fsf@gmx.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="1625"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74287@debbugs.gnu.org To: James Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 12 09:55:28 2024 Return-path: Envelope-to: geb-bug-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 1tAmgK-0000HX-Bu for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Nov 2024 09:55:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAmfx-0004H3-Og; Tue, 12 Nov 2024 03:55:06 -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 1tAmfv-0004Gu-Jx for bug-gnu-emacs@gnu.org; Tue, 12 Nov 2024 03:55:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tAmfv-0004W3-A6 for bug-gnu-emacs@gnu.org; Tue, 12 Nov 2024 03:55:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=bmftXB3MdAGZiHyzfjV1SwjLhq9Fh5aBWESljP+3T8s=; b=qq6+wEG20lEdYKKynZiBwG/ATDASeBowxn0wxGSAoKWkV8qOeNahbJsFzaSLThpMggZ5GVQLUAR8Ozh9gvKagCmL98ITSGPmlGPfGiWQvLpP7xSBNhBSOLDyJLFyw94PhSdxm+VJSLcCevepC6VO3C/RmzkS0bCFe2k25Oq7uIarTjlUjbmWQ0XZV5T9xzD1CJJWaRnW1b/oD8eFXkDbg0NX3+8gBhI/qYHCHZs2aW4IuTj511AMYUbZ9Kw1xa5adKPNGD7tH57hw27QReE4yIQpoCVJdUymE4evlnbXbej1Rjo0kj0rpukjGqCAnFEReeSQlp+ITi/5gyYJeY7xjg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tAmfu-0003Uf-3j for bug-gnu-emacs@gnu.org; Tue, 12 Nov 2024 03:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pengji Zhang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Nov 2024 08:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74287 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74287-submit@debbugs.gnu.org id=B74287.173140168913395 (code B ref 74287); Tue, 12 Nov 2024 08:55:02 +0000 Original-Received: (at 74287) by debbugs.gnu.org; 12 Nov 2024 08:54:49 +0000 Original-Received: from localhost ([127.0.0.1]:60560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAmfh-0003Tz-4P for submit@debbugs.gnu.org; Tue, 12 Nov 2024 03:54:49 -0500 Original-Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]:49499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAmff-0003Tl-D6 for 74287@debbugs.gnu.org; Tue, 12 Nov 2024 03:54:48 -0500 Original-Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id CDBA11380446; Tue, 12 Nov 2024 03:54:41 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Tue, 12 Nov 2024 03:54:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pengjiz.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1731401681; x=1731488081; bh=bmftXB3MdA GZiHyzfjV1SwjLhq9Fh5aBWESljP+3T8s=; b=dQWsnbx/sftb4MPB0h3jbjMQUe EHcJrbRQCcV8tw7Xfya0FoJN+Ebpi/ryaNZyHsybKLXbNEjcHPG6Dn7fyNxJanHY iAtgpDiTv5fdLHuwvzBXUpX2ueKFYTl4ot492u3LEONhSdB/jDByi9PWZtmPtetZ 9NedeAZ/Ho57X7RRV03SBCjOC/SORkQmP71fRWnNXAsIsuV42HYvoiIkKgpGO14Q aegaqY+fGFCw79qvtq7s7MVLOrGefiIIHRt2GH1omvwUYG8k3x8HR6+uxSmQcd4/ JjWLV2uyTn4W7NI+NKDnf2pPpT2Jlnt9FzyFvCICOLyw8IJBPIX+oysnPZMA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1731401681; x=1731488081; bh=bmftXB3MdAGZiHyzfjV1SwjLhq9Fh5aBWES ljP+3T8s=; b=Ca8MoNKFpMIrk+waeEIgej9d8olsj21eMUVZwzCdRdRDtXtg9Wf 8ksTZrD/jHq/qXNow+KdBUfWSx2MKS93UXK5ThiYTLopKvp8A0h27E75h3WGODyh +U0qbFis8CDjInbo3HtW+dSvfYm2rONZEBZLDZMp3ibF0mBSnsUrW4a1qWdzlzpA pRkhuDHlkiZaeIjqu7muKPVQLPcAiL5BfWwXwdczFgpmuiz7+rdSlLnIkzoaOR7n jM/66MFsHogtvxo5kliK+XM+nZ8a16Rzogw5s9KtElFchBBqPCcHd0keQ/jAVeXB ddLwpWb3/ezPz+DbuUcKFtHn/JG1rY+r9fg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudefgdduvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevuf gjfhffkfggtgesthdtredttddttdenucfhrhhomheprfgvnhhgjhhiucgkhhgrnhhguceo mhgvsehpvghnghhjihiirdgtohhmqeenucggtffrrghtthgvrhhnpeegfeeiiedvudekie dtgedufedtvedtueetieffhfdvhefftefgieejieelleehgeenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmvgesphgvnhhgjhhiiidrtghomh dpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhi mhhjohgvsehgmhigrdhnvghtpdhrtghpthhtohepjeegvdekjeesuggvsggsuhhgshdrgh hnuhdrohhrgh X-ME-Proxy: Feedback-ID: i16614472:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Nov 2024 03:54:40 -0500 (EST) In-Reply-To: <861pziejzd.fsf@gmx.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295241 Archived-At: James Thomas writes: > Just wanna add a POC to the alternatives suggested. WDYT? Does not use > regexps for now, and C-. and C-, for cycling (rather than C-r and C-s): > > (setq icomplete-in-buffer t) > (icomplete-mode 1) > > (defun my/eshell-history-complete nil > (interactive) > (let ((icomplete-compute-delay 0) > (completion-at-point-functions > '((lambda nil > `(,eshell-last-output-end ,(point) ,(append (cddr eshell-history-ring) nil) . nil))))) > (completion-at-point))) > > (define-key eshell-hist-mode-map (kbd "M-r") #'my/eshell-history-complete) Thanks! While I like the simplicity of your approach, I am not sure if it is a good idea to depend on 'icomplete-mode'. People may have different preferences for the in-buffer completion framework.