I want to open a file foo in org-mode on the terminal. However, Issuing emacs -nw -f org-mode foo opens foo in Fundamental mode. What's wrong with my command?

  • 4
    I bet your scratch buffer is in org-mode, though. :) Jul 11, 2019 at 12:49

1 Answer 1


I was able to do it by switching the order around

emacs -nw foo -f org-mode

After reading the help, if the function is a command, it is just like pressing a key command to do it. There's also the --file option and --find-file option, so I figured it is executing find-file when you put the filename on the command line, and would call these in order. So potentially it could be:

emacs -nw --find-file foo --funcall org-mode
  • The second command doesn't work for me but the first does. Thanks! Jul 11, 2019 at 2:27
  • just fixed the second command
    – shoshin
    Jul 11, 2019 at 2:29

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.