* eat.el (eat-enable-native-shell-prompt-editing)
(eat-prompt-input-ring-size)
(eat-prompt-move-point-for-matching-input): New user option.
* eat.el (eat--t-term): Remove slots 'cwd', 'prompt-start-fn',
'prompt-end-fn', 'cont-prompt-start-fn', 'cont-prompt-end-fn',
'cmd-start-fn' and 'cmd-finish-fn'. Add new slot 'ui-cmd-fn'.
* eat.el (eat--t-set-cwd): Support only the format used by OSC
7.
* eat.el (eat--t-prompt-start, eat--t-prompt-end)
(eat--t-cont-prompt-start, eat--t-cont-prompt-end)
(eat--t-set-cmd, eat--t-cmd-start, eat--t-cmd-finish): Remove
function.
* eat.el (eat--t-ui-cmd): New function.
* eat.el (eat--t-handle-output): Remove all specialized OSC 51
handlers and call 'eat--t-ui-cmd' to handle any OSC 51
sequence.
* eat.el (eat-term-set-parameter): Set 'ui-cmd-fn' slot of
terminal when 'ui-command-function' is set.
* eat.el (eat-term-cwd): Remove function.
* eat.el (eat-term-prompt-start-function)
(eat-term-prompt-end-function, eat-term-cmd-start-function)
(eat-term-cont-prompt-start-function)
(eat-term-cont-prompt-end-function, eat-term-set-cmd-function)
(eat-term-cmd-finish-function): Remove generalized variables.
* eat.el (eat-term-send-string): New function.
* eat.el (eat-send-string-as-yank): Rename to
'eat-term-send-string-as-yank'.
All callers changed.
* eat.el (eat--set-cwd-uic, eat--post-cont-prompt): New
function.
* eat.el (eat--pre-prompt, eat--post-prompt, eat--set-cmd)
(eat--pre-cmd, eat--set-cmd-status): Remove unused first
argument.
All callers changed.
* eat.el (eat--get-shell-history, eat--handle-uic): New
function.
* eat.el (eat-prompt-mode-map): New variable.
* eat.el (eat-emacs-mode, eat-semi-char-mode, eat-char-mode):
Handle the case when prompt mode is active.
* eat.el (eat--prompt-mode-previous-mode): New variable.
* eat.el (eat--prompt-mode): New non-interactive minor mode.
* eat.el (eat-prompt-send-default, eat-prompt-send)
(eat-prompt-newline, eat-prompt-delchar-or-eof)
(eat-prompt-send-interrupt): New command.
* eat.el (eat--prompt-input-ring, eat--prompt-input-ring-index)
(eat--prompt-stored-incomplete-input)
(eat--prompt-matching-input-from-input-string): New variable.
* eat.el (eat--prompt-populate-input-ring)
(eat--prompt-reset-input-ring-vars, eat--prompt-ask-for-regexp-arg)
(eat--prompt-search-arg, eat--prompt-search-start)
(eat--prompt-prev-input-string, eat--prompt-prev-matching-input-str)
(eat--prompt-delete-input, eat--prompt-prev-matching-input-str-pos):
New function.
* eat.el (eat-prompt-previous-input, eat-prompt-next-input)
(eat-prompt-restore-input, eat-prompt-previous-matching-input)
(eat-prompt-next-matching-input, eat-prompt-find-input)
(eat-prompt-previous-matching-input-from-input)
(eat-prompt-next-matching-input-from-input): New command.
* eat.el (eat-mode): Make 'eat--prompt-mode-previous-mode',
'eat--prompt-input-ring', 'eat--prompt-input-ring-index',
'eat--prompt-stored-incomplete-input' and
'eat--prompt-matching-input-from-input-string' buffer-local.
Record undo information if
'eat-enable-native-shell-prompt-editing' is enabled. Set
'mode-line-process' properly so that prompt mode is shown when
enabled.
* eat.el (eat--process-output-queue): Remove any narrowing
temporarily when called. Don't
* eat.el (eat--sentinel): Disable prompt mode. Also fix the
bug where the point centers when the program exits, instead of
going to the end of buffer.
* eat.el (eat-exec): Don't set removed generalized variables
'eat-term-prompt-start-function', 'eat-term-set-cmd-function',
'eat-term-prompt-end-function', 'eat-term-cmd-start-function'
and 'eat-term-cmd-finish-function'. Set terminal parameter
'ui-command-function' to 'eat--handle-uic'.
* eat.el (eat--eshell-handle-uic): New function.
* eat.el (eat--eshell-output-filter): Let-bind
'inhibit-read-only' only for required parts.
* eat.el (eat--eshell-setup-proc-and-term): Set terminal
parameter 'ui-command-function' to 'eat--eshell-handle-uic'.
* eat.el (eat--eshell-sentinel): Fix the bug where the point
centers when the program exits, instead of going to the end of
buffer.
* integration/bash (__eat_enable_integration): Send shell
history.
* eat.el (eat--t-device-status-report): Implement properly.
Take an argument.
* eat.el (eat--t-handle-output): Update call to
'eat--t-device-status-report'.
* eat.el (eat-mouse-yank-primary): Switch to the window where
the event was initiated.
* eat.el (eat-mouse-yank-secondary): Switch to the window where
the event was initiated. Ensure that the secondary selection
is non-empty before sending it.
* eat.el (eat-mouse-yank-primary, eat-mouse-yank-secondary):
New command.
* eat.el (eat--prepare-semi-char-mode-map)
(eat--eshell-prepare-semi-char-mode-map): Remap commands
'mouse-yank-primary' and 'mouse-yank-secondary' to
'eat-mouse-yank-primary' and 'eat-mouse-yank-secondary'
respectively.
* README.org (Usage): List keybindings in semi-char mode to
switch to other keybinding modes.
* eat.el (Commentary): Put the documentation of semi-char mode
first as it is the default. List keybindings in semi-char mode
to switch to other keybinding modes. Update stale keybindings
listed in emacs mode documentation.
* eat.el (eat-exec-hook, eat-exit-hook): Update docstring.
* eat.el (eat--sentinel): Pass process to 'eat-exit-hook'.
Delete process after running 'eat-exit-hook'.
* eat.el (eat--kill-buffer): New helper function.
* eat.el (eat-exec): Pass process to 'eat-exec-hook'. Add or
remove 'eat--kill-process' from 'eat-exit-hook' instead of
'kill-buffer'.
* eat.el (eat--post-prompt): Put the 'eat--shell-prompt-begin'
text property at the beginning of shell prompt.
* eat.el (eat--correct-shell-prompt-mark-overlays): Don't try
to go outside accessible portion of buffer when the buffer is
narrowed.
* eat.el (eat-narrow-to-shell-prompt): New command.
* eat.el (eat-mode-map): Bind key sequence 'C-x n d' to
'eat-narrow-to-shell-prompt'.
* eat.el (eat--filter-buffer-substring): Remove all text
properties added on UI side before passing buffer substring to
'eat-term-filter-string'.
* eat.texi (Shell Integration): Document
'eat-narrow-to-shell-prompt'.
* eat.el (eat-exit-hook, eat-update-hook, eat-eshell-exit-hook)
(eat-eshell-update-hook): New user option.
* eat.el (eat-reset, eat--process-output-queue): Run
'eat-update-hook'.
* eat.el (eat--sentinel): Don't test 'eat-kill-buffer-on-exit',
run 'eat-exit-hook'.
* eat.el (eat--adjust-process-window-size): Run
'eat-update-hook' when the major mode is 'eat-mode'. Run
'eat-eshell-update-hook' in 'eshell-mode' buffers.
* eat.el (eat-exec): Don't let-bind 'eat-kill-buffer-on-exit'
while killing old process, remove 'kill-buffer' from hook
'eat-exit-hook' instead. When 'eat-kill-buffer-on-exit' is
non-nil, add 'kill-buffer' to 'eat-exit-hook' with priority 90.
Run 'eat-exec-hook' outside any let-block.
* eat.el (eat--eshell-output-filter): Run
'eat-eshell-update-hook'.
* eat.el (eat--eshell-cleanup): Run 'eat-eshell-exit-hook'.
* eat.el (eat-very-visible-vertical-bar-cursor-type)
(eat-vertical-bar-cursor-type, eat-horizontal-bar-cursor-type)
(eat-very-visible-horizontal-bar-cursor-type): New user
options.
* eat.el (eat--t-term): New slot 'cur-visible-p'. Remove slot
'cur-blinking-p'. Change the default value of 'cur-state' to
':block'.
* eat.el (eat--t-reset): Don't reset slot 'cur-blinking-p'.
Reset slot 'cur-visible-p'. Reset 'cur-state' to ':block'.
Reset cursor state to ':block'.
* eat.el (eat--t-set-cursor-state): Set slot 'cur-visible-p' to
the current visibility of cursor. Set slot 'cur-state' to the
shape of cursor, regardless of visibility.
* eat.el (eat--t-default-cursor): Rename to
'eat--t-show-cursor'. Don't change any cursor state except
visibility.
* eat.el (eat--t-invisible-cursor): Rename to
'eat--t-hide-cursor'. Don't change any cursor state except
visibility.
* eat.el (eat--t-set-cursor-style): New function.
* eat.el (eat--t-blinking-cursor, eat--t-non-blinking-cursor):
Update to handle new cursor shapes properly.
* eat.el (eat--t-set-modes): Call 'eat--t-show-cursor' instead
of 'eat--t-default-cursor'.
* eat.el (eat--t-reset-modes): Call 'eat--t-hide-cursor'
instead of 'eat--t-invisible-cursor'.
* eat.el (eat--t-handle-output): Handle DECSCUSR control
function.
* eat.el (eat-term-cursor-type): Return ':invisible' if cursor
is invisible, otherwise the value of slot 'cur-state'. Update
the list of possible cursor states in the docstring.
* eat.el (eat-term-set-cursor-function): Update the list of
possible cursor states and fallback cursor state in the
docstring.
* eat.el (eat--cursor-blink-mode): Add
'eat--cursor-blink-stop-timers' to 'kill-buffer-hook'.
* eat.el (eat--set-cursor): Support new cursor states. Update
the list of possible cursor states in the docstring.
* eat.texi (Cursor Types): Document new user options
'eat-vertical-bar-cursor-type',
'eat-very-visible-vertical-bar-cursor-type',
'eat-horizontal-bar-cursor-type' and
'eat-very-visible-horizontal-bar-cursor-type'.
* eat.el (eat--t-term): Put a vector of length 8 (instead of
10) in 'cut-buffers' slot.
* eat.el (eat--t-manipulate-selection): Don't process the
targets '8' and '9', since they are not in the protocol.
Return correct list of queried targets to the client. Make
sure base64 encoded data doesn't contain line breaks.
* eat.el (eat--t-handle-output): Tolerate invalid targets in
OSC 52 (manipulate selection data).
* eat.el (eat--manipulate-kill-ring): Handle 'nil' correctly.
* eat.el (eat--process): Remove.
* eat.el (eat-mode): Don't make 'eat--process' buffer-local.
Use 'eat--terminal' to determine whether terminal is live.
* eat.el (eat--eshell-set-input-process): New function.
* eat.el (eat--eshell-local-mode): Don't make 'eat--process'
buffer-local. Add 'eat--eshell-set-input-process' as a advice
after 'eshell-resume-eval'.
* eat.el (eat-exec): Use the terminal parameters
'eat--process', 'eat--input-process' and 'eat--output-process'
instead of the buffer-local variable 'eat--process' store the
process object.
* eat.el (eat--sentinel): Don't set 'eat--process' to nil.
* eat.el (eat--eshell-setup-proc-and-term): Set the terminal
parameters instead of buffer-local 'eat--process'.
* eat.el (eat--pre-prompt, eat--pre-cmd, eat-kill-process, eat)
(eat--send-input, eat--trace-eshell-adjust-make-process-args)
(eat--eshell-cleanup, eat--eshell-output-filter): Get the
process from terminal parameter.
* eat.el (eat-query-before-killing-running-terminal): New user
option.
* eat.el (eat--pre-prompt): Unset process query on exit flag if
eat-query-before-killing-running-terminal is 'auto'.
* eat.el (eat--pre-cmd): Set process query on exit flag if
eat-query-before-killing-running-terminal is 'auto'.
* eat.el (eat--load-file-path, eat--being-loaded): New
variable.
* eat.el (eat-semi-char-non-bound-keys)
(eat-eshell-semi-char-non-bound-keys): Reload Eat when
customized. Document what to do if changed from Lisp.
* eat.el (eat-update-semi-char-mode-map)
(eat-eshell-update-semi-char-mode-map): New function.
* eat.el (eat-reload): New command.
* eat.texi (Semi-char Mode): Document what to do if the lists
of not bound keys are changed from Lisp.
* eat.el (eat-semi-char-non-bound-keys)
(eat-eshell-semi-char-non-bound-keys): New user option.
* eat.el (eat--prepare-semi-char-mode-map)
(eat--eshell-prepare-semi-char-mode-map): New function.
* eat.el (eat-semi-char-mode-map): Use
'eat--prepare-semi-char-mode-map' to make the keymap.
* eat.el (eat-eshell-semi-char-mode-map): Use
'eat--eshell-prepare-semi-char-mode-map' to make the keymap.