Skip to content

evil-ghostel: bridged terminals (e.g. rexel) treated as not live #845

Done

Description

@merrickluo

In bridged terminals created via ghostel-make-terminal (such as rexel block buffers), ghostel--process is nil and I/O goes through ghostel--pty-out-function instead.

However, evil-ghostel--terminal-live-p in extensions/evil-ghostel/evil-ghostel.el only checks ghostel--process:

(defun evil-ghostel--terminal-live-p ()
  "Return non-nil while a live semi-char terminal can receive keys.
Gates raw passthrough keys (Ctrl, Delete) a TUI still wants."
  (and evil-ghostel-mode
       ghostel--term
       ghostel--process (process-live-p ghostel--process)
       (eq ghostel--input-mode 'semi-char)))

As a result, evil-ghostel--terminal-live-p (and therefore evil-ghostel--prompt-active-p) always returns nil in rexel buffers, so insert-state Ctrl/Delete passthrough and normal/visual-state PTY editing commands stop working.

Suggested fix

Match ghostel.el's bridged-terminal check by also accepting ghostel--pty-out-function:

(defun evil-ghostel--terminal-live-p ()
  (and evil-ghostel-mode
       ghostel--term
       (or ghostel--pty-out-function
           (and ghostel--process (process-live-p ghostel--process)))
       (eq ghostel--input-mode 'semi-char)))

(Note: evil-ghostel--sync-render also guards on (when ghostel--process ...) — not sure if bridged terminals need anything special there or if skipping accept-process-output is fine.)

Environment

  • ghostel: 0.68.0 (5e84f96)
  • rexel: db2d34c
  • Emacs: 32.0.50 (Doom Emacs, evil-ghostel-mode enabled)

Activity

  1. dakra commented on Nov 30, 2026

    @dakra
    Owner

    Thanks. Should be fixed on main. But please test. I tested locally but I'm not a evil user so my testing was limited.

  2. added a commit that references this issue on Dec 1, 2026
    016a0ef
  3. merrickluo commented on Dec 3, 2026

    @merrickluo
    Author

    can confirm it's working with remote rex session now thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions