Next: , Previous: Network access, Up: Top


9 Text and Utility modes

9.1 How do I use TeX with Emacs?

You will need an implementation of TeX for Windows. A number of implementations are listed on the TeX Users Group website.

9.1.1 AUCTeX

AUCTeX is an Emacs package for writing LaTeX files, which also includes preview-latex, an Emacs mode for previewing the formatted contents of LaTeX documents. Pre-compiled versions for Windows are available from the AUCTeX site.

9.2 How do I perform spell checks?

Emacs has support for spell checking on demand (ispell) and as your type (flyspell). Both packages depend on a copy of ispell 3.2 or a compatible spell-checking program. GNU Aspell is a popular choice these days, Windows installers are available from the official site.

Once installed, you will need to configure ispell-program-name to tell ispell and flyspell to use aspell as a replacement for ispell. You can include the full path to the aspell binary, which means you do not need to add its installation directory to the PATH.

9.3 Emacs and encryption

GNU Privacy Guard is a Free replacement for PGP, with Windows binaries available. See http://www.gnupg.org/.

9.4 Why doesn't my wheel mouse work in Emacs?

Some wheel mice ship with default settings that do not send the standard wheel events to programs, but instead try to simulate scroll bar events. Usually this is configurable from the hardware specific pages on the mouse control panel. The middle button is often mapped in the same settings to have some functionality other than sending middle mouse button events. In some cases, uninstalling the manufacturer's drivers and telling Windows to use the generic USB or PS/2 drivers is the only way to make the mouse work properly.

9.5 How do I use grep with Emacs?

The best way to use M-x grep with Emacs is to download a port of GNU grep. See Other useful ports.

If you want a quick solution without installing extra tools, a poor substitute that works for simple text searches is to specify the built in Windows command findstr as the command to run at the M-x grep prompt. Normally you will want to use the /n argument to findstr.

9.5.1 How do I do a recursive grep?

The Emacs commands rgrep, grep-find and find-grep-dired are all different interfaces for grepping recursively into subdirectories. By default, they use the command find to determine which files to work on, and either run grep directly from find, or use xargs to batch up files and reduce the number of invocations of grep.

Windows also comes with a find command, but it is not in any way compatible with the POSIX find that Emacs tries to use. Emacs expects a find compatible with GNU findutils. See Other useful ports. After you have installed it, you will need to make sure that Emacs finds this version, not the standard Windows find command. You can do this by either renaming the Windows command, changing your PATH to ensure that the directory containing the findutils bin directory comes before the Windows system directory, or set the variable find-program to the full path to the findutils find command.

An alternative if you have a recent version of grep is to customize grep-find-command to use ‘grep -r’ instead of both find and grep. Another alternative if you don't need the full capabilities of grep is to use ‘findstr /n /r’.