A newbie question and probably very bingable (had to use that word once :-)), but as I gather thats both ok for SO : How can you get files to open automatically when st
C-h b
This opens the help showing the correspondence between key-bindings and elisp functions. Look for
C-x C-f
in it (you can do it by typing C-s C - x space C - f
), you find find-file
. Now, do
C-h f find-file
and it tells you, among other things, the syntax :
(find-file FILENAME &optional WILDCARDS)
So just try
(find-file "/path/to/your/file")
in your .emacs
If you're calling it from the terminal , can't you just go
emacs FileName
Are you thinking of having it re-open files you've looked at before? The desktop package remembers files and re-opens them when you restart. Depending on your emacs version, you enable by simply adding this to your .emacs (for 22.1+ versions):
(desktop-save-mode 1)
And after that, it's pretty much automatic. Whatever files you had open before will be re-opened (provided you start from the same directory, b/c that's where the desktop configuration file is saved) - unless you add a change that forces a single desktop for all sessions.
There are bunches of variants of that functionality, which are listed in the session management page.
You could desktop-save which basically restores the last session you were working with. When you restart emacs, it looks for a saved session in your folder and loads your files. See link text