How to start “emacsformacosx” in terminal

前端 未结 5 1888
北海茫月
北海茫月 2020-12-29 04:02

I am using MAC OX 10.6 , and install the emacs from here http://emacsformacosx.com/

I want to know how to start it in terminal, so my ecb can open current directory<

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-29 04:29

    The answer from @Toymakerii is a good one, but you might also consider adding:

    export PATH=/Applications/Emacs.app/Contents/MacOS/bin:$PATH
    

    This way, you can use emacsclient to open files in an already-running Emacs instance:

    emacsclient -t SOMEFILE   # Open SOMEFILE in a terminal frame
    emacsclient -c SOMEFILE   # Open SOMEFILE in a new graphical frame
    

    Depending on your Emacs version, you might need to put the following in your ~/.emacs.d/init.el (or ~/.emacs, if you're old-fashioned):

    (require 'server)
    (unless (server-running-p)
      (server-start))
    

提交回复
热议问题