Since I've decided to give up on Vim, it's time to take a serious look at Emacs.
- Windows is always quirky: GNU Emacs FAQ For MS Windows; the short of it is that you probably want an
init.elfile in your
- EmacsWiki: Emacs Channel FAQ
- Windows binaries.
runemacs.exe. Then, if you want to load a file from the command-line into the existing Emacs client (with
- Supposedly, you can directly edit MediaWiki.el pages from Emacs. But no matter what I do, I receive:
error in process filter: Invalid Login!.
- Use can use python-mode. Please note that this is different than the
python.elthat comes by default in FSF Emacs. I've added to the existing bug report; it appears that it assumes the existence of an
- Ultimately, I'd like to be able to use
ipythonfrom within this environment.
- It would be a shame if you couldn't get spelling to work at all. For Windows, you'll need GNU Aspell. You need to download both the Full Installer and then a Precompiled Dictionary. There are some instructions for setting up Aspell Windows. I prefer instead to use
M-x customize-variableto do this.
- Flyspell note: turn-on-flyspell.
- I've tried practically every editor at this point and decided that Emacs is in fact the best environment for editing LaTeX documents.
- For LaTeX: AUXTex, sophisticated document creation. Installation on Windows involves simply extracting a zip file, but PDF preview is much more difficult to get reasonably correct. Compile to PDF by default. The EmacsWiki has a lot of good AucTeX tweaks.
- This isn't just an Emacs issue, but
acroreadlocks the PDF, which makes repeated runs of
pdflatexirritating. You can try Sumatra PDF instead as your LaTeX viewer. The first thing people usually notice about Sumatra PDF is the obnoxious background color. This can be changed through a command-line argument in the manual.
AucTeX and PDF Synchronization on Windows
In this section, we'd like to setup GNU Emacs and AucTex so that it can do both forward searches (using Emacs to control the PDF Viewer) and inverse searches (using the PDF Viewer to control Emacs). William's instructions have recently been updated, and reflect many of these changes. The version here is expanded for individuals like myself who need a little more hand holding.
- Unlike on the Mac, TeX tool support on Windows is quite a challenge. With the exception of Sumatra PDF, there are basically no PDF viewers that support source synchronization. Here, use the full installer, and not the portable apps version of Sumatra PDF.
- To get PDF synchronization to work, you'll need to set a few AucTeX variables in emacs (
M-x customize-variable). The first is
TeX-view-program-list, which needs to have a
Nameshould read as
Sumatra PDF. The Command part needs to read:
"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance %o, adjusting accordingly for your actual path. I have no idea where
%ois actually documented; it just works.
- The next variable is
TeX-view-program-selection, where the
output-pdfshould be set to Sumatra PDF.
- Similarly, find
TeX-source-correlate-modeand set this to
On. Finally, set
- Need, you'll need a special script for forward searching: sumatra-forward.el. Place this file in
c:\emacs\site-lisp, or equivalent. Update your
- On Windows in particular,
(server-start)is problematic and will fail by default with something like:
error: The directory ‘~/.emacs.d/server' is unsafe. This is due to a permissions problem; the file
~/.emacs.d/serverneeds to be owned by you. The easiest way to do this is through the command-line:
takeown /f server, though you can also use the GUI to take ownership of the file (
Properties > Security > Advanced > Owner). If you like, you can optionally also set the variable
- Also, GNU Emacs now comes with DDE client, so there's no need to install this.
- The only thing left to do now is inverse search. Under Sumatra PDF, go to
Settings > Options. Set the inverse search command-line to
c:\emacs\bin\emacsclientw.exe +%l "%f"or equivalent.
- Finally! To perform forward search (from within Emacs) hit
F8. To perform inverse search (from within Sumatra PDF), double-click the area of text.