32 how do i install emacs after unpacking the binary zip file
Shane Holder gives some background on how "Scancode Map" is used by the system: It's a binary value that lets you map keystrokes in the low-level keyboard drivers in NT. As a result you don't have to worry about applications bypassing mappings that you've done at a higher level i. Here's the format of the value: To map scancode 0x1d left control to scancode 0x3a caps lock , you want a value of 0xad.
Note that this does not swap the keys. Using just this mapping value, both the left control and the caps lock key will behave as caps-lock.
To swap, you also need to map 0x3a to 0x1d, using 0xda. This registry value is system wide, and can't be made user-specific. It also only takes affect on reboot. Ulfar Erlingsson has provided a registry file that sets the CapsLock key to be a Control key and the Windows key to be an Alt key: Swap Caps NT , Up: The tool has also been confirmed to work on Windows Window operations , Previous: Make Windows more like X , Up: Many beginning users find Emacs difficult to use because its user interface is different in many ways.
Emacs predates most UI standards, and experienced Emacs users are used to the way things are, so changing the defaults is difficult. Highlight selection CUA Next: Make Emacs like a Windows app 3. But the mark in Emacs is used for more than just defining the selected region, it lives on while you continue to edit and move around the buffer so it can also be a kind of bookmark.
The history of marks is saved so you can pop previous marks back to the top of the stack to go back to somewhere you were some time ago. Because of this dual purpose, the region between mark and point is not highlighted by default unless you select a region by clicking and dragging the mouse.
The minor mode transient-mark-mode changes the behavior of the mark in two ways. First, it distinguishes between an active mark that has just been defined or reactivated, and an inactive mark.
When the mark is active, some commands that normally act on lines, words, buffers, etc. An inactive mark needs to be reactivated to operate on it, unless mark-even-if-inactive is set. Secondly, transient-mark-mode also highlights the region when it is active, providing the same visual clue that you get in other programs.
This mode is turned on by default in latest versions of Emacs. In addition to seeing the highlighting, new Emacs users often expect editing commands to replace the region when it is active. This behavior can be obtained with delete-selection-mode , but see the following question also. Highlight selection , Up: CUA mode attempts to let both bindings co-exist by defining C-x and C-c as kill-region and copy-region-as-kill when the region is active, and letting them have their normal Emacs bindings when the region is not active.
Many people find this to be an acceptable compromise. CUA mode also defines a number of other keys C-v, Shift selection , and can be turned on from the Options menu. Make Emacs like a Windows app , Up: Does not run , Previous: Window operations , Up: Emacs does not come with an uninstall program.
No files are installed outside of the directories you find in the binary zip archive, so deleting those directories is sufficient to clean away the files. If you ran addpm , you'll need to delete the Start Menu group too. The most common symptom is that, when Emacs is started, the cursor changes for a second but nothing happens. If this happens to you, it is quite likely that the distribution was unpacked incorrectly. Check for the following to see if there was a problem during unpacking: Older versions of WinZipNT would enable this translation by default.
If you are using WinZipNT, disable it. Check that filenames were not truncated to 8. If it is still not working, send mail to the help-gnu-emacs gnu. The more information you send the more likely it is that you'll receive a helpful response. Does not run , Up: There have been reports in the past that some virus scanners claim that the Emacs distribution has a virus. This is extremely unlikely if you have downloaded Emacs from the GNU FTP site or one of its mirrors and the GPG signature for it is valid and listed in the GNU keyring, unless perhaps it is a new release made in the last few days, in which case you should exercise more caution and report the problem.
Past problems seem to have been caused by virus checkers running into a buffer size limit when unpacking large tar. Anti-virus and firewall software can block Emacs from starting subprocesses and opening network connections. Most such products have an Advanced mode where they will prompt you rather than silently blocking.
See Why is nothing happening when I enter shell commands? Fonts and text translation , Previous: Installing Emacs , Up: Mouse trouble , Up: Normally the window size is correct, but when running Emacs over some telnet servers, the buffer size needs to be used. Emacs tries to guess the correct value at startup, but if it guesses wrong, you can customize that variable yourself.
Cut and paste NUL , Previous: Console window size , Up: Emacs assigns bindings assuming a three button mouse. On Windows, if a two button mouse is detected, a hack is enabled which lets you simulate the third button by pressing both mouse buttons simultaneously.
You can check how many buttons Emacs thinks your mouse has with C-h v wnum-mouse-buttons. If you find yourself needing the mouse-3 bindings more often than mouse-2, you can swap the buttons with the following code in your init file: Garbled clipboard , Previous: If you attempt to cut and paste text with NUL characters embedded in it, then the text will be truncated at the first NUL character. This is a limitation of the Windows clipboard, and does not affect killing and yanking from the kill-ring within Emacs.
Beep sound , Previous: Cut and paste NUL , Up: You can try set-selection-coding-system , but generally such corruption is a thing of the past, as Emacs uses Unicode for the clipboard by default now. Garbled clipboard , Up: You can use the function set-message-beep to change the sound that Emacs uses for its beep.
This affects both console and GUI frames. The doc string contains a list of the system sounds you can use. Display Settings , Up: Bold and italic , Up: Fonts and text translation 5. Former maintainer Andrew Innes wrote this explanation of what each field in the font string means and how Emacs treated them back in Since then, multilingual support and a redisplay overhaul to support variable width fonts have changed things slightly; more character sets are recognized and the old pseudo character sets are deprecated , and the resolution fields are used to calculate the difference between point and pixel sizes, but normally you should leave these at the system default.
The foundry field is also populated with an indication of whether the font is outline. FON based when fonts are listed, which may let you differentiate between two fonts with the same name and different technologies. Starting with Emacs 23, the preferred font name format will be moving to the simpler and more flexible fontconfig format. XLFD names will continue to be supported for backward compatibility. Fonts can also be used when defining faces, though family and size are generally specified individually there.
In addition, Emacs on Windows reads the registry to find X Resources. This is also documented in the manual. Multilingual fonts , Previous: Font names , Up: Emacs will only use the italic and bold versions of a font automatically if it has the same width as the normal version.
Many fonts have italic and bold versions that are slightly wider. It will also only use real bold and italic fonts by default, where other applications may use synthesized variations that are derived from the normal font. To enable more italic and bold fonts to be displayed, you can enable synthesized fonts and manually set the font for italic, bold and bold-italic as follows: Font menu , Previous: Non-latin display , Up: See How do I use bdf fonts with Emacs?
For many languages, native truetype fonts are sufficient, and in Emacs 23 the need for BDF fonts will disappear for almost all languages.
At the time of writing, all supported characters are able to be displayed with appropriate truetype or opentype fonts. International fonts , Previous: Language display , Up: Recent versions of Emacs display a large range of characters out of the box, but if you are having problems with a particular character set which you know you have fonts for, you can try defining a new fontset with create-fontset-from-ascii-font or create-fontset-from-fontset-spec.
See Modifying Fontsets , for details and some useful examples. Third-party multibyte , Previous: The GNU Unifont project contains glyphs for most of the Unicode codespace, and can be downloaded from ftp. Localized fonts , Previous: International fonts , Up: You probably only need to do this on the non-Unicode versions of Windows 95, 98 and ME , and even then, various Windows and Internet Explorer updates have made third party software unnecessary in most cases.
If you are having trouble displaying text, try defining a fontset with the font for the languages that the third party software handles set to what that software expects which may not be an appropriate font for that language, but the third party software is intercepting it and using a different font behind the scenes.
Third-party multibyte , Up: Normally Emacs should initialize locale-coding-system appropriately based on your locale, which will let Emacs use font names in your local language successfully. Line ends , Previous: Multilingual fonts , Up: Place the following in your init file: If you have set wuse-wfont-dialog to nil , you can add fonts to the font menu by changing wfixed-font-alist. Font menu , Up: For a discussion of this issue, take a look at this collection of email messages on the topic.
Automatic line ends Line ends by file system Next: Line ends by file system , Up: It does this to be safe, as no data loss will occur if the file is really binary and the Ctrl-M characters are significant. Automatic line ends , Up: The list can be manipulated with the functions add-untranslated-filesystem and remove-untranslated-filesystem. With auto-detection in recent versions of Emacs, this is seldom useful for existing files, but can still be used to influence the choice of line ends for newly created files.
Fonts and text translation , Up: Top 6 Printing A lot of effort has gone into making it easier to print from Emacs on MS Windows, but this has still been insufficient to keep up with changes in printing technology from text and postscript based printers connected via ports that can be accessed directly, to graphical printers that are only accessible via USB.
For details, see Emacs Wiki , http: Network access , Previous: Subprocess hang , Up: When Emacs spawns subprocesses, it tries to determine whether the process is a Cygwin program and changes its quoting mechanism appropriately. Subprocess buffering , Previous: Quoting issues , Up: The default ftp client on Windows is an example of such a program - this ftp program is mostly fine for use with ange-ftp or tramp , but not for M-x ftp see How do I use FTP within Emacs.
There is no convenient way for either Emacs or any shell used in shell-mode to redirect the input and output of such processes from the console to input and output pipes. The only workaround is to use a different implementation of the program that does not use the console directly.
Microsoft's new PowerShell appears to be another such program, so that cannot be used as a replacement shell for Emacs. Subprocesses and floppy drive , Previous: When the program has a lot of output, it overflows the buffering and gets printed to the shell buffer; however, if the program only outputs a small amount of text, it will remain buffered and won't appear in the shell buffer. The same can happen in other subprocesses that themselves run other programs as subprocesses, for example when using cvs from Emacs, which is itself configured to use ssh , password prompts fail to appear when expected, and cvs appears to hang.
Although it may at first seem like the shell is buffering the output from the program, it is actually the program that is buffering output. The C runtime typically decides how to buffer output based upon whether stdout is bound to a handle to a console window or not. If bound to a console window, output is buffered line by line; if bound to a block device, such as a file, output is buffered block by block. In a shell buffer, stdout is a pipe handle and so is buffered in blocks.
If you would like the buffering behavior of your program to behave differently, the program itself is going to have to be changed; you can use setbuf and setvbuf to manipulate the buffering semantics.
Some programs handle this by having an explicit flag to control their buffering behavior, typically -i for interactive, or by a special environment variable. Look in the program's documentation for the way around this issue.
Perl script buffering Up: Turn all buffering off. Killing subprocesses , Previous: Subprocess buffering , Up: Subprocess EOF , Previous: Subprocesses and floppy drive , Up: To avoid problems on these systems, you should let subprocesses run to completion including explicitly exiting shells before killing the associated buffer.
If you find that while shutting down, Windows complains that there is a running cmdproxy. Using shell , Previous: Killing subprocesses , Up: This affects the use of C-c C-d in shell buffers.
See this discussion for more details. Cygwin paths , Previous: Subprocess EOF , Up: You can start an interactive shell in Emacs by typing M-x shell.
By default, this will start the standard Windows shell cmd. To instruct Emacs to use a non-default shell, you can either set this environment variable, or customize explicit-shell-file-name. You can also customize shell-file-name to change the shell that will be used by subprocesses that are started with shell-command and related non-interactive shell commands.
To use bash as the default shell in Emacs, you can place the following in your init file: Some versions of bash set and use the environment variable PID. For some as yet unknown reason, if PID is set and Emacs passes it on to bash subshells, bash dies Emacs can inherit the PID variable if it's started from a bash shell.
If you clear the PID variable in your init file, you should be able to continue to use bash as your subshell: Dired ls , Previous: Using shell , Up: Shell echo , Previous: Cygwin paths , Up: Dired uses an internal lisp implementation of ls by default on Windows. For consistent display of symbolic links and other information with other programs eg Cygwin and performance reasons, you may want to use a Windows port of ls instead.
Shell completion forward slash , Previous: Dired ls , Up: Some shells echo the commands that you send to them, and the echoed commands appear in the output buffer.
In particular, the default shells, command. To prevent echoed commands from being printed, you can place the following in your init file: Incorrect DOS version , Previous: Shell echo , Up: The character appended to directory names when completing in a shell buffer is controlled by the variable comint-completion-addsuffix.
See its documentation with C-h v for details. Shell commands do nothing , Previous: Shell completion forward slash , Up: This might happen if, for example, you invoke nmake in a shell and it tries to create sub-shells. The problem happens because when the shell is initially created, the first argument to the shell is not the directory in which the shell program resides. When this happens, command. The fix for this is to either prevent any arguments from being sent to the shell when it starts up in which case command.
Incorrect DOS version , Up: Some anti-virus software has been reported to cause problems with shells in the past. See What known problems are there with anti-virus software? Text and Utility modes , Previous: Attachments with Gnus , Up: Emacs comes with several options for reading and writing mail.
These are documented in the manual, and the choice of which method to use depends on personal taste. There are some issues specific to Windows however, related to the fact that Windows machines do not have the mail infrastructure that is commonly installed on other platforms, so mail will not work without some configuration. Incoming mail with Rmail , Up: This is included with Emacs, and can be set up as follows: If you are experiencing problems with sending large messages, check the value of the variable smtpmail-debug-info.
If it is non- nil , you should set it to nil: Incoming mail with Gnus , Previous: Outgoing mail , Up: Incoming mail other , Previous: See The Gnus manual. Incoming mail with Gnus , Up: MH-E is included with Emacs. The others require lisp or executable code that does not come with Emacs, so you should seek help where you obtained the packages from if you want to use them.
Using FTP , Previous: In your HOME directory create a file called. Associating MIME types with start or other generic Windows commands to open arbitrary files might seem like a good idea, but it leaves your system as open to attack as Outlook Express was at its worst.
Tramp ssh , Previous: Windows built in FTP client can be used with ange-ftp. Ange-ftp is the Emacs package that provides FTP connectivity to tramp, a multi-protocol remote file access package for Emacs that is enabled by default. The Windows FTP client does have problems with some firewalls, due to lack of passive mode support, so you may want to try an alternative ftp client instead.
Make sure that the client you are trying is in your PATH before the default Windows client, or rename the default Windows client to avoid it getting in the way. Alternatively you can customize ange-ftp-ftp-program-name to the full path to the version you are trying.
Using FTP , Up: Tramp can use a number of protocols to connect to remote machines to read files and even run commands on those files remotely. A popular one is ssh. As well as Cygwin versions of openssh, you can use PuTTY's command line plink program as the ssh client.
The relevant methods to use in tramp-default-method or tramp-default-method-alist for these options are: PuTTY pscp Uses pscp for copying, plink for shell operations. Tramp ssh , Up: To use telnet-mode on Windows, you need a telnet client that uses stdin and stdout for input and output. The default Windows client is a Windows application, and will not work as a subprocess. Several options exist, but information that was formerly in this FAQ is out of date now, so no concrete pointers are available.
Developing with Emacs , Previous: Network access , Up: Spell check , Up: Text and Utility modes 9. You will need an implementation of TeX for Windows. A number of implementations are listed on the TeX Users Group website.
Emacs has support for spell checking on demand ispell and as your type flyspell. Both packages depend on a copy of ispell 3.
GNU Aspell is a popular choice these days, Windows installers are available from the official site. Another possibility is Hunspell, which is available from the ezwinports site. Once installed, you will need to configure ispell-program-name to tell ispell and flyspell to use aspell or hunspell as a replacement for ispell.
Mouse wheel , Previous: 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. Mouse wheel , Up: 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.
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. 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.
Other useful ports , Previous: Text and Utility modes , Up: The rest of this chapter describes other alternatives which you may need to use. Developing with Emacs MSVC command line , Up: See the following two URLs for details: The experiments done below were done with Emacs Your mileage may vary. This writeup assumes minimal knowledge of Emacs hacking on the part of the reader. Default compile command , Up: MSVC command line Arrange for those same environment variables to be set in your Emacs session.
You can do this on Windows 9x by calling the vcvars On other versions of Windows you can set the environment variables globally using the System control panel. For all versions of Windows you can alternatively set the variables just inside Emacs by using setenv calls in your init file.
See Where do I put my init file? You should now be able to compile from Emacs. Replace the proposed command line with: You can change it to a release build with: Reverting buffers , Previous: Add the following to your init file: Reverting buffers , Up: In the Tools tab, click on Add. Use Browse to locate the emacsclientw. E is already used for the OLE control test container.
You should now be able to go to any source file in your project. If you use keystrokes to work the menus, try Alt-T A to move the file into Emacs. Binding this tool to a keystroke will be left as an exercise for the student. If you have the option of saving files before running tools, make sure this option is set. Version control , Previous: If you are using a graphical revision control tool already, check if it comes with command-line tools. Most of the supported VC systems have well supported Free native Windows binaries.
For those that don't Cygwin may be an option. Version control , Up: Some versions of the perl debugger itself need to be patched to work with emacs. They are perl versions 5. Further information , Previous: Developing with Emacs , Up: Other useful ports Most of its tools can be used with Emacs, and it covers a wide range of ported software. The main shell used by Cygwin is GNU bash , but other shells are also available.
Some Cygwin tools may not interoperate well with Emacs or other native Windows tools, due to the total immersion aspect of Cygwin, including its non-native filesystem mapping. If you choose to use Cygwin, then its tools will probably be all that you need, but you will need to get image libraries from elsewhere, as the Cygwin ones are not compatible with non-Cygwin software.
In fact, if Cygwin is on your PATH when you run Emacs, and Emacs does not find other versions of the image libraries first, then the Cygwin ones can cause problems. Instead you can make the Cygwin tools available within Emacs by setting exec-path in your init file.
Like Cygwin, this environment uses a non-native filesystem mapping to appear more POSIX like to the scripts that it runs. This is intended to complement the MinGW tools to make it easier to port software to Windows. Unfortunately, the ports are outdated. Tools available here that are useful for Emacs include: Arc - used by archive-mode to edit. Bzip2 - used by Emacs to automatically decompress. CompFace - used by gnus to display XFace headers in messages. GifLib - library to support GIF images.
Grep - for searching through files with grep. Gzip - used by Emacs to automatically decompress. Lha - used by archive-mode to edit. Patch - used by ediff-patch-file and others to apply patches. Tar - used by tar-mode to edit tar files. TexInfo - used to build Emacs' manuals. Unzip - used by archive-mode for extracting zip files. Xpm - library to support XPM images bundled with Emacs binaries Zip - used by archive-mode for editing zip files.
Read man pages , Previous: Man pages for Emacs and other ported programs that you have can be read using Emacs' built-in manual reader woman. This requires no external programs, but if you do have a port of man , there is also an Emacs wrapper man that which may be slightly faster.
Other useful ports , Up: Top 12 Further information More information Mailing lists Next: Mailing lists , Up: If you have general questions about Emacs, the best places to start looking are Top , and Top. More information , Up: The official mailing list for Windows specific help and discussion is help-emacs-windows.
See that link for information on how to subscribe or unsubscribe. The list archives are available online. Further information , Up: Top Indexes Function and Variable Index add-untranslated-filesystem: Line ends by file system ange-ftp-ftp-program-name: Shell completion forward slash comint-completion-addsuffix: MSVC command line compile-command: Default compile command create-fontset-from-ascii-font: Focus follows mouse ftp: Read man pages message-send-mail-function: Line ends by file system rgrep: Incoming mail with Rmail rmail-primary-inbox-list: Incoming mail with Rmail send-mail-command: Associate files with Emacs set-face-font: Bold and italic set-message-beep: Line ends by file system user-full-name: Bold and italic wenable-unicode-output: Add fonts to menu wmouse-button-tolerance: Console window size wuse-wfont-dialog: Read man pages x-list-fonts: Font names Concept Index -nw, window size: Location of init file.
Attachments with Gnus 2 button mouse: Location of init file addpm: Installing binaries addpm, using GTK image libraries: GTK alt key, using windows keys as additional: Associate files with Emacs ange-ftp: Using FTP anti-virus software reporting a virus in Emacs: Virus anti-virus software, bad interaction with: One option to provide these libraries is to use GnuWin The useful libraries for emacs include: Mac OS X includes a command-line version of emacs.
However, to use all of Emacs' functionality it is best to use an emacs package such as Carbon Emacs. Windows Install There are three options when installing Emacs in Windows: First download the binary, and click through the warning messages that may present themselves: In some operating systems another warning may occur: After that, the install begins; Follow the on-screen instructions to complete installing Emacs: Accept the GPL licence agreement: Read any important information or release information: After choose the installation directory: Then select what parts of Emacs you wish to install: Choose if you wish to install EmacsW32 for all users on the system: If you decide to install for all users, the install may prompt for removing previous emacs customizations for the current user: Next choose if you wish to associate any files with emacs: Once you have decided on which extensions to use, next will confirm the extensions: Next, you choose the name of the program group that will house the emacs program, by default this is "GNU Emacs" Last an installation summary screen is shown: And the install begins: At the end of the install, there is an option to customize the EmacsW Here the following dialog is displayed: Its a simple dialog that asks if you wish to install emacs as the location you specified: Bzip2 - used by Emacs to automatically decompress.
CompFace - used by gnus to display XFace headers in messages. GifLib - library to support GIF images. Grep - for searching through files with grep. Gzip - used by Emacs to automatically decompress. Lha - used by archive-mode to edit. Patch - used by ediff-patch-file and others to apply patches. Tar - used by tar-mode to edit tar files.