Commit graph

170 commits

Author SHA1 Message Date
Akib Azmain Turja
f01afd6c24
Fix middle-click yanking commands
* 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.
2023-05-06 18:31:04 +06:00
Akib Azmain Turja
a1c4422f21
Support middle-click yank in terminal
* 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.
2023-05-06 18:02:11 +06:00
Akib Azmain Turja
5a01e09cbb
Update documentation in commentary section
* 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.
2023-04-17 17:49:15 +06:00
Akib Azmain Turja
092bdd9b95
; Release version 0.8
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2023-04-13 17:55:57 +06:00
Akib Azmain Turja
bf8639a34d
Pass process to eat-exec-hook and eat-exit-hook
* 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'.
2023-04-09 19:50:33 +06:00
Akib Azmain Turja
c51446bafb
New command 'eat-narrow-to-shell-prompt'
* 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'.
2023-04-09 17:31:14 +06:00
Akib Azmain Turja
f7fd7694a9
Run hooks on terminal update and process exit
* 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'.
2023-04-07 17:45:48 +06:00
Akib Azmain Turja
5c373094cc
Fix resizing when alternative display is enabled
* eat.el (eat--t-term): Fix error while resizing when
alternative display is enabled.
2023-04-05 20:39:05 +06:00
Akib Azmain Turja
5792c1b2e0
; Inform about unlisted semi-char mode exceptions
eat.el: Inform about unlisted semi-char mode exceptions in
Commentary section.
2023-04-04 17:13:49 +06:00
Akib Azmain Turja
a20c01e012
; Release version 0.7
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2023-04-02 20:01:51 +06:00
Akib Azmain Turja
69be16b565
Force directionality of paragraphs in Eat buffer
* eat.el (eat-mode): Set 'bidi-paragraph-direction' to
'left-to-right'.
2023-04-02 19:58:43 +06:00
Akib Azmain Turja
322e10c713
Inform about unlisted semi-char mode exceptions
* eat.texi (Input Modes): Inform about unlisted semi-char mode
exceptions.
* README.org: Inform about unlisted semi-char mode exceptions.
Add Zsh integration instructions.
2023-04-02 14:17:14 +06:00
Akib Azmain Turja
b986063994
Support DECSCUSR control function
* 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'.
2023-03-31 17:51:15 +06:00
chriselrod
644d01f6fd
; eat.texi (Hello Terminal): Fix typo 2023-03-31 11:42:24 +06:00
Akib Azmain Turja
cf011ad6b1
Capture keys 'M-backspace' and 'C-M-backspace'
* eat.el (eat-term-input-event): Support 'M-backspace' and
'C-M-backspace'.
* eat.el (eat-term-make-keymap): Bind 'M-backspace' and
'C-M-backspace'.
2023-03-31 11:27:12 +06:00
Akib Azmain Turja
48202c147b
Suggest to invoke 'eat-compile-terminfo' in manual
* eat.texi (Not Recognized, Garbled Text): Suggest to do
'M-x eat-compile-terminfo' when the Terminfo databases aren't
working properly.
2023-03-31 11:10:07 +06:00
Akib Azmain Turja
5c5711a97e
Fix directory tracking in Zsh
* integration/zsh (__eat_precmd): Use '$HOST' instead of
'$HOSTNAME'.
2023-03-31 10:36:56 +06:00
Akib Azmain Turja
792a98810e
Implement Zsh integration
* integration/zsh: New file.
* eat.texi (Shell Integration): Add instructions for Zsh.
* integration/bash: Always return zero on succuss.
2023-03-31 00:05:33 +06:00
Akib Azmain Turja
eab01e693b
Add new command 'eat-compile-terminfo'
* eat.el (eat-compile-terminfo): New command.
* eat.texi (Hello Terminal): Refer to 'Common Problems'.
* eat.texi (Common Problems): Add instructions to compile
Terminfo databases with 'eat-compile-terminfo'.
2023-03-30 13:25:16 +06:00
Akib Azmain Turja
26d83d04c1
Update manual to correctly describe command 'eat'
* eat.texi (Hello Terminal): Update to match with the current
behavior of command 'eat'.
2023-03-29 23:09:30 +06:00
Akib Azmain Turja
8ee08d2b22
Don't prompt for program in M-x eat by default
* eat.el (eat): Prompt for program to run only if double prefix
argument is given, otherwise use the default one.
2023-03-29 22:39:45 +06:00
Akib Azmain Turja
5a2123910a
; Release version 0.6.1
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2023-03-28 14:08:07 +06:00
Akib Azmain Turja
6cf6db86c9
Fix bugs in selection data manipulation code
* 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.
2023-03-28 14:05:35 +06:00
Akib Azmain Turja
0586a84e52
Fix incompatiblity with Eshell on Emacs 28
* eat.el (eat--eshell-setup-proc-and-term): Set
'eat--input-process' terminal parameter on Emacs 28.
* eat.el (eat-eshell-mode): Don't add advice
'eat--eshell-set-input-process' on Emacs 28.
2023-03-21 20:24:59 +06:00
Akib Azmain Turja
532f7221b7
Send input to correct process in Eshell pipeline
* 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.
2023-03-20 23:54:33 +06:00
mmarshall540
d7034f5ab5
; Fix group name typos (eat-ehell -> eat-eshell) 2023-03-09 11:36:14 +06:00
Akib Azmain Turja
f2bca97ac6
; Release version 0.6
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2023-02-08 21:22:48 +06:00
Akib Azmain Turja
b8c661c6fa
* eat.texi (Querying Before Kill): New chapter 2023-02-08 21:19:56 +06:00
Akib Azmain Turja
153491a0a1
Query when killing buffer when command is running
* 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'.
2023-02-07 17:13:10 +06:00
Akib Azmain Turja
d66c55a285
; Release version 0.5
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2023-01-22 22:44:24 +06:00
Akib Azmain Turja
e12a5be607
; Update copyright years
* eat.el:
* eat.texi:
Update copyright year to add 2023.
2023-01-22 22:42:40 +06:00
Akib Azmain Turja
ac954032c6
Add many more semi-char mode exceptions
* eat.el (eat-semi-char-non-bound-keys)
(eat-eshell-semi-char-non-bound-keys): Add 81 more keys.
2023-01-22 22:39:12 +06:00
Akib Azmain Turja
417e7d2362
Auto reload Eat when "semi-char" map is customized
* 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.
2023-01-19 22:46:37 +06:00
Akib Azmain Turja
beb4a57c6f
Document some new user options
* eat.texi (Semi-char Mode): Document
'eat-semi-char-non-bound-keys' and
'eat-eshell-semi-char-non-bound-keys'.
* eat.texi (Input Invisible): New section.
2023-01-18 17:22:13 +06:00
Akib Azmain Turja
96dfb50d84
Allow modifying semi-char key exceptions
* 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.
2023-01-16 12:11:25 +06:00
Akib Azmain Turja
344cc075d2
Allow pasting from parent XTerm to Eat terminal
* eat.el (eat-xterm-paste): New command.
* eat.el (eat-mode-map, eat-eshell-emacs-mode-map): Bind
<xterm-paste> to 'ignore'.
* eat.el (eat-semi-char-mode-map, eat-char-mode-map)
(eat-eshell-semi-char-mode-map, eat-eshell-char-mode-map): Bind
<xterm-paste> to 'eat-xterm-paste'.
2023-01-15 22:22:13 +06:00
Akib Azmain Turja
135a562a20
; * README.org (Usage): Improve and link to manual 2023-01-15 22:15:44 +06:00
Akib Azmain Turja
9a432eef11
; Release version 0.4
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2022-12-28 22:54:31 +06:00
Akib Azmain Turja
c9a7aef4f6
Don't error while handling the sequence '\e[>c'
* eat.el (eat--t-send-device-attrs): Accept '((nil))' as the
value of the parameter PARAMS, but don't accept 'nil'.
2022-12-28 22:01:36 +06:00
Akib Azmain Turja
5314be930e
* eat.el (eat): Use buffer name for process name 2022-12-28 21:46:27 +06:00
Akib Azmain Turja
e66cca3341
* eat.el (eat-eshell-exec-hook): Make customizable 2022-12-28 21:41:47 +06:00
Akib Azmain Turja
dcbe6b861e
* eat.el (eat-exec-hook): Make customizable 2022-12-28 21:41:11 +06:00
Akib Azmain Turja
328c9d629d
Run eat-eshell-exec-hook as Eshell process is run
* eat.el (eat--eshell-setup-proc-and-term): Run
'eat-eshell-exec-hook' at the very end.
2022-12-28 21:35:39 +06:00
Akib Azmain Turja
63f23b3e50
* README.org (Straight.el): New section 2022-12-22 21:11:40 +06:00
Akib Azmain Turja
a4b20341b3
Don't let font-lock to mess up text face
* eat.el (eat--t-repeated-insert, eat--t-write)
(eat--t-fix-partial-multi-col-char): Add 'font-lock-face' text
property along with 'face' to stop font-lock from removing the
face.
2022-12-22 20:27:50 +06:00
Akib Azmain Turja
fcc02df105
; Release version 0.3.1
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2022-12-21 01:42:43 +06:00
Akib Azmain Turja
403a1d4b5d
; * README.org (Quelpa): Fix recipe ':url' 2022-12-21 01:40:35 +06:00
Akib Azmain Turja
764b075255
Fix terminfo path on case-insensitive filesystems
* eat.el (eat--terminfo-path): New variable.
* eat.el (eat-term-terminfo-directory): Change default value to
'PACKAGE-ROOT/terminfo/'.
* Makefile (terminfo): Don't depend on other targets.  Make
directory 'terminfo'.  Write terminfo to both 'e' and
'65' (hexadecimal number of ASCII 'e') directories.
* Makefile (e/eat-mono e/eat-color eat-256color e/eat-truecolor):
Remove target.
* README.org (Quelpa): Update recipe.
2022-12-21 01:05:36 +06:00
Akib Azmain Turja
510f8b565c
; .dir-locals.el: Use tabs in Makefile 2022-12-21 00:43:11 +06:00
Akib Azmain Turja
627458cdd5
* eat.el (eat--t-handle-output): Fix NULL handling 2022-12-20 17:02:53 +06:00