How to start “emacsformacosx” in terminal

前端 未结 5 1922
北海茫月
北海茫月 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:24

    In my ~/.profile i have the following:

    function emacs
    {
        if [ -e "$@" ]
        then
            command open -a emacs "${@}"
        else
            touch "$@"
            command open -a emacs "${@}"
        fi
    }
    

    (The reason for having a function is to make it also work when the specified file does not yet exist when emacs is started)

提交回复
热议问题