M-x dired = defaults me to C:\emacs\bin/

C-x d = defaults me to C:\home\files\

My init file is in C:\home\ and seems to work.

I have read the relevant manual sections several times, and I can't figure out what is going on here.

I want M-x dired to default me to C:\home\files\

I don't want anything to be going on in emacs\bin

How do I do this?

  • Provide a step-by-step recipe, starting from emacs -Q (no init file). C-x d is bound (by default) to command dired, so there should be no difference between M-x dired and C-x d, if invoked in the same directory. – Drew Sep 25 '16 at 14:25
  • Check to what command is C-x d bound (C-h k C-x d). As Drew pointed, it should be dired. – JeanPierre Sep 25 '16 at 16:07
  • Ok, you guys are right that those two commands are taking me to the same place now. Both are taking me to C:\emacs\bin/. I want them both to take me to C:\home\files, and I want that to be that way when I start emacs. What am I doing wrong? – Carl Roberts Sep 25 '16 at 18:34

Create a Windows shortcut, then set the “Start in” field.

To create a file shortcut:

  • Hold Alt then drag that runemacs.exe icon to desktop.
  • In the newly created alias icon, right click to open file properties. Then, in the “Start in” field, enter %home%.
  • In the “Target” field, you can add your own init files. For example, here's mine: %home%\apps\emacs-24.1\bin\runemacs.exe -q --load=%home%\ErgoEmacs_dev\init.el --load=%home%.emacs. Here, i suppress loading init files by -q, but load ErgoEmacs init files, then load my personal init files.

Tested on Windows Vista. Solution probably similar in Windows 10.

  • 1
    Unfortunately, the question does not at all speak to what the real question (apparently) was, which was about the directory to start Emacs in. This means that the question and answer are much less likely to be found, and so help, someone else. @user13432: Please edit your question to be what you really meant - the question that was correctly answered. At least change the title and integrate what you say in your last comment (OK, you guys...). – Drew Sep 25 '16 at 19:51
  • @Drew - done... – Carl Roberts Sep 27 '16 at 10:09

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.