Emacs in Windows

WindowsEmacs

Windows Problem Overview


How do you run Emacs in Windows?

What is the best flavor of Emacs to use in Windows, and where can I download it? And where is the .emacs file located?

Windows Solutions


Solution 1 - Windows

I use EmacsW32, it works great. EDIT: I now use regular GNU Emacs 24, see below.

See its EmacsWiki page for details.

To me, the biggest advantage is that:

  • it has a version of emacsclient that starts the Emacs server if no server is running (open all your files in the same Emacs window)
  • it includes several useful packages such as Nxml
  • it has a Windows installer or you can build it from sources

And concerning XEmacs, according to this post by Steve Yegge:

> To summarize, I've argued that XEmacs has a much lower market share, poorer performance, more bugs, much lower stability, and at this point probably fewer features than GNU Emacs. When you add it all up, it's the weaker candidate by a large margin.

EDIT: I now use regular GNU Emacs 24. It also contains Nxml, can be installed or built from sources, and with this wrapper, the Emacs server starts if no server is running. Cheers!

Solution 2 - Windows

Note that GNU Emacs for Windows comes with two executables to start Emacs: "emacs.exe" and "runemacs.exe". The former keeps a DOS-Prompt window in the background, while the latter does not, so when if you choose that distribution and want to create a shortcut, be sure to launch "runemacs.exe".

Carl

Solution 3 - Windows

Easiest way to find where the user init file is:

C-h v user-init-file

Easiest way to open it is (in the scratch buffer):

(find-file user-init-file)

and hit C-j to eval

Solution 4 - Windows

Well, I personally really like what I have been using since I started with Emacs, which is GNU Emacs. It looks like it is built for windows too. That link also answers your .emacs file question. Here is a place you can download it. You should probably get version 22.2 (the latest).

If this is your first time, I hope you enjoy it! I know I absolutely love emacs!

Solution 5 - Windows

I run it under cygwin. That also gives me a Unix-ish environment for shelling out commands with meta-!

Solution 6 - Windows

I use a vanilla version of emacs. In my experience, this is very stable, simple, does everything I need, and doesn't add a bunch of bloat that I don't need. The .emacs file can be placed in C:\Users\YourName if the HOME environment variable is set. This is a great way to handle it because it works on a user basis and mimics emacs behavior on Linux. You can download the zip from any gnu software repository mirror in the emacs/windows folder. You want the file that is named emacs-xx.x-bin-i686-pc-mingw32.zip.

There are some great instructions for configuring emacs for windows here. Basically, "installation" boils down to:

  1. Download emacs from a gnu mirror at emacs/windows/emacs-version-bin-i686-pc-mingw32.zip, and extract the zip to an appropriate folder. Preferably C:\emacs to avoid spaces in the filename.
  2. Set the HOME environment variable to C:\Users\username (or whatever you want). Make it a user-only variable (if it is username-specific). This is where your .emacs file goes.
  3. If you want a start menu or desktop shortcut, create a shortcut to bin/runemacs.exe.
  4. Add c:\emacs\emacs-xx.x\bin\ to your path (user or system), so that you can run it from the command line.

Solution 7 - Windows

Also, you can consider emacs-w64 for 64bit windows systems:

emacs-w64: http://sourceforge.net/projects/emacsbinw64/

Solution 8 - Windows

See <http://www.gnu.org/software/emacs/windows/ntemacs.html>;. Section 2.1 describes where to get it, and section 3.5 describes where the .emacs file goes (by default, in your home directory, as specified by the HOME environment variable).

Solution 9 - Windows

I've run both GNU emacs and Xemacs on windows. I used to use it as my primary editor, email client etc, but not it's "just" an editor.

When I recently reinstalled to Vista I installed the latest GNU version. It works fine. So does Xemacs, but it does look like GNU have got their sh*t together so Xemacs isn't as compelling anymore.

Solution 10 - Windows

I suggest you to use development version of GNU Emacs 23, which is pretty stable and to be released relatively soon. You can get weekly binary builds from the link below.

Latest GNU Emacs as a zip archive

Solution 11 - Windows

I have a portable version with .emacs configure ready, which setup org mode, I-do, etc. It also included org sample file. I think that is a better start point for new comers.

Basically run with runemacs.bat and everything is ready.

http://nd.edu/~gsong/portable_emacs.html

Solution 12 - Windows

When forced to use Windows, I ...

Download "Emacs for windows", and save it in some directory (henceforth referred to as EMACS_SOMEWHERE)

Drop a .cmd file in "Startup" to map, "My Documents" to H: drive with subst, or if "My Documents" resides on a remote server, I use the "Map Network Drive" thing in Explorer to have "My Documents" named H:. Then I create an environment variable named HOME in Windows and give it the name of "H:". Now I can drop my .emacs file in "My Documents" and it will be read by emacs when it launches.

Then I create the H:\bin directory. Then I add "H:\bin" to my Windows "Path" environment variable.

