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, 10 Dec 2024 08:55:27 +0800 Message-ID: <8734iwl5kw.fsf@pengjiz.com> References: <871pzjkhmm.fsf@pengjiz.com> <8c80ae91-476e-e665-43be-86d72fb57ed1@gmail.com> <86v7waz603.fsf@gmx.net> <6fdd8386-8915-e3a8-046a-b18750a7057d@gmail.com> <87v7vzgtuq.fsf@mail.linkov.net> <87jzcecnc9.fsf@pengjiz.com> <87h67icmu1.fsf@pengjiz.com> <87cyi159vo.fsf@pengjiz.com> <87msh4n29s.fsf@mail.linkov.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="12643"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jim Porter , 74287@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 10 01:56:19 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 1tKoXy-00036H-4e for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Dec 2024 01:56:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKoXk-0007x4-VQ; Mon, 09 Dec 2024 19:56:05 -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 1tKoXi-0007wo-MP for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2024 19:56: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 1tKoXi-00060e-EA for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2024 19:56:02 -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=p1B7XBEzffU4CexAKA4rozQVH87Fddt9HgashpZKzlQ=; b=MUi+zwrnuGJk7VglpEzdoEuhaHFuqeIh2Ncm+b68DHMHiluFn9R9J3W5YPv3iqtLybjLapExROQbz1F4GvGrd8qW7nlaYctxdXgAOAPonOd9mfBBBOmbfgdt9gX0aouFVmu0NDpbYw9ZfRGRwV8R9XDjGis3RsqPG+alnYMh7Pj/q7a4dFyqpWtyClS1fgVUzd3y+iddxsCbHB4vppI2P6YWD/0qngHhVLQ+fvGU2/HpFHO7XsfndUO6yJz1QRaDn5FaADQux/WzYIV0mtAi73K4A+Pzz9oBV9pMB6EnireMyZrkk0vwTThLbAj3aSlotjxPMKevQ8oCPKiAwRY9YQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tKoXi-0007ho-1N for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2024 19:56: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, 10 Dec 2024 00:56:01 +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.173379214129582 (code B ref 74287); Tue, 10 Dec 2024 00:56:01 +0000 Original-Received: (at 74287) by debbugs.gnu.org; 10 Dec 2024 00:55:41 +0000 Original-Received: from localhost ([127.0.0.1]:56246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKoXM-0007h4-PD for submit@debbugs.gnu.org; Mon, 09 Dec 2024 19:55:41 -0500 Original-Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]:50431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKoXJ-0007gk-LR for 74287@debbugs.gnu.org; Mon, 09 Dec 2024 19:55:38 -0500 Original-Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id BAE13254016E; Mon, 9 Dec 2024 19:55:31 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Mon, 09 Dec 2024 19:55:31 -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=fm2; t=1733792131; x=1733878531; bh=p1B7XBEzff U4CexAKA4rozQVH87Fddt9HgashpZKzlQ=; b=I8R4ZxspEor1bDT50N2jSu3ffx CyMNOCRkHHZjNvWeqS/iNlcB7rWOTeSpqsoOLEily6dHmioDrGhHGyIti0bl6EpU 33nsuQg+YzXL9dGc+8JdbAvWagizz2dTFQ8UNBg6q/g9H3ZfPPe0+hiilOm4VLU+ d9+EU0cFEF5nnQGvEg83lSpVI39Y14MwjjobqPbI8vS0dONnQglGFInFf5U6ByHD JFFEOL1YGeRooJaRRsDFW8SNo2FFCRaQvSntp89TX/VJzrnQRzIPA0i74BApXE5C W+Dz1gHXQupMvwGyraOYq3ypJbr7fEGdIonbzZW8oyI86UcjNq+DEf7+5Ekg== 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=fm1; t= 1733792131; x=1733878531; bh=p1B7XBEzffU4CexAKA4rozQVH87Fddt9Hga shpZKzlQ=; b=x0rWHLMHNlUoXLI+sgYG8A0yDJ5W59L8VM6zYOYN1s6lzow70YX 0tKAuhlS9BbT7Srp6No3jLtm/7XaV11cYMqWWZcC75uJ/YgAzjrviSq8Np/aJ8Kl QrTe0BhbxB9ppXnflePhGckgpSozE4m3Kara5SsMnHQvDDZYLbRCfVdiuIyKX+6O cqqxJWevUhe80/k/uugnMW+gTVJ1dDLZbK+ins6O441Je0pPWnRC+rALhCEsCNU+ v/vtU/JSlWxwDJxAj+kv2VsOr6674wu6YRL4JT4SMlc6vspEWSHgWxIA64ebiL2y E4I4FeqVy5Dm2VsbGMRU9SqKn3k+qhEXmsw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrjeejgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevufgjfhffkfggtgesthdtredttddttdenucfh rhhomheprfgvnhhgjhhiucgkhhgrnhhguceomhgvsehpvghnghhjihiirdgtohhmqeenuc ggtffrrghtthgvrhhnpeegfeeiiedvudekiedtgedufedtvedtueetieffhfdvhefftefg ieejieelleehgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehmvgesphgvnhhgjhhiiidrtghomhdpnhgspghrtghpthhtohepfedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepjhhurhhisehlihhnkhhovhdrnhgvthdprhgtph htthhopehjphhorhhtvghrsghughhssehgmhgrihhlrdgtohhmpdhrtghpthhtohepjeeg vdekjeesuggvsggsuhhgshdrghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i16614472:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Dec 2024 19:55:30 -0500 (EST) In-Reply-To: <87msh4n29s.fsf@mail.linkov.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:296727 Archived-At: Juri Linkov writes: > [...] > > So do you propose to add an internal variable that duplicates the user > option? Yes, sort of. It does not fully duplicates the user option though. Because we only need to force turning *on* history search, it is made to override the user option only when it is non-nil. Basically, it is something like: --8<---------------cut here---------------start------------->8--- @@ -951,7 +954,8 @@ eshell--isearch-setup (when (and ;; Eshell is busy running a foreground process (not eshell-foreground-command) - (or (eq eshell-history-isearch t) + (or eshell--force-history-isearch + (eq eshell-history-isearch t) (and (eq eshell-history-isearch 'dwim) (>= (point) eshell-last-output-end)))) (setq isearch-message-prefix-add "history ") @@ -975,7 +979,7 @@ eshell-history-isearch-end (remove-hook 'isearch-mode-end-hook #'eshell-history-isearch-end t) (setq isearch-opoint (point)) (unless isearch-suspended - (custom-reevaluate-setting 'eshell-history-isearch))) + (setq eshell--force-history-isearch nil))) --8<---------------cut here---------------end--------------->8---