/ ChangeLog
ChangeLog
1 2023-12-15 Akib Azmain Turja <akib@disroot.org> 2 3 Don't let automatic scrolling mess up the display 4 5 * eat.el (eat-mode, eat--eshell-local-mode): Set both 6 'scroll-margin' and 'hscroll-margin' to zero. 7 8 2023-10-26 Akib Azmain Turja <akib@disroot.org> 9 10 Don't queue input 11 12 * eat.el (eat--pending-input-chunks) 13 (eat--defer-input-processing, eat--process-input-queue-timer): 14 Remove. 15 All references updated. 16 * eat.el (eat--send-input): Send the input immediately. 17 * eat.el (eat--process-input-queue): Remove. 18 * eat.el (eat--eshell-process-output-queue) 19 (eat--process-output-queue): Loop while output queue isn't 20 empty, set 'eat--output-queue-first-chunk-time' to 't' in the 21 loop. 22 * eat.el (eat--filter, eat--eshell-filter): Don't start a timer 23 if 'eat--output-queue-first-chunk-time' is 't'. 24 25 2023-10-19 Akib Azmain Turja <akib@disroot.org> 26 27 * eat.ti (eat-mono): Remove unused capability 'Ed' 28 29 2023-10-17 Akib Azmain Turja <akib@disroot.org> 30 31 Fix input processing & auto line mode 32 33 * eat.el (eat--process-input-queue): Set 34 'eat--process-input-queue-timer' to 'nil'. 35 * eat.el (eat--auto-line-mode-pending-toggles): New variable. 36 * eat.el (eat--line-mode-enter-auto-1): Don't take any 37 argument. 38 * eat.el (eat--line-mode-exit-auto-1): Don't take any argument. 39 Don't call 'eat-line-mode'. 40 * eat.el (eat--line-mode-enter-auto, eat--line-mode-exit-auto): 41 Queue the toggle in 'eat--auto-line-mode-pending-toggles' 42 instead of starting a timer. 43 * eat.el (eat--line-mode-do-toggles): New function. 44 * eat.el (eat--process-output-queue): Let-bind 45 'eat--auto-line-mode-pending-toggles' to nil. Call 46 'eat--line-mode-do-toggles'. 47 48 2023-10-17 Akib Azmain Turja <akib@disroot.org> 49 50 Fix compiler warnings 51 52 * eat.el: Wrap all 'emacs-major-version' checks with 53 'eval-when-compile'. 54 * eat.el (eat--process-input-queue): Don't use obsolete 55 generalized variable 'buffer-local-value'. 56 57 2023-10-17 Akib Azmain Turja <akib@disroot.org> 58 59 Don't let 'eat--process-input-queue' to recurse 60 61 * eat.el (eat--defer-input-processing): New variable. 62 * eat.el (eat-mode, eat--eshell-local-mode): Make 63 'eat--defer-input-processing' buffer-local. 64 * eat.el (eat--process-input-queue): If 65 'eat--defer-input-processing' is non-nil, do nothing, otherwise 66 bind it to non-nil while sending input. 67 68 2023-10-17 Akib Azmain Turja <akib@disroot.org> 69 70 Don't mess up terminal when switching to line mode 71 72 * eat.el (eat--line-mode-enter-auto-1) 73 (eat--line-mode-exit-auto-1): New function. 74 * eat.el (eat--line-mode-enter-auto, eat--line-mode-exit-auto): 75 Do everything after the output is processed. 76 77 2023-10-10 Akib Azmain Turja <akib@disroot.org> 78 79 Don't flicker due to screen line breaking 80 81 * eat.el (eat--eshell-synchronize-scroll) 82 (eat--synchronize-scroll): Use 'recenter' instead of 83 'set-window-start' to synchronize scrolling. 84 85 2023-10-10 Akib Azmain Turja <akib@disroot.org> 86 87 Fix side-effect in 'eat--set-term-sixel-params' 88 89 * eat.el (eat--set-term-sixel-params): Fix unintended 90 side-effect. 91 92 2023-10-10 Akib Azmain Turja <akib@disroot.org> 93 94 Fix 'eat--set-term-sixel-params' on text display 95 96 * eat.el (eat--set-term-sixel-params): Don't error on text 97 display. 98 99 2023-10-09 Akib Azmain Turja <akib@disroot.org> 100 101 Fix 'eat--eshell-set-input-process' advice 102 103 * eat.el (eat--eshell-set-input-process): Take any number of 104 arguments and ignore them. 105 106 2023-10-09 Akib Azmain Turja <akib@disroot.org> 107 108 Make motion commands work properly 109 110 * eat.el (eat--line-mode): Set 'front-sticky' and 111 'rear-nonsticky' text properties to 't' when enabling mode, and 112 revert them when disabling. 113 * eat.el (eat--process-output-queue): Don't add 'front-sticky' 114 and 'rear-nonsticky' text properties if not in line mode. 115 * eat.el (eat--sentinel): Don't remove 'front-sticky' and 116 'rear-nonsticky' text properties, they shouldn't be in the 117 buffer. 118 119 2023-10-09 Akib Azmain Turja <akib@disroot.org> 120 121 Remove internal text properties when killing text 122 123 * eat.el (eat-term-filter-string): Remove 'read-only', 124 'rear-nonsticky', 'front-sticky' and 'field' text properties. 125 * eat.el (eat--filter-buffer-substring): Remove 126 'eat--t-char-width', 'eat--t-sixel-bitmap-size' and 127 'eat--t-sixel-bitmap' text properties. 128 129 2023-10-08 Akib Azmain Turja <akib@disroot.org> 130 131 Fix Makefile 132 133 * Makefile (eat.elc, check): Pass $(EMACSFLAGS) to $(EMACS). 134 135 2023-10-07 Akib Azmain Turja <akib@disroot.org> 136 137 Fix garbage image after the end of Sixel image 138 139 * eat.el (eat--t-sixel-init): Increase Sixel buffer size. 140 141 2023-10-07 Akib Azmain Turja <akib@disroot.org> 142 143 Support Emacs 26.1 144 145 * eat.el: Depend on Emacs 26.1. 146 * eat.el (eat--t-handle-output, eat--handle-uic) 147 (eat--eshell-handle-uic): Don't use '(not CHAR)' form in 'rx' 148 forms. 149 * eat.el (eat--eshell-process-output-queue): Use 150 'combine-change-calls' if available. 151 * README.org: Update to reflect support for Emacs 26. 152 153 2023-10-07 Akib Azmain Turja <akib@disroot.org> 154 155 Update tests to make them pass 156 157 * eat-tests.el: Use 'eat-term-parameter'. 158 * eat-tests.el (eat-test-set-cwd): Test OSC 7 only. 159 160 2023-10-07 Akib Azmain Turja <akib@disroot.org> 161 162 Modify eshell-variable-aliases-list buffer-locally 163 164 * eat.el (eat-eshell-mode): Don't modify 165 'eshell-variable-aliases-list'. 166 * eat.el (eat--eshell-local-mode): Modify 167 'eshell-variable-aliases-list'. 168 169 2023-10-07 Akib Azmain Turja <akib@disroot.org> 170 171 Support Emacs 27.1 172 173 * eat.el: Depend on Emacs 27.1. Require 'compat' and 'term'. 174 * eat.el (eat-term-color-*): Inherit 'term-color-*' in Emacs 175 27. 176 * eat.el (eat--t-sixel-render-bitmap): Call 'mapconcat' with 177 three arguments. 178 * eat.el (eat-yank-from-kill-ring): Signal error in Emacs 27. 179 * eat.el (eat--eshell-setup-proc-and-term): Don't error if 180 process mark is invalid. 181 * eat.el (eat-eshell-mode): Properly revert 182 'eshell-variable-aliases-list' when disabling the mode. 183 * eat.el (eat--trace-exec) 184 (eat--trace-eshell-adjust-make-process-args): Make sure 185 'lisp-data-mode' is defined before calling. 186 187 2023-10-06 Akib Azmain Turja <akib@disroot.org> 188 189 Enable shell command completion by default 190 191 * eat.el (eat-mode): Use shell mode's completion facilities. 192 193 2023-10-04 Akib Azmain Turja <akib@disroot.org> 194 195 Don't put overlay on prompt while history Isearch 196 197 * eat.el (eat--line-history-isearch-message-overlay) 198 (eat--line-history-isearch-message): Remove. 199 * eat.el (eat--line-history-isearch-setup) 200 (eat--line-history-isearch-end): Don't modify 201 'isearch-message-function'. 202 * eat.el (eat-mode): Don't make 'isearch-message-function' and 203 'eat--line-history-isearch-message-overlay' buffer-local. 204 205 2023-10-04 Akib Azmain Turja <akib@disroot.org> 206 207 Put the cursor below Sixel image after showing it 208 209 * eat.el (eat--t-sixel-cleanup): Make sure the cursor is below 210 the image. 211 212 2023-10-03 Akib Azmain Turja <akib@disroot.org> 213 214 Apply scaling and ascept ratio on Sixel properly 215 216 * eat.el (eat--set-term-sixel-params): Make sure both numbers 217 of char-dimension is non-zero. 218 219 2023-10-03 Akib Azmain Turja <akib@disroot.org> 220 221 Use terminal parameters to set callback functions 222 223 Also make sure the terminal passed as arguments to API 224 functions is live. 225 226 * eat.el (eat--t-term): Update default value of slot 'params'. 227 * eat.el (eat-term-p, eat-term-live-p): New function. 228 * eat.el (eat--t-ensure-live-term): New macro. 229 * eat.el (eat--t-with-env, eat-term-parameter, eat-term-size) 230 (eat-term-set-parameter, eat-term-cursor-type, eat-term-end) 231 (eat-term-beginning, eat-term-display-cursor, eat-term-title) 232 (eat-term-in-alternative-display-p, eat-term-input-event) 233 (eat-term-send-string, eat-term-send-string-as-yank): Ensure 234 the terminal passed as argument is live. 235 * eat.el (eat-term-delete): Ensure the terminal passed as 236 argument is live. Mark terminal as deleted. 237 * eat.el (eat-term-parameters): New function. 238 * eat.el (eat-term-set-parameter): Handle more special 239 parameters: 'input-function', 'ring-bell-function', 240 'grab-mouse-function', 'grab-focus-events-function', 241 'manipulate-selection-function', 'set-title-function' and 242 'set-cwd-function'. 243 * eat.el (eat-term-input-function, eat-term-ring-bell-function) 244 (eat-term-set-cursor-function, eat-term-grab-mouse-function) 245 (eat-term-grab-focus-events-function) 246 (eat-term-manipulate-selection-function) 247 (eat-term-set-title-function, eat-term-set-cwd-function): 248 Remove function. 249 * eat.el (eat-exec, eat--eshell-setup-proc-and-term) 250 (eat--trace-replay-eval): Update to use parameters. 251 252 2023-10-03 Akib Azmain Turja <akib@disroot.org> 253 254 Support rendering Sixel with XPM images 255 256 * eat.el (eat--t-sixel-render-bitmap): Support conversion to 257 XPM format. 258 * eat.el (eat-sixel-render-formats): Add XPM to the default. 259 * eat.el (eat-term-set-parameter, eat--sixel-render-format): 260 Support XPM as an allowed format. 261 * eat.texi (Sixel): Update. 262 263 2023-10-03 Akib Azmain Turja <akib@disroot.org> 264 265 Refactor 'eat--t-sixel-flush-line' 266 267 * eat.el (eat--t-sixel-render-bitmap): New function. 268 * eat.el (eat--t-sixel-flush-line): Move bitmap rendering code 269 to 'eat--t-sixel-render-bitmap'. 270 271 2023-10-02 Akib Azmain Turja <akib@disroot.org> 272 273 * eat.el (eat-enable-alternative-display): Obsolete 274 275 2023-10-02 Akib Azmain Turja <akib@disroot.org> 276 277 Allow customizing Sixel scaling and aspect ratio 278 279 * eat.el (eat-sixel-scale, eat-sixel-aspect-ratio): New user 280 option. 281 * eat.el (eat--t-term): Remove slot 'sixel-image-height'. New 282 slot 'sixel-image-extra-props'. 283 * eat.el (eat--t-sixel-flush-line): Give more control to the UI 284 on the image properties. 285 * eat.el (eat-term-set-parameter): Don't treat parameter 286 'sixel-image-height' specially. Treat parameter 287 'sixel-image-extra-properties' specially. 288 * eat.el (eat--set-term-sixel-params): New function. 289 * eat.el (eat-exec, eat--eshell-setup-proc-and-term): Set Sixel 290 related terminal parameters with 'eat--set-term-sixel-params'. 291 * eat.texi (Sixel): Document 'eat-sixel-scale' and 292 'eat-sixel-aspect-ratio'. 293 294 2023-09-28 Akib Azmain Turja <akib@disroot.org> 295 296 Support <backtab> 297 298 * eat.el (eat-term-input-event): Handle '<tab>' and '<backtab>' 299 events. 300 * eat.el (eat-term-make-keymap): Bind '<tab>' and '<backtab>'. 301 * eat.ti (eat-mono): Add 'kcbt' capability. 302 303 2023-09-27 Akib Azmain Turja <akib@disroot.org> 304 305 Handle output correctly in emacs mode in Eshell 306 307 * eat.el (eat--eshell-output-filter): Inhibit read only. 308 309 2023-09-24 Akib Azmain Turja <akib@disroot.org> 310 311 Add command 'eat-send-password' 312 313 * eat.el (eat-send-password): New command. 314 * eat.texi (Password Input): New chapter. 315 316 2023-09-24 Akib Azmain Turja <akib@disroot.org> 317 318 Add the underlying terminal object to public API 319 320 * eat.el (eat--terminal): Rename to 'eat-terminal'. 321 All references changed. 322 323 2023-09-23 Akib Azmain Turja <akib@disroot.org> 324 325 New command eat-line-load-input-history-from-file 326 327 * eat.el (eat-line-load-input-history-from-file): New command. 328 329 2023-09-23 Akib Azmain Turja <akib@disroot.org> 330 331 Integrate Isearch with line mode input history 332 333 * eat.el (eat-line-input-history-isearch): New user option. 334 * eat.el (eat-line-mode-map): Bind 'M-r' to 335 'eat-line-history-isearch-backward-regexp'. 336 * eat.el (eat-line-mode): Error if process isn't running. 337 * eat.el (eat--line-history-isearch-message-overlay) 338 (eat--saved-line-input-history-isearch): New variable. 339 * eat.el (eat--line-delete-input): Remove. 340 All callers changed. 341 * eat.el (eat-line-history-isearch-backward-regexp) 342 (eat-line-history-isearch-backward): New command. 343 * eat.el (eat--line-history-isearch-setup) 344 (eat--line-history-isearch-end, eat--line-history-isearch-wrap) 345 (eat--line-history-isearch-search, eat--line-goto-input) 346 (eat--line-history-isearch-message) 347 (eat--line-history-isearch-push-state) 348 (eat--line-history-isearch-pop-state): New function. 349 * eat.el (eat-mode): Make 350 'eat--line-history-isearch-message-overlay', 351 'isearch-search-fun-function', 'isearch-message-function', 352 'isearch-wrap-function' and 'isearch-push-state-function' 353 buffer-local. Add 'eat--line-history-isearch-setup' to 354 'isearch-mode-hook' locally. 355 * eat.texi (Line Mode): Document this new feature. 356 357 2023-09-23 Akib Azmain Turja <akib@disroot.org> 358 359 Move to the input line automatically in line mode 360 361 * eat.el (eat-line-auto-move-to-input): New user option. 362 * eat.el (eat--line-move-to-input): New function. 363 * eat.el (eat--line-mode): Add/remove 'eat--line-move-to-input' 364 to 'pre-command-hook' locally. 365 * eat.texi (Line Mode): Document 'eat-line-auto-move-to-input'. 366 367 2023-09-23 Akib Azmain Turja <akib@disroot.org> 368 369 Rename prompt mode to line mode and generalize it 370 371 * eat.el: Rename prompt mode to line mode, also rename related 372 symbols to have 'eat-line-' or 'eat--line-' prefix. 373 * eat.el (eat-enable-native-shell-prompt-editing): Rename to 374 'eat-enable-auto-line-mode'. 375 * eat.el (eat--line-mode-enter-auto) 376 (eat--line-mode-exit-auto): New function. 377 * eat.el (eat--post-prompt, eat--post-cont-prompt): Call 378 'eat--line-mode-enter-auto' to enter line mode. 379 * eat.el (eat--pre-cmd): Call 'eat--line-mode-exit-auto'. 380 * eat.el (eat--get-shell-history): Populate input ring 381 unconditionally. 382 * eat.el (eat-emacs-mode, eat-semi-char-mode, eat-char-mode): 383 Call 'eat--line-mode-exit' to exit line mode. 384 * eat.el (eat--line-mode): Move all logic to 'eat-line-mode', 385 'eat--line-mode-exit' and 'eat--line-mode-exit-auto'. 386 * eat.el (eat-line-send): Make non-interactive. Reset input 387 history cycling variables. 388 * eat.el (eat-line-send-input): New argument NO-NEWLINE. 389 * eat.el (eat-mode): Don't disable undo information recording. 390 * eat.el (eat--process-output-queue): Disable undo information 391 recording while process output. 392 * eat.texi (Line Mode): New section in chapter 'Input Modes'. 393 * eat.texi (Line Mode Integration): New section in chapter 394 'Shell Integration'. 395 * eat.texi (Native Shell Prompt Editing): Remove section. 396 * README.org (Usage): Avoid the term "keybinding mode", use 397 "input mode" instead as the manual uses it. Document line 398 mode. 399 * README.org (NonGNU ELPA): Emacs 28 has NonGNU ELPA enabled by 400 default, so remove unnecessary instructions. 401 402 2023-09-22 Akib Azmain Turja <akib@disroot.org> 403 404 Skip comments in Bash history file 405 406 * eat.el (eat--prompt-populate-input-ring): Skip Bash history 407 comments. 408 * eat.el: Add Compat as dependency; some functions from Emacs 409 29 are used. 410 411 2023-09-18 Akib Azmain Turja <akib@disroot.org> 412 413 Allow customizing Sixel rendering format 414 415 * eat.el (eat-sixel-render-formats): New user option. 416 * eat.el (eat-eshell-fallback-if-stty-not-available): Fix 417 customization type. 418 * eat.el (eat--t-term): Rename slot 'sixel-display-method' to 419 'sixel-render-format'. 420 All callers changed. 421 * eat.el (eat--t-sixel-flush-line): New support render format, 422 'none'. 423 * eat.el (eat-term-set-parameter): Rename parameter 424 'sixel-display-method' to 'sixel-render-format'. 425 All callers changed. 426 * eat.el (eat--sixel-render-format): New function. 427 * eat.el (eat-exec, eat--eshell-setup-proc-and-term): Set 428 'sixel-render-format' according to user customization. 429 430 2023-09-17 Akib Azmain Turja <akib@disroot.org> 431 432 Add message passing support 433 434 * eat.el (eat-message-handler-alist): New user option. 435 * eat.el (eat--handle-message): New function. 436 * eat.el (eat--handle-uic, eat--eshell-handle-uic): Handle 437 message passing sequence. 438 * eat.texi (Message Passing): New section in chapter "Shell 439 Integration". 440 * integration/bash (__eat_enable_integration): Remove the 441 unnecessary complex code to update PROMPT_COMMAND. 442 * integration/bash (_eat_msg): 443 * integration/zsh (_eat_msg): 444 New function. 445 446 2023-09-16 Akib Azmain Turja <akib@disroot.org> 447 448 Don't enter prompt mode after exit till new prompt 449 450 * eat.el (eat--inhibit-prompt-mode): New variable. 451 * eat.el (eat--post-prompt, eat--post-cont-prompt): Check 452 'eat--inhibit-prompt-mode' before switching to prompt mode. 453 * eat.el (eat--before-new-prompt): New function. 454 * eat.el (eat--handle-uic): Support "before new prompt" 455 sequence. 456 * eat.el (eat-emacs-mode, eat-semi-char-mode, eat-char-mode): 457 Set 'eat--inhibit-prompt-mode' to t if prompt mode is enabled. 458 * eat.el (eat-mode): Make 'eat--inhibit-prompt-mode' 459 buffer-local. 460 * integration/bash (__eat_prompt_command): 461 * integration/zsh (__eat_precmd): 462 Send the "before new prompt" sequence. 463 464 2023-09-16 Akib Azmain Turja <akib@disroot.org> 465 466 Add history reporting in Zsh integration script 467 468 * eat.el (eat--get-shell-history): New argument FORMAT, pass it 469 to 'eat--prompt-populate-input-ring'. 470 * eat.el (eat--handle-uic): Accept FORMAT argument in input 471 history reporting sequence and pass it to 472 'eat--get-shell-history'. 473 * eat.el (eat--prompt-populate-input-ring): New argument 474 FORMAT. Support Zsh extended history file format. 475 * integration/bash (__eat_enable_integration): Send "bash" as 476 the history file format. 477 * integration/zsh (__eat_enable_integration): Send shell 478 history. 479 480 2023-09-16 Akib Azmain Turja <akib@disroot.org> 481 482 Fix input handling in Eshell 483 484 * eat.el (eat--eshell-local-mode): Make input processing 485 variables buffer-local. 486 487 2023-09-14 Akib Azmain Turja <akib@disroot.org> 488 489 * eat.el (eat-prompt-newline): Make ring if needed 490 491 2023-09-14 Illia Ostapyshyn <ilya.ostapyshyn@gmail.com> 492 493 * eat.el (eat-mode): Escape '%' character in title 494 495 2023-09-14 Akib Azmain Turja <akib@disroot.org> 496 497 Fix recursive output processing 498 499 * eat.el (eat--pending-input-chunks) 500 (eat--process-input-queue-timer): New variable. 501 * eat.el (eat-mode): Make 'eat--pending-input-chunks' and 502 'eat--process-input-queue-timer' buffer-local. 503 * eat.el (eat--send-input): Queue input instead of sending 504 immediately. 505 * eat.el (eat--process-input-queue): New function. 506 507 2023-09-14 Akib Azmain Turja <akib@disroot.org> 508 509 Document prompt mode 510 511 * eat.texi (Shell Integration): Divide into sections. Add new 512 section 'Native Shell Prompt Editing'. 513 * README.org (Usage): Document "prompt" mode. 514 * README.org (Comparison With Other Terminal Emulators): Update 515 comparison. 516 517 2023-09-14 Akib Azmain Turja <akib@disroot.org> 518 519 Allow terminal text modification after it's killed 520 521 * eat.el (eat--sentinel): Remove 'read-only' and other text 522 properties from the terminal region. 523 524 2023-09-13 Akib Azmain Turja <akib@disroot.org> 525 526 Fix Bash long startup when run from Eshell 527 528 * eat.el (eat--eshell-handle-uic): Acknowledge when input 529 history file is sent by the shell. 530 531 2023-09-13 Akib Azmain Turja <akib@disroot.org> 532 533 Disable native shell prompt editing by default 534 535 * eat.el (eat-enable-native-shell-prompt-editing): Set to nil. 536 537 2023-09-13 Akib Azmain Turja <akib@disroot.org> 538 539 Add prompt mode and process OSC 51 as UI Command 540 541 * eat.el (eat-enable-native-shell-prompt-editing) 542 (eat-prompt-input-ring-size) 543 (eat-prompt-move-point-for-matching-input): New user option. 544 * eat.el (eat--t-term): Remove slots 'cwd', 'prompt-start-fn', 545 'prompt-end-fn', 'cont-prompt-start-fn', 'cont-prompt-end-fn', 546 'cmd-start-fn' and 'cmd-finish-fn'. Add new slot 'ui-cmd-fn'. 547 * eat.el (eat--t-set-cwd): Support only the format used by OSC 548 7. 549 * eat.el (eat--t-prompt-start, eat--t-prompt-end) 550 (eat--t-cont-prompt-start, eat--t-cont-prompt-end) 551 (eat--t-set-cmd, eat--t-cmd-start, eat--t-cmd-finish): Remove 552 function. 553 * eat.el (eat--t-ui-cmd): New function. 554 * eat.el (eat--t-handle-output): Remove all specialized OSC 51 555 handlers and call 'eat--t-ui-cmd' to handle any OSC 51 556 sequence. 557 * eat.el (eat-term-set-parameter): Set 'ui-cmd-fn' slot of 558 terminal when 'ui-command-function' is set. 559 * eat.el (eat-term-cwd): Remove function. 560 * eat.el (eat-term-prompt-start-function) 561 (eat-term-prompt-end-function, eat-term-cmd-start-function) 562 (eat-term-cont-prompt-start-function) 563 (eat-term-cont-prompt-end-function, eat-term-set-cmd-function) 564 (eat-term-cmd-finish-function): Remove generalized variables. 565 * eat.el (eat-term-send-string): New function. 566 * eat.el (eat-send-string-as-yank): Rename to 567 'eat-term-send-string-as-yank'. 568 All callers changed. 569 * eat.el (eat--set-cwd-uic, eat--post-cont-prompt): New 570 function. 571 * eat.el (eat--pre-prompt, eat--post-prompt, eat--set-cmd) 572 (eat--pre-cmd, eat--set-cmd-status): Remove unused first 573 argument. 574 All callers changed. 575 * eat.el (eat--get-shell-history, eat--handle-uic): New 576 function. 577 * eat.el (eat-prompt-mode-map): New variable. 578 * eat.el (eat-emacs-mode, eat-semi-char-mode, eat-char-mode): 579 Handle the case when prompt mode is active. 580 * eat.el (eat--prompt-mode-previous-mode): New variable. 581 * eat.el (eat--prompt-mode): New non-interactive minor mode. 582 * eat.el (eat-prompt-send-default, eat-prompt-send) 583 (eat-prompt-newline, eat-prompt-delchar-or-eof) 584 (eat-prompt-send-interrupt): New command. 585 * eat.el (eat--prompt-input-ring, eat--prompt-input-ring-index) 586 (eat--prompt-stored-incomplete-input) 587 (eat--prompt-matching-input-from-input-string): New variable. 588 * eat.el (eat--prompt-populate-input-ring) 589 (eat--prompt-reset-input-ring-vars, eat--prompt-ask-for-regexp-arg) 590 (eat--prompt-search-arg, eat--prompt-search-start) 591 (eat--prompt-prev-input-string, eat--prompt-prev-matching-input-str) 592 (eat--prompt-delete-input, eat--prompt-prev-matching-input-str-pos): 593 New function. 594 * eat.el (eat-prompt-previous-input, eat-prompt-next-input) 595 (eat-prompt-restore-input, eat-prompt-previous-matching-input) 596 (eat-prompt-next-matching-input, eat-prompt-find-input) 597 (eat-prompt-previous-matching-input-from-input) 598 (eat-prompt-next-matching-input-from-input): New command. 599 * eat.el (eat-mode): Make 'eat--prompt-mode-previous-mode', 600 'eat--prompt-input-ring', 'eat--prompt-input-ring-index', 601 'eat--prompt-stored-incomplete-input' and 602 'eat--prompt-matching-input-from-input-string' buffer-local. 603 Record undo information if 604 'eat-enable-native-shell-prompt-editing' is enabled. Set 605 'mode-line-process' properly so that prompt mode is shown when 606 enabled. 607 * eat.el (eat--process-output-queue): Remove any narrowing 608 temporarily when called. Don't 609 * eat.el (eat--sentinel): Disable prompt mode. Also fix the 610 bug where the point centers when the program exits, instead of 611 going to the end of buffer. 612 * eat.el (eat-exec): Don't set removed generalized variables 613 'eat-term-prompt-start-function', 'eat-term-set-cmd-function', 614 'eat-term-prompt-end-function', 'eat-term-cmd-start-function' 615 and 'eat-term-cmd-finish-function'. Set terminal parameter 616 'ui-command-function' to 'eat--handle-uic'. 617 * eat.el (eat--eshell-handle-uic): New function. 618 * eat.el (eat--eshell-output-filter): Let-bind 619 'inhibit-read-only' only for required parts. 620 * eat.el (eat--eshell-setup-proc-and-term): Set terminal 621 parameter 'ui-command-function' to 'eat--eshell-handle-uic'. 622 * eat.el (eat--eshell-sentinel): Fix the bug where the point 623 centers when the program exits, instead of going to the end of 624 buffer. 625 * integration/bash (__eat_enable_integration): Send shell 626 history. 627 628 2023-09-03 Akib Azmain Turja <akib@disroot.org> 629 630 * eat.el (eat-project-other-window): New command 631 632 2023-08-31 Akib Azmain Turja <akib@disroot.org> 633 634 Add command 'eat-other-window' 635 636 * eat.el (eat--1, eat-other-window): New function. 637 * eat.el (eat): Move all logic to 'eat--1' and call it. 638 639 2023-08-27 Akib Azmain Turja <akib@disroot.org> 640 641 Support Sixel properly in Eshell 642 643 * eat.el (eat--eshell-setup-proc-and-term): Set Sixel 644 attributes of the terminal object. 645 646 2023-08-25 Akib Azmain Turja <akib@disroot.org> 647 648 Add experimental Sixel support 649 650 * eat.el (eat--t-cur): New slots 'sixel-x', 'sixel-y' and 651 'sixel-beg'. 652 * eat.el (eat--t-term): New slots 'sixel-buffer', 653 'sixel-buffer-size', 'sixel-palette', 'sixel-color', 654 'sixel-display-method', 'sixel-image-height', 655 'sixel-scroll-mode', 'sixel-initial-cursor-pos', 'char-width' 656 and 'char-height'. 657 * eat.el (eat--t-reset): Reset 'sixel-scroll-mode' to 't'. 658 * eat.el (eat--t-fix-partial-multi-col-char): Preserve original 659 face if PRESERVE-FACE is non-nil. 660 * eat.el (eat--t-send-device-attrs): Send correct attributes. 661 * eat.el (eat--t-report-foreground-color) 662 (eat--t-report-background-color): Use correct format. 663 * eat.el (eat--t-sixel-init, eat--t-send-graphics-attrs) 664 (eat--t-sixel-write, eat--t-sixel-flush-line) 665 (eat--t-sixel-newline, eat--t-sixel-set-color-reg) 666 (eat--t-sixel-cleanup, eat--t-sixel-enable-scrolling) 667 (eat--t-sixel-disable-scrolling): New function. 668 * eat.el (eat--t-set-modes, eat--t-reset-modes): Handle Sixel 669 scroll mode. 670 * eat.el (eat--t-handle-output): Update 671 'eat--t-send-device-attrs' call. Handle 'send graphics 672 attributes' CSI function. Parse and dispatch DCS sequence 673 properly. Handle Sixel sequence. 674 * eat.el (eat-term-set-parameter): Handle 'char-dimensions', 675 'sixel-display-method', and 'sixel-image-height' parameters. 676 * eat.el (eat-exec): Set 'char-dimensions', 677 'sixel-display-method', and 'sixel-image-height' parameters. 678 679 2023-07-20 Akib Azmain Turja <akib@disroot.org> 680 681 Implement device status report function properly 682 683 * eat.el (eat--t-device-status-report): Implement properly. 684 Take an argument. 685 * eat.el (eat--t-handle-output): Update call to 686 'eat--t-device-status-report'. 687 688 2023-07-12 Akib Azmain Turja <akib@disroot.org> 689 690 Bind 'S-<insert>' to 'eat-yank' 691 692 * eat.el (eat--eshell-prepare-semi-char-mode-map) 693 (eat--prepare-semi-char-mode-map): Bind 'S-<insert>' to 694 'eat-yank'. 695 696 2023-07-06 Akib Azmain Turja <akib@disroot.org> 697 698 Bind keys 'DEL' and 'M-DEL' keys 699 700 * eat.el (eat-term-input-event): Handle 'DEL' and 'M-DEL' keys. 701 * eat.el (eat-term-make-keymap): Bind 'DEL' and 'M-DEL' keys. 702 703 2023-07-03 Akib Azmain Turja <akib@disroot.org> 704 705 Fix recursive load error 706 707 * eat.el (eat-semi-char-non-bound-keys) 708 (eat-eshell-semi-char-non-bound-keys): Let-bind 709 'after-load-alist' and 'after-load-functions' before reloading 710 Eat. 711 712 2023-05-15 Akib Azmain Turja <akib@disroot.org> 713 714 Yank active region with middle-click yank 715 716 * eat.el (eat-mouse-yank-primary): Select active region if 717 'select-active-regions' is non-nil. 718 719 2023-05-06 Akib Azmain Turja <akib@disroot.org> 720 721 Fix middle-click yanking commands 722 723 * eat.el (eat-mouse-yank-primary): Switch to the window where 724 the event was initiated. 725 * eat.el (eat-mouse-yank-secondary): Switch to the window where 726 the event was initiated. Ensure that the secondary selection 727 is non-empty before sending it. 728 729 2023-05-06 Akib Azmain Turja <akib@disroot.org> 730 731 Support middle-click yank in terminal 732 733 * eat.el (eat-mouse-yank-primary, eat-mouse-yank-secondary): 734 New command. 735 * eat.el (eat--prepare-semi-char-mode-map) 736 (eat--eshell-prepare-semi-char-mode-map): Remap commands 737 'mouse-yank-primary' and 'mouse-yank-secondary' to 738 'eat-mouse-yank-primary' and 'eat-mouse-yank-secondary' 739 respectively. 740 741 2023-04-17 Akib Azmain Turja <akib@disroot.org> 742 743 Update documentation in commentary section 744 745 * README.org (Usage): List keybindings in semi-char mode to 746 switch to other keybinding modes. 747 * eat.el (Commentary): Put the documentation of semi-char mode 748 first as it is the default. List keybindings in semi-char mode 749 to switch to other keybinding modes. Update stale keybindings 750 listed in emacs mode documentation. 751 752 2023-04-09 Akib Azmain Turja <akib@disroot.org> 753 754 Pass process to eat-exec-hook and eat-exit-hook 755 756 * eat.el (eat-exec-hook, eat-exit-hook): Update docstring. 757 * eat.el (eat--sentinel): Pass process to 'eat-exit-hook'. 758 Delete process after running 'eat-exit-hook'. 759 * eat.el (eat--kill-buffer): New helper function. 760 * eat.el (eat-exec): Pass process to 'eat-exec-hook'. Add or 761 remove 'eat--kill-process' from 'eat-exit-hook' instead of 762 'kill-buffer'. 763 764 2023-04-09 Akib Azmain Turja <akib@disroot.org> 765 766 New command 'eat-narrow-to-shell-prompt' 767 768 * eat.el (eat--post-prompt): Put the 'eat--shell-prompt-begin' 769 text property at the beginning of shell prompt. 770 * eat.el (eat--correct-shell-prompt-mark-overlays): Don't try 771 to go outside accessible portion of buffer when the buffer is 772 narrowed. 773 * eat.el (eat-narrow-to-shell-prompt): New command. 774 * eat.el (eat-mode-map): Bind key sequence 'C-x n d' to 775 'eat-narrow-to-shell-prompt'. 776 * eat.el (eat--filter-buffer-substring): Remove all text 777 properties added on UI side before passing buffer substring to 778 'eat-term-filter-string'. 779 * eat.texi (Shell Integration): Document 780 'eat-narrow-to-shell-prompt'. 781 782 2023-04-07 Akib Azmain Turja <akib@disroot.org> 783 784 Run hooks on terminal update and process exit 785 786 * eat.el (eat-exit-hook, eat-update-hook, eat-eshell-exit-hook) 787 (eat-eshell-update-hook): New user option. 788 * eat.el (eat-reset, eat--process-output-queue): Run 789 'eat-update-hook'. 790 * eat.el (eat--sentinel): Don't test 'eat-kill-buffer-on-exit', 791 run 'eat-exit-hook'. 792 * eat.el (eat--adjust-process-window-size): Run 793 'eat-update-hook' when the major mode is 'eat-mode'. Run 794 'eat-eshell-update-hook' in 'eshell-mode' buffers. 795 * eat.el (eat-exec): Don't let-bind 'eat-kill-buffer-on-exit' 796 while killing old process, remove 'kill-buffer' from hook 797 'eat-exit-hook' instead. When 'eat-kill-buffer-on-exit' is 798 non-nil, add 'kill-buffer' to 'eat-exit-hook' with priority 90. 799 Run 'eat-exec-hook' outside any let-block. 800 * eat.el (eat--eshell-output-filter): Run 801 'eat-eshell-update-hook'. 802 * eat.el (eat--eshell-cleanup): Run 'eat-eshell-exit-hook'. 803 804 2023-04-05 Akib Azmain Turja <akib@disroot.org> 805 806 Fix resizing when alternative display is enabled 807 808 * eat.el (eat--t-term): Fix error while resizing when 809 alternative display is enabled. 810 811 2023-04-02 Akib Azmain Turja <akib@disroot.org> 812 813 Force directionality of paragraphs in Eat buffer 814 815 * eat.el (eat-mode): Set 'bidi-paragraph-direction' to 816 'left-to-right'. 817 818 2023-04-02 Akib Azmain Turja <akib@disroot.org> 819 820 Inform about unlisted semi-char mode exceptions 821 822 * eat.texi (Input Modes): Inform about unlisted semi-char mode 823 exceptions. 824 * README.org: Inform about unlisted semi-char mode exceptions. 825 Add Zsh integration instructions. 826 827 2023-03-31 Akib Azmain Turja <akib@disroot.org> 828 829 Support DECSCUSR control function 830 831 * eat.el (eat-very-visible-vertical-bar-cursor-type) 832 (eat-vertical-bar-cursor-type, eat-horizontal-bar-cursor-type) 833 (eat-very-visible-horizontal-bar-cursor-type): New user 834 options. 835 * eat.el (eat--t-term): New slot 'cur-visible-p'. Remove slot 836 'cur-blinking-p'. Change the default value of 'cur-state' to 837 ':block'. 838 * eat.el (eat--t-reset): Don't reset slot 'cur-blinking-p'. 839 Reset slot 'cur-visible-p'. Reset 'cur-state' to ':block'. 840 Reset cursor state to ':block'. 841 * eat.el (eat--t-set-cursor-state): Set slot 'cur-visible-p' to 842 the current visibility of cursor. Set slot 'cur-state' to the 843 shape of cursor, regardless of visibility. 844 * eat.el (eat--t-default-cursor): Rename to 845 'eat--t-show-cursor'. Don't change any cursor state except 846 visibility. 847 * eat.el (eat--t-invisible-cursor): Rename to 848 'eat--t-hide-cursor'. Don't change any cursor state except 849 visibility. 850 * eat.el (eat--t-set-cursor-style): New function. 851 * eat.el (eat--t-blinking-cursor, eat--t-non-blinking-cursor): 852 Update to handle new cursor shapes properly. 853 * eat.el (eat--t-set-modes): Call 'eat--t-show-cursor' instead 854 of 'eat--t-default-cursor'. 855 * eat.el (eat--t-reset-modes): Call 'eat--t-hide-cursor' 856 instead of 'eat--t-invisible-cursor'. 857 * eat.el (eat--t-handle-output): Handle DECSCUSR control 858 function. 859 * eat.el (eat-term-cursor-type): Return ':invisible' if cursor 860 is invisible, otherwise the value of slot 'cur-state'. Update 861 the list of possible cursor states in the docstring. 862 * eat.el (eat-term-set-cursor-function): Update the list of 863 possible cursor states and fallback cursor state in the 864 docstring. 865 * eat.el (eat--cursor-blink-mode): Add 866 'eat--cursor-blink-stop-timers' to 'kill-buffer-hook'. 867 * eat.el (eat--set-cursor): Support new cursor states. Update 868 the list of possible cursor states in the docstring. 869 * eat.texi (Cursor Types): Document new user options 870 'eat-vertical-bar-cursor-type', 871 'eat-very-visible-vertical-bar-cursor-type', 872 'eat-horizontal-bar-cursor-type' and 873 'eat-very-visible-horizontal-bar-cursor-type'. 874 875 2023-03-31 Akib Azmain Turja <akib@disroot.org> 876 877 Capture keys 'M-backspace' and 'C-M-backspace' 878 879 * eat.el (eat-term-input-event): Support 'M-backspace' and 880 'C-M-backspace'. 881 * eat.el (eat-term-make-keymap): Bind 'M-backspace' and 882 'C-M-backspace'. 883 884 2023-03-31 Akib Azmain Turja <akib@disroot.org> 885 886 Suggest to invoke 'eat-compile-terminfo' in manual 887 888 * eat.texi (Not Recognized, Garbled Text): Suggest to do 889 'M-x eat-compile-terminfo' when the Terminfo databases aren't 890 working properly. 891 892 2023-03-31 Akib Azmain Turja <akib@disroot.org> 893 894 Fix directory tracking in Zsh 895 896 * integration/zsh (__eat_precmd): Use '$HOST' instead of 897 '$HOSTNAME'. 898 899 2023-03-31 Akib Azmain Turja <akib@disroot.org> 900 901 Implement Zsh integration 902 903 * integration/zsh: New file. 904 * eat.texi (Shell Integration): Add instructions for Zsh. 905 * integration/bash: Always return zero on succuss. 906 907 2023-03-30 Akib Azmain Turja <akib@disroot.org> 908 909 Add new command 'eat-compile-terminfo' 910 911 * eat.el (eat-compile-terminfo): New command. 912 * eat.texi (Hello Terminal): Refer to 'Common Problems'. 913 * eat.texi (Common Problems): Add instructions to compile 914 Terminfo databases with 'eat-compile-terminfo'. 915 916 2023-03-29 Akib Azmain Turja <akib@disroot.org> 917 918 Update manual to correctly describe command 'eat' 919 920 * eat.texi (Hello Terminal): Update to match with the current 921 behavior of command 'eat'. 922 923 2023-03-29 Akib Azmain Turja <akib@disroot.org> 924 925 Don't prompt for program in M-x eat by default 926 927 * eat.el (eat): Prompt for program to run only if double prefix 928 argument is given, otherwise use the default one. 929 930 2023-03-28 Akib Azmain Turja <akib@disroot.org> 931 932 Fix bugs in selection data manipulation code 933 934 * eat.el (eat--t-term): Put a vector of length 8 (instead of 935 10) in 'cut-buffers' slot. 936 * eat.el (eat--t-manipulate-selection): Don't process the 937 targets '8' and '9', since they are not in the protocol. 938 Return correct list of queried targets to the client. Make 939 sure base64 encoded data doesn't contain line breaks. 940 * eat.el (eat--t-handle-output): Tolerate invalid targets in 941 OSC 52 (manipulate selection data). 942 * eat.el (eat--manipulate-kill-ring): Handle 'nil' correctly. 943 944 2023-03-21 Akib Azmain Turja <akib@disroot.org> 945 946 Fix incompatiblity with Eshell on Emacs 28 947 948 * eat.el (eat--eshell-setup-proc-and-term): Set 949 'eat--input-process' terminal parameter on Emacs 28. 950 * eat.el (eat-eshell-mode): Don't add advice 951 'eat--eshell-set-input-process' on Emacs 28. 952 953 2023-03-20 Akib Azmain Turja <akib@disroot.org> 954 955 Send input to correct process in Eshell pipeline 956 957 * eat.el (eat--process): Remove. 958 * eat.el (eat-mode): Don't make 'eat--process' buffer-local. 959 Use 'eat--terminal' to determine whether terminal is live. 960 * eat.el (eat--eshell-set-input-process): New function. 961 * eat.el (eat--eshell-local-mode): Don't make 'eat--process' 962 buffer-local. Add 'eat--eshell-set-input-process' as a advice 963 after 'eshell-resume-eval'. 964 * eat.el (eat-exec): Use the terminal parameters 965 'eat--process', 'eat--input-process' and 'eat--output-process' 966 instead of the buffer-local variable 'eat--process' store the 967 process object. 968 * eat.el (eat--sentinel): Don't set 'eat--process' to nil. 969 * eat.el (eat--eshell-setup-proc-and-term): Set the terminal 970 parameters instead of buffer-local 'eat--process'. 971 * eat.el (eat--pre-prompt, eat--pre-cmd, eat-kill-process, eat) 972 (eat--send-input, eat--trace-eshell-adjust-make-process-args) 973 (eat--eshell-cleanup, eat--eshell-output-filter): Get the 974 process from terminal parameter. 975 976 2023-02-08 Akib Azmain Turja <akib@disroot.org> 977 978 * eat.texi (Querying Before Kill): New chapter 979 980 2023-02-07 Akib Azmain Turja <akib@disroot.org> 981 982 Query when killing buffer when command is running 983 984 * eat.el (eat-query-before-killing-running-terminal): New user 985 option. 986 * eat.el (eat--pre-prompt): Unset process query on exit flag if 987 eat-query-before-killing-running-terminal is 'auto'. 988 * eat.el (eat--pre-cmd): Set process query on exit flag if 989 eat-query-before-killing-running-terminal is 'auto'. 990 991 2023-01-22 Akib Azmain Turja <akib@disroot.org> 992 993 Add many more semi-char mode exceptions 994 995 * eat.el (eat-semi-char-non-bound-keys) 996 (eat-eshell-semi-char-non-bound-keys): Add 81 more keys. 997 998 2023-01-19 Akib Azmain Turja <akib@disroot.org> 999 1000 Auto reload Eat when "semi-char" map is customized 1001 1002 * eat.el (eat--load-file-path, eat--being-loaded): New 1003 variable. 1004 * eat.el (eat-semi-char-non-bound-keys) 1005 (eat-eshell-semi-char-non-bound-keys): Reload Eat when 1006 customized. Document what to do if changed from Lisp. 1007 * eat.el (eat-update-semi-char-mode-map) 1008 (eat-eshell-update-semi-char-mode-map): New function. 1009 * eat.el (eat-reload): New command. 1010 * eat.texi (Semi-char Mode): Document what to do if the lists 1011 of not bound keys are changed from Lisp. 1012 1013 2023-01-18 Akib Azmain Turja <akib@disroot.org> 1014 1015 Document some new user options 1016 1017 * eat.texi (Semi-char Mode): Document 1018 'eat-semi-char-non-bound-keys' and 1019 'eat-eshell-semi-char-non-bound-keys'. 1020 * eat.texi (Input Invisible): New section. 1021 1022 2023-01-16 Akib Azmain Turja <akib@disroot.org> 1023 1024 Allow modifying semi-char key exceptions 1025 1026 * eat.el (eat-semi-char-non-bound-keys) 1027 (eat-eshell-semi-char-non-bound-keys): New user option. 1028 * eat.el (eat--prepare-semi-char-mode-map) 1029 (eat--eshell-prepare-semi-char-mode-map): New function. 1030 * eat.el (eat-semi-char-mode-map): Use 1031 'eat--prepare-semi-char-mode-map' to make the keymap. 1032 * eat.el (eat-eshell-semi-char-mode-map): Use 1033 'eat--eshell-prepare-semi-char-mode-map' to make the keymap. 1034 1035 2023-01-15 Akib Azmain Turja <akib@disroot.org> 1036 1037 Allow pasting from parent XTerm to Eat terminal 1038 1039 * eat.el (eat-xterm-paste): New command. 1040 * eat.el (eat-mode-map, eat-eshell-emacs-mode-map): Bind 1041 <xterm-paste> to 'ignore'. 1042 * eat.el (eat-semi-char-mode-map, eat-char-mode-map) 1043 (eat-eshell-semi-char-mode-map, eat-eshell-char-mode-map): Bind 1044 <xterm-paste> to 'eat-xterm-paste'. 1045 1046 2022-12-28 Akib Azmain Turja <akib@disroot.org> 1047 1048 Don't error while handling the sequence '\e[>c' 1049 1050 * eat.el (eat--t-send-device-attrs): Accept '((nil))' as the 1051 value of the parameter PARAMS, but don't accept 'nil'. 1052 1053 2022-12-28 Akib Azmain Turja <akib@disroot.org> 1054 1055 * eat.el (eat): Use buffer name for process name 1056 1057 * eat.el (eat-eshell-exec-hook): Make customizable 1058 1059 * eat.el (eat-exec-hook): Make customizable 1060 1061 2022-12-28 Akib Azmain Turja <akib@disroot.org> 1062 1063 Run eat-eshell-exec-hook as Eshell process is run 1064 1065 * eat.el (eat--eshell-setup-proc-and-term): Run 1066 'eat-eshell-exec-hook' at the very end. 1067 1068 2022-12-22 Akib Azmain Turja <akib@disroot.org> 1069 1070 * README.org (Straight.el): New section 1071 1072 2022-12-22 Akib Azmain Turja <akib@disroot.org> 1073 1074 Don't let font-lock to mess up text face 1075 1076 * eat.el (eat--t-repeated-insert, eat--t-write) 1077 (eat--t-fix-partial-multi-col-char): Add 'font-lock-face' text 1078 property along with 'face' to stop font-lock from removing the 1079 face. 1080 1081 2022-12-21 Akib Azmain Turja <akib@disroot.org> 1082 1083 Fix terminfo path on case-insensitive filesystems 1084 1085 * eat.el (eat--terminfo-path): New variable. 1086 * eat.el (eat-term-terminfo-directory): Change default value to 1087 'PACKAGE-ROOT/terminfo/'. 1088 * Makefile (terminfo): Don't depend on other targets. Make 1089 directory 'terminfo'. Write terminfo to both 'e' and 1090 '65' (hexadecimal number of ASCII 'e') directories. 1091 * Makefile (e/eat-mono e/eat-color eat-256color e/eat-truecolor): 1092 Remove target. 1093 * README.org (Quelpa): Update recipe. 1094 1095 2022-12-20 Akib Azmain Turja <akib@disroot.org> 1096 1097 * eat.el (eat--t-handle-output): Fix NULL handling 1098 1099 2022-12-17 Akib Azmain Turja <akib@disroot.org> 1100 1101 Fix typo in 'eat--t-scroll-up' 1102 1103 * eat.el (eat--t-scroll-up): Replace 'scroll-begin' with 1104 'scroll-end' in '(< scroll-end (eat--t-disp-width disp))', 1105 since this will always evaluate to t, and thus it was most 1106 probably a typo. 1107 1108 2022-12-17 Akib Azmain Turja <akib@disroot.org> 1109 1110 Make sure symbol is used as face parameter value 1111 1112 * eat.el (eat-term-set-parameter): Make sure face parameter 1113 values are symbols. 1114 1115 2022-12-16 Akib Azmain Turja <akib@disroot.org> 1116 1117 Allow changing terminal faces terminal-locally 1118 1119 * eat.el (eat--t-term): New slots: bold-face, faint-face, 1120 italic-face, slow-blink-face, fast-blink-face, color-0-face, 1121 color-faces, font-faces. Use hash table for 'params' slot. 1122 * eat.el (eat--t-set-sgr-params): Use new slot instead using 1123 the faces directly. 1124 * eat.el (eat-term-parameter): Update to work with 'params' 1125 hash table. 1126 * eat.el (eat-term-set-parameter): Update to work with 'params' 1127 hash table. Handle the following parameters specially: 1128 bold-face, faint-face, italic-face, slow-blink-face, 1129 fast-blink-face, color-0-face, color-1-face, ..., 1130 color-255-face, font-0-face, font-1-face, ..., font-9-face. 1131 1132 2022-12-16 Akib Azmain Turja <akib@disroot.org> 1133 1134 Decoding UTF-8 encoded strings encoded as base64 1135 1136 * eat.el (eat--t-set-cwd): Decoding UTF-8 encoded strings encoded as 1137 base64. 1138 * eat.el (eat--t-manipulate-selection): Use 'ignore-errors' 1139 instead of '(ignore-error ...)', since both macro expand to the 1140 same code. 1141 * eat.el (eat--t-set-cmd): Decoding UTF-8 encoded strings encoded as 1142 base64. Use 'when-let*' instead of 'when' nested in 'let'. 1143 1144 2022-12-15 Akib Azmain Turja <akib@disroot.org> 1145 1146 Decrease regexp usage while parsing output 1147 1148 * eat.el (eat--t-handle-output): Don't use regular expressions 1149 while parsing plain text and CSI sequences. Remove useless 1150 code from VT300-specific charset set sequence parser. 1151 1152 2022-12-15 Akib Azmain Turja <akib@disroot.org> 1153 1154 Fix handling non-interactive processes in Eshell 1155 1156 * eat.el (eat--eshell-adjust-make-process-args): Check whether 1157 the process going to be run will be interactive process. 1158 * eat.el: Declare function 'eshell-interactive-output-p'.a 1159 1160 2022-12-15 Akib Azmain Turja <akib@disroot.org> 1161 1162 Don't use '.*-char-property-.*' functions 1163 1164 * eat.el (eat--t-move-before-to-safe): Use 1165 'previous-single-property-change' instead of 1166 '(previous-single-char-property-change'. 1167 * eat.el (eat--t-join-long-line): Use 'get-text-property' 1168 instead of 'get-char-property'. Handle properly the case where 1169 'next-single-property-change' returns nil. 1170 * eat.el (eat--t-fix-partial-multi-col-char): Handle properly 1171 the case where 'next-single-property-change' returns nil. 1172 1173 2022-12-15 Akib Azmain Turja <akib@disroot.org> 1174 1175 Refactor 'eat--eshell-adjust-make-process-args' 1176 1177 * eat.el (eat--eshell-adjust-make-process-args): Move the 1178 'add-hook' out of 'unwind-protect'. 1179 1180 2022-12-15 Akib Azmain Turja <akib@disroot.org> 1181 1182 Remove invisible spaces when killing text 1183 1184 * eat.el (eat-term-filter-string): Remove invisible spaces 1185 preceding multi-column width characters. 1186 * eat.el (eat--t-join-long-line) 1187 (eat--t-fix-partial-multi-col-char): Use 1188 'next-single-property-change' instead of 1189 'next-single-char-property-change'. 1190 1191 2022-12-14 Akib Azmain Turja <akib@disroot.org> 1192 1193 Refactor 'eat--eshell-adjust-make-process-args' 1194 1195 * eat.el (eat--eshell-adjust-make-process-args): Avoid 1196 unnecessary function overrides. Overriding functions with 1197 'cl-letf*' is not well documented, and self-overriding a 1198 function (override a function with its own definition) may not 1199 a nop. 1200 1201 2022-12-14 Akib Azmain Turja <akib@disroot.org> 1202 1203 Ask if 'stty' is unavailable in Eshell 1204 1205 * eat.el (eat-eshell-fallback-if-stty-not-available): New user 1206 option. 1207 * eat.el (eat--eshell-adjust-make-process-args): If 'stty' is 1208 not available, use 'eat-eshell-fallback-if-stty-not-available' 1209 to determine whether to continue terminal emulation or not. 1210 1211 2022-12-12 Akib Azmain Turja <akib@disroot.org> 1212 1213 Fix shell prompt navigation 1214 1215 * eat.el (eat--post-prompt): Set 'eat--shell-prompt-begin' to 1216 nil at the very end to ensure prompt end text properties are 1217 put. 1218 1219 2022-12-12 Akib Azmain Turja <akib@disroot.org> 1220 1221 Synchronize scroll on all windows showing terminal 1222 1223 * eat.el (eat--synchronize-scroll-windows): New function. 1224 * eat.el (eat--synchronize-scroll) 1225 (eat--eshell-synchronize-scroll): Take a single argument, 1226 WINDOWS, list of windows to synchronize. The special value 1227 'buffer' can also be included, to synchronize the point in 1228 buffer. 1229 * eat.el (eat-self-input, eat-yank, eat-yank-from-kill-ring): 1230 Pass the return value of 'eat--synchronize-scroll-windows' to 1231 the function in 'eat--synchronize-scroll-function'. 1232 * eat.el (eat--process-output-queue) 1233 (eat--adjust-process-window-size, eat--eshell-output-filter) 1234 Call 'eat--synchronize-scroll-windows' before doing anything, 1235 save the result, and pass it as the first argument to the 1236 function in 'eat--synchronize-scroll-function'. 1237 * eat.el (eat--trace-replay-eval): Pass the return value of 1238 'get-buffer-window-list' to 'eat--synchronize-scroll'. 1239 1240 2022-12-12 Akib Azmain Turja <akib@disroot.org> 1241 1242 Don't intercept background processes in Eshell 1243 1244 * eat.el (eat--eshell-adjust-make-process-args): Don't do any 1245 change to the environment if 'eshell-current-subjob-p' is 1246 non-nil. 1247 1248 2022-12-11 Akib Azmain Turja <akib@disroot.org> 1249 1250 Check whether 'yank-transform-functions' is bound 1251 1252 * eat.el (eat-yank, eat-yank-from-kill-ring): Check whether 1253 'yank-transform-functions' is bound before using it's value. 1254 The variable is not available in Emacs 28. 1255 1256 2022-12-11 Akib Azmain Turja <akib@disroot.org> 1257 1258 * integration/bash: Check TERM before enabling 1259 1260 * eat.el (eat-eshell-emacs-mode-map): Disable undo 1261 1262 2022-12-11 Akib Azmain Turja <akib@disroot.org> 1263 1264 Use Eshell "emacs" mode map when process is live 1265 1266 * eat.el (eat-eshell-emacs-mode-map): Update docstring. 1267 * eat.el (eat--eshell-process-running-mode): New 1268 non-interactive minor mode. 1269 * eat.el (eat--eshell-setup-proc-and-term): Enable 1270 'eat--eshell-process-running-mode'. 1271 * eat.el (eat--eshell-cleanup): Disable 1272 'eat--eshell-process-running-mode'. 1273 * eat.le (eat--eshell-local-mode): Don't use 1274 'eat-eshell-emacs-mode-map' as the mode keymap. 1275 1276 2022-12-11 Akib Azmain Turja <akib@disroot.org> 1277 1278 Synchronize scrolling and point properly 1279 1280 * eat.el (eat--synchronize-scroll) 1281 (eat--eshell-synchronize-scroll): Call 'set-window-point' in 1282 addition to 'goto-char'. 1283 1284 2022-12-11 Akib Azmain Turja <akib@disroot.org> 1285 1286 Fix invoking commands with eshell/sudo from Tramp 1287 1288 * eat.el (eat--eshell-adjust-make-process-args): Override 1289 'start-file-process' on Emacs 28, used by Eshell on Emacs 28. 1290 Don't override 'make-process' on Emacs 28, Eshell doesn't use 1291 that on Emacs 28. Set process filter and sentinel in 1292 'eshell-exec-hook' instead of 'make-process' advice. 1293 1294 2022-12-11 Akib Azmain Turja <akib@disroot.org> 1295 1296 Fix Eshell working directory tracking 1297 1298 * eat.el (eat--eshell-local-mode): Call 1299 'eat--eshell-update-cwd'. 1300 * eat.el (eat-eshell-mode): Don't call 1301 'eat--eshell-update-cwd'. 1302 1303 2022-12-10 Akib Azmain Turja <akib@disroot.org> 1304 1305 Fix yanking text into terminal 1306 1307 * eat.el (eat-yank): Use simpler, saner and better approach to get the 1308 yanked string instead of the previous stupid, insane and buggy 1309 approach. 1310 * eat.el (eat-yank-pop): Remove, because it's not cancel the text 1311 already sent to the terminal. 1312 * eat.el (eat-yank-from-kill-ring): New function. Behaves essentially 1313 the same the previous (not properly working) 'eat-yank-pop'. 1314 * eat.el (eat-semi-char-mode-map, eat-eshell-semi-char-mode-map): 1315 Replace 'eat-yank-pop' with 'eat-yank-from-kill-ring'. 1316 1317 2022-12-10 Akib Azmain Turja <akib@disroot.org> 1318 1319 Implement terminal parameters 1320 1321 * eat.el (eat--t-term): New slot: 'params'. 1322 * eat.el (eat-term-parameter): New function and generalized 1323 variable. 1324 * eat.el (eat-set-term-parameter): New function. 1325 1326 2022-12-09 Akib Azmain Turja <akib@disroot.org> 1327 1328 Fix terminal color reporting in text terminals 1329 1330 * eat.el (eat--t-report-foreground-color): Fix foreground color 1331 reporting in text terminals. 1332 * eat.el (eat--t-report-background-color): Fix background color 1333 reporting in text terminals. 1334 1335 2022-12-08 Akib Azmain Turja <akib@disroot.org> 1336 1337 Break combined 'setq'/'setf'/'setq-local's 1338 1339 When giving more than two arguments to 'setq', it becomes hard 1340 to figure out what is assigned to what. As the number of 1341 argument increases, the readablity of code decreases. This is 1342 also true for 'setq-local'. For 'setf', the problem is even 1343 greater, unlike 'setq', all arguments to 'setf' look the same. 1344 1345 * eat.el (eat--t-reset, eat--t-write, eat--t-save-cur) 1346 (eat--t-restore-cur, eat--t-enable-alt-disp) 1347 (eat--t-disable-alt-disp, eat--t-change-scroll-region) 1348 (eat--t-set-sgr-params, eat--t-manipulate-selection) 1349 (eat--t-resize, eat--blink-start-timers, eat-blink-mode) 1350 (eat--cursor-blink-mode, eat--set-cursor, eat-self-input) 1351 (eat-mode, eat-exec, eat--eshell-setup-proc-and-term) 1352 (eat--eshell-cleanup, eat--eshell-adjust-make-process-args) 1353 (eat--eshell-local-mode, eat--eshell-exec-visual) 1354 (eat--trace-exec, eat--trace-eshell-adjust-make-process-args) 1355 (eat--trace-replay-eval, eat-trace-replay, eat-trace--cleanup): 1356 Break combined 'setq'/'setf'/'setq-local's. 1357 1358 2022-12-08 Akib Azmain Turja <akib@disroot.org> 1359 1360 Don't 'cd' as root when using 'sudo' from Tramp 1361 1362 * eat.el (eat--eshell-setup-proc-and-term): Don't set 1363 'eat--eshell-invocation-directory'. 1364 * eat.el (eat--eshell-update-cwd): New function. 1365 * eat.el (eat--eshell-local-mode): Call 1366 'eat--eshell-update-cwd' when enabling the mode and add it to 1367 'eshell-directory-change-hook' to keep track of Eshell's 1368 working directory. 1369 1370 2022-12-08 Akib Azmain Turja <akib@disroot.org> 1371 1372 Fix prompt annotation bug trigger when shell exits 1373 1374 * eat.el (eat--correct-shell-prompt-mark-overlays): Make sure 1375 'eat--terminal' is non-nil. 1376 * eat.el (eat--sentinel): Cancel timers, correct shell prompt 1377 annotations for the final time, reset shell prompt annotation 1378 related local variables. 1379 1380 2022-12-07 Akib Azmain Turja <akib@disroot.org> 1381 1382 Synchronize scrolling only when point is on cursor 1383 1384 * eat.el (eat--adjust-process-window-size): Synchronize 1385 scrolling only when point is on cursor. 1386 1387 2022-12-07 Akib Azmain Turja <akib@disroot.org> 1388 1389 Escape control characters in trace output 1390 1391 * eat.el (eat--trace-log): Escape control 1392 characters (codepoints from 0 to 31) in trace output. 1393 1394 2022-12-07 Akib Azmain Turja <akib@disroot.org> 1395 1396 Auto update 'eat-term-shell-integration-directory' 1397 1398 * eat.el: Auto update 'eat-term-shell-integration-directory' if 1399 not modified. 1400 1401 2022-12-07 Akib Azmain Turja <akib@disroot.org> 1402 1403 Move Bash global variables to function 1404 1405 * integration/bash (__eat_current_command, __eat_exit_status) 1406 (__eat_inhibit_preexec): Move to '__eat_enable_integration'. 1407 * integration/bash (__eat_prompt_start, __eat_prompt_end) 1408 (__eat_continuation_start, __eat_continuation_end): Move to 1409 '__eat_enable_integration' and make local there. 1410 1411 2022-12-07 Akib Azmain Turja <akib@disroot.org> 1412 1413 Document annotation correction delay user option 1414 1415 * eat.texi (Performance Tuning): Document the purpose and the 1416 use of 'eat-shell-prompt-annotation-correction-delay' user 1417 option. 1418 1419 2022-12-07 Akib Azmain Turja <akib@disroot.org> 1420 1421 Don't accept 'nil' as annotation correction delay 1422 1423 * eat.el (eat-shell-prompt-annotation-correction-delay): Don't 1424 accept 'nil'. 1425 * eat.el (eat--process-output-queue): Don't accept value 'nil' 1426 for 'eat-shell-prompt-annotation-correction-delay'. 1427 1428 2022-12-07 Akib Azmain Turja <akib@disroot.org> 1429 1430 Rename some symbols to reflect their purposes 1431 1432 * eat.el (eat-shell-prompt-annotation-delay): Rename to 1433 'eat-shell-prompt-annotation-correction-delay'. 1434 * eat.el (eat--update-shell-prompt-mark-overlays): Rename to 1435 'eat--correct-shell-prompt-mark-overlays'. 1436 * eat.el (eat--shell-prompt-annotation-update-timer): Rename to 1437 'eat--shell-prompt-annotation-correction-timer'. 1438 * eat.el (eat-mode, eat--process-output-queue, eat--filter): 1439 Update references to renamed symbols. 1440 1441 2022-12-07 Akib Azmain Turja <akib@disroot.org> 1442 1443 * README.org: Add shell integration instructions 1444 1445 * eat-tests.el (eat-test-set-cwd): Update test 1446 1447 * eat.el (eat--t-term): Fix initial value of 'cwd' 1448 1449 2022-12-06 Akib Azmain Turja <akib@disroot.org> 1450 1451 Document everything about shell integration 1452 1453 * eat.texi (Shell Integration): Move to be the first chapter of 1454 Part III. Document everything about shell integration. 1455 * eat.texi (Directory Tracking): Merge with the node 'Shell 1456 Integration'. 1457 1458 2022-12-06 Akib Azmain Turja <akib@disroot.org> 1459 1460 Fix prompt navigation when annotation is disabled 1461 1462 * eat.el (eat--pre-prompt): Always set 1463 'eat--shell-prompt-begin'. 1464 * eat.el (eat--post-prompt): Always put special prompt end 1465 marking text property. 1466 1467 2022-12-06 Akib Azmain Turja <akib@disroot.org> 1468 1469 Add shell prompt navigation commands 1470 1471 * eat.el (eat--post-prompt): Add special text property on the 1472 last character of shell prompt. 1473 * eat.el (eat-previous-shell-prompt, eat-next-shell-prompt): 1474 New command. 1475 * eat.el (eat-mode-map): Bind 'eat-previous-shell-prompt' and 1476 'eat-next-shell-prompt' to 'C-c C-p' and 'C-c C-n' 1477 respectively. 1478 1479 2022-12-06 Akib Azmain Turja <akib@disroot.org> 1480 1481 Annotate shell prompts 1482 1483 * eat.el (eat-enable-shell-prompt-annotation) 1484 (eat-shell-prompt-annotation-position) 1485 (eat-shell-prompt-annotation-running-margin-indicator) 1486 (eat-shell-prompt-annotation-success-margin-indicator) 1487 (eat-shell-prompt-annotation-failure-margin-indicator) 1488 (eat-shell-prompt-annotation-delay): New user option. 1489 * eat.el (eat-shell-prompt-annotation-running) 1490 (eat-shell-prompt-annotation-success) 1491 (eat-shell-prompt-annotation-failure): New face. 1492 * eat.el (eat--shell-command-status, eat--shell-prompt-begin) 1493 (eat--shell-prompt-mark, eat--shell-prompt-mark-overlays): New 1494 variable. 1495 * eat.el (eat--pre-prompt, eat--post-prompt) 1496 (eat--update-shell-prompt-mark-overlays, eat--pre-cmd) 1497 (eat--set-cmd-status): New function. 1498 * eat.el (eat-mode): Make 'eat--shell-command-status', 1499 'eat--shell-prompt-begin', 'eat--shell-prompt-mark', 1500 'eat--shell-prompt-mark-overlays' and 1501 'eat--shell-prompt-annotation-update-timer' local. Set margin 1502 width if shell prompt annotation is enabled. 1503 * eat.el (eat--shell-prompt-annotation-update-timer): New 1504 variable. 1505 * eat.el (eat--process-output-queue): Call or schedule 1506 'eat--update-shell-prompt-mark-overlays' call. 1507 * eat.el (eat--filter): Cancel timer 1508 'eat--shell-prompt-annotation-update-timer'. 1509 * eat.el (eat-exec): Set prompt start & end and command start & 1510 end functions. 1511 1512 2022-12-06 Akib Azmain Turja <akib@disroot.org> 1513 1514 Add shell commands run in Eat to Emacs history 1515 1516 * eat.el (eat-enable-shell-command-history): New user option. 1517 * eat.el (eat--set-cmd): New function. 1518 * eat.el (eat-exec, eat--eshell-setup-proc-and-term): Call 1519 'eat--set-cmd' when the shell reports the command being run. 1520 1521 2022-12-06 Akib Azmain Turja <akib@disroot.org> 1522 1523 Tighter shell integration 1524 1525 * eat.el (eat--t-term): New slots: 'prompt-start-fn', 1526 'prompt-end-fn', 'cont-prompt-start-fn', 'cont-prompt-end-fn', 1527 'set-cmd-fn', 'cmd-start-fn', 'cmd-finish-fn' 1528 * eat.el (eat--t-set-cwd): Accept three arguments in two 1529 different formats. 1530 * eat.el (eat--t-prompt-start, eat--t-prompt-end) 1531 (eat--t-cont-prompt-start, eat--t-cont-prompt-end) 1532 (eat--t-set-cmd, eat--t-cmd-start, eat--t-cmd-finish): New 1533 function. 1534 * eat.el (eat--t-handle-output): Accept Eat's own 1535 OSC 51 ; e ; ... ST sequences. 1536 * eat.el (eat-term-prompt-start-function) 1537 (eat-term-prompt-end-function) 1538 (eat-term-continuation-prompt-start-function) 1539 (eat-term-continuation-prompt-end-function) 1540 (eat-term-set-cmd-function, eat-term-cmd-start-function) 1541 (eat-term-cmd-finish-function): New generalized variable. 1542 * integration/bash (__eat_current_command, __eat_exit_status): 1543 New variable. 1544 * integration/bash (__eat_prompt_command): Send exit status of 1545 last command, if applicable. Use Eat specific sequence to 1546 report working directory. Set title. 1547 * integration/bash (__eat_preexec): Report current command and 1548 execution start. 1549 * integration/bash (__eat_before_prompt_command): Set 1550 '__eat_exit_status' to the exit status of the last command. 1551 * integration/bash (__eat_prompt_start, __eat_prompt_end) 1552 (__eat_continuation_start, __eat_continuation_end): New 1553 variable, used as constant only to make the code more readable. 1554 * integration/bash (__eat_enable_integration): Wrap 'PS1' and 1555 'PS2'. Don't set title from 'PS1'. 1556 1557 2022-12-04 Akib Azmain Turja <akib@disroot.org> 1558 1559 Calculate the number of lines on window properly 1560 1561 * eat.el (eat-exec, eat--eshell-setup-proc-and-term) 1562 (eat--eshell-adjust-make-process-args) 1563 (eat--eshell-synchronize-scroll): Calculate the number of 1564 available lines on window properly. 1565 1566 2022-12-04 Akib Azmain Turja <akib@disroot.org> 1567 1568 Remap 'insert-char' to read and input a character 1569 1570 * eat.el (eat-input-char): New function. 1571 * eat.el (eat-semi-char-mode-map) 1572 (eat-eshell-semi-char-mode-map): Remap 'insert-char' to 1573 'eat-input-char'. 1574 1575 2022-12-04 Akib Azmain Turja <akib@disroot.org> 1576 1577 Use full command as title in shell integration 1578 1579 * integration/bash (__eat_in_prompt_command): Rename to 1580 '__eat_inhibit_preexec'. 1581 * integration/bash (__eat_before_exec): Inhibit further 1582 '__eat_preexec' calls until next prompt. 1583 * integration/bash (__eat_preexec): Use 'history' to get the 1584 real command typed by the user. 1585 1586 2022-12-04 Akib Azmain Turja <akib@disroot.org> 1587 1588 Fix Bash integration 1589 1590 * integration/bash (__eat_enable_integration): Fix moving 1591 'PROMPT_COMMAND' array elements. 1592 1593 2022-12-04 Akib Azmain Turja <akib@disroot.org> 1594 1595 * eat.el: Fix bright faces face definitions 1596 1597 2022-12-04 Akib Azmain Turja <akib@disroot.org> 1598 1599 Refactor shell integration enabling code 1600 1601 * integration/bash (__eat_enable_integration): New function. 1602 * integration/bash: Move enabling code to dedicated function. 1603 1604 2022-12-04 Akib Azmain Turja <akib@disroot.org> 1605 1606 Update title automatically in shell integration 1607 1608 * integration/bash (__eat_prompt_command): Remove extra '\'s. 1609 * integration/bash (__eat_in_prompt_command): New variable. 1610 * integration/bash (__eat_preexec, __eat_before_prompt_command) 1611 (__eat_after_prompt_command, __eat_before_exec): New function. 1612 * integration/bash: Modify PS1 to update terminal title when 1613 displaying prompt. Add '__eat_before_exec' as 'DEBUG' trap 1614 handler to update terminal title just before executing a 1615 command. Prepend and append '__eat_before_prompt_command' and 1616 '__eat_after_prompt_command' to 'PROMPT_COMMAND' to avoid 1617 getting trapped in 'DEBUG' trap. 1618 1619 2022-12-04 Akib Azmain Turja <akib@disroot.org> 1620 1621 * README.org (Quelpa): Update recipe. 1622 1623 * term/eat.el: New file. 1624 1625 2022-12-04 Akib Azmain Turja <akib@disroot.org> 1626 1627 Refer to NonGNU ELPA in README 1628 1629 * README.org (NonGNU ELPA Devel): Rename to NonGNU ELPA. 1630 Change the code-snippet to use NonGNU ELPA (stable). 1631 1632 2022-12-03 Akib Azmain Turja <akib@disroot.org> 1633 1634 * integration/bash: Add copyright notice. 1635 1636 * integration/bash: Use '__' prefix 1637 1638 * integration/bash: Append to array more cleanly 1639 1640 * integration/bash: Don't setup again on reload 1641 1642 2022-12-03 Akib Azmain Turja <akib@disroot.org> 1643 1644 Use more uniform names for tracer functions 1645 1646 * eat.el: Rename 'eat--eshell-trace-...' symbols to 1647 'eat--trace-eshell-...'. 1648 1649 2022-12-03 Akib Azmain Turja <akib@disroot.org> 1650 1651 Add shell integration script for GNU Bash 1652 1653 * integration/bash: New file. 1654 * eat.el (eat-term-shell-integration-directory): New variable. 1655 Contains path to the directory containing the scripts, 1656 automatically updated when Eat is updated. 1657 * eat.el (eat-exec, eat-eshell-mode): New enviroment variable 1658 'EAT_SHELL_INTEGRATION_DIR'. 1659 * eat.texi (Shell Integration): New chapter. 1660 * eat.texi (Directory Tracking): Refer to 'Shell Integration'. 1661 1662 2022-12-01 Akib Azmain Turja <akib@disroot.org> 1663 1664 Check terminal contents while testing bell 1665 1666 * eat-tests.el (eat-test-character-sets): Check terminal 1667 contents. 1668 1669 2022-12-01 Akib Azmain Turja <akib@disroot.org> 1670 1671 Refer to Info manual to setup directory tracking 1672 1673 * eat.el (eat-enable-directory-tracking): Refer to Info manual. 1674 1675 2022-12-01 Akib Azmain Turja <akib@disroot.org> 1676 1677 Support directory tracking with OSC 7 1678 1679 * eat.el: Require 'url'. 1680 * eat.el (eat-enable-directory-tracking): New user option. 1681 * eat.el (eat--t-term): New slots: 'cwd' and 'set-cwd-fn'. 1682 * eat.el (eat--t-set-cwd, eat-term-cwd): New function. 1683 * eat.el (eat-term-set-cwd-function): New function and 1684 generalized variable. 1685 * eat.el (eat--t-handle-output): Handle OSC 7. 1686 * eat.el (eat--set-cwd): New function. 1687 * eat.el (eat-exec): Use 'eat--set-cwd' to change current 1688 working directory. 1689 * eat.el (eat--eshell-invocation-directory): New variable, 1690 local in Eshell buffers when 'eat-eshell-mode' is enabled. 1691 * eat.el (eat--eshell-setup-proc-and-term): Save the invocation 1692 directory of process. 1693 * eat.el (eat--eshell-cleanup): Revert working directory to 1694 invocation directory. 1695 * eat.el (eat--eshell-local-mode): When enabling, make 1696 'eat--eshell-invocation-directory' local variable and kill when 1697 disabling. 1698 * eat-tests.el (eat-test-set-cwd): New test. 1699 * eat.texi (Directory Tracking): New chapter. 1700 1701 2022-11-30 Akib Azmain Turja <akib@disroot.org> 1702 1703 Fix byte-compilation warnings on Emacs 28 1704 1705 * eat.el (eat-term-input-event): Fix byte-compilation warnings 1706 on Emacs 28, caused by calling 'posn-col-row' with two 1707 arguments on Emacs >= 29, which is not available on Emacs 28. 1708 1709 2022-11-30 Akib Azmain Turja <akib@disroot.org> 1710 1711 * eat.el: Use loop to define color and font faces 1712 1713 2022-11-30 Akib Azmain Turja <akib@disroot.org> 1714 1715 Document eat-eshell-visual-command-mode in manual 1716 1717 * eat.texi (Eshell Terminal): Document 1718 'eat-eshell-visual-command-mode' and suggest to set 1719 'eshell-visual-commands' to nil. 1720 1721 2022-11-30 Akib Azmain Turja <akib@disroot.org> 1722 1723 Fix compatibility issues with Emacs 28 1724 1725 * eat.el: Require 'subr-x'. 1726 * eat.el (eat-yank, eat-yank-pop): Pass three arguments to 1727 'mapconcat'. 1728 * eat.el (eat--eshell-term-name): New function. 1729 * eat.el (eat-eshell-mode): Use 'eat--eshell-term-name' instead 1730 of using 'eat-term-name' directly. 1731 * eat.el (eat-eshell-mode) [(< emacs-major-version 29)]: Use 1732 'eshell-last-async-proc' instead of 'eshell-last-async-procs'. 1733 * eat.el (eat--eshell-adjust-make-process-args) 1734 [(< emacs-major-version 29)]: Don't check and set ':filter' and 1735 ':sentinel' of 'make-process' argument plist. Set process 1736 filter and sentinel from 'eshell-exec-hook'. 1737 * eat.el (eat--eshell-adjust-make-process-args): Call 1738 'eat--eshell-setup-proc-and-term' from 'eshell-exec-hook', not 1739 just after 'make-process'. 1740 1741 2022-11-29 Akib Azmain Turja <akib@disroot.org> 1742 1743 Don't put 'error' as the only then part of 'if' 1744 1745 * eat.el (eat-semi-char-mode, eat-char-mode): Don't put 'error' 1746 as only then part of 'if'. 1747 1748 2022-11-29 Akib Azmain Turja <akib@disroot.org> 1749 1750 Use 'mapc' to make & kill multiple local variables 1751 1752 * eat.el (eat-blink-mode, eat--cursor-blink-mode, eat-mode) 1753 (eat--eshell-local-mode, eat-trace-replay-mode): Use 'mapc' to 1754 make & kill multiple local variables. 1755 1756 2022-11-29 Akib Azmain Turja <akib@disroot.org> 1757 1758 Put declare-function and defvar outside functions 1759 1760 * eat.el (eat--flip-slow-blink-state) 1761 (eat--flip-fast-blink-state, eat-blink-mode) 1762 (eat--eshell-output-filter, eat--eshell-cleanup) 1763 (eat--eshell-process-output-queue, eat--eshell-sentinel) 1764 (eat-eshell-mode, eat--eshell-visual-sentinel) 1765 (eat--eshell-exec-visual, eat-eshell-visual-command-mode) 1766 (eat-project): Move 'declare-function's and 'defvar's outside. 1767 1768 2022-11-29 Akib Azmain Turja <akib@disroot.org> 1769 1770 Use 'vector' directly instead of backquote 1771 1772 * eat.el (eat-term-make-keymap): Use 'vector' directly instead 1773 of backquote. 1774 1775 2022-11-29 Akib Azmain Turja <akib@disroot.org> 1776 1777 * eat.el (eat-term-make-keymap): Use 'cl-flet' 1778 1779 2022-11-29 Akib Azmain Turja <akib@disroot.org> 1780 1781 Use more readable '?\C-\s' instead of '?\C-\ ' 1782 1783 * eat.el (eat-term-input-event, eat-term-make-keymap): Use more 1784 readable '?\C-\s' instead of '?\C-\ '. 1785 1786 2022-11-29 Akib Azmain Turja <akib@disroot.org> 1787 1788 * eat.el (eat-mode): Fix char mode 'help-echo' 1789 1790 * eat.el (eat--bell): Use 'ding' instead of 'beep' 1791 1792 * eat.el (eat--trace-exec): Use "-*- mode: MD -*-" 1793 1794 2022-11-29 Akib Azmain Turja <akib@disroot.org> 1795 1796 Use 'setf' + 'plist-get' instead of 'plist-put' 1797 1798 * eat.el (eat--eshell-adjust-make-process-args): Use (setf (plist-get 1799 ...) ...) instead of 'plist-put' without taking the result, which is 1800 not guaranteed to always work. 1801 1802 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1803 1804 Prefer 'and-let*' and 'when-let*' over 'when-let' 1805 1806 * eat.el (eat--t-set-sgr-params): Use 'and-let*' instead of 'when-let' 1807 for side-effect free 'when-let'. 1808 * eat.el (eat--flip-cursor-blink-state, eat--synchronize-scroll) 1809 (eat-exec, eat--eshell-setup-proc-and-term) 1810 (eat--eshell-synchronize-scroll, eat--eshell-visual-sentinel) 1811 (eat--trace-replay-eval-next): Use 'when-let*' instead of 'when-let' 1812 for 'when-let's with side-effect. 1813 1814 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1815 1816 Prefer 'pcase-exhaustive' over 'pcase' 1817 1818 * eat.el (eat--t-erase-in-line, eat--t-erase-in-disp) 1819 (eat--t-set-mouse-mode, eat--t-send-device-attrs) 1820 (eat--t-handle-output, eat-term-input-event) 1821 (eat--manipulate-kill-ring, eat--trace-replay-eval): 1822 Prefer 'pcase-exhaustive' over 'pcase'. 1823 1824 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1825 1826 * eat.el (eat--t-change-charset): Assert argument 1827 1828 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1829 1830 Combine multiple setq/setf/setq-local into one 1831 1832 * eat.el (eat--t-reset, eat--t-goto, eat--t-write) 1833 (eat--t-save-cur, eat--t-enable-alt-disp) 1834 (eat--t-change-scroll-region, eat--t-set-sgr-params) 1835 (eat--t-manipulate-selection, eat--t-handle-output) 1836 (eat--t-resize, eat--flip-slow-blink-state) 1837 (eat--flip-fast-blink-state, eat-blink-mode) 1838 (eat--cursor-blink-mode, eat--set-cursor, eat-self-input) 1839 (eat-mode, eat-exec, eat--eshell-setup-proc-and-term) 1840 (eat--eshell-cleanup, eat--eshell-local-mode) 1841 (eat--eshell-exec-visual, eat--trace-exec) 1842 (eat--eshell-trace-adjust-make-process-args) 1843 (eat--trace-replay-eval, eat-trace-replay, eat-trace--cleanup): 1844 Combine multiple setq/setf/setq-local into one wherever 1845 possible. 1846 1847 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1848 1849 Avoid copying STR to the extent possible 1850 1851 * eat.el (eat--t-write): Take two more optional arguments BEG 1852 and END to avoid copying STR multiple times unneccessarily. 1853 1854 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1855 1856 Support multi-column characters properly 1857 1858 * eat.el (eat--t-write): Use 'char-width' instead of the 1859 unpredictable 'string-width' to support multi-column characters 1860 properly. 1861 1862 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1863 1864 Use hash table to convert from charset 1865 1866 * eat.el (eat--t-dec-line-drawing-chars): New constant 1867 containing the hash table. 1868 * eat.el (eat--t-write): Use hash-table instead alist while 1869 converting from DEC Line Drawing charset. 1870 1871 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1872 1873 Use as less let-bindings as possible 1874 1875 * eat.el (eat--t-goto-bol, eat--t-goto-eol) 1876 (eat--t-repeated-insert, eat--t-cur-right, eat--t-cur-left) 1877 (eat--t-cur-horizontal-abs, eat--t-beg-of-next-line) 1878 (eat--t-beg-of-prev-line, eat--t-cur-down, eat--t-cur-up) 1879 (eat--t-cur-vertical-abs, eat--t-scroll-up, eat--t-scroll-down) 1880 (eat--t-write, eat--t-horizontal-tab) 1881 (eat--t-horizontal-backtab, eat--t-reverse-index) 1882 (eat--t-erase-in-line, eat--t-erase-in-disp) 1883 (eat--t-insert-char, eat--t-delete-char, eat--t-erase-char) 1884 (eat--t-insert-line, eat--t-delete-line) 1885 (eat--t-repeat-last-char, eat--t-change-scroll-region) 1886 (eat--t-send-device-attrs): Minimize let-binding count. 1887 * eat.el (eat--t-break-long-line, eat--t-write) 1888 (eat-trace-replay): Use replace 'propertize' call with already 1889 propertized string. 1890 1891 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1892 1893 Replace 'let*' with 'let' wherever possible 1894 1895 * eat.el (eat--t-eol, eat--t-reset, eat--t-erase-in-disp) 1896 (eat--t-disable-alt-disp, eat--t-resize, eat-term-redisplay) 1897 (eat-term-input-event, eat--adjust-process-window-size): Use 1898 'let' instead of 'let*' wherever possible. 1899 * eat.el (eat--eshell-exec-visual): Use (VAR nil) form instead 1900 of VAR form in 'let*' variable list. 1901 1902 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1903 1904 * README.org (NonGNU ELPA Devel): New section 1905 1906 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1907 1908 Experimentally support for multi-column characters 1909 1910 * eat.el (eat--t-move-before-to-safe, eat--t-make-pos-safe) 1911 (eat--t-fix-partial-multi-col-char): New function. 1912 * eat.el (eat--t-write): Handle multi-column characters. 1913 * eat.el (eat--t-insert-char, eat--t-delete-char) 1914 (eat--t-erase-char): Handle multi-column characters on the 1915 display while manipulating text. 1916 1917 2022-11-28 Akib Azmain Turja <akib@disroot.org> 1918 1919 * .elpaignore: New file. 1920 1921 2022-11-25 Akib Azmain Turja <akib@disroot.org> 1922 1923 Use third argument of posn-col-row on Emacs >= 29 1924 1925 * eat.el (eat-term-input-event): Use USE-WINDOW argument of 1926 'posn-col-row' to support text scaling properly, but only on 1927 Emacs >= 29 since on Emacs 28 'posn-col-row' takes only one 1928 argument. 1929 1930 2022-11-24 Akib Azmain Turja <akib@disroot.org> 1931 1932 * Makefile (all): Remove "check" and "changelog." 1933 1934 2022-11-24 Akib Azmain Turja <akib@disroot.org> 1935 1936 Add documentation file generation code to Makefile 1937 1938 * Makefile (info, dvi, html, pdf, eat.info, eat.dvi, eat.html) 1939 (eat.pdf): New targets. 1940 * Makefile (all): New dependency "info." 1941 * Makefile (.PHONY): Add "info", "dvi", "html" and "pdf." 1942 1943 2022-11-24 Akib Azmain Turja <akib@disroot.org> 1944 1945 Add proper dependencies to targets in Makefile 1946 1947 * Makefile (TIC): New variable. 1948 * Makefile (eat.elc): Depend on eat.el. 1949 * Makefile (e/eat-mono, e/eat-color, eat-256color) 1950 (e/eat-truecolor): Depend on eat.ti. 1951 1952 2022-11-24 Akib Azmain Turja <akib@disroot.org> 1953 1954 Implement the terminal 1955 1956 This includes everything written from 2022-08-15 up to now. 1957 * .dir-locals.el: 1958 * CONTRIBUTE: 1959 * COPYING: 1960 * Makefile: 1961 * NEWS: 1962 * README.org: 1963 * eat-tests.el: 1964 * eat.el: 1965 * eat.texi: 1966 * eat.ti: 1967 * fdl.texi: 1968 * gitlog-to-changelog: 1969 * gpl.texi: 1970 * make-changelog: 1971 * texinfo.tex: 1972 New file. 1973 1974 ;; Local Variables: 1975 ;; coding: utf-8 1976 ;; End: 1977 1978 Copyright (C) 2022-2023 Akib Azmain Turja. 1979 1980 This file is not part of GNU Emacs. 1981 1982 GNU Emacs is free software: you can redistribute it and/or modify 1983 it under the terms of the GNU General Public License as published by 1984 the Free Software Foundation, either version 3 of the License, or 1985 (at your option) any later version. 1986 1987 GNU Emacs is distributed in the hope that it will be useful, 1988 but WITHOUT ANY WARRANTY; without even the implied warranty of 1989 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1990 GNU General Public License for more details. 1991 1992 You should have received a copy of the GNU General Public License 1993 along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.