Article View: gnu.emacs.help
Article #189672GNU Emacs Frequently Asked Questions with Answers (part 2 of 2)
From: Joe Wells
Date: Sat, 08 Dec 1990 06:46
Date: Sat, 08 Dec 1990 06:46
760 lines
33035 bytes
33035 bytes
GNU Emacs Frequently Asked Questions with Answers (part 2 of 2)
Sat Dec 8 01:30:53 1990
Weird/Confusing Problems:
53: Does Emacs have problems with files larger than 8 Megs?
Most installed versions of GNU Emacs will use 24 bit signed integers
(and 24 bit pointers!) internally. This limits the file size that Emacs
can handle to 8388608 bytes.
Leonard N. Zubkoff <lnz@lucid.com> writes:
Putting the following two lines in src/config.h before compiling Emacs
allows for 26 bit integers and pointers:
#define VALBITS 26
#define GCTYPEBITS 5
See question 54 for an explanation.
54: Why does Emacs use 24 bit integers and pointers?
David Gillespie <daveg@csvax.cs.caltech.edu> writes:
Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed
language in the sense that you can put any value of any type into any
variable, or return it from a function, and so on. So each value must
carry a "tag" along with it identifying what kind of thing it is, e.g.,
integer, pointer to a list, pointer to an editing buffer, and so on.
Emacs uses standard 32-bit integers for data objects, taking the top 8
bits for the tag and the bottom 24 bits for the value. So integers (and
pointers) are somewhat restricted compared to true C integers and
pointers.
Emacs uses 8-bit tags because that's a little faster on byte-oriented
machines, but there are only really enough tags to require 6 bits. See
question 53 to find how to recompile Emacs with 6-bit tags and
26-bit integers and pointers if space is at a premium for you.
55: Why does Emacs start up using the wrong directory?
Most likely, you have an environment variable named PWD that is set to a
value other than the name of your current directory. This is most
likely caused by using two different shell programs. "ksh" and (some
versions of) "csh" set and maintain the value of the PWD environment
variable, but "sh" doesn't. If you start sh from ksh, change your
current directory inside sh, and then start Emacs from inside sh, PWD
will have the wrong value but Emacs will use this value. See question
72.
56: How do I edit a file with a "$" in its name?
When entering a filename in the minibuffer, Emacs will attempt to expand
a "$" followed by a word as an environment variable. To suppress this
behavior, type "$$" instead.
57: Why does Shell Mode lose track of the shell's current directory?
Emacs has no way of knowing when the shell actually changes its
directory. So it tries to guess by recognizing cd commands. A number
of fixes and enhancements to Shell Mode have been written, check the
Emacs Lisp Archive (question 14).
58: Why doesn't Emacs expand my aliases when sending mail?
First, you must separate multiple addresses with commas.
Emacs normally only reads the ".mailrc" file once per session, when you
start to compose your first mail message. If you edit .mailrc, you can
type "M-ESC (build-mail-aliases) RET" to make Emacs reread .mailrc.
59: Why doesn't setting default-directory always work?
There is a separate value of default-directory for each Emacs buffer.
The value in the current buffer is the one that is used.
60: Why does my change to load-path not work?
If you added file names with tildes (~) in them to your load-path,
you'll need to do something like this:
(setq-default load-path (mapcar 'expand-file-name load-path))
61: Why does the cursor always go to the wrong column when I move up or
down one line?
You have inadvertently typed "C-x C-n" (set-goal-column) which sets the
"goal-column" to the column where the cursor was. To undo this type
"C-u C-x C-n".
If you make this mistake frequently, you might want to unbind this
command by doing (define-key ctl-x-map "\C-n" nil).
62: Why don't the command line switches documented in the man page work?
The "man page", ie. the file etc/emacs.1, hasn't been updated in a
while. The command line switches that it says work with X Windows are
for X10. See question 72 for details on what switches are
available using X11. {Would someone like to rewrite the man page? RMS
asked me and I haven't had time yet.}
63: Why does gnus-Subject-mail-reply chop off the last character of the
article headers?
There is a bug in some rnews functions that GNUS uses. Here is a patch:
(Patch supplied by Karl Kleinpaste <karl_kleinpaste@cis.ohio-state.edu>.)
>*** rnewspost.el.orig Thu Oct 5 10:32:47 1989
>--- rnewspost.el Thu Oct 5 10:32:47 1989
>***************
>*** 252,258 ****
> (save-restriction
> (narrow-to-region (point-min) (progn (goto-line (point-min))
> (search-forward "\n\n")
>! (- (point) 2)))
> (setq from (mail-fetch-field "from")
> subject (mail-fetch-field "subject")
> reply-to (mail-fetch-field "reply-to")
>--- 252,258 ----
> (save-restriction
> (narrow-to-region (point-min) (progn (goto-line (point-min))
> (search-forward "\n\n")
>! (- (point) 1)))
> (setq from (mail-fetch-field "from")
> subject (mail-fetch-field "subject")
> reply-to (mail-fetch-field "reply-to")
>***************
>*** 289,295 ****
> ;@@ but rnews.el lacks support
> (narrow-to-region (point-min) (progn (goto-char (point-min))
> (search-forward "\n\n")
>! (- (point) 2)))))
> (setq from (mail-fetch-field "from")
> news-reply-yank-from from
> ;; @@ not handling old Title: field
>--- 289,295 ----
> ;@@ but rnews.el lacks support
> (narrow-to-region (point-min) (progn (goto-char (point-min))
> (search-forward "\n\n")
>! (- (point) 1)))))
> (setq from (mail-fetch-field "from")
> news-reply-yank-from from
> ;; @@ not handling old Title: field
>***************
>*** 365,371 ****
> ;@@ but rnews.el lacks support
> (narrow-to-region (point-min) (progn (goto-char (point-min))
> (search-forward "\n\n")
>! (- (point) 2)))))
> (setq news-reply-yank-from (mail-fetch-field "from")
> ;; @@ not handling old Article-I.D.: field
> news-reply-yank-message-id (mail-fetch-field "message-id")))
>--- 365,371 ----
> ;@@ but rnews.el lacks support
> (narrow-to-region (point-min) (progn (goto-char (point-min))
> (search-forward "\n\n")
>! (- (point) 1)))))
> (setq news-reply-yank-from (mail-fetch-field "from")
> ;; @@ not handling old Article-I.D.: field
> news-reply-yank-message-id (mail-fetch-field "message-id")))
64: Why does Emacs hang with message "Unknown XMenu" with X11R4?
Many different X errors can produce this message. Here is the solution
to one problem:
X11 Release 4 now enforces some conditions in the X protocol that were
previously allowed to pass unnoticed. You need to put the X11R4 server
into X11R3 bug compatibility mode for Emacs's Xmenu code to work. You
can do this with the command "xset bc".
65: Why isn't the load average displayed by display-time?
The most likely cause of the problem is that "loadst" can't read the
special file /dev/kmem. To properly install loadst, it should be either
setuid to the owner of /dev/kmem, or is should be setgid to the group to
which /dev/kmem belongs. In either case, /dev/kmem should be readable by
its owner or its group, respectively.
Another possibility is that your version of Unix doesn't have the load
average data available in /dev/kmem. Your version of Unix might have a
special system call to retrieve this information (eg., inq_stats under
UMAX).
66: Why doesn't GNUS work anymore via NNTP?
There is a bug in NNTP version 1.5.10, such that when multiple requests
are sent to the NNTP server, the server only handles the first one before
blocking waiting for more input which never comes.
You can work around the bug inside Emacs like this:
(setq nntp-maximum-request 1)
(setq nntp-buggy-select t)
Or you could fix the NNTP server in one of these ways:
1. Test whether there is data in stdin's stdio buffer before calling
"select" using something like "((fileptr)->_cnt > 0)". Best choice.
2. Remove call to select by not defining "TIMEOUT" in "common/conf.h".
3. Put "setbuf (stdin, NULL)" in the NNTP server in the right spot.
This would be very inefficient.
4. Rewrite the server to use an alarm instead of "select".
67: Why can't I paste a selection I made in Emacs into my xterm window?
A person whose name I lost writes:
The strange interaction between Emacs, xterm, and the cut buffers is
because most xterm clients use selections instead of (well, superceding)
cut buffers. If there is a selection around, xterms will use that
instead of the cut buffer. Emacs doesn't know about selections, but you
can convince xterm to always use the cut buffer instead of selections by
adding this to your .Xdefaults:
! Solution by Thomas Narten, should work under X11R3 and later
! GNU Emacs only copies to CUT_BUFFER0. xterm by default wants to paste
! from the PRIMARY selection.
XTerm*VT100.Translations: #override \
~Meta <Btn2Up>: insert-selection(CUT_BUFFER0)
68: Why does ispell sometimes ignore the local dictionary?
You need to update the version of ispell to 2.0.02. A patch is
available via:
Anonymous FTP:
site: tut.cis.ohio-state.edu
file: /pub/gnu/ispell/patch2.Z
You also need to change a line in ispell.el from:
(defconst ispell-version "2.0.01") ;; Check against output of "ispell -v".
to:
(defconst ispell-version "2.0.02") ;; Check against output of "ispell -v".
Configuring Emacs for yourself:
69: How do I set up a .emacs file properly?
I'm going to be sending out a sample .emacs file in a separate message
later this month. It will be based largely on AT&T's sample .emacs
file, which was sent to me by Dan Jacobson. In fact it might be
identical.
70: How do you debug a .emacs file?
First start Emacs with the "-q" command line option. Then, in the
*scratch* buffer, type the following:
(setq debug-on-error t) C-j
(load-file "~/.emacs") C-j
(C-j stands for Control-J, ie., hold the control key and press J.)
If you have an error in your .emacs file, this will invoke the debugger
when the error occurs. If you don't know how to use the debugger do
(setq stack-trace-on-error t) instead.
WARNING: this will not discover errors caused by trying to do something
that requires the terminal/window-system initialization code to have
been loaded. See question 34.
71: How do I turn on abbrevs by default just in mode XXX?
Put this in your .emacs file:
(condition-case ()
(read-abbrev-file nil t)
(file-error nil))
(setq XXX-mode-hook
(function
(lambda ()
(setq abbrev-mode t))))
72: What does Emacs do every time it starts up?
This question is not itself frequently asked, but helps to answer other
questions.
Here is a complete explanation of the order in which things are done
during startup.
1. These command line switches are handled, only if they appear before
all other command line arguments, and only if they appear in this
order:
"-map". Only under VMS. Instead of "undumping", under VMS the
contents of a dump file are mapped over a section of memory (very
quickly initializing lots of variables).
"-t". The next argument is treated as the name of a terminal to use
instead of whatever is connected to the stdin, stdout, and stderr
FILE pointers.
"-display" (synonym: "-d"). The next argument is treated as the
name of an X Window System server with which to connect. This
overrides the DISPLAY environment variable.
"-nw". This means don't connect to an X Window server even if the
DISPLAY environment variable was set or the "-display" switch was
specified. Instead, Emacs talks to a regular dumb terminal.
"-batch". Emacs is noninteractive. The variable "noninteractive"
is t. This disables any full screen interaction either with a
dumb terminal or with a window system. In addition, Emacs will
die after processing all command line arguments.
All of Emacs's internal data structures are initialized between steps 2
and 5.
2. The "*scratch*" buffer is created and its value of default-directory
is set from the result of calling the "getwd" library routine.
(getwd does what the "pwd" program does.)
3. If X11 is being used, Emacs determines the name under which it looks
for X resource values. (I haven't checked how it does this under
X10.)
1. If there is a "-rn" command line switch, it is handled now, no
matter where it is on the command line. (Later it will be
processed again and ignored.) The next argument is used as
Emacs's resource name.
2. If the "-rn" switch was missing, Emacs looks for the WM_RES_NAME
environment variable.
3. If neither of the previous two steps succeed, Emacs uses the
filename with which it was invoked as its resource name.
4. If X11 is being used, these command line switches are handled now,
no matter where they appear in the command line. (Under X10, they
are not handled until step 13.) WARNING: this can cause strange
interactions with the processing of the remaining command line
arguments in step 13.
In addition, under both X11 and X10, X resources (ie. the stuff in
an .Xdefaults file) are handled now. Command line switches take
precedence over resources.
After each command line switch are given the equivalent resource
names in this format: (X10 name / X11 instance name / X11 class name).
"-r". Reverse video. (ReverseVideo/reverseVideo/ReverseVideo)
"-font" (synonym: "-fn"). Font. (BodyFont/font/Font)
"-wn". Window name (X11 only). (/title/Title)
"-in". Icon name (X11 only). (/iconName/Title)
"-i". Use built-in icon bitmap. (BitMapIcon//)
"-b". Border width (in pixels).
(BorderWidth/borderWidth/BorderWidth)
"-ib". Internal border width (in pixels) (default: 1).
(/internalBorder/BorderWidth)
"-geometry" (synonym: "-w"). Window shape and size. "-geometry" is
X11 only, but its synonym "-w" was available under X10.
(/geometry/Geometry)
Color options only:
"-fg". Foreground color. (Foreground/foreground/Foreground)
"-bg". Background color. (Background/background/Background)
"-bd". Border color. (Border/borderColor/BorderColor)
"-cr". Cursor color. (Cursor/cursorColor/Foreground)
"-ms". Mouse pointer color. (Mouse/pointerColor/Foreground)
In addition, under X10, the resource "Keymap" was handled now.
5. If your Emacs isn't "dumped", the default Lisp libraries are
"loaded" now.
6. Emacs enters a "recursive edit". The first time Emacs does a
recursive edit, steps 7 through 15 are followed, and then Emacs
enters its normal editing mode.
7. If the environment variable PWD exists, the value of
default-directory in the *scratch* buffer is set to the value of
PWD. This often causes problems and confusion when the value of PWD
doesn't actually contain the pathname of the current directory.
8. Now the "-no-init-file" (synonym: "-q") and "-user" (synonym: "-u")
command line switches are handled. They must follow the switches
mentioned in step 1, and must precede any other command line
arguments. Actually, both of these options can be specified;
whichever is last on the command line wins.
9. The user's ".emacs" file is loaded now, if the -no-init-file option
was not specified. If the -user option was specified, that user's
.emacs file is loaded instead. A user's .emacs file is a file named
".emacs" in the user's "home" directory. If no such file exists,
this step has no effect.
10. The system wide "default" file is loaded now, if the variable
inhibit-default-init is nil. The user can set this variable in the
.emacs file to skip this step.
11. If the *scratch* buffer still exists now, the value of
initial-major-mode is called as a function in this buffer.
Normally, this puts this buffer in Lisp Interaction mode.
12. Now the terminal/window-system setup file is loaded. The name of
this file is determined as follows:
1. It starts with the value of term-file-prefix. Normally this is
"term/", but the user can set it to another value. If this
variable is nil, this entire step is skipped.
2. For a window system, the prefix is followed by the name of the
value of the variable window-system, followed by "-win". For X
Windows, this means the name is "term/x-win".
3. For a terminal, the prefix is followed by the value of the
environment variable TERM, for example, "term/vt200". If Emacs
cannot find such a file to load, it retries by stripping off
suffixes that begin with a hyphen. For example, if TERM is
"vt200-40", first Emacs will try "term/vt200-40", and if that
fails it will try "term/vt200".
13. The rest of the command line arguments are handled at this point, in
the order they appear:
"-funcall" (synonyms: "-f", "-e"). The next argument is treated as
the name of a function, which is called with no arguments.
"-load" (synonym: "-l"). The next argument is treated as the name
of a file to load. NOTE: the value of the variable load-path
will be restored after this file is done loading. Thus, trying
to change load-path in such a file will fail!!
"-kill". When this argument is handled, Emacs kills itself.
"+DDD", where D is a digit. DDD is used as a line number to go to.
When the next ordinary file argument on the command line is
handled, Emacs positions point in that file on line DDD.
An ordinary filename. Emacs edits this file using the function
find-file. If the filename is not an "absolute" filename, it is
expanded relative to the value that default-directory in the
*scratch* buffer had at the beginning of step 11. The buffer
visiting this file becomes the current buffer.
"-insert" (synonym: "-i"). The next argument is treated as the name
of a file. This file is inserted in the current buffer.
Initially, this is the *scratch* buffer. Otherwise it is the
buffer visiting the file most recently specified on the command
line. WARNING: the synonym "-i" doesn't work under X11.
Other command line switches may have been created by modifying the
value of the variable command-switch-alist. If X Windows is being
used, all X-specific switches mentioned above in steps 3 and 4 will
be processed. Under X11, they will have already been handled, and
will be ignored now. Under X10, they are being handled for the
first time.
14. The values of the variables term-setup-hook and window-setup-hook
are called as functions with no arguments, in the order listed.
15. If the user did not specify any of the command line options handled
in step 13, and the variable inhibit-startup-message is still nil,
the familiar Emacs startup message is displayed.
73: What are the valid X resource settings (ie., stuff in .Xdefaults file)?
See question 72.
WARNING: Don't pay any attention to the documentation in etc/XDOC or
etc/emacs.1. It's way out of date. {Would someone like to rewrite it?
RMS asked me and I haven't had time yet.}
74: How do I turn down the bell volume in Emacs running under X Windows?
Under Epoch you can do:
(setq epoch::bell-volume 20)
Under normal GNU Emacs you must modify the XTfeep function in
src/x11term.c, and change the number 50 to some other number:
XTfeep ()
{
BLOCK_INPUT_DECLARE ();
#ifdef XDEBUG
fprintf (stderr, "XTfeep\n");
#endif
BLOCK_INPUT ();
XBell (XXdisplay,50); /* change this 50 */
UNBLOCK_INPUT ();
}
75: How do I make Emacs send 8-bit characters to my terminal?
Johan Widen <jw@sics.se> writes:
A patch for emacs-18.55 is available by ftp and mail-server from
sics.se.
Anonymous FTP:
site: sics.se [192.16.123.90]
file: archive/emacs-18.55-8bit-diff
E-mail:
To: mail-server@sics.se
body: send emacs-18.55-8bit-diff
Emacs Lisp programming:
76: What dialect of Lisp is Emacs Lisp?
It's the dialect of Lisp called Emacs Lisp. (No joke!) People also
call it elisp or e-lisp. (NOTE: The term "Elisp" is trademarked by
someone else.)
77: How close is Emacs Lisp to Common Lisp?
Pretty far. GNU Emacs Lisp is case-sensitive, uses dynamic scoping,
doesn't have packages, doesn't have multiple return values, doesn't have
reader macros, etc. For people used to Common Lisp, some of the
functions in Common Lisp that are not in Emacs Lisp by default are
provided in the file lisp/cl.el. There is a Texinfo manual describing
these functions in man/cl.texinfo.
78: How do I execute a piece of Emacs Lisp code?
There are a number of ways to execute (called "evaluate") an Emacs Lisp
"form":
* If you want it evaluated every time you run Emacs, put it in a file
named ".emacs" in your home directory.
* You can type the form in the "*scratch*" buffer, and then type C-j
after it. The result of evaluating the form will be inserted in the
buffer.
* In in Emacs-Lisp mode, typing M-C-x evaluates a top-level form before
or around point.
* Typing "C-x C-e" in any buffer evaluates the Lisp form immediately
before point and prints its value in the echo area.
* Typing M-ESC or M-x eval-expression allows you to type a Lisp form in
the minibuffer which will be evaluated.
* You can use M-x load-file to have Emacs evaluate all the Lisp forms in
a file. (To do this from Lisp use the function "load" instead.)
79: How do I make a set of operations fully local to a region?
Use narrow-to-region inside of save-restriction.
80: How can I highlight a region?
There are ways to get highlighting in GNU Emacs 18.55, but they all
require patching the C code of Emacs and rebuilding. They are also slow
and the highlighting disappears if you scroll or redraw the screen. One
patch is by Kenichi Handa <handa@etl.go.jp>.
You can hightlight regions in a variety of ways in Epoch. GNU Emacs 19
will have everything you need, but won't be out soon.
81: How do I change Emacs's idea of the tab character's length?
Example: (setq default-tab-width 10).
82: What is the difference between (interactive "P") and (interactive "p")?
The value that is a result of "P" can be a list, a symbol, or an
integer; the value that is a result of "p" is always an integer:
Prefix keys typed result of: "P" "p"
nothing nil 1
"M-1" 1 1
"C-u 1" 1 1
"M--" '- -1
"C-u -" '- -1
"C-u" (4) 4
"C-u C-u" (16) 16
Carrying Out Common Tasks:
83: How do I insert ">"'s in the beginning of every line in a buffer?
Type "M-x replace-regexp RET ^ RET > RET". ("replace-regexp" can be
shortened to "repl TAB r".)
To do this only in the region, type "C-x n M-x replace-regexp RET ^ RET
> RET C-x w". (You're going to remember that, right?)
84: How do I insert "_^H" characters before each character in a
paragraph to get an underlined paragraph?
M-x underline-region.
85: How do I repeat a command as many times as possible?
Make a keyboard macro that invokes the command and then type "M-0 C-x
e". WARNING: any messages your command prints in the echo area will be
suppressed.
86: How do I search for an unprintable (8-bit) character that appears
in a buffer as \237?
C-s C-q 2 3 7
(This assumes the value of search-quote-char is 17 (C-q).)
87: How do I tell Emacs to automatically indent a new line to the
indentation of the previous line?
M-x indented-text-mode. (This is a major mode.)
If you have auto-fill mode on (minor mode), you can tell Emacs to prefix
every line with a certain character sequence, the "fill prefix". Type
the prefix at the beginning of a line, position point after it, and then
type "C-x ." (set-fill-prefix) to set the fill prefix. Thereafter,
auto-filling will automatically put the fill prefix at the beginning of
new lines, and M-q (fill-paragraph) will maintain any fill prefix when
refilling the paragraph.
88: How do I make Emacs "typeover" or "overwrite" when I type instead of
always inserting?
M-x overwrite-mode (minor mode).
WARNING: delete-backward-char (usually the delete key) doesn't work
properly in overwrite mode. It deletes the character to the left,
rather than replacing it with a space.
89: How do I show which parenthesis matches the one I'm looking at?
If you're looking at a right parenthesis (or brace or bracket) you can
delete it and reinsert it.
M-C-f (forward-sexp) and M-C-b (backward-sexp) will skip over balanced
parentheses, so you can see which parentheses match. (You can train it
to skip over balanced brackets and braces at the same time by modifying
the syntax table.)
Here is some Emacs Lisp that will make the % key show the matching
parenthese, like in vi. In addition, if the cursor isn't over a
parenthese, it simply inserts a % like normal.
(By an unknown contributor.)
(global-set-key "%" 'match-paren)
(defun match-paren (arg)
"Go to the matching parenthesis if on parenthesis otherwise insert %."
(interactive "p")
(cond ((looking-at "[([{]") (forward-sexp 1) (backward-char))
((looking-at "[])}]") (forward-char) (backward-sexp 1))
(t (self-insert-command (or arg 1)))))
90: How do I make Emacs behave like this: when I go up or down, the cursor
should stay in the same column even if the line is too short?
M-x picture-mode. (This is a minor mode, in theory anyway ...)
91: How do I read news under Emacs?
There are at least three news reading packages that operate inside
Emacs. "rnews" comes with Emacs. "GNUS" and "Gnews" come separately.
{I've never used rnews; could someone write a description? BTW, rnews
will be replaced with GNUS in Emacs 19.}
Both GNUS and Gnews handle reading news over NNTP. I think both can
also read from a local news spool. GNUS also supports reading mail
stored in MH folders or articles saved by GNUS.
GNUS is written (mostly) by Masanobu Umeda. His (?) latest e-mail
address was umerin@tc.nagasaki.go.jp, but I don't think he has an e-mail
address right now. The latest version is GNUS 3.13. There is a
newsgroup for discussion of GNUS called gnu.emacs.gnus. This newsgroup
is gatewayed with the mailing list info-gnus-english to subscribe send
mail to info-gnus-english-request@cis.ohio-state.edu. There is also a
mailing list called info-gnus, which includes discussion in Japanese.
Gnews was written by Matthew Wiener <e-mail address?>. {Could someone
tell me the # of the latest version, and how long it has been since
anyone has heard from Matthew?}. There is a newsgroup for Gnews called
gnu.emacs.gnews.
92: In C mode, can I show just the lines that will be left after #ifdef
commands are handled by the compiler?
M-x hide-ifdef-mode. (This is a minor mode.)
You may have to (load "hideif") first. If you want to do this
regularly, put this in your .emacs file:
(autoload 'hide-ifdef-mode "hideif" nil t)
93: Is there an equivalent to the "." (dot) command of vi?
("." is the redo command in vi. It redoes the last insertion/deletion.)
No, not really.
You can type "C-x ESC" (repeat-complex-command) to reinvoke commands
that used the minibuffer to get arguments. In repeat-complex-command
you can type M-p and M-n to scan through all the different complex
commands you've typed.
To repeat something on each line I recommend using keyboard macros.
94: How do I use emacstool under SunView?
The file etc/SUN-SUPPORT includes the document "Using Emacstool with GNU
Emacs". Also read the man page for emacstool (etc/emacstool.1).
95: How do I get Emacs to display the current line number on the mode line?
There is no "correct" way to constantly display the current line number
on the mode line in Emacs 18. Emacs is not a line-oriented editor, and
really has no idea what "lines" of the buffer are displayed in the
window. It would require a lot of work at the C code level to make
Emacs keep track of this.
Emacs 19 will probably be able to do this, but probably not with great
efficiency.
To find out what line of the buffer you are on right now, do "M-x
what-line". Typing "C-x l" will also tell you what line you are on,
provided the buffer isn't separated into "pages" with C-l characters.
In that case, it will only tell you what line of the current "page" you
are on. WARNING: "C-x l" gives the wrong value when point is at the
beginning of a line.
People have written various kludges to display the current line number
on the mode line. Look in the Lisp Code Directory. (See question 13.)
96: How do I tell Emacs to iconify itself?
You need to modify C source and recompile. Either that or get Epoch
instead. For the interested I have a patch to allow Emacs to iconify
itself.
97: How do I use regexps (regular expressions) in Emacs?
This is documented in the Emacs manual. To read the manual section
online, type "C-h i m emacs RET m regexps RET".
WARNING: Unlike in Unix grep, sed, etc., a complement character set
([^...]) can match a Newline, unless Newline is mentioned as one of the
characters not to match.
Technical Details
Message-ID:
<JBW.90Dec8014613@bucsf.bu.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!zaphod.mps.ohio-state.edu!rpi!bu.edu!nntp-read!jbwShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,1744ac1b923f97ed,start X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1990-12-07 22:46:13 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!zaphod.mps.ohio-state.edu!rpi!bu.edu!nntp-read!jbw From: jbw@bucsf.bu.edu (Joe Wells) Newsgroups: gnu.emacs.help Subject: GNU Emacs Frequently Asked Questions with Answers (part 2 of 2) Message-ID: <JBW.90Dec8014613@bucsf.bu.edu> Date: 8 Dec 90 06:46:13 GMT Sender: news@bu.edu.bu.edu Organization: Boston University Computer Science Department Lines: 760 Posted: Sat Dec 8 07:46:13 1990