0

I'm making my way through the tutorial and have run into an issue when trying to do the exercise on saving a file:

Saving file /~TUTORIAL...
basic-save-buffer-2: Directory / write-protected
Auto-saving...
Auto-saving ~TUTORIAL: Opening output file: Permission denied, /#~TUTORIAL#

The machine is mine, and so I have access everywhere, I think, and believe that I'm in my user directory to begin with.

Any ideas? Do I have to run the command as root?

4
  • Is there a typo? It looks like you are trying to save the file "~TUTORIAL" at the root of the system ("/") instead of saving the file "TUTORIAL" in your home directory (" ~/ ") – jerome Dec 17 '17 at 17:35
  • Yeah, it looks like I somehow got out of ~/ and into root. I quite emacs and relaunched and the save exercise worked as expected. Thanks! – innumeratus Dec 17 '17 at 17:42
  • @jerome you should write an answer with that suggestion. – user12563 Dec 17 '17 at 20:48
  • 3
    I'm voting to close this question as off-topic because it was based on a typo: /~ instead of ~/. Not really an Emacs question (except possibly for someone unfamiliar with / and ~ in UNIX or GNU/Linux). – Drew Dec 17 '17 at 22:08
1

It looks like you are trying to save the file ~TUTORIAL at the root of the system (/) instead of saving the file TUTORIAL in your home directory (~/).

Typically when you open a new file Emacs will suggest directory based on the active buffer; however that is only a suggestion and you can always delete it, and enter something else. Emacs itself is not working "in" any directory.

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.