Commit graph

249 commits

Author SHA1 Message Date
Akib Azmain Turja
5f4f4a87d1
; * eat.el: Fix font face names. 2022-12-02 10:27:37 +06:00
Akib Azmain Turja
b65c0c40ec
Check terminal contents while testing bell
* eat-tests.el (eat-test-character-sets): Check terminal
contents.
2022-12-01 02:26:04 +06:00
Akib Azmain Turja
406d72b4b5
Refer to Info manual to setup directory tracking
* eat.el (eat-enable-directory-tracking): Refer to Info manual.
2022-12-01 02:01:11 +06:00
Akib Azmain Turja
0121c3747f
; * README.org: Fix typo. 2022-12-01 01:41:21 +06:00
Akib Azmain Turja
eac1165a1a
Support directory tracking with OSC 7
* eat.el: Require 'url'.
* eat.el (eat-enable-directory-tracking): New user option.
* eat.el (eat--t-term): New slots: 'cwd' and 'set-cwd-fn'.
* eat.el (eat--t-set-cwd, eat-term-cwd): New function.
* eat.el (eat-term-set-cwd-function): New function and
generalized variable.
* eat.el (eat--t-handle-output): Handle OSC 7.
* eat.el (eat--set-cwd): New function.
* eat.el (eat-exec): Use 'eat--set-cwd' to change current
working directory.
* eat.el (eat--eshell-invocation-directory): New variable,
local in Eshell buffers when 'eat-eshell-mode' is enabled.
* eat.el (eat--eshell-setup-proc-and-term): Save the invocation
directory of process.
* eat.el (eat--eshell-cleanup): Revert working directory to
invocation directory.
* eat.el (eat--eshell-local-mode): When enabling, make
'eat--eshell-invocation-directory' local variable and kill when
disabling.
* eat-tests.el (eat-test-set-cwd): New test.
* eat.texi (Directory Tracking): New chapter.
2022-12-01 01:40:17 +06:00
Akib Azmain Turja
29a6ab9141
Fix byte-compilation warnings on Emacs 28
* eat.el (eat-term-input-event): Fix byte-compilation warnings
on Emacs 28, caused by calling 'posn-col-row' with two
arguments on Emacs >= 29, which is not available on Emacs 28.
2022-11-30 22:40:11 +06:00
Akib Azmain Turja
b378306e36
; Write copyright year range properly in ChangeLog 2022-11-30 17:27:44 +06:00
Akib Azmain Turja
2b7dccd741
* eat.el: Use loop to define color and font faces 2022-11-30 17:26:26 +06:00
Akib Azmain Turja
16d9a5074f
; Bump version to 0.1.1
* eat.el:
* eat.texi:
Bump version.
* ChangeLog: Add ChangeLog.
2022-11-30 13:09:02 +06:00
Akib Azmain Turja
f35cbd2124
; Ignore "Bump version to 0.1" commit in ChangeLog 2022-11-30 13:08:04 +06:00
Akib Azmain Turja
de93ce07e3
Document eat-eshell-visual-command-mode in manual
* eat.texi (Eshell Terminal): Document
'eat-eshell-visual-command-mode' and suggest to set
'eshell-visual-commands' to nil.
2022-11-30 13:01:42 +06:00
Akib Azmain Turja
0cf617d60e
Fix compatibility issues with Emacs 28
* eat.el: Require 'subr-x'.
* eat.el (eat-yank, eat-yank-pop): Pass three arguments to
'mapconcat'.
* eat.el (eat--eshell-term-name): New function.
* eat.el (eat-eshell-mode): Use 'eat--eshell-term-name' instead
of using 'eat-term-name' directly.
* eat.el (eat-eshell-mode) [(< emacs-major-version 29)]: Use
'eshell-last-async-proc' instead of 'eshell-last-async-procs'.
* eat.el (eat--eshell-adjust-make-process-args)
[(< emacs-major-version 29)]: Don't check and set ':filter' and
':sentinel' of 'make-process' argument plist.  Set process
filter and sentinel from 'eshell-exec-hook'.
* eat.el (eat--eshell-adjust-make-process-args): Call
'eat--eshell-setup-proc-and-term' from 'eshell-exec-hook', not
just after 'make-process'.
2022-11-30 12:29:05 +06:00
Akib Azmain Turja
d8171b9a8c
; Ignore a commit while generating ChangeLog
The commit is summary line is "Prefer 'pcase-exhaustive' over
'pcase'", but the ChangeLog in the body isn't formatted
correctly.
2022-11-29 16:18:35 +06:00
Akib Azmain Turja
3e496e8db8
; Merge diverged elpa/eat branch of NonGNU ELPA 2022-11-29 14:59:43 +06:00
Akib Azmain Turja
1b2b7aee26
Bump version to 0.1
* eat.el:
* eat.texi:
Bump version.
2022-11-29 01:39:25 +06:00
Akib Azmain Turja
59c0745e75
Don't put 'error' as the only then part of 'if'
* eat.el (eat-semi-char-mode, eat-char-mode): Don't put 'error'
as only then part of 'if'.
2022-11-29 01:38:41 +06:00
Akib Azmain Turja
10d9f3cb56
Use 'mapc' to make & kill multiple local variables
* eat.el (eat-blink-mode, eat--cursor-blink-mode, eat-mode)
(eat--eshell-local-mode, eat-trace-replay-mode): Use 'mapc' to
make & kill multiple local variables.
2022-11-29 01:04:36 +06:00
Akib Azmain Turja
528bfe424d
Put declare-function and defvar outside functions
* eat.el (eat--flip-slow-blink-state)
(eat--flip-fast-blink-state, eat-blink-mode)
(eat--eshell-output-filter, eat--eshell-cleanup)
(eat--eshell-process-output-queue, eat--eshell-sentinel)
(eat-eshell-mode, eat--eshell-visual-sentinel)
(eat--eshell-exec-visual, eat-eshell-visual-command-mode)
(eat-project): Move 'declare-function's and 'defvar's outside.
2022-11-29 00:48:04 +06:00
Akib Azmain Turja
86e247137b
Use 'vector' directly instead of backquote
* eat.el (eat-term-make-keymap): Use 'vector' directly instead
of backquote.
2022-11-29 00:40:51 +06:00
Akib Azmain Turja
c19cf68b28
* eat.el (eat-term-make-keymap): Use 'cl-flet' 2022-11-29 00:37:47 +06:00
Akib Azmain Turja
5ce98430e8
Use more readable '?\C-\s' instead of '?\C-\ '
* eat.el (eat-term-input-event, eat-term-make-keymap): Use more
readable '?\C-\s' instead of '?\C-\ '.
2022-11-29 00:31:34 +06:00
Akib Azmain Turja
31f93da3fd
* eat.el (eat-mode): Fix char mode 'help-echo' 2022-11-29 00:28:03 +06:00
Akib Azmain Turja
9a9d9165f2
* eat.el (eat--bell): Use 'ding' instead of 'beep' 2022-11-29 00:22:39 +06:00
Akib Azmain Turja
dc99739fb8
* eat.el (eat--trace-exec): Use "-*- mode: MD -*-" 2022-11-29 00:18:28 +06:00
Akib Azmain Turja
0e82988d6f
Use 'setf' + 'plist-get' instead of 'plist-put'
* eat.el (eat--eshell-adjust-make-process-args): Use (setf (plist-get
...) ...) instead of 'plist-put' without taking the result, which is
not guaranteed to always work.
2022-11-29 00:17:15 +06:00
Akib Azmain Turja
a736f08ea9
Prefer 'and-let*' and 'when-let*' over 'when-let'
* eat.el (eat--t-set-sgr-params): Use 'and-let*' instead of 'when-let'
for side-effect free 'when-let'.
* eat.el (eat--flip-cursor-blink-state, eat--synchronize-scroll)
(eat-exec, eat--eshell-setup-proc-and-term)
(eat--eshell-synchronize-scroll, eat--eshell-visual-sentinel)
(eat--trace-replay-eval-next): Use 'when-let*' instead of 'when-let'
for 'when-let's with side-effect.
2022-11-28 23:22:52 +06:00
Akib Azmain Turja
2dd4e42773
Prefer 'pcase-exhaustive' over 'pcase'
* eat.el (eat--t-erase-in-line, eat--t-erase-in-disp)
(eat--t-set-mouse-mode, eat--t-send-device-attrs)
(eat--t-handle-output, eat-term-input-event)
(eat--manipulate-kill-ring, eat--trace-replay-eval):
Prefer 'pcase-exhaustive' over 'pcase'.
2022-11-28 23:19:56 +06:00
Akib Azmain Turja
f3fed64957
Prefer 'pcase-exhaustive' over 'pcase'
* eat.el (eat--t-erase-in-line, eat--t-erase-in-disp,
eat--t-set-mouse-mode, eat--t-send-device-attrs,
eat--t-handle-output, eat-term-input-event,
eat--manipulate-kill-ring, eat--trace-replay-eval):
Prefer 'pcase-exhaustive' over 'pcase'.
2022-11-28 22:29:15 +06:00
Akib Azmain Turja
b36f923919
* eat.el (eat--t-change-charset): Assert argument 2022-11-28 22:13:06 +06:00
Akib Azmain Turja
9a5bd15866
Combine multiple setq/setf/setq-local into one
* eat.el (eat--t-reset, eat--t-goto, eat--t-write)
(eat--t-save-cur, eat--t-enable-alt-disp)
(eat--t-change-scroll-region, eat--t-set-sgr-params)
(eat--t-manipulate-selection, eat--t-handle-output)
(eat--t-resize, eat--flip-slow-blink-state)
(eat--flip-fast-blink-state, eat-blink-mode)
(eat--cursor-blink-mode, eat--set-cursor, eat-self-input)
(eat-mode, eat-exec, eat--eshell-setup-proc-and-term)
(eat--eshell-cleanup, eat--eshell-local-mode)
(eat--eshell-exec-visual, eat--trace-exec)
(eat--eshell-trace-adjust-make-process-args)
(eat--trace-replay-eval, eat-trace-replay, eat-trace--cleanup):
Combine multiple setq/setf/setq-local into one wherever
possible.
2022-11-28 21:54:55 +06:00
Akib Azmain Turja
bc4bd45fa6
Avoid copying STR to the extent possible
* eat.el (eat--t-write): Take two more optional arguments BEG
and END to avoid copying STR multiple times unneccessarily.
2022-11-28 20:50:58 +06:00
Akib Azmain Turja
9d14bbeaa5
Support multi-column characters properly
* eat.el (eat--t-write): Use 'char-width' instead of the
unpredictable 'string-width' to support multi-column characters
properly.
2022-11-28 19:37:17 +06:00
Akib Azmain Turja
6a94082eff
Use hash table to convert from charset
* eat.el (eat--t-dec-line-drawing-chars): New constant
containing the hash table.
* eat.el (eat--t-write): Use hash-table instead alist while
converting from DEC Line Drawing charset.
2022-11-28 18:48:38 +06:00
Akib Azmain Turja
6271968c86
Use as less let-bindings as possible
* eat.el (eat--t-goto-bol, eat--t-goto-eol)
(eat--t-repeated-insert, eat--t-cur-right, eat--t-cur-left)
(eat--t-cur-horizontal-abs, eat--t-beg-of-next-line)
(eat--t-beg-of-prev-line, eat--t-cur-down, eat--t-cur-up)
(eat--t-cur-vertical-abs, eat--t-scroll-up, eat--t-scroll-down)
(eat--t-write, eat--t-horizontal-tab)
(eat--t-horizontal-backtab, eat--t-reverse-index)
(eat--t-erase-in-line, eat--t-erase-in-disp)
(eat--t-insert-char, eat--t-delete-char, eat--t-erase-char)
(eat--t-insert-line, eat--t-delete-line)
(eat--t-repeat-last-char, eat--t-change-scroll-region)
(eat--t-send-device-attrs): Minimize let-binding count.
* eat.el (eat--t-break-long-line, eat--t-write)
(eat-trace-replay): Use replace 'propertize' call with already
propertized string.
2022-11-28 18:23:43 +06:00
Akib Azmain Turja
64c537da78
Replace 'let*' with 'let' wherever possible
* eat.el (eat--t-eol, eat--t-reset, eat--t-erase-in-disp)
(eat--t-disable-alt-disp, eat--t-resize, eat-term-redisplay)
(eat-term-input-event, eat--adjust-process-window-size): Use
'let' instead of 'let*' wherever possible.
* eat.el (eat--eshell-exec-visual): Use (VAR nil) form instead
of VAR form in 'let*' variable list.
2022-11-28 12:40:19 +06:00
Akib Azmain Turja
499c9dd911
* README.org (NonGNU ELPA Devel): New section 2022-11-28 11:39:15 +06:00
Akib Azmain Turja
0638ff6212
Experimentally support for multi-column characters
* eat.el (eat--t-move-before-to-safe, eat--t-make-pos-safe)
(eat--t-fix-partial-multi-col-char): New function.
* eat.el (eat--t-write): Handle multi-column characters.
* eat.el (eat--t-insert-char, eat--t-delete-char)
(eat--t-erase-char): Handle multi-column characters on the
display while manipulating text.
2022-11-28 03:01:45 +06:00
Akib Azmain Turja
999c779bfc
* .elpaignore: New file. 2022-11-28 01:10:14 +06:00
Akib Azmain Turja
f65a6b0188
; * eat.el: Use ?\s everywhere as space character 2022-11-27 00:21:56 +06:00
Akib Azmain Turja
9eadacb243
; * .dir-locals.el: No tabs and 70 column limit 2022-11-26 22:08:52 +06:00
Akib Azmain Turja
ebdbba0c4b
Use third argument of posn-col-row on Emacs >= 29
* eat.el (eat-term-input-event): Use USE-WINDOW argument of
'posn-col-row' to support text scaling properly, but only on
Emacs >= 29 since on Emacs 28 'posn-col-row' takes only one
argument.
2022-11-25 13:06:10 +06:00
Akib Azmain Turja
0cf652a591
; Fix :url in Quelpa recipe in README.org 2022-11-25 12:30:45 +06:00
Akib Azmain Turja
1035d99185
* Makefile (all): Remove "check" and "changelog." 2022-11-24 21:29:40 +06:00
Akib Azmain Turja
ae4322fb45
Add documentation file generation code to Makefile
* Makefile (info, dvi, html, pdf, eat.info, eat.dvi, eat.html)
(eat.pdf): New targets.
* Makefile (all): New dependency "info."
* Makefile (.PHONY): Add "info", "dvi", "html" and "pdf."
2022-11-24 21:28:51 +06:00
Akib Azmain Turja
ed4d4ea6de
; Fix outdated key sequences in README.org 2022-11-24 19:15:48 +06:00
Akib Azmain Turja
469b457238
; Fix typo in code in Quelpa section in README.org 2022-11-24 19:13:06 +06:00
Akib Azmain Turja
3464e6b68c
; Fix typo in summany line 2022-11-24 19:07:08 +06:00
Akib Azmain Turja
99dacbbf52
Add proper dependencies to targets in Makefile
* Makefile (TIC): New variable.
* Makefile (eat.elc): Depend on eat.el.
* Makefile (e/eat-mono, e/eat-color, eat-256color)
(e/eat-truecolor): Depend on eat.ti.
2022-11-24 14:34:07 +06:00
Akib Azmain Turja
06e45d68b9
Implement the terminal
This includes everything written from 2022-08-15 up to now.
* .dir-locals.el:
* CONTRIBUTE:
* COPYING:
* Makefile:
* NEWS:
* README.org:
* eat-tests.el:
* eat.el:
* eat.texi:
* eat.ti:
* fdl.texi:
* gitlog-to-changelog:
* gpl.texi:
* make-changelog:
* texinfo.tex:
New file.
2022-11-24 14:26:03 +06:00