I work on a Mac 10.9.5 and use Emacs 24.4 (installed with macports).
This question is related to https://stackoverflow.com/questions/27778836/customizing-emacs-open-new-files-tabs-and-properly-storing-back-up-files?noredirect=1#comment43984459_27778836 .There I was advised to split the "whole-question" into different questions, and also post it here, so here is the 1st of 3 emacs related questions, , hopefully in a better format and in a more adequate stack exchange.
open an empty, brand new file in a new Emacs window, from terminal.
at the moment, when I type in my terminal (or XQuartz), for example:
>emacs new.py &
The file ~/new.py does not exist.
which, effectively, does not exist, but I would like Emacs to open an empty file called new.py. Of course, I can always get around by typing:
>emacs &
then start coding and save it as new.py. I simply would like to be able to do that from terminal. Also, once emacs is open, if I type >emacs&
on terminal, I "land" in the file already open and I have to do : Cmd-N + C-x C-f
to open a brand new file. So my first question is: Is there something to be added to my .emacs file so I open a brand new file from terminal?
emacs &
command the same way? Launch command in background?emacs newfile.txt -Q
(the-Q
to prevent loading the init file to confirm that it's vanilla Emacs), Emacs pops open with a buffer fornewfile.txt
.&
if you want. Typingemacs new.py
without the&
does return the messagenew.py does not exist
as well. For example, the fink emacs installation seems to do it by default.emacs newfile.txt -Q
returnsopen: invalid option -- Q
emacs
defined as an alias or a shell script? Seems like you are not invoking Emacs directly.