Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs "M-x term" Prompt

When I start a terminal in Emacs 23.3.1 it prompts me with "Run program: /usr/local/bin/bash". How can I get rid of this prompt? I would like to bind F4 to starting a terminal without it prompting me for the same shell every time.

Something like:

(global-set-key [f4] 'term)

This doesn't work though. It will start a terminal, but it still prompts me to enter the shell again.

like image 333
jmq Avatar asked Apr 12 '12 17:04

jmq


2 Answers

(global-set-key [f4] '(lambda () (interactive) (term (getenv "SHELL"))))
like image 77
Eli Barzilay Avatar answered Oct 09 '22 06:10

Eli Barzilay


If you like using terms in emacs, you could look at multi term.

like image 32
Daimrod Avatar answered Oct 09 '22 06:10

Daimrod