Reputation: 7590
How can I change the initial directory on emacs? I started using it today and there are a lot of things to learn!
Right now I'm using M-X cd and then I change the directory that I use for C-x C-f, but in a daily work I'm going to heavily use one particular directory so I need to make the change permanent.
Also if you have some tips for a starter it will be nice.
Upvotes: 2
Views: 5389
Reputation: 524
Default directory is determined by:
(setq default-directory "~/")
in this case, set to the users home dir, but it could be somewhere else.
If this variable is not set, the initial load point for find-file will be the directory where the emacs executable lives.
EDIT: on windows, a global HOME environment variable can be defined (HOME=c:\path\to\user\home\directory), ensuring that Emacs translates ~ to the correct value. This makes the Emacs settings usable across platforms.
Upvotes: 3
Reputation: 21686
This is a solution specific to Windows.
emacs.exe"
called GNU Emacs%USERPROFILE%\Documents
This solution works for multi-user workstations whether they are on or off Active Directory.
This shortcut will start Emacs in the current user's Documents folder.
Upvotes: 2
Reputation: 37747
Start up emacs only after changing to that "initial directory", effectively setting the current directory for emacs.
Upvotes: 1
Reputation: 40299
Print out the Gnu Emacs Reference card and keep it by the desk.
Upvotes: 0
Reputation: 879083
To set a default directory, simply put
(cd "/default/path/")
in your ~/.emacs file.
Emacs has a steep learning curve, but with constant use the most common commands will soon become second nature. As you discover more, emacs may become your favorite text editor, file manager, and email reader :)
To learn emacs, I'd start by pressing C-h t
to start plowing through the excellent tutorial. Have a pad of paper beside you and write down the commands as you learn them. You'll use the crib sheet at first, but after a while, as I mentioned before, your fingers will learn the key combinations without your brain conciously intervening.
Good luck and have fun!
Upvotes: 9