From: James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Pengji Zhang <me@pengjiz.com>
Cc: 74287@debbugs.gnu.org
Subject: bug#74287: [PATCH] Rework history Isearch for Eshell
Date: Mon, 11 Nov 2024 05:10:06 +0530 [thread overview]
Message-ID: <861pziejzd.fsf@gmx.net> (raw)
In-Reply-To: <871pzjkhmm.fsf@pengjiz.com> (Pengji Zhang's message of "Sun, 10 Nov 2024 09:22:09 +0800")
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)
--
next prev parent reply other threads:[~2024-11-10 23:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-10 1:22 bug#74287: [PATCH] Rework history Isearch for Eshell Pengji Zhang
2024-11-10 23:40 ` James Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-11-12 8:54 ` Pengji Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=861pziejzd.fsf@gmx.net \
--to=bug-gnu-emacs@gnu.org \
--cc=74287@debbugs.gnu.org \
--cc=jimjoe@gmx.net \
--cc=me@pengjiz.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).