Then I create a H:\bin\emacs.cmd file. It contains one line:

@call drive:\EMACS_SOMEWHERE\emacs-23.2\bin\emacsclientw.exe --alternate-editor=c:\programs\emacs-23.2\bin\runemacs.exe -n -c %*

This is a fair bit of work, but it will enable me to run the one and same emacs from either a windows command prompt or from a cygwin command prompt, provided that /cygdrive/h/bin is added to my cygwin PATH variable. Haven't used this setup for a while but as I recall, when I call the emacs.cmd with a new file over and over, they all end up being buffers in the one and same emacs session.

Solution 13 - Windows

I've encountered this problem, and discovered the fault (at least in my case) to be the existence of c:\site-lisp\site-start.el, a file that was created when EmacsW32 was installed, and which was not removed when I uninstalled it. (Vanilla GNU Emacs for Windows has c:\site-lisp in its load-path, and will try to load this file, which somehow winds up triggering that error.)

Solution: removing that whole directory (c:\site-lisp) worked for me, but you should just be able to remove the site-start.el file.

Solution 14 - Windows

The best place to start, to get an MS Windows binary for GNU Emacs is ... GNU Emacs:

http://www.gnu.org/software/emacs/

(Oh, and how did I find that URL? From the Emacs manual, node Distribution. If you have access to Emacs anywhere, that's the place to go for such information.)

On that page you will see everything you need to know about obtaining Emacs. In particular, you will find a section called Obtaining/Downloading GNU Emacs, which links to a nearby GNU mirror. Clicking that link takes you to a page of links that download all Emacs releases since release 21.

More imporantly here, on that page of links you will also see a directory link named windows. Click that to get a page of links to Emacs binaries (executables) for MS Windows. That is the page you want.

Knowing the above information can help when you need to find the page again, if you haven't bookmarked it. But here is the final URL, directly: http://mirror.anl.gov/pub/gnu/emacs/windows/

Solution 15 - Windows

There was https://bitbucket.org/Haroogan/emacs-for-windows with the latest Emacs 25, but the whole page has been removed. The benefit of this build and the emacs-w64 above is that they come with jpg, png, tiff DLLs as well as lxml DLL, which is needed for the new eww web browser.

Solution 16 - Windows

I prefer to run Windows 10 + VcXsrv + Emacs 25 client in WSL. Emacs is my shell.

Solution 17 - Windows

To access the .emacs file for your profile the easiest way is to open up emacs. Then do C-x C-, type in ~USERNAME/.emacs (or you can use init.el or one of the other flavours). Type your stuff into the file and C-x C-s (I think) to save it.

The actual file is located (in Windows XP) in c:\Documents and Settings\USERNAME.emacs.d(whatever you named the file), or the equivalent spelling/location on your system.

Solution 18 - Windows

You can download GNU Emacs NT from here direct. It works fine in windows, make sure you create a shortcut to the runemacs.exe file rather than the emacs.exe file so it doesn't show a command prompt before opening!

XEmacs is less stable than GNU Emacs, and a lot of extensions are specifically written for GNU. I would recommend GNU > X.

You can place the .emacs file in the root of the drive it's installed on. Not sure whether you can add it elsewhere too...

Solution 19 - Windows

Solution 20 - Windows

If You Mean Emacs as Latex Editor for Windows 7.

Emacs4LS (Emacs 4 Latex Support under Windows 7) for newcomer for Emacs. http://chunqishi.github.io/emacs4ls/

  1. Easy Steps to Install.
  2. Plugins Built-In.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsverrejohView Question on Stackoverflow
Solution 1 - WindowsSébastien RoccaSerraView Answer on Stackoverflow
Solution 2 - WindowsCarl SeleborgView Answer on Stackoverflow
Solution 3 - WindowscristobalitoView Answer on Stackoverflow
Solution 4 - WindowsMike StoneView Answer on Stackoverflow
Solution 5 - WindowsBrian CarltonView Answer on Stackoverflow
Solution 6 - WindowsmkasbergView Answer on Stackoverflow
Solution 7 - WindowsimrissView Answer on Stackoverflow
Solution 8 - WindowsHenryView Answer on Stackoverflow
Solution 9 - WindowsgeriksonView Answer on Stackoverflow
Solution 10 - WindowsboskomView Answer on Stackoverflow
Solution 11 - WindowsGSongView Answer on Stackoverflow
Solution 12 - WindowsAdam.at.EpsilonView Answer on Stackoverflow
Solution 13 - WindowsDarren EmbryView Answer on Stackoverflow
Solution 14 - WindowsDrewView Answer on Stackoverflow
Solution 15 - WindowsAlainView Answer on Stackoverflow
Solution 16 - Windowstbc0View Answer on Stackoverflow
Solution 17 - WindowsDaeminView Answer on Stackoverflow
Solution 18 - WindowsljsView Answer on Stackoverflow
Solution 19 - WindowssandosView Answer on Stackoverflow
Solution 20 - WindowsJeffView Answer on Stackoverflow