unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Pengji Zhang <me@pengjiz.com>
To: James Thomas <jimjoe@gmx.net>
Cc: 74287@debbugs.gnu.org
Subject: bug#74287: [PATCH] Rework history Isearch for Eshell
Date: Tue, 12 Nov 2024 16:54:27 +0800	[thread overview]
Message-ID: <87frnw96ik.fsf@pengjiz.com> (raw)
In-Reply-To: <861pziejzd.fsf@gmx.net>

James Thomas <jimjoe@gmx.net> 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.





      reply	other threads:[~2024-11-12  8:54 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
2024-11-12  8:54   ` Pengji Zhang [this message]

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=87frnw96ik.fsf@pengjiz.com \
    --to=me@pengjiz.com \
    --cc=74287@debbugs.gnu.org \
    --cc=jimjoe@gmx.net \
    /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).