need help writing an emacs function

Posted by murtaza52 on Stack Overflow See other posts from Stack Overflow or by murtaza52
Published on 2012-07-09T06:34:19Z Indexed on 2012/07/09 15:16 UTC
Read the original article Hit count: 160

Filed under:

I want to write an emacs function that does the following -

1) Start a new shell named "abc". 2) Change the dir "/opt/abc" 3) In the dir run a shell command "python abc.py"

I have written the following fucntion -

(defun abc-server ()
 (interactive)
 (shell-command "cd /opt/abc/")
 (shell-command "python abc.py"))

The problem with the above -

1) It doesnt start a new shell 2) It doesnt change the dir. 3) When the cmd executes, it opens a browser window, which completely blocks any usage of emacs.

© Stack Overflow or respective owner

Related posts about emacs