From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74287: [PATCH] Rework history Isearch for Eshell Date: Mon, 11 Nov 2024 05:10:06 +0530 Message-ID: <861pziejzd.fsf@gmx.net> References: <871pzjkhmm.fsf@pengjiz.com> Reply-To: James Thomas Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1527"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74287@debbugs.gnu.org To: Pengji Zhang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 11 00:41:23 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 1tAHYY-0000FF-SU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Nov 2024 00:41:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAHYH-00019p-BR; Sun, 10 Nov 2024 18:41: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 1tAHYE-00019c-Gg for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 18:41:02 -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 1tAHYE-0007ng-7z for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 18:41: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=/IV5joABwZcVi6+ClhEHX8iwR20mnilq8rr4T8CIDuY=; b=qG2KyjvtO78pUU8AF6yRwcbf/S8z1g5ai/ynPs0sTKNn+ElHdQ/tExSAN7tru2Xn8cm56kzM6ZSBaS8nNxn4KcN+1xVP3cFiQlLXf2QlHyxU3GKbNJJbLl83bBJbowuN3WLVgPIk2lnxiTpjShmUrP+x+HMmk5qglOyZEAW8Obx9F15/2sOT/AaIhQ144PvYa0vSH80+Q6L6/rW+B7lGRWoSDoNFXcpKPwQ9IOb8pD8+4XxJZI/dRjpHtZ3ahsNXQXY/wiUcGtQEo/niviACib2sm/lU28w3ULo+dw3w61//Y8MvErkgIEejpdx2DibtKTQKU//7kW9GUlRjC6VM7g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tAHYD-0004By-SF for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 18:41:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Nov 2024 23:41: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.173128202616050 (code B ref 74287); Sun, 10 Nov 2024 23:41:01 +0000 Original-Received: (at 74287) by debbugs.gnu.org; 10 Nov 2024 23:40:26 +0000 Original-Received: from localhost ([127.0.0.1]:57047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAHXd-0004An-SF for submit@debbugs.gnu.org; Sun, 10 Nov 2024 18:40:26 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:47189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAHXZ-0004AU-NG for 74287@debbugs.gnu.org; Sun, 10 Nov 2024 18:40:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1731282013; x=1731886813; i=jimjoe@gmx.net; bh=/IV5joABwZcVi6+ClhEHX8iwR20mnilq8rr4T8CIDuY=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=JgvvAaP9qn6QTIQSEtoFBYue99zmVtZt3QsJUXKs8xDVB0EEj3vQdSYoYhxpxcuO x9dQB8oI8KV7CJvCLadhYfR04LeB6VNFUb3BBF+85I1wAbx+7ORA1+VINEYQ/zlSs J7JoqsjnCkunlYvglgLx3oCsLgM25xeJBRlbzQyWcEjDzY3pUy5EuqCZFkdpusAeD /l7TqFO+NF8SOUKR9eC9kpSjSPZ/r5QX7O3pmtrXuim3K5P7KKpoTWyIC13iRP2uN GsuM8UrgCuLT2yKrIkPJJOJz7I3R7ldM+UGluRsd4QeMtgj+5xnUJy42fGM1NjpQO FEjUNj7B/Q57Ctm1VQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from user-Inspiron-3493 ([42.108.14.13]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1ML9uU-1tSMcT3F8k-00Kgwu; Mon, 11 Nov 2024 00:40:12 +0100 In-Reply-To: <871pzjkhmm.fsf@pengjiz.com> (Pengji Zhang's message of "Sun, 10 Nov 2024 09:22:09 +0800") X-Provags-ID: V03:K1:Oy9WUH2SKRBglcDHw6URihgx78Hqdqj/d3cOUrFdACZ/ua91iix 2c4l+ZWq0QpIIuzyJZ7VtCcnm6PNmw5x2Wmpil6286DpQX8Wwh6l66K4SPTOLK6FkZ7mQjc QtoqC06qDyqRD1j9oV4JfnA9kRkyDYqxEVzVjs/eXLBoWtlbpFAlJ+01T9KLUZvHxR5kux+ BO0xWAG4XWhBjor7PkBfw== UI-OutboundReport: notjunk:1;M01:P0:cpSei2HeeJk=;pOv1lJSvLMu9ibAoJ5h+HsMsjEW Xe/6mUExo982k5zyQnpattYPrpdu0vwLQMRAoxaR1qkjUbHecRawrbuNoPbTWkZBq0qSgTM5k UPMPcIMKqbnsZdiGu0YiXWj/V+lhg9XVUkFgce0b9AeFLN+wN5G/CLc2JoavXTQWl7gkj881x sN6agfW4FARSooL0DDzF/gy7/zxNQFR95vquGFmxbu5MovYr5DRtzz7x9coaveftu0lJtgPsN YY1AQaySJR0UsiCsIhGxtm1EEDcN46qUuwAZw1sEL+S5bMAQxe94X+IqFGGtMhHJM+kJbEku6 IpnGO2+DnaWV2VtnWfC4ze0xTF+B2UZPG8aBNCsGcCp0zJR8Q5D57wALwtzR/EBDqNuAhhd5q 0ToDJ9+Skp4Rr6P6l6EpOf/EUg64JIYSd/87qtbqZTse0Ex9kWmIIxGZ08UXUCpBlHQPLF8/W evyvxbJjsv5fNSOYBUIEH2vj09ya4wqLBZEXr4u86Q9KlAQsgY2oNAIzDzi2+ScpoqhPyEen9 E3fkNl0qCFidfFQGIZePSXcTff2ud0wzj1kUDRdGrLYBVF8iruMR0l2GdvafES0EkPxvTPOCu 2lrL6pbkxHRleyVP606JS4iMUyWpwm+DQb9o4VIwqeBkvdU5/l74YYJaXa3swlDxMVRruceyw X/h57PEwlXchA3+R6KVtMtGdTsEaWJ/Shi6G1HhHmEKmb+yIGnMdYaDsdws9dcwP4AOIEtKR7 l5kkKDbTbrChIV5dhJIVMWjRmaCvah8jXdW3Cwi0WpqlEkXoi4+dlbdMQotMpaabtUQZfsQi 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:295209 Archived-At: Pengji Zhang wrote: > Hello, > > This patch brings a comint-like interface for history Isearch to Eshell. > To try it, type 'M-r' in Eshell, and search through the input history > ring incrementally. > > Compared to the existing implementation, this patch integrates with > Isearch properly, like what we do for the minibuffer and comint modes. > > There are relevant discussions (thank you all for the feedback!) in the > mailing list: > > https://lists.gnu.org/archive/html/emacs-devel/2024-11/msg00069.html > > For Jim's concern, I do not think this implementation closes the door > for a history completion interface, as shown by Sean and Juri. 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) --