FAQ Revised: Thursday 21 August 2003 18:02:28
makeinfo saying "Unknown command `copying'"?Emacs.app
application bundle?M-h) instead of
being processed by the Finder as the Hide Emacs shortcut?HELLO file not supported?The sequence of commands to obtain and build texinfo and Emacs (assuming that you already have Developer Tools installed) should look something like this:
curl -O ftp://ftp.gnu.org/gnu/texinfo/texinfo-4.2.tar.gz tar zxf texinfo-4.2.tar.gz cd texinfo-4.2 ./configure make sudo make install cd .. cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/emacs login cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/emacs co emacs cd emacs ./configure --with-carbon --without-x make bootstrap sudo make install
For specialized methods of building Emacs, such as building it to run
on the X Window System, read the file mac/INSTALL.
You're probably not doing a make bootstrap at the
top-level directory while you got this error message. Otherwise
lisp/abbrev.elc would have already been created. The top-level
Makefile will not try to create ../etc/DOC before that happens.
Check that you are in fact doing a make bootstrap.
Try running make extraclean; ./configure ...whatever...; make
bootstrap.
makeinfo saying "Unknown command `copying'"?You need makeinfo from texinfo version 4.2. Earlier versions will not work. Check your version of texinfo by typing
makeinfo --version
Perhaps you can try rebuilding the launch service database as described here:
http://developer.apple.com/carbon/tipsandtricks.html#RebuildLS
Basically, type
rm ~/Library/Preferences/LS* rm ~/Library/Preferences/.LS*
and reboot.
Those messages just mean that the compiler needs to read and parse
the header files, instead of being able to use the pre-compiled
headers. In any case, the compiler is doing the right thing using the
new definitions for vfork and select rather
than those in the pre-compiled headers. So it is normal to see them.
No.
I put it in my Mac OS 9 System Folder so both systems 9 and X can
see it. You can also try putting it in ~/Library/Fonts/
for only that user to see or /Library/Fonts/ for all
users to see.
You say something like this:
cvs update -D "29 Sep 2002 11:00:00 -0600"
for example. Note however, that once you've used
the -D option, your copy will be `stuck' at that date.
To update to a later version subsequently, do this:
cvs update -A
There being so many Fink packages, it is hard to give a definitive answer. Furthermore, I build everything from source! So I know nothing about Fink.
But in general, development software and libraries installed by
Fink can affect the build. If so, perhaps it is possible to remove
them and try. Also check whether your environment variables (such
as PATH, CFLAGS, CC,
LD_LIBRARY_PATH, etc.) are set by these packages.
Emacs.app
application bundle?Yes. Copy the
directories etc, leim, lisp,
and site-lisp, which are by default installed into
/usr/local/share/emacs/<emacs-version>/, into
Emacs.app/Contents/Resources/.
Copy the files installed into /usr/local/bin and
/usr/local/libexec/emacs/<emacs-version>/<system-configuration>/ into
Emacs.app/Contents/MacOS/bin/
and Emacs.app/Contents/MacOS/libexec/, respectively.
Copy the files installed into /usr/local/info/ into
Emacs.app/Contents/Resources/info/.
Now the application bundle (as a whole) can be moved around anywhere
you want. A script to automatically construct such an application
bundle will follow.
I will provide one at ftp.gnu.org when the Mac OS X
code becomes part of a standard Emacs source distribution.
This will probably not happen until version 21.4, however.
http:XEmacs
It is based on and will be part of the standard Emacs 21 distribution.
It is highly stable. It runs natively as a GUI application and does
not require X Window to run (although it can be compiled to run under
X Window).
If you are learning to use Emacs, you should read the Emacs FAQ
(C-h C-f), the tutorial (C-h t), and the
online manual (C-h i).
The book Learning GNU Emacs by Cameron, Rosenblatt, and Raymond
provides a good introduction, although dated.
Read the Emacs Lisp online manual (C-h i g ( Elisp ) RET).
The O'Reilly book GNU Emacs Extensions by Bob Glickstein is also a
good source of information, although dated.
There are routines that connect the Mac clipboard and the Emacs kill ring.
The most recent kill is copied to the clipboard when Emacs is
suspended and the contents of the clipboard is inserted into the kill
ring when Emacs resumes. The result is that you can yank a piece of
text and paste it to another Mac application or cut or copy one in
another Mac application and yank it into a Emacs buffer.
Emacs detects and selects the correct characters to be interpreted as end of line. It should automatically and correctly handle Mac-, Unix-, and DOS-style end of line characters in files it edits and saves them in their original end-of-line styles.
To change a file's end-of-line style, visit it and determine its
coding by evaluating the
expression buffer-file-coding-system. Then change the
suffix to the desired end-of-line style and save the file using by
typing M-x set-buffer-file-coding-system. For example if
the coding of the file is undecided-mac, changing it to undecided-dos
and saving the file will cause the file to use DOS end-of-lines.
Emacs can use either the option key or command key as the meta key.
The Lisp variable mac-command-key-is-meta can be set
dynamically to a non-nil value (e.g., in .emacs) to make
Emacs recognize the command key as the meta key. The default value of
this variable is nil, which means that the option key is the meta key.
Most people, however, should want to use the Mac command key as the
meta key so dead key processing with the Mac option key will still
work.
All X colors defined in .../etc/rgb.txt are supported
(type M-x list-colors-display to see them). Therefore
modes and packages that require color support like font lock mode,
hilit mode, and customize will be displayed in color.
It also supports old-style RGB color specs (i.e., #RRGGBB).
Here's an example. Evaluate the following expressions
(set-background-color "snow") (set-foreground-color "firebrick4")
It looks for
-etl-fixed-medium-r-normal--16-160-75-75-m-160-iso8859-1
and if that's not installed on the system, it looks for 12-pt Monaco.
Like its font, the width and height of a frame can be changed dynamically. E.g., to specify a 100 x 44 initial frame, add the follow line to .emacs:
(setq initial-frame-alist '((width . 100) (height . 44)))
To set the width and height of a frame after it has been created, evaluate the expression
(modify-frame-parameters (selected-frame) '((width . 100) (height . 44)))
Note that there must be at least one space before and after the
period.
That's easy. Just put
(cd "whatever/pathname/you/want")
at the end of your .emacs file.
Replace the binary /usr/local/bin/emacs (or wherever
you installed it) with a file containing the following two lines (of
course you need to change the pathname according to where you have put
the Emacs.app application bundle).
#!/bin/sh /Applications/Emacs.app/Contents/MacOS/Emacs "$@"
Then typing emacs
(provided /usr/local/bin is include in your PATH
environment variable) will start Emacs in GUI mode.
Typing emacs -nw will start Emacs in terminal mode.
Try doing this:
(setq process-connection-type nil)
There seems to be a problem with the pty implementation in Mac OS X.
Unfortunately some Emacs packages (like ange-ftp) depends on it.
M-h) instead of
being processed by the Finder as the Hide Emacs shortcut?Try setting
mac-pass-command-to-system
to nil. Another variable mac-pass-control-to-system
determines whether control keys are sent first to the system for
processing.
Once you have set up the Unix command lpr
<filename> to work correctly (for both text files and
Postscript files), you should be able to use all the printing commands
in Emacs.
There are different bits information on the web on how to do this.
You will probably need to experiment a little. Try
this
one (for 10.1), e.g., or
this
one (for 10.2).
Yes. Emacs recognizes the setting in the Keyboard control panel and
should support international and alternative keyboard layouts (e.g.,
Dvorak). Note that the Mac toolbox still performs deadkey processing
(see Inside Macintosh: Event Manager) which affects the characters
that Emacs actually receives.
To use the Mac keyboard (which ordinarily generates characters in the MacRoman encoding) for entering ISO Latin-1 characters, evaluate the following expression
(setq mac-keyboard-text-encoding kTextEncodingISOLatin1)
and select one of the layouts from the keyboard layout pull-down menu.
Note also that not all Mac Roman characters that can be entered at the
keyboard can be converted to ISO Latin-1 characters.
This experimental feature allows you to enter ISO Latin-2 characters directly using the Mac keyboard. To do this evaluate the expression
(setq mac-keyboard-text-encoding kTextEncodingISOLatin2)
Then type M-x set-keyboard-coding-system RET iso-latin-2
RET. Please let me know if this works. I have no way of
testing it.
To edit a file in Big-5 Traditional Chinese encoding, set the language
environment to Chinese-BIG5 and set a LEIM Big-5 input method (e.g.,
chinese-b5-tsangchi). This can be achieved by placing
the following lines into your .emacs file.
(set-language-environment 'Chinese-BIG5) (set-input-method 'chinese-b5-tsangchi)
You can then input Chinese characters using the LEIM input method.
To use a Traditional Chinese input method supported by Mac OS X, evaluate the following expression
(set-keyboard-coding-system 'chinese-big5)
and select one of the Traditional Chinese input methods the keyboard
layout pull-down menu.
To edit a file in iso-2022-jp or SJIS,
set the language environment to Japanese. This can be
achieved by evaluating the following expressions.
(set-language-environment 'Japanese)
To use a Japanese input method supported by Mac OS X, evaluate the following expression
(set-keyboard-coding-system 'sjis)
and select one of the Japanese input methods the keyboard layout
pull-down menu.
Fonts must be specified to Emacs using the long X font spec format. I.e.,
-FOUNDRY-FAMILY-WEIGHT-SLANT-WIDTH--PIXELS-POINTS-
HRES-VRES-SPACING-AVEWIDTH-CHARSET
where the fields are foundry, font family, weight, slant, width, pixels, point size, horizontal resolution, vertical resolution, spacing, average width, and character set, respectively.
With respect to Emacs, there are two types of fonts on the Mac: normal fonts, like Monaco, Taipei, Osaka and those that are converted from GNU fonts. The latter have foundry, family, and character sets encoded in their names. E.g., the converted font ETL-Fixed-ISO8859-1 is identified by the name
-ETL-Fixed-*-*-*-*-*-*-*-*-*-*-ISO8859-1
The names of normal Mac fonts do not provide information about their encoding. The Mac OS determines that from the number of their FOND resources, which implies that the font should be use for a certain script by examining the range of values into which this number falls. Internally, the Mac font Taipei is referred to by the name
-*-Taipei-*-*-*-*-*-*-*-*-*-*-big5
because it is used for Traditional Chinese.
The plain, bold, italic, bold-italic variants of an X font are represented by the long font specs of the forms
-*-*-medium-r-*-*-*-*-*-*-*-*-* -*-*-bold-r-*-*-*-*-*-*-*-*-* -*-*-medium-i-*-*-*-*-*-*-*-*-* -*-*-bold-i-*-*-*-*-*-*-*-*-*
respectively. However, each Mac font is assumed to already contain
all four variants and if a certain bitmap is absent, the font manager
will create it as it is needed.
A frame can be set to use a certain font by evaluating the expression of the form
(modify-frame-parameters (selected-frame)
'((font . "-*-Monaco-*-100-*")))
The above example shows how to set the Monaco font of size 10. Evaluating the expression
(modify-frame-parameters (selected-frame)
'((font . "-ETL-Fixed-*-140-*-ISO8859-1")))
makes the front most frame use the size-14 version of the converted font ETL-Fixed-ISO8859-1.
The font used for the initial frame and subsequently created frames
can be set by changing the value of the initial-frame-alist and
default-frame-alist as described in Emacs documentation.
A frame can be set to use a fontset by evaluating the expression
(modify-frame-parameters (selected-frame)
'((font . "fontset-mac")))
A list of fontsets can be obtained by typing M-x
list-fontsets. Two fontsets are created by default:
fontset-standard and fontset-mac.
To see which fonts are used for the codings
in fontset-mac, e.g., type
M-x describe-fontset RET -*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-mac RET
The simplest way is to install the GNU intlfonts (see download link
below). Then latin-1 characters should be displayed correctly by
default. If you want to use Monaco instead, make sure you have that
font installed in your system and set your font
to fontset-mac. To find out how to do this, read about
default-frame-alist in the on-line manual. The most
flexible method of setting which fonts to use for characters in
different codings is to define your own fontsets. Please read about
the function create-fontset-from-fontset-spec in the
manual and use fontset-mac as an example.
To properly display latin-1 characters using 9-pt Monaco, do this:
(create-fontset-from-fontset-spec "-apple-monaco-medium-r-normal--9-*-*-*-*-*-fontset-monaco, ascii:-apple-monaco-medium-r-normal--9-90-75-75-m-90-mac-roman, latin-iso8859-1:-apple-monaco-medium-r-normal--9-90-75-75-m-90-mac-roman")
and set-frame-font to fontset-monaco.
You can also use any other font that has non-zero size in the list
returned by the function x-list-fonts.
HELLO file not supported?I've written an MPW tool to convert fixed-width BDF fonts to Mac NFNT fonts. Because of the limitation of the NFNT format, this program will work only for fonts with no more than 256 code points.
Font sets with more than 256 code points cannot be represented in the NFNT format. I have also written another MPW tool to convert BDF fonts to the "bitmap" variant of TrueType fonts (the one that uses a 'bhed' table instead of a 'head' table). Of course the conversion will not generate any font outlines. I have not finished testing this tool and the fonts generated by it.
An alternatively method of get more fonts to work is by
implementing our own font cache as done in w32bdf.c. It
is not easy to adapt the code in w32bdf.c directly
because it depends on the ability of Windows to map a portion of
virtual memory to a file.
Ikegami Tsutomu suggested the addition of the following lines to
.emacs to enable kill-yank region (and clipboard
transfer) containing Japanese characters
; translate clipboard
(set-selection-coding-system 'sjis-mac)
(setq interprogram-cut-function
'(lambda (str push)
(mac-cut-function
(encode-coding-string str selection-coding-system t) push)))
(setq interprogram-paste-function
'(lambda ()
(decode-coding-string
(mac-paste-function) selection-coding-system t)))
The Emacs Lisp function do-applescript allows one to
run an AppleScript from Emacs by writing, e.g.,
(do-applescript "tell application \"iTunes\" to activate")
Since the Mac using '\r' as end lines, multiple-line script should be written in the form, e.g.,
(do-applescript "tell application \"iTunes\"\r activate\rend tell")