How can I send commands to other buffers which are EXWM, say, URxvt?

This works for generic emacs buffers:

(with-current-buffer "local_machine.org" (insert "Hello"))

I want to send to urxvt keystrokes (ls -la), be able to execute commands as if I was in that buffer such as balance-windows

  • I have partially solved my task with an other approach, though it is not related to EXWM (shell) (with-current-buffer "*shell*" (insert "echo 'rest'") (comint-send-input)) Commented Feb 25 at 18:04
  • or (defun s (arg1 &optional shellbuffer) (or shellbuffer (setq shellbuffer "*terminal*")) (with-current-buffer shellbuffer (insert arg1) (term-send-input))) for term Commented Feb 25 at 19:38


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.