aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPengji Zhang2024-12-10 18:55:36 +0800
committerJim Porter2024-12-11 11:56:45 -0800
commit3959ea66448fb371cdc67bd963cd539a90f99ee5 (patch)
tree8f4094a990a4eda26381e5cc7ece15365d17db04 /doc
parent6a07dc19ac65eaa3ee1eeb814af85bde7fd2c509 (diff)
downloademacs-3959ea66448fb371cdc67bd963cd539a90f99ee5.tar.gz
emacs-3959ea66448fb371cdc67bd963cd539a90f99ee5.zip
Rework history Isearch for Eshell
This is to make history Isearch for Eshell similar to that of 'comint-mode', by hooking into Isearch properly instead of defining new commands to emulate Isearch (bug#74287). * lisp/eshell/em-hist.el (eshell-history-isearch): New user option. (eshell-goto-history, eshell--isearch-setup) (eshell-history-isearch-end, eshell-history-isearch-search) (eshell-history-isearch-message, eshell-history-isearch-wrap) (eshell-history-isearch-push-state): New functions. (eshell-isearch-backward-regexp, eshell-isearch-forward-regexp): New commands. (eshell--history-isearch-message-overlay) (eshell--stored-incomplete-input, eshell--force-history-isearch): New internal variables. (eshell-hist-mode-map): Bind 'M-r' to 'eshell-isearch-backward-regexp' and free 'M-s' binding for normal in-buffer search commands. (eshell-isearch-backward, eshell-isearch-forward): Use the new way to start searching. (eshell-hist-initialize): Use the new Isearch setup function. (eshell-previous-matching-input): Use 'eshell-goto-history'. Also inhibit messages when searching. (eshell-isearch-map, eshell-isearch-repeat-backward) (eshell-isearch-abort, eshell-isearch-delete-char) (eshell-isearch-return, eshell-isearch-cancel) (eshell-isearch-repeat-forward, eshell-test-imatch) (eshell-return-to-prompt, eshell-prepare-for-search): Remove. These are for the old history Isearch implementation. * doc/misc/eshell.texi (History): Document changes. * etc/NEWS: Annouce changes.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/eshell.texi15
1 files changed, 12 insertions, 3 deletions
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index 709417a7efb..264bb655e5e 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -2660,10 +2660,10 @@ navigation and searching are bound to different keys:
2660 2660
2661@table @kbd 2661@table @kbd
2662@kindex M-r 2662@kindex M-r
2663@kindex M-s
2664@item M-r 2663@item M-r
2665@itemx M-s 2664History I-search. @kbd{M-r} starts an incremental search in input
2666History I-search. 2665history. While searching, type @kbd{C-r} to move to the previous match,
2666and @kbd{C-s} to move to the next match in the input history.
2667 2667
2668@kindex M-p 2668@kindex M-p
2669@kindex M-n 2669@kindex M-n
@@ -2674,6 +2674,15 @@ line when you run these commands, they will instead jump to the
2674previous or next line that begins with that string. 2674previous or next line that begins with that string.
2675@end table 2675@end table
2676 2676
2677@vindex eshell-history-isearch
2678If you would like to use the default Isearch key-bindings to search
2679through input history, you may customize @code{eshell-history-isearch}
2680to @code{t}. That makes, for example, @kbd{C-r} and @kbd{C-M-r} in an
2681Eshell buffer search in input history only. In addition, if the value
2682of @code{eshell-history-isearch} is @code{dwim}, those commands search
2683in the history when the point is after the last prompt, and search in
2684the buffer when the point is before or within the last prompt.
2685
2677@node Extension modules 2686@node Extension modules
2678@chapter Extension modules 2687@chapter Extension modules
2679Eshell provides a facility for defining extension modules so that they 2688Eshell provides a facility for defining extension modules so that they