<p>How do you run Emacs in Windows?</p>

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

[{'answer_id': 41307, 'author': 'Mike Stone', 'author_id': 122, 'author_profile': 'https://Stackoverflow.com/users/122', 'pm_score': 3, 'selected': False, 'text': '<p>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 <a href="http://www.gnu.org/software/emacs/windows/ntemacs.html" rel="noreferrer">windows too</a>.  That link also answers your <a href="http://www.gnu.org/software/emacs/windows/Installing-Emacs.html#index-HOME-directory-48" rel="noreferrer">.emacs file question</a>.  <a href="ftp://mirrors.kernel.org/gnu/emacs/windows/" rel="noreferrer">Here is a place you can download it</a>.  You should probably get version 22.2 (the latest).</p>\n\n<p>If this is your first time, I hope you enjoy it!  I know I absolutely love emacs!</p>\n'}, {'answer_id': 41310, 'author': 'Henry', 'author_id': 3598, 'author_profile': 'https://Stackoverflow.com/users/3598', 'pm_score': 2, 'selected': False, 'text': '<p>See <a href="http://www.gnu.org/software/emacs/windows/ntemacs.html" rel="nofollow noreferrer">http://www.gnu.org/software/emacs/windows/ntemacs.html</a>. 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).</p>\n'}, {'answer_id': 41317, 'author': 'Carl Seleborg', 'author_id': 2095, 'author_profile': 'https://Stackoverflow.com/users/2095', 'pm_score': 5, 'selected': False, 'text': '<p>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".</p>\n\n<p>Carl</p>\n'}, {'answer_id': 41333, 'author': 'Dominik Grabiec', 'author_id': 3719, 'author_profile': 'https://Stackoverflow.com/users/3719', 'pm_score': 0, 'selected': False, 'text': '<p>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.</p>\n\n<p>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.</p>\n'}, {'answer_id': 41335, 'author': 'gerikson', 'author_id': 3988, 'author_profile': 'https://Stackoverflow.com/users/3988', 'pm_score': 1, 'selected': False, 'text': '<p>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. </p>\n\n<p>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.</p>\n'}, {'answer_id': 41362, 'author': 'ljs', 'author_id': 3394, 'author_profile': 'https://Stackoverflow.com/users/3394', 'pm_score': 0, 'selected': False, 'text': '<p>You can download GNU Emacs NT from <a href="http://ftp.gnu.org/gnu/emacs/windows/emacs-22.2-bin-i386.zip" rel="nofollow noreferrer">here</a> 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!</p>\n\n<p>XEmacs is less stable than GNU Emacs, and a lot of extensions are specifically written for GNU. I would recommend GNU > X.</p>\n\n<p>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...</p>\n'}, {'answer_id': 41370, 'author': 'Sébastien RoccaSerra', 'author_id': 2797, 'author_profile': 'https://Stackoverflow.com/users/2797', 'pm_score': 7, 'selected': True, 'text': '<p>I use <a href="http://www.emacswiki.org/emacs/EmacsW32" rel="noreferrer">EmacsW32</a>, it works great. <em>EDIT: I now use regular GNU Emacs 24, see below.</em></p>\n\n<p>See its <a href="http://www.emacswiki.org/cgi-bin/wiki/EmacsW32" rel="noreferrer">EmacsWiki page</a> for details.</p>\n\n<p>To me, the biggest advantage is that:</p>\n\n<ul>\n<li>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)</li>\n<li>it includes several useful packages such as Nxml</li>\n<li>it has a Windows installer or you can build it from sources</li>\n</ul>\n\n<p>And concerning XEmacs, according to <a href="http://steve-yegge.blogspot.com/2008/04/xemacs-is-dead-long-live-xemacs.html" rel="noreferrer">this post</a> by Steve Yegge:</p>\n\n<blockquote>\n  <p>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.</p>\n</blockquote>\n\n<p><em>EDIT: I now use regular GNU Emacs 24. It also contains Nxml, can be installed or built from sources, and with <a href="http://www.emacswiki.org/emacs/EmacsClient#toc2" rel="noreferrer">this wrapper</a>, the Emacs server starts if no server is running. Cheers!</em></p>\n'}, {'answer_id': 476875, 'author': 'boskom', 'author_id': 20550, 'author_profile': 'https://Stackoverflow.com/users/20550', 'pm_score': 1, 'selected': False, 'text': '<p>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.</p>\n\n<p><a href="http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl" rel="nofollow noreferrer">Latest GNU Emacs as a zip archive</a></p>\n'}, {'answer_id': 626329, 'author': 'Brian Carlton', 'author_id': 20147, 'author_profile': 'https://Stackoverflow.com/users/20147', 'pm_score': 3, 'selected': False, 'text': '<p>I run it under cygwin.  That also gives me a Unix-ish environment for shelling out commands with meta-!</p>\n'}, {'answer_id': 3666251, 'author': 'sandos', 'author_id': 266486, 'author_profile': 'https://Stackoverflow.com/users/266486', 'pm_score': 0, 'selected': False, 'text': '<p>Im using emacs32, I only have one problem with it really:</p>\n\n<p><a href="https://stackoverflow.com/questions/3625738/comint-previous-matching-input-in-emacsw32-is-not-interactive">https://stackoverflow.com/questions/3625738/comint-previous-matching-input-in-emacsw32-is-not-interactive</a></p>\n'}, {'answer_id': 3679058, 'author': 'cristobalito', 'author_id': 376700, 'author_profile': 'https://Stackoverflow.com/users/376700', 'pm_score': 5, 'selected': False, 'text': '<p>Easiest way to find where the user init file is:</p>\n\n<pre><code>C-h v user-init-file\n</code></pre>\n\n<p>Easiest way to open it is (in the <em>scratch</em> buffer):</p>\n\n<pre><code>(find-file user-init-file)\n</code></pre>\n\n<p>and hit C-j to eval</p>\n'}, {'answer_id': 7178969, 'author': 'GSong', 'author_id': 910054, 'author_profile': 'https://Stackoverflow.com/users/910054', 'pm_score': 1, 'selected': False, 'text': '<p>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.</p>\n\n<p>Basically run with runemacs.bat and everything is ready.</p>\n\n<p><a href="http://nd.edu/~gsong/portable_emacs.html" rel="nofollow">http://nd.edu/~gsong/portable_emacs.html</a></p>\n'}, {'answer_id': 14307654, 'author': 'mkasberg', 'author_id': 1263211, 'author_profile': 'https://Stackoverflow.com/users/1263211', 'pm_score': 3, 'selected': False, 'text': '<p>I use a vanilla version of <a href="http://www.gnu.org/software/emacs/" rel="nofollow noreferrer">emacs</a>.  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 <em>.emacs</em> file can be placed in <em>C:\\Users\\YourName</em> if the <em>HOME</em> 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 <a href="http://www.gnu.org/prep/ftp.html" rel="nofollow noreferrer">mirror</a> in the <em>emacs/windows</em> folder.  You want the file that is named <code>emacs-xx.x-bin-i686-pc-mingw32.zip</code>.</p>\n\n<p>There are some great instructions for configuring emacs for windows <a href="https://web.archive.org/web/20180321233238/http://www1.cmc.edu/pages/faculty/alee/emacs/emacs.html" rel="nofollow noreferrer">here</a>.  Basically, "installation" boils down to:</p>\n\n<ol>\n<li>Download emacs from a gnu <a href="http://www.gnu.org/prep/ftp.html" rel="nofollow noreferrer">mirror</a> at <em>emacs/windows/emacs-version-bin-i686-pc-mingw32.zip</em>, and extract the zip to an appropriate folder. Preferably <em>C:\\emacs</em> to avoid spaces in the filename.</li>\n<li>Set the <em>HOME</em> environment variable to <em>C:\\Users\\username</em> (or whatever you want).  Make it a user-only variable (if it is username-specific).  This is where your <em>.emacs</em> file goes.</li>\n<li>If you want a start menu or desktop shortcut, create a shortcut to <em>bin/runemacs.exe</em>.</li>\n<li>Add <em>c:\\emacs\\emacs-xx.x\\bin\\</em> to your path (user or system), so that you can run it from the command line.</li>\n</ol>\n'}, {'answer_id': 16260342, 'author': 'Jeff', 'author_id': 2320976, 'author_profile': 'https://Stackoverflow.com/users/2320976', 'pm_score': 0, 'selected': False, 'text': '<p>If You Mean <strong>Emacs as Latex Editor for Windows 7.</strong></p>\n\n<p><code>Emacs4LS</code> (Emacs 4 Latex Support under Windows 7) for newcomer for Emacs.\n<a href="http://chunqishi.github.io/emacs4ls/" rel="nofollow">http://chunqishi.github.io/emacs4ls/</a></p>\n\n<ol>\n<li>Easy Steps to Install.</li>\n<li>Plugins Built-In.</li>\n</ol>\n'}, {'answer_id': 16415484, 'author': 'Adam.at.Epsilon', 'author_id': 2173897, 'author_profile': 'https://Stackoverflow.com/users/2173897', 'pm_score': 1, 'selected': False, 'text': '<p>When forced to use Windows, I ...</p>\n\n<p>Download "Emacs for windows", and save it in some directory (henceforth referred to as EMACS_SOMEWHERE)</p>\n\n<p>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.</p>\n\n<p>Then I create the H:\\bin directory. Then I add "H:\\bin" to my Windows "Path" environment variable.</p>\n\n<p>Then I create a H:\\bin\\emacs.cmd file. It contains one line:</p>\n\n<pre><code>@call drive:\\EMACS_SOMEWHERE\\emacs-23.2\\bin\\emacsclientw.exe --alternate-editor=c:\\programs\\emacs-23.2\\bin\\runemacs.exe -n -c %*\n</code></pre>\n\n<p>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.</p>\n'}, {'answer_id': 17683861, 'author': 'Darren Embry', 'author_id': 8621049, 'author_profile': 'https://Stackoverflow.com/users/8621049', 'pm_score': 1, 'selected': False, 'text': "<p>I've encountered this problem, and discovered the fault (at least in my case) to be the existence of <code>c:\\site-lisp\\site-start.el</code>, a file that was created when EmacsW32 was installed, and which was not removed when I uninstalled it.  (Vanilla GNU Emacs for Windows has <code>c:\\site-lisp</code> in its load-path, and will try to load this file, which somehow winds up triggering that error.)</p>\n\n<p>Solution: removing that whole directory (<code>c:\\site-lisp</code>) worked for me, but you <em>should</em> just be able to remove the <code>site-start.el</code> file.</p>\n"}, {'answer_id': 21370649, 'author': 'Drew', 'author_id': 729907, 'author_profile': 'https://Stackoverflow.com/users/729907', 'pm_score': 1, 'selected': False, 'text': '<p>The best place to start, to get an MS Windows binary for GNU Emacs is ... <strong>GNU Emacs</strong>:</p>\n\n<p><a href="http://www.gnu.org/software/emacs/" rel="nofollow">http://www.gnu.org/software/emacs/</a></p>\n\n<p>(Oh, and <em>how did I find that URL</em>?  From the Emacs manual, node <strong>Distribution</strong>.  If you have access to Emacs anywhere, that\'s the place to go for such information.)</p>\n\n<p>On that page you will see everything you need to know about obtaining Emacs.  In particular, you will find a section called <strong><em>Obtaining/Downloading GNU Emacs</em></strong>, which links to a <strong>nearby GNU mirror</strong>.  Clicking that link takes you to a page of links that download all Emacs releases since release 21.</p>\n\n<p>More imporantly here, on that page of links you will also see a <em>directory</em> link named <a href="http://mirror.anl.gov/pub/gnu/emacs/windows/" rel="nofollow"><strong><em>windows</em></strong></a>.  Click that to get a page of links to <strong>Emacs binaries (executables) for <em>MS Windows</em></strong>. That is the page you want.</p>\n\n<p>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: <strong><a href="http://mirror.anl.gov/pub/gnu/emacs/windows/" rel="nofollow">http://mirror.anl.gov/pub/gnu/emacs/windows/</a></strong></p>\n'}, {'answer_id': 26508758, 'author': 'imriss', 'author_id': 2026975, 'author_profile': 'https://Stackoverflow.com/users/2026975', 'pm_score': 2, 'selected': False, 'text': '<p>Also, you can consider emacs-w64 for 64bit windows systems:</p>\n\n<p><a href="http://sourceforge.net/projects/emacsbinw64/" rel="nofollow">emacs-w64</a>: <a href="http://sourceforge.net/projects/emacsbinw64/" rel="nofollow">http://sourceforge.net/projects/emacsbinw64/</a></p>\n'}, {'answer_id': 27023911, 'author': 'Alain', 'author_id': 475162, 'author_profile': 'https://Stackoverflow.com/users/475162', 'pm_score': 1, 'selected': False, 'text': '<p>There was <code>https://bitbucket.org/Haroogan/emacs-for-windows</code> with the latest Emacs 25, but the whole page has been removed. \nThe 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 <code>eww</code> web browser.</p>\n'}, {'answer_id': 42615803, 'author': 'tbc0', 'author_id': 650264, 'author_profile': 'https://Stackoverflow.com/users/650264', 'pm_score': 1, 'selected': False, 'text': '<p>I prefer to run Windows 10 + VcXsrv + Emacs 25 client in WSL. Emacs is my shell.</p>\n'}]
['https://Stackoverflow.com/questions/41300', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/473/']