Replies: 3 comments
-
Was going to create an issue for the same, with-editor doesn't export the variables in eat-mode, hope it can be supported! |
Beta Was this translation helpful? Give feedback.
-
I’ve got a hack that works for me: (cl-defun with-editor-export-editor-eat (process &optional (envvar "EDITOR"))
"Like `with-editor-export-editor', but for `eat-exec-hook'."
(cond
((derived-mode-p 'eat-mode)
(if with-editor-emacsclient-executable
(let ((with-editor--envvar envvar)
(process-environment process-environment))
(with-editor--setup)
(while (accept-process-output process 0.1))
(when-let ((v (getenv envvar)))
(eat-term-send-string eat-terminal (format " export %s=%S" envvar v))
(eat-self-input 1 'return))
(when-let ((v (getenv "EMACS_SERVER_FILE")))
(eat-term-send-string eat-terminnal (format " export EMACS_SERVER_FILE=%S" v))
(eat-self-input 1 'return))
(eat-term-send-string eat-terminal "clear")
(eat-self-input 1 'return))
(error "Cannot use sleeping editor in this buffer")))
(t (error "Cannot export environment variables in this buffer")))
(message "Successfully exported %s" envvar))
(add-hook 'eat-exec-hook #'with-editor-export-editor-eat) This is based on support for |
Beta Was this translation helpful? Give feedback.
-
FYI, I plan to start using eat and teach with-editor about it. In that order. (Gotta do some other things first though.) |
Beta Was this translation helpful? Give feedback.
-
eat (Emulate a Terminal) https://codeberg.org/akib/emacs-eat is a recently popular terminal emulator. It's comparable to vterm but doesn't require a native library nor a compilation step. It would be excellent if
with-editor
supported exporting to eat.Beta Was this translation helpful? Give feedback.
All reactions