1

I need function that opens terminal emulator buffer if none exists, in that case it switches to that buffer.

Does anyone know how to do this?

2 Answers 2

7

M-x term does exactly that. Use M-u M-x term if you want to force a new terminal buffer.

From elisp:

(term "/bin/bash")
Sign up to request clarification or add additional context in comments.

Comments

0

M-x ansi-term is more... Well, Ansi. Allow for nifty pretty prompts (BTW take care of not making tramp trip over your fancy color prompt, this bit me just today when a C-x C-f /sudo::root@localhost:/someRootOnlyFile got stuck)

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.