Emacs is disabled via make-directory: The file exists: c: / Users / USER / My Documents / .emacs.d /

I am trying to install / run emacs on a 64-bit Win7 machine after using it for many years on a 32-bit WinXP machine and run into a problem. I did not find any help in the documentation or on the Internet.

Symptom:

  • when runemacs.exe is launched for the first time, the file * C: \ Users \ USER \ My Documents.emacs.d * is created as expected (both for my administrator and my user account) and works quickly
  • from the second runemacs.exe run, it breaks at the startup stage, displaying the buffer from scratch, ringing a warning bell and displaying the error in the bottom line: The file exists: c: / Users / USER / My documents /.emacs.d/ Buffer messages
  • : make-directory: File exists: c: / Users / USER / My Documents /.emacs.d/
  • if runemacs is called with the file being opened, i.e. since the file type was associated with it, and the file was open for editing, the file is not open and ready for editing, but the file can be opened through the menu File-> Open File ...
  • but my configurations in file C: \ Users \ USER \ My Documents.emacs are not loaded

My goal:

I want to restore a way to use emacs on an old 32-bit WinXP system: click on the emacs-related file, open it and ready to edit, upload my configurations to .emacs, downloaded automatically, i.e. work with emacs no problem.

Checks for failed and failed attempts to fix this:

  • I tried the following recently updated versions of emacs
    • emacs-23.4-bin-i386.zip
    • emacs-23.2-bin-i386.zip (the one I used in WinXP)
  • I had an emacs directory containing the directory structure (bin, etc, ...) located in:
    • C: \ Program Files (x86) \ emacs-23.4 \ (my preferred location)
    • C: \ Emacs \ Emacs-23.4 \
    • in the download directory where I originally extracted it
  • The My HOME variable points to:
    • C: \ Users \ USER \ My Documents (default)
    • C: \ Users \ USER \ My Documents \ (Verified)
  • My PATH variable contains:
    • C: \ Program Files (x86) \ emacs-23.4 \ bin (default)
    • or the corresponding other locations I tried
  • Ownership and permissions of my C: \ Users \ USER \ My Documents.emacs.d look OK:
    • owner - USER (admin or standard_user)
    • Permissions to provide full access
  • Emacs was originally installed in * C: \ Program Files (x86) \ emacs-23.4 * using an administrator account, I also tried using the user account setting instead (to check if any unobvious option / permission was set if the account administrator account is used to configure)
  • For the runemacs.exe executable, I manually set compatibility options
    • Windows XP (Service Pack 3)
    • default setting after unpacking: compatibility mode enabled
  • I deleted the private configuration file C: \ Users \ USER \ My Documents.emacs (inherited from my XP installation) to check if this causes debugging

All that did not change the slightly described symptom, that is, either I squinted at testing the above and missed a specific setting that should work, or I was looking for the wrong direction ...

It’s still not clear to me if this has anything to do:

  • W7 64-bit and XP 32-bit
  • environmental pollution
  • Emacs configuration (.emacs, .emacs.d).
  • general stupidity (from me ;-)

... and why he has a problem with him, first of all, that the .emacs.d directory already exists ... This should be a standard case ...

Any help and wisdom was greatly appreciated.

+6
source share
3 answers

First of all, a good question. Details and a list of what you have already tried are helpful.

Some moments:

  • You have no spaces in key paths (Emacs and% HOME%). As a rule, everything works well. But when something breaks, it is often difficult to debug and track the fact that some package author did not take into account spaces properly.

  • Set the HOME environment variable to% USER_PROFILE%. Do this% USER_PROFILE% / home if necessary, but I use the first one.

  • Start by starting emacs without any configuration.

    runemacs -Q 

    When this works, add your settings one at a time.

+4
source

nb This answer is not related to the original question (which relates to Windows), but may be useful for Unix users who are looking for this error message

You will also get this error if emacs does not have the correct permissions in the .emacs.d directory.

Check out

 ls -ld $HOME/.emacs.d 

And make sure that the user you are working with has rwx permissions!

+4
source

I had similar problems when I installed a new version of emacs on a new installation of ubuntu 12.10. I am asking a problem fixed by chmod 777.emacs.d, that is, as indicated in a previous post, emacs does not have permission to access the .emacs.d directory. Hope this help.

0
source

Source: https://habr.com/ru/post/910490/


All Articles