I am using emacs for Windows.

I start a new terminal using serial-term. Once in that buffer, I cannot open a minibuffer or use meta keys to escape this shell. The only way I can navigate out is using the mouse to click on the buffer I would like to switch to. Is there a keyboard command that can escape from serial mode?

  • 1
    You should be able to use C-x commands by just typing them with C-c instead, so C-x o becomes C-c o in char-mode term.
    – user12563
    Feb 12 '18 at 20:32
  • That works for C-x commands. Is there a way to run M-x commands without navigating to another buffer? Feb 12 '18 at 20:36
  • 1
    Look at term-line-mode (C-c C-j). Compare with term-char-mode (C-c C-k).
    – jpkotta
    Feb 12 '18 at 21:00
  • Alternatively, do things like (define-key term-raw-map (kbd "M-x") #'execute-extended-command)
    – jpkotta
    Feb 12 '18 at 21:02
  • Thanks for both those answers. Here is the my fix in my .emacs: (eval-after-load 'term '(define-key term-raw-map (kbd "M-x") #'execute-extended-command) ) Feb 12 '18 at 23:09

Here is the my fix in my .emacs:

(eval-after-load 'term
  '(define-key term-raw-map (kbd "M-x") #'execute-extended-command))

This reassigns the meta key after entering terminal mode.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.