Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I access a lot of files from a certain directory which is not ~ but say: D:\Mijn documenten\My Dropbox.

What is the quickest way to 'find' a file in that directory within a new Emacs session? Using bookmarks?

share|improve this question
up vote 0 down vote accepted

I typically switch to another buffer editing a file in that common directory so that when I C-x C-f to find a new file, the path is already showing the directory I want.

This works for new sessions because I have desktop-save-mode enabled to save my session when I exit emacs (and the only time I exit emacs is if I'm updating emacs or have to reboot my machine).

share|improve this answer
Ain't that many keys, especially if you didn't just used one ? Switching is C-x b <find one> RET, right ? – Nikana Reklawyks Oct 29 '12 at 15:07

ido is really nice for this exact reason. These are the sites where I first read about it:

share|improve this answer

You can open any directory you choose in dired. (C-xd and directory name.) You can search for the filename in the dired buffer.

If you simply want to change the current directory to be /something/else instead of ~, you can do M-x cd and change it to the directory you want. The next time you do C-x C-f to open a file, you will be in the different directory.

share|improve this answer

Also take a look at Speedbar.

Speedbar is another frame which displays information about the current buffer, allowing you to better navigate your sources.

share|improve this answer

I'd bind “going to that dir” to a single key, and C-x C-f from there.

(defun my-favorite-directory ()
    "Open where I often go."
    (find-file "/path/to/there"))
(global-set-key [f5] 'my-favorite-directory) ; Let it be a global bookmark.

Or, as you suggest, I'm sure you could use bookmarks.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .