Function: ghostel-emacs-mode

ghostel-emacs-mode is an interactive and natively compiled function defined in ghostel.el.

Signature

(ghostel-emacs-mode)

Documentation

Toggle Emacs mode — read-only buffer with the terminal still running.

The terminal keeps running and scrollback keeps growing. The buffer is read-only, so standard Emacs commands like isearch, occur, C-SPC / M-w, and regular navigation all work unmodified over the entire materialised scrollback. While point sits on the live terminal cursor the window follows new output. Moving point off the cursor stops scrolling until point returns to the cursor. When already in Emacs mode this exits back to the previous mode.

Key Bindings

ghostel-mode-map C-c C-e

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel-emacs-mode ()
  "Toggle Emacs mode — read-only buffer with the terminal still running.
The terminal keeps running and scrollback keeps growing.
The buffer is read-only, so standard Emacs commands like `isearch', `occur',
`C-SPC' / `M-w', and regular navigation all work unmodified over the entire
materialised scrollback.  While point sits on the live terminal cursor the
window follows new output.
Moving point off the cursor stops scrolling until point returns to the cursor.
When already in Emacs mode this exits back to the previous mode."
  (interactive)
  (ghostel--ensure-ghostel-buffer)
  (if (eq ghostel--input-mode 'emacs)
      (ghostel-readonly-exit)
    (ghostel--enter-readonly
     'emacs nil ":Emacs"
     (format "Emacs mode: terminal live, %s to exit"
             (substitute-command-keys "\\[ghostel-semi-char-mode]")))))