5 Indispensable Tips for Emacs on Windows
Emacs is generally not very popular on Windows based operating systems. The default installation of Emacs leaves you with a very spartan UI and a very basic editor. However, due to Emacs’ extendibility, you can create a very powerful editor by customizing your .emacs file and making some OS specific tweaks. We will be concentrating on the latter as there are plenty of .emacs files floating around for your reference.I have 5 simple yet useful tips below, which I have tested with a GNU Emacs 23.0.0.1 (i386-mingw-nt5.1.2600) running on Windows XP.
Tip 1: Starting off With a Prettier Emacs
Most of us customize the fonts, colours and window position of Emacs. In fact, I have found that dark backgrounds are much suited to Emacs than the default light background. However, when Emacs starts up, it annoyingly shows the default fonts and colours first. As your .emacs files load, it jumps around and changes colours quite noticeably.
You can avoid this annoyance by making a simple registry modification. Create a new .reg file say set-frame-and-fonts.reg and copy paste the following lines. Open the file to add the changes to the registry. Restart Emacs and enjoy the difference!
REGEDIT4
[HKEY_CURRENT_USERSOFTWAREGNUEmacs]
"Emacs.Foreground"="black"
"Emacs.Background"="#f5f5f5"
"Emacs.Font"="-outline-Consolas-normal-r-normal-normal-12-90-96-96-c-*-iso8859-1"
"Emacs.Geometry"="100x35+0+0"
Caveat: The lines above are my preferred colours, fonts and window positions. Your’s could be different. Please customize to your taste.
Tip #2: Add “Open In Emacs” option to all Files
This will be indispensable once you are more used to Emacs. You will feel like opening anything and everything with it. And being the one true swiss-army-chainsaw it is, you will be delighted at the enormous no: of filetypes that Emacs supports out of the box.
This .reg file add an “Open in Emacs” option in Windows Explorer when you right click on any file. Copy the following lines to a .reg file say Add-Emacs-To-Open-Any-File.reg and open it to add the changes to the registry. Make sure that you have modified the path below to point to your emacs installation path (mine is in D: drive). The emacsclientw.exe resides in the same place where your runemacs.exe resides (right-clicking on the emacs icon, generally shows you this).
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT*ShellOpen In EmacsCommand]
@="\"D:\Program Files\Emacs23\bin\emacsclientw.exe\" -a \"D:\Program Files\Emacs23\bin\runemacs.exe\" \"%1\""
Read the rest:
5 Indispensable Tips for Emacs on Windows
No comments yet.