Filenames like ".emacs"


  1. Posts : 50
    Win 7
       #1

    Filenames like ".emacs"


    This isn't really a "performance & maintenance" question but there isn't really a category on the forum for it. I am hoping someone here will be smart enough to know the answer.

    A GNU (open-source) program called "Emacs" requires a file in the root of the C: drive named ".emacs". This worked fine on XP, but Win 7 is throwing a bunch of obstacles in my way to creating this file. Can someone explain how to create and/or rename a file to something like this?

    Thanks,
    Mike
      My Computer


  2. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #2

    Hi Mike and welcome to Windows 7 Forums

    I've not heard of this program, but, nonetheless, I've downloaded, extracted and run it, and it has created a folder named .emacs.d in the C:\Users\Dwarf\AppData\Roaming\ directory. Inside this folder is another folder, auto-save-list.

    Note that Dwarf is my username and that yours, of course, will be different.
      My Computer


  3. Posts : 50
    Win 7
    Thread Starter
       #3

    Dwarf said:
    Hi Mike and welcome to Windows 7 Forums

    I've not heard of this program, but, nonetheless, I've downloaded, extracted and run it, and it has created a folder named .emacs.d in the C:\Users\Dwarf\AppData\Roaming\ directory. Inside this folder is another folder, auto-save-list.

    Note that Dwarf is my username and that yours, of course, will be different.
    Hey, thanks a lot for the experiment. The auto-save-list and .emacs.d folders are different from the ".emacs" file, so that still leaves me with the question of how to create a file with a name like that (or if I'm even allowed to). (Your experiment may show that the .emacs file should go in c:\users\<name>\AppData rather than c:\.) Emacs will run fine without a .emacs, but you will lose the ability to customize the startup of the program, so your experiment may not have indicated anything about .emacs.

    Thanks,
    Mike
      My Computer


  4. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #4

    Hi Mike,

    How do you create this .emacs file? If you give me an example, I'll see what I can do.
      My Computer


  5. Posts : 50
    Win 7
    Thread Starter
       #5

    Hi Dwarf,
    Some Emacs experts told me that you create it by running emacs, then typing

    Ctrl-x Ctrl-f
    at the prompt type
    ~/.emacs<Enter>
    then type anything, then save by
    Ctrl-x Ctrl-s
    and it should be created, probably in the AppData directory. I will try this myself tonight but I am away from my Win 7 laptop right now.

    After you create it, because you probably won't create valid lisp syntax Emacs will give an error when you next start it, but that won't harm anything and is not a sign anything went wrong with the simple existence of this file.

    They said it should work as long as you create it from emacs and save it using the filename as above. My problem was trying to create it from Notepad, I think. Also apparently C:\ is not the right location, even though on Win XP I used that location.

    Thanks for your help,
    Mike
      My Computer


  6. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #6

    Hi Mike,

    Just tried what you said, and the file was created in the highlighted location (see image below).
    Filenames like &quot;.emacs&quot;-capture.png
      My Computer


  7. Posts : 50
    Win 7
    Thread Starter
       #7

    Awesome! I'm sure it will work for me when I next get a chance.

    Now, perhaps you can explore the wonders of Emacs the editor. Maybe you'll like it.
      My Computer


  8. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #8

    It does work. I firstly deleted the .emacs and the .emacs~ files to ensure that I was starting with a clean slate.
    Filenames like &quot;.emacs&quot;-capture.png
    I then selected Customize Startup.
    Filenames like &quot;.emacs&quot;-capture1.png
    Next, I toggled and saved the option Inhibit Startup Screen.
    Filenames like &quot;.emacs&quot;-capture2.png
    I then closed the application and restarted it.
    Filenames like &quot;.emacs&quot;-capture3.png
      My Computer


  9. Posts : 50
    Win 7
    Thread Starter
       #9

    Thanks! You are a helpful guy! I still haven't been able to get to my Win 7 laptop to try it! I feel like I'm the cobbler and the elves are making shoes in the middle of the night. Very convenient. :)
      My Computer


  10. Posts : 1
    Windows 7 Ultimate x64
       #10

    Hello! It seems like you guys have solved the issue here, but I wanted to point out that GNU Emacs for Windows can accept the '.emacs' file as '_emacs'. As long as you have that file in your home directory:

    Filenames like &quot;.emacs&quot;-emacs_home.png

    and you have your HOME variable set in the Environment Variables:

    Filenames like &quot;.emacs&quot;-environmentvariables.png

    At this point it will load it up and you won't have to worry about having a file starting with a '.'

    I hope this helps. :)
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:29.
Find Us