This file accompanies an Apple Macintosh port of GNU Emacs 18.59. Here are some things to remember: 1) This document describes differences between GNU Emacs on the Macintosh, and GNU Emacs on Unix. It is not an introduction to Emacs. Type control-H t in Emacs to get an introduction. | 2) Emacs can read and edit Macintosh formatted text files, Unix | formatted text files, and MSDOS formatted text files. Emacs can | also be used to edit binary files. See the file "About text file | formats" for more information on how Emacs detects and handles | these different situations. The methods used to determine file | formats are still subject to change. 3) The Modifier Key Nightmare: A fully functional Emacs implementation uses a modifier key called meta. There is no key named meta on the Macintosh keyboard. There is an option key, and many users of Emacs prefer to use the option key as a meta key. Some users prefer not to change the function of any of the modifier keys at all. Others prefer to use the larger command key as a meta key. If any key is changed to function as meta, there remains the question, how can the function of that lost modifier key be refound when necessary. The solution implemented now is that the functions of all five modifier keys, control, option, command, shift, and caps-lock, are configuable. By default, the function of these keys in Emacs is just like that of any other Macintosh program. Before you make any changes, you need to understand that the Macintosh operating system makes use of seven combinations of modifier keys. Each has a different effect on the keyboard, observable with the Key Caps desk accessory: shift, control, option, caps-lock, shift option, command option, and caps-lock option. A completely functional Emacs requires six more combinations: shift control, control option, control shift option, meta, shift meta, and control meta. The combinations control option and control shift option are not required by American keyboards, but some foreign keyboards use them. By default, this Emacs provides the seven standard combinations faithfully, plus the three additional combinations that do not require meta. The three meta combinations are not provided. You can change this and provide yourself with a meta key by using the ÒChange modifier keysÓ menu item in the Special menu. The settings you choose are saved in a preferences file. If you decide to let the option key function as meta, you need to redefine the option modifier. One suggestion provided in the dialog box is to let command-option be option. You could also leave option completely undefined, by chosing no modifier keys for it. If you decide to provide yourself a meta key, note that in other implementations of Emacs the meta key sets the high bit of any character typed. On the Macintosh, the meta key prefixes each character typed with an escape character. The resulting behavior is slightly different at times. The option-is-meta variable once provided for modifying keyboard behavior is now obsolete. 4) The author's favorite Unix utilities have been ported in addition to Emacs. These are ls, grep, ispell, and lpr. Try them using dired, M-x grep, M-x ispell, M-x print-buffer, and M-x print-region. You should uncomment the appropriate lines in ¥emacs to use ispell. (The program sh is included so that wildcard characters used in arguments to ls, grep, and lpr can be expanded in the normal way.) The programs chown, chmod, chgrp, mkdir, and rmdir are included for use with dired. The program wakeup is included for the display-time function. 5) Slashes in filenames within the Finder are translated to colons when referenced in Emacs. Colons in filenames within Emacs are translated to slashes when referenced by the Finder. Similarly, a '.' prefix in filenames within Emacs is translated to a '¥' when passed to the Finder, and a '¥' prefix in filenames within the Finder are translated to a '.' in Emacs. The dot-bullet translation is not quite as clean as the colon-slash translation, but it seems to be the solution that leaves the fewest problems. 6) Emacs is System 7 dependent. At one point Emacs required a 68020 processor, but this is no longer true. | 7) Emacs has a 25 bit address space. That's 32 megabytes. Emacs will | not make any use of a larger partition. Emacs does however make use | of temporary memory for large buffers, even memory above 32 megabytes. | | A utility program "Emacs Positioner" is run automatically when Emacs | is launched into high memory on a machine with more than 32 megabytes. | Emacs Positioner will reload Emacs into low memory. | | Note: If virtual memory is on, and the logical size of RAM is above | 32 megabytes, the Emacs Positioner will still work, but the system | will thrash excessively while loading Emacs. The larger the ratio | of logical to physical RAM, the worse the thrashing. Under worst | circumstances, Emacs may take a full minute or more to start up. | To prevent the Positioner from loading under any circumstances, hold | the control key down as Emacs starts. In this case, it's your | responsibility to be sure that Emacs will launch below the 32M cutoff. | Make absolutely sure you know what you're doing when you use this | feature. 8) Keep your ¥emacs file in your home directory. On the Macintosh the name ¥emacs is used instead of .emacs, because other programs have problems with filenames that begin with a period. The character ¥ is typed option-8. If you use option as meta, you must type option-command-8. 9) There should be a folder named ÒdirectoriesÓ in the same folder as Emacs. The use of ~ in directory names is as follows: a) The directory Ò~emacsÓ is, by definition, the same one that the Emacs program is in. b) If in the folder ÒdirectoriesÓ is an alias called ÒhomeÓ, then ~/ is the folder targeted by that alias. Otherwise ~/ is the same as ~emacs. c) For any other directory name ~dir, the folder understood is the target of the alias ÒdirÓ in the ÒdirectoriesÓ folder. 10) For Emacs elisp hackers only: To start Emacs without loading the dumped elisp data, hold the shift key down when starting. To rebuild the database, hold the option key down when starting. It is a good idea to save a copy of Emacs before rebuilding its database, because Emacs saves its dumped data directly into its own resource fork. 11) If Emacs suddenly quits on you, perhaps during garbage collection or byte-compiling, and perhaps with an error of ID 28, try using the "Set stack size..." menu item to increase the stack size. Sometimes the use of large windows on large screens with many lines of text requires larger amounts of stack space. 12) Hackers may like working with the files in the directory lisp:mac. But remember this warning: If you start using the Macintosh Toolbox, you can easily, and will most likely, crash Emacs, and the entire machine, losing all changes in any open documents in Emacs and other programs. 13) The commands in the Edit menu do the following: Undo calls the elisp function undo. Unlike what is typical on the Macintosh, successive undo's will undo more and more of what has been changed in the buffer. If you move the cursor after successive undo's, the undo command will then begin to successively redo what has been undone. Cut copies the region of the current buffer to the buffer named *clipboard*, and also copies that region to the System Scrap. Then the function delete-region is called. [The function kill-region, more familiarly known as control-W, is no longer called.] Copy is just like Cut, except that delete-region is not called. [The function copy-region-as-kill, more familiarly know as ESC-W, is no longer called.] Paste insures that the buffer named *clipboard* contains the contents of the Macintosh System Scrap, then inserts the contents of the buffer *clipboard* into the current buffer. It does not call the elisp function yank, known also as ESC-Y. Clear calls delete-region, and does nothing with the Macintosh System Scrap. These definitions are in lisp:mac:menu-install.el, and can be changed. The clipboard can be examined in the buffer named *clipboard*. By default on extended keyboards, the keys labeled undo, cut, copy, and paste do the expected things. 14) Emacs can only use fixed-width fonts. 15) Not all the elisp files included are immediately useful. The files dealing with mail are not working, for example. They are included for others who have a mail program and might try to make them work. 16) Emacs handles correctly pathnames with aliases used as directories. The pathname /HardDrive/Folder/AliasedFolder/File works. But pathnames with the final filename an alias work differently. If /HardDrive/Folder/Alias is an alias to say /HardDrive/File, then you can open and edit that file using the alias. When you save it, however, Emacs will first copy /HardDrive/File to /HardDrive/Folder/Alias~, then create rewrite /HardDrive/File. This may or may not be what you want. This is similar to what Emacs does under Unix with symbolic links. 17) In dired, use the command 'O', which runs chown, to change the creator of a file. Use the command 'G', which runs chgrp, to change the type of a file. Use the command 'M', which runs chmod, to set the mode bits of a file. Only the write permission of files is affected; the file is effectively locked or unlocked. 18) In TeX mode, C-c C-b (TeX-buffer), and C-c C-r (TeX-region) have been rewritten to send the appropriate Apple events to Textures. The version of Textures required is 1.6.2. You will need to edit the ¥emacs file to load the appropriate lisp code. 19) Mouse support is at the moment limited to this: Clicking sets point, and shift-clicking sets mark. 20) You can change the fonts available in the Font menu item by setting the variable fixed-width-fonts in your ¥emacs file. The default value is ("Courier" "Monaco"). 21) You can change the definitions of the keys on the numeric keypad, the keys F1-F15, the cursor keys, and the keys labeled help, home, page up, del, end, and page down. See the file lisp/term/Macintosh-win.el. | 22) Turn off "Always save session" in the Think Project Manager | before running with the debugger and using Emacs as an external editor. | 23) Macintosh Emacs now includes a CodeWarrior AppleEvent suite and | a CodeWarrior menu. Uncomment the marked line in the .emacs file | provided to use the menu. The current version of Codewarrior | compilers often return large error result numbers after a successful | compilation. This is a bug in Codewarrior, and you can ignore it. 24) The principal ftp site for the Macintosh port of Emacs is ftp.cs.cornell.edu, directory pub/parmet. The sources are on this site. 25) This port is now fairly well tested. Still, save often. Send bug reports, suggestions, and comments to the author of the port at parmet@cs.cornell.edu.