1

When starting emacs from the shell command line, if you pass the "dot", it opened emacs with a 'dired' of the current directory.

But can I do this?

emacs '*scratch*'

so emacs opens with the focus on the scratch buffer.

# my .bashrc
function emacs() {
  emacsclient -a "" -s workspace -nw "$@"
}
  • 1
    Your edit shows that you are conflating two different things. Your question asks about running emacs, but your bash function shows that you are running emacsclient. As you had already procured an answer to the original stated question, I suggest that you ask a new question if you want an answer about emacsclient. – phils Nov 25 '19 at 2:21
  • okay thanks, !! – american-ninja-warrior Nov 25 '19 at 2:24
2

There is no need to provide the "." in your command. However, by default, there is a startup message shown.

emacs -nw --eval '(setq inhibit-startup-message t)'

or

emacs -nw --no-splash

should do what you want.

  • 1
    And, although I didn't mention it, setting the variable in your .emacs or .emacs.d/init.el file will make the behaviour persistent. – Realraptor Nov 25 '19 at 2:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.