X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/1860d5c5b0e2fffb55e0c0a13384ca5039f81a60..57596fb6244238787666c4c4f1c2c98cb361e86a:/man/macos.texi diff --git a/man/macos.texi b/man/macos.texi index 42cdb99b60..6a7b291e7f 100644 --- a/man/macos.texi +++ b/man/macos.texi @@ -1,27 +1,31 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2000 Free Software Foundation, Inc. +@c Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Mac OS, MS-DOS, Antinews, Top @appendix Emacs and the Mac OS @cindex Mac OS @cindex Macintosh - Emacs built on the Mac OS supports many of its major features: + Emacs built on Mac OS X supports most of its major features: multiple frames, colors, scroll bars, menu bars, use of the mouse, -fontsets, international characters, input methods, coding systems, and -synchronous subprocesses (@code{call-process}). Much of this works in -the same way as on other platforms and is therefore documented in the -rest of this manual. This section describes the peculiarities of using -Emacs under the Mac OS. - - The following features of Emacs are not yet supported on the Mac: -unexec (@code{dump-emacs}), asynchronous subprocesses -(@code{start-process}), and networking (@code{open-network-connection}). -As a result, packages such as Gnus, Ispell, and Comint do not work. - - Since external Unix programs to handle commands such as -@code{print-buffer} and @code{diff} are not available on the Mac OS, -they are not supported in the Mac OS version. +fontsets, international characters, input methods, coding systems, +asynchronous and synchronous subprocesses, unexec (@code{dump-emacs}), +and networking (@code{open-network-stream}). Support for various +image file formats has not been implemented yet. + + The following features of Emacs are not yet supported on the Mac OS +8 or 9: unexec (@code{dump-emacs}), asynchronous subprocesses +(@code{start-process}), and networking (@code{open-network-stream}). +As a result, packages such as Gnus, GUD, and Comint do not work. +However, synchronous subprocesses (@code{call-process}) are supported. +Since external programs to handle commands such as @code{print-buffer} +and @code{diff} are not available on Mac OS 8 or 9, they are not +supported. + + Most of the features that are supported work in the same way as on +other platforms and are therefore documented in the rest of this +manual. This section describes the peculiarities of using Emacs under +the Mac OS. @menu * Input: Mac Input. Keyboard input on the Mac. @@ -42,8 +46,8 @@ they are not supported in the Mac OS version. On the Mac, Emacs can use either the @key{option} key or the @key{command} key as the @key{META} key. If the value of the variable @code{mac-command-key-is-meta} is non-@code{nil} (its default value), -Emacs uses the @key{command} key as the @key{META} key. Otherwise it uses the -@key{option} key as the @key{META} key. +Emacs uses the @key{command} key as the @key{META} key. Otherwise it +uses the @key{option} key as the @key{META} key. Most people should want to use the @key{command} key as the @key{META} key, so that dead-key processing with the @key{option} key will still work. This is @@ -69,8 +73,9 @@ characters. To enter ISO Latin-2 characters directly from the Mac keyboard, set the value of @code{mac-keyboard-text-encoding} to @code{kTextEncodingISOLatin2}. Then let Emacs know that the keyboard -generates Latin-2 codes by typing @kbd{C-x RET k iso-latin-2 RET}. To -make this setting permanent, put this in your @file{.emacs} init file: +generates Latin-2 codes, by typing @kbd{C-x @key{RET} k iso-latin-2 +@key{RET}}. To make this setting permanent, put this in your +@file{.emacs} init file: @lisp (set-keyboard-coding-system 'iso-latin-2) @@ -82,10 +87,11 @@ make this setting permanent, put this in your @file{.emacs} init file: @cindex clipboard support (Mac OS) The Mac uses a non-standard encoding for the upper 128 single-byte -characters. It also deviates from the ISO 2022 standard by using code -points in the range 128-159. The coding system @code{mac-roman} is used -to represent this Mac encoding. It is used for editing files stored in -this native encoding, and for displaying file names in Dired mode. +characters. It also deviates from the ISO 2022 standard by using +character codes in the range 128-159. The coding system +@code{mac-roman} is used to represent this Mac encoding. It is used +for editing files stored in this native encoding, and for displaying +file names in Dired mode. Any native (non-symbol) Mac font can be used to correctly display characters in the @code{mac-roman} coding system. @@ -95,8 +101,8 @@ is run on the Mac. It displays characters in the @code{mac-roman} coding system using 12-point Monaco. To insert characters directly in the @code{mac-roman} coding system, -type @kbd{C-x RET k mac-roman RET}, or put this in your @file{.emacs} -init file: +type @kbd{C-x @key{RET} k mac-roman @key{RET}}, customize the option +@code{keyboard-coding-system}, or put this in your init file: @lisp (set-keyboard-coding-system 'mac-roman) @@ -109,10 +115,10 @@ This is useful for editing documents in native Mac encoding. Methods}) or the Mac OS to enter international characters. To use the former, see the International Character Set Support section -of the manual. +of the manual (@pxref{International}). To use input methods provided by the Mac OS, set the keyboard coding -system accordingly using the @kbd{C-x RET k} command +system accordingly using the @kbd{C-x @key{RET} k} command (@code{set-keyboard-coding-system}). For example, for Traditional Chinese, use @samp{chinese-big5} as keyboard coding system; for Japanese, use @samp{sjis}, etc. Then select the desired input method in @@ -126,9 +132,9 @@ a piece of text and paste it into another Mac application, or cut or copy one in another Mac application and yank it into a Emacs buffer. The encoding of text selections must be specified using the commands -@kbd{C-x RET x} (@code{set-selection-coding-system}) or @kbd{C-x RET X} -(@code{set-next-selection-coding-system}) (e.g., for Traditional -Chinese, use @samp{chinese-big5-mac} and for Japanese, +@kbd{C-x @key{RET} x} (@code{set-selection-coding-system}) or @kbd{C-x +@key{RET} X} (@code{set-next-selection-coding-system}) (e.g., for +Traditional Chinese, use @samp{chinese-big5-mac} and for Japanese, @samp{sjis-mac}). @xref{Specify Coding}, for more details. @@ -136,9 +142,15 @@ Chinese, use @samp{chinese-big5-mac} and for Japanese, @section Environment Variables and Command Line Arguments. @cindex environment variables (Mac OS) - Environment variables and command line arguments for Emacs can be set -by modifying the @samp{STR#} resources 128 and 129, respectively. A common -environment variable that one may want to set is @samp{HOME}. + On Mac OS X, when Emacs is run in a terminal, it inherits the values +of environment variables from the shell from which it is invoked. +However, when it is run from the Finder as a GUI application, it +inherits no environment variable values. + + On Mac OS 8 or 9, environment variables and command line arguments +for Emacs can be set by modifying the @samp{STR#} resources 128 and +129, respectively. A common environment variable that one may want to +set is @samp{HOME}. The way to set an environment variable is by adding a string of the form @@ -168,28 +180,30 @@ EMACS_UNIBYTE=1 @end example So when Emacs requests a file name, doing file name completion on -@file{/} will display all volumes on the system. As in Unix, @file{..} -can be used to go up a directory level. +@file{/} will display all volumes on the system. You can use @file{..} +to go up a directory level. - To access files and folders on the desktop, look in the folder -@file{Desktop Folder} in your boot volume (this folder is usually -invisible in the Mac @code{Finder}). + On Mac OS 8 or 9, to access files and folders on the desktop, look +in the folder @file{Desktop Folder} in your boot volume (this folder +is usually invisible in the Mac @code{Finder}). - Emacs creates the Mac folder @file{:Preferences:Emacs:} in the -@file{System Folder} and uses it as the temporary directory. The Unix -emulation code maps the Unix directory @file{/tmp} to it. Therefore it -is best to avoid naming a volume @file{tmp}. If everything works -correctly, the program should leave no files in it when it exits. You -should be able to set the environment variable @code{TMPDIR} to use -another directory but this folder will still be created. + On Mac OS 8 or 9, Emacs creates the Mac folder +@file{:Preferences:Emacs:} in the @file{System Folder} and uses it as +the temporary directory. Emacs maps the directory name @file{/tmp/} +to that. Therefore it is best to avoid naming a volume @file{tmp}. +If everything works correctly, the program should leave no files in it +when it exits. You should be able to set the environment variable +@code{TMPDIR} to use another directory but this folder will still be +created. @node Mac Font Specs @section Specifying Fonts on the Mac @cindex font names (Mac OS) - Fonts are specified to Emacs on the Mac in the form of a standard X -font name, i.e. + It is rare that you need to specify a font name in Emacs; usually +you specify face attributes instead. But when you do need to specify +a font name in Emacs on the Mac, use a standard X font name: @smallexample -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{} @@ -197,8 +211,7 @@ font name, i.e. @end smallexample @noindent -@xref{Font X}. Wildcards -are supported as they are on X. +@xref{Font X}. Wildcards are supported as they are on X. Native Apple fonts in Mac Roman encoding has maker name @code{apple} and charset @code{mac-roman}. For example 12-point Monaco can be @@ -224,9 +237,10 @@ the name @samp{-ETL-fixed-*-iso8859-1}. executes it as an AppleScript command, and returns the result as a string. -@findex mac-filename-to-unix -@findex unix-filename-to-mac - The function @code{mac-filename-to-unix} takes a Mac file name and -returns the Unix equivalent. The function @code{unix-filename-to-mac} -performs the opposite conversion. They are useful for constructing -AppleScript commands to be passed to @code{do-applescript}. +@findex mac-file-name-to-posix +@findex posix-file-name-to-mac + The function @code{mac-file-name-to-posix} takes a Mac file name and +returns the GNU or Unix equivalent. The function +@code{posix-file-name-to-mac} performs the opposite conversion. They +are useful for constructing AppleScript commands to be passed to +@code{do-applescript}.