Commit graph

139 commits

Author SHA1 Message Date
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
Akib Azmain Turja
877a188021
; * eat.el (eat-eshell-mode): Fix docstring typo 2022-12-19 11:31:56 +06:00
Akib Azmain Turja
dfa7e02557
Fix typo in 'eat--t-scroll-up'
* eat.el (eat--t-scroll-up): Replace 'scroll-begin' with
'scroll-end' in '(< scroll-end (eat--t-disp-width disp))',
since this will always evaluate to t, and thus it was most
probably a typo.
2022-12-17 16:12:17 +06:00
Akib Azmain Turja
ab0ac1ff76
Make sure symbol is used as face parameter value
* eat.el (eat-term-set-parameter): Make sure face parameter
values are symbols.
2022-12-17 16:11:18 +06:00
Akib Azmain Turja
74295d2a17
; * .gitignore: Ignore 'dir' and 'eat.info' 2022-12-17 11:24:02 +06:00
Akib Azmain Turja
d87392e571
; Release version 0.3
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2022-12-17 01:11:42 +06:00
Akib Azmain Turja
9ca45b4bcd
Allow changing terminal faces terminal-locally
* eat.el (eat--t-term): New slots: bold-face, faint-face,
italic-face, slow-blink-face, fast-blink-face, color-0-face,
color-faces, font-faces.  Use hash table for 'params' slot.
* eat.el (eat--t-set-sgr-params): Use new slot instead using
the faces directly.
* eat.el (eat-term-parameter): Update to work with 'params'
hash table.
* eat.el (eat-term-set-parameter): Update to work with 'params'
hash table.  Handle the following parameters specially:
bold-face, faint-face, italic-face, slow-blink-face,
fast-blink-face, color-0-face, color-1-face, ...,
color-255-face, font-0-face, font-1-face, ..., font-9-face.
2022-12-16 23:21:50 +06:00
Akib Azmain Turja
59fe724b27
Decoding UTF-8 encoded strings encoded as base64
* eat.el (eat--t-set-cwd): Decoding UTF-8 encoded strings encoded as
base64.
* eat.el (eat--t-manipulate-selection): Use 'ignore-errors'
instead of '(ignore-error ...)', since both macro expand to the
same code.
* eat.el (eat--t-set-cmd): Decoding UTF-8 encoded strings encoded as
base64.  Use 'when-let*' instead of 'when' nested in 'let'.
2022-12-16 14:48:24 +06:00
Akib Azmain Turja
61695d9671
Decrease regexp usage while parsing output
* eat.el (eat--t-handle-output): Don't use regular expressions
while parsing plain text and CSI sequences.  Remove useless
code from VT300-specific charset set sequence parser.
2022-12-15 20:18:04 +06:00
Akib Azmain Turja
f912425fb4
Fix handling non-interactive processes in Eshell
* eat.el (eat--eshell-adjust-make-process-args): Check whether
the process going to be run will be interactive process.
* eat.el: Declare function 'eshell-interactive-output-p'.a
2022-12-15 18:57:55 +06:00
Akib Azmain Turja
e597bcfbb2
Don't use '.*-char-property-.*' functions
* eat.el (eat--t-move-before-to-safe): Use
'previous-single-property-change' instead of
'(previous-single-char-property-change'.
* eat.el (eat--t-join-long-line): Use 'get-text-property'
instead of 'get-char-property'.  Handle properly the case where
'next-single-property-change' returns nil.
* eat.el (eat--t-fix-partial-multi-col-char): Handle properly
the case where 'next-single-property-change' returns nil.
2022-12-15 13:52:08 +06:00
Akib Azmain Turja
559c9c362c
Refactor 'eat--eshell-adjust-make-process-args'
* eat.el (eat--eshell-adjust-make-process-args): Move the
'add-hook' out of 'unwind-protect'.
2022-12-15 13:00:06 +06:00
Akib Azmain Turja
162ec61f3d
Remove invisible spaces when killing text
* eat.el (eat-term-filter-string): Remove invisible spaces
preceding multi-column width characters.
* eat.el (eat--t-join-long-line)
(eat--t-fix-partial-multi-col-char): Use
'next-single-property-change' instead of
'next-single-char-property-change'.
2022-12-15 12:41:27 +06:00
Akib Azmain Turja
35df1bc2a4
Refactor 'eat--eshell-adjust-make-process-args'
* eat.el (eat--eshell-adjust-make-process-args): Avoid
unnecessary function overrides.  Overriding functions with
'cl-letf*' is not well documented, and self-overriding a
function (override a function with its own definition) may not
a nop.
2022-12-14 14:32:03 +06:00
Akib Azmain Turja
fc195410e4
Ask if 'stty' is unavailable in Eshell
* eat.el (eat-eshell-fallback-if-stty-not-available): New user
option.
* eat.el (eat--eshell-adjust-make-process-args): If 'stty' is
not available, use 'eat-eshell-fallback-if-stty-not-available'
to determine whether to continue terminal emulation or not.
2022-12-14 14:12:34 +06:00
Akib Azmain Turja
8fce5fe928
; Release version 0.2.3
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2022-12-13 23:45:55 +06:00
Akib Azmain Turja
fd9e8fddc3
Fix shell prompt navigation
* eat.el (eat--post-prompt): Set 'eat--shell-prompt-begin' to
nil at the very end to ensure prompt end text properties are
put.
2022-12-12 14:13:36 +06:00
Akib Azmain Turja
f2d57e2086
Synchronize scroll on all windows showing terminal
* eat.el (eat--synchronize-scroll-windows): New function.
* eat.el (eat--synchronize-scroll)
(eat--eshell-synchronize-scroll): Take a single argument,
WINDOWS, list of windows to synchronize.  The special value
'buffer' can also be included, to synchronize the point in
buffer.
* eat.el (eat-self-input, eat-yank, eat-yank-from-kill-ring):
Pass the return value of 'eat--synchronize-scroll-windows' to
the function in 'eat--synchronize-scroll-function'.
* eat.el (eat--process-output-queue)
(eat--adjust-process-window-size, eat--eshell-output-filter)
Call 'eat--synchronize-scroll-windows' before doing anything,
save the result, and pass it as the first argument to the
function in 'eat--synchronize-scroll-function'.
* eat.el (eat--trace-replay-eval): Pass the return value of
'get-buffer-window-list' to 'eat--synchronize-scroll'.
2022-12-12 14:00:57 +06:00
Akib Azmain Turja
f76c27cd93
Don't intercept background processes in Eshell
* eat.el (eat--eshell-adjust-make-process-args): Don't do any
change to the environment if 'eshell-current-subjob-p' is
non-nil.
2022-12-12 10:26:39 +06:00
Akib Azmain Turja
6756e72d88
; Release version 0.2.2
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2022-12-11 19:45:48 +06:00
Akib Azmain Turja
fffca2c06e
Check whether 'yank-transform-functions' is bound
* eat.el (eat-yank, eat-yank-from-kill-ring): Check whether
'yank-transform-functions' is bound before using it's value.
The variable is not available in Emacs 28.
2022-12-11 18:40:27 +06:00
Akib Azmain Turja
731ead9bfb
; * .gitignore: New file 2022-12-11 16:12:21 +06:00
Akib Azmain Turja
65dbbfcad3
* integration/bash: Check TERM before enabling 2022-12-11 14:50:47 +06:00
Akib Azmain Turja
917464cf56
* eat.el (eat-eshell-emacs-mode-map): Disable undo 2022-12-11 14:44:01 +06:00
Akib Azmain Turja
aa0607e1cb
Use Eshell "emacs" mode map when process is live
* eat.el (eat-eshell-emacs-mode-map): Update docstring.
* eat.el (eat--eshell-process-running-mode): New
non-interactive minor mode.
* eat.el (eat--eshell-setup-proc-and-term): Enable
'eat--eshell-process-running-mode'.
* eat.el (eat--eshell-cleanup): Disable
'eat--eshell-process-running-mode'.
* eat.le (eat--eshell-local-mode): Don't use
'eat-eshell-emacs-mode-map' as the mode keymap.
2022-12-11 14:41:38 +06:00
Akib Azmain Turja
7891cae44b
Synchronize scrolling and point properly
* eat.el (eat--synchronize-scroll)
(eat--eshell-synchronize-scroll): Call 'set-window-point' in
addition to 'goto-char'.
2022-12-11 14:10:25 +06:00
Akib Azmain Turja
ab52caff52
; Release version 0.2.1
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update.
2022-12-11 00:43:49 +06:00
Akib Azmain Turja
f54af22d6a
Fix invoking commands with eshell/sudo from Tramp
* eat.el (eat--eshell-adjust-make-process-args): Override
'start-file-process' on Emacs 28, used by Eshell on Emacs 28.
Don't override 'make-process' on Emacs 28, Eshell doesn't use
that on Emacs 28.  Set process filter and sentinel in
'eshell-exec-hook' instead of 'make-process' advice.
2022-12-11 00:39:08 +06:00
Akib Azmain Turja
714d9738cc
Fix Eshell working directory tracking
* eat.el (eat--eshell-local-mode): Call
'eat--eshell-update-cwd'.
* eat.el (eat-eshell-mode): Don't call
'eat--eshell-update-cwd'.
2022-12-11 00:20:05 +06:00
Akib Azmain Turja
b6caebb0ab
; Release 0.2
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Update with new entries.
2022-12-10 17:43:47 +06:00
Akib Azmain Turja
51eebc562b
Fix yanking text into terminal
* eat.el (eat-yank): Use simpler, saner and better approach to get the
yanked string instead of the previous stupid, insane and buggy
approach.
* eat.el (eat-yank-pop): Remove, because it's not cancel the text
already sent to the terminal.
* eat.el (eat-yank-from-kill-ring): New function.  Behaves essentially
the same the previous (not properly working) 'eat-yank-pop'.
* eat.el (eat-semi-char-mode-map, eat-eshell-semi-char-mode-map):
Replace 'eat-yank-pop' with 'eat-yank-from-kill-ring'.
2022-12-10 15:51:04 +06:00
Akib Azmain Turja
12a5fb72b2
; * eat.el (eat--t-term): Fix 'params' docstring 2022-12-10 13:27:58 +06:00