aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-01-03 16:55:00 +0800
committerChong Yidong2012-01-03 16:55:00 +0800
commit88c5c7c8313162b94173fd4333e6062aa07c4d2e (patch)
tree058a8318021fef3af7ec54c2750a3ec27ca92649
parent787cdb34ea494f0a800cd6c3f8af2fbfd69b7c29 (diff)
downloademacs-88c5c7c8313162b94173fd4333e6062aa07c4d2e.tar.gz
emacs-88c5c7c8313162b94173fd4333e6062aa07c4d2e.zip
More updates to misc.texi.
* doc/emacs/misc.texi (Single Shell): Don't document Lisp usage of shell-command. Tidy up discussion of synchronicity. Add index entries for async-shell-command. (Interactive Shell): Note that M-x shell uses shell-file-name. Note change in behavior in Emacs 24. (Shell Mode): Shell mode now uses completion-at-point. (Shell Prompts): Emphasize that comint-use-prompt-regexp isn't the default method for recognizing prompts nowadays. (Shell Ring): Add xref to Minibuffer History. (Directory Tracking): Explain Dirtrack mode in more detail. (Term Mode): Fix index entries. (Paging in Term): Merge into Term Mode. (Serial Terminal, Emacs Server, emacsclient Options): Copyedits. (Printing): Fix xref. State default of lpr-switches. (PostScript): Remove obsolete sentence. Omit description of non-interactive behaviors. (Hyperlinking): Improve description. (Browse-URL): Using compose-mail for mailto URLs is the default. Document browse-url-mailto-function. (Goto Address mode): Add index entries. Add xref to Browse-URL. (FFAP): FFAP is not a minor mode. (Amusements): M-x lm was renamed to M-x landmark. Document nato-region.
-rw-r--r--admin/FOR-RELEASE2
-rw-r--r--doc/emacs/ChangeLog26
-rw-r--r--doc/emacs/emacs.texi1
-rw-r--r--doc/emacs/misc.texi840
-rw-r--r--etc/NEWS9
5 files changed, 404 insertions, 474 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 114ace6065a..91576dd4c8a 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -156,7 +156,7 @@ macos.texi
156maintaining.texi cyd 156maintaining.texi cyd
157mark.texi cyd 157mark.texi cyd
158mini.texi 158mini.texi
159misc.texi 159misc.texi cyd
160modes.texi cyd 160modes.texi cyd
161msdog.texi 161msdog.texi
162msdog-xtra.texi 162msdog-xtra.texi
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 30ba8779e72..c99c64eea68 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,29 @@
12012-01-03 Chong Yidong <cyd@gnu.org>
2
3 * misc.texi (Single Shell): Don't document Lisp usage of
4 shell-command. Tidy up discussion of synchronicity. Add index
5 entries for async-shell-command.
6 (Interactive Shell): Note that M-x shell uses shell-file-name.
7 Note change in behavior in Emacs 24.
8 (Shell Mode): Shell mode now uses completion-at-point.
9 (Shell Prompts): Emphasize that comint-use-prompt-regexp isn't the
10 default method for recognizing prompts nowadays.
11 (Shell Ring): Add xref to Minibuffer History.
12 (Directory Tracking): Explain Dirtrack mode in more detail.
13 (Term Mode): Fix index entries.
14 (Paging in Term): Merge into Term Mode.
15 (Serial Terminal, Emacs Server, emacsclient Options): Copyedits.
16 (Printing): Fix xref. State default of lpr-switches.
17 (PostScript): Remove obsolete sentence. Omit description of
18 non-interactive behaviors.
19 (Hyperlinking): Improve description.
20 (Browse-URL): Using compose-mail for mailto URLs is the default.
21 Document browse-url-mailto-function.
22 (Goto Address mode): Add index entries. Add xref to Browse-URL.
23 (FFAP): FFAP is not a minor mode.
24 (Amusements): M-x lm was renamed to M-x landmark. Document
25 nato-region.
26
12012-01-01 Chong Yidong <cyd@gnu.org> 272012-01-01 Chong Yidong <cyd@gnu.org>
2 28
3 * misc.texi (Gnus, Buffers of Gnus): Copyedits. 29 * misc.texi (Gnus, Buffers of Gnus): Copyedits.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 9db0bd4616e..7a1e71b0fd2 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -988,7 +988,6 @@ Running Shell Commands from Emacs
988* Shell Options:: Options for customizing Shell mode. 988* Shell Options:: Options for customizing Shell mode.
989* Terminal emulator:: An Emacs window as a terminal emulator. 989* Terminal emulator:: An Emacs window as a terminal emulator.
990* Term Mode:: Special Emacs commands used in Term mode. 990* Term Mode:: Special Emacs commands used in Term mode.
991* Paging in Term:: Paging in the terminal emulator.
992* Remote Host:: Connecting to another computer. 991* Remote Host:: Connecting to another computer.
993* Serial Terminal:: Connecting to a serial port. 992* Serial Terminal:: Connecting to a serial port.
994 993
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 3d86241a497..9e7c1dbfc94 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -447,27 +447,32 @@ emulator window.
447 447
448@table @kbd 448@table @kbd
449@item M-! @var{cmd} @key{RET} 449@item M-! @var{cmd} @key{RET}
450Run the shell command line @var{cmd} and display the output 450Run the shell command @var{cmd} and display the output
451(@code{shell-command}). 451(@code{shell-command}).
452@item M-| @var{cmd} @key{RET} 452@item M-| @var{cmd} @key{RET}
453Run the shell command line @var{cmd} with region contents as input; 453Run the shell command @var{cmd} with region contents as input;
454optionally replace the region with the output 454optionally replace the region with the output
455(@code{shell-command-on-region}). 455(@code{shell-command-on-region}).
456@item M-& @var{cmd} @key{RET} 456@item M-& @var{cmd} @key{RET}
457Run the shell command line @var{cmd} asynchronously, and display the 457Run the shell command @var{cmd} asynchronously, and display the output
458output (@code{async-shell-command}). 458(@code{async-shell-command}).
459@item M-x shell 459@item M-x shell
460Run a subshell with input and output through an Emacs buffer. 460Run a subshell with input and output through an Emacs buffer. You can
461You can then give commands interactively. 461then give commands interactively.
462@item M-x term 462@item M-x term
463Run a subshell with input and output through an Emacs buffer. 463Run a subshell with input and output through an Emacs buffer. You can
464You can then give commands interactively. 464then give commands interactively. Full terminal emulation is
465Full terminal emulation is available. 465available.
466@end table 466@end table
467 467
468 @kbd{M-x eshell} invokes a shell implemented entirely in Emacs. It 468 @kbd{M-x eshell} invokes a shell implemented entirely in Emacs. It
469is documented in a separate manual. @xref{Top,Eshell,Eshell, eshell, 469is documented in its own manual.
470Eshell: The Emacs Shell}. 470@ifnottex
471@xref{Top,Eshell,Eshell, eshell, Eshell: The Emacs Shell}.
472@end ifnottex
473@iftex
474See the Eshell Info manual, which is distributed with Emacs.
475@end iftex
471 476
472@menu 477@menu
473* Single Shell:: How to run one shell command and return. 478* Single Shell:: How to run one shell command and return.
@@ -479,7 +484,6 @@ Eshell: The Emacs Shell}.
479* Options: Shell Options. Options for customizing Shell mode. 484* Options: Shell Options. Options for customizing Shell mode.
480* Terminal emulator:: An Emacs window as a terminal emulator. 485* Terminal emulator:: An Emacs window as a terminal emulator.
481* Term Mode:: Special Emacs commands used in Term mode. 486* Term Mode:: Special Emacs commands used in Term mode.
482* Paging in Term:: Paging in the terminal emulator.
483* Remote Host:: Connecting to another computer. 487* Remote Host:: Connecting to another computer.
484* Serial Terminal:: Connecting to a serial port. 488* Serial Terminal:: Connecting to a serial port.
485@end menu 489@end menu
@@ -490,53 +494,62 @@ Eshell: The Emacs Shell}.
490@kindex M-! 494@kindex M-!
491@findex shell-command 495@findex shell-command
492 @kbd{M-!} (@code{shell-command}) reads a line of text using the 496 @kbd{M-!} (@code{shell-command}) reads a line of text using the
493minibuffer and executes it as a shell command in a subshell made just 497minibuffer and executes it as a shell command, in a subshell made just
494for that command. Standard input for the command comes from the null 498for that command. Standard input for the command comes from the null
495device. If the shell command produces any output, the output appears 499device. If the shell command produces any output, the output appears
496either in the echo area (if it is short), or in an Emacs buffer named 500either in the echo area (if it is short), or in an Emacs buffer named
497@samp{*Shell Command Output*}, which is displayed in another window 501@samp{*Shell Command Output*}, displayed in another window (if the
498but not selected (if the output is long). 502output is long).
499 503
500 For instance, one way to decompress a file @file{foo.gz} from Emacs 504 For instance, one way to decompress a file named @file{foo.gz} is to
501is to type @kbd{M-! gunzip foo.gz @key{RET}}. That shell command 505type @kbd{M-! gunzip foo.gz @key{RET}}. That shell command normally
502normally creates the file @file{foo} and produces no terminal output. 506creates the file @file{foo} and produces no terminal output.
503 507
504 A numeric argument, as in @kbd{M-1 M-!}, says to insert terminal 508 A numeric argument to @code{shell-command}, e.g.@: @kbd{M-1 M-!},
505output into the current buffer instead of a separate buffer. It puts 509causes it to insert terminal output into the current buffer instead of
506point before the output, and sets the mark after the output. For 510a separate buffer. It puts point before the output, and sets the mark
507instance, @kbd{M-1 M-! gunzip < foo.gz @key{RET}} would insert the 511after the output. For instance, @kbd{M-1 M-! gunzip < foo.gz
508uncompressed equivalent of @file{foo.gz} into the current buffer. 512@key{RET}} would insert the uncompressed form of the file
509 513@file{foo.gz} into the current buffer.
510 If the shell command line ends in @samp{&}, it runs asynchronously. 514
511For a synchronous shell command, @code{shell-command} returns the 515 Provided the specified shell command does not end with @samp{&}, it
512command's exit status (0 means success), when it is called from a Lisp 516runs @dfn{synchronously}, and you must wait for it to exit before
513program. You do not get any status information for an asynchronous 517continuing to use Emacs. To stop waiting, type @kbd{C-g} to quit;
514command, since it hasn't finished yet when @code{shell-command} returns. 518this sends a @code{SIGINT} signal to terminate the shell command (this
515 519is the same signal that @kbd{C-c} normally generates in the shell).
516 You can also type @kbd{M-&} (@code{async-shell-command}) to execute 520Emacs then waits until the command actually terminates. If the shell
517a shell command asynchronously. This behaves exactly like calling 521command doesn't stop (because it ignores the @code{SIGINT} signal),
518@code{shell-command} with @samp{&}, except that you do not need to add 522type @kbd{C-g} again; this sends the command a @code{SIGKILL} signal,
519the @samp{&} to the shell command line. 523which is impossible to ignore.
524
525@kindex M-&
526@findex async-shell-command
527 A shell command that ends in @samp{&} is executed
528@dfn{asynchronously}, and you can continue to use Emacs as it runs.
529You can also type @kbd{M-&} (@code{async-shell-command}) to execute a
530shell command asynchronously; this is exactly like calling @kbd{M-!}
531with a trailing @samp{&}, except that you do not need the @samp{&}.
532The output buffer for asynchronous shell commands is named
533@samp{*Async Shell Command*}. Emacs inserts the output into this
534buffer as it comes in, whether or not the buffer is visible in a
535window.
520 536
521@kindex M-| 537@kindex M-|
522@findex shell-command-on-region 538@findex shell-command-on-region
523 @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!} but 539 @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!}, but
524passes the contents of the region as the standard input to the shell 540passes the contents of the region as the standard input to the shell
525command, instead of no input. With a numeric argument, meaning insert 541command, instead of no input. With a numeric argument, it deletes the
526the output in the current buffer, it deletes the old region and the 542old region and replaces it with the output from the shell command.
527output replaces it as the contents of the region. It returns the 543
528command's exit status, like @kbd{M-!}. 544 For example, you can use @kbd{M-|} with the @command{gpg} program to
529 545see what keys are in the buffer. If the buffer contains a GnuPG key,
530 One use for @kbd{M-|} is to run @code{gpg} to see what keys are in 546type @kbd{C-x h M-| gpg @key{RET}} to feed the entire buffer contents
531the buffer. For instance, if the buffer contains a GPG key, type 547to @command{gpg}. This will output the list of keys to the
532@kbd{C-x h M-| gpg @key{RET}} to feed the entire buffer contents to 548@samp{*Shell Command Output*} buffer.
533the @code{gpg} program. That program will ignore everything except
534the encoded keys, and will output a list of the keys the buffer
535contains.
536 549
537@vindex shell-file-name 550@vindex shell-file-name
538 Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify 551 The above commands use the shell specified by the variable
539the shell to use. This variable is initialized based on your 552@code{shell-file-name}. Its default value is determined by the
540@env{SHELL} environment variable when Emacs is started. If the file 553@env{SHELL} environment variable when Emacs is started. If the file
541name is relative, Emacs searches the directories in the list 554name is relative, Emacs searches the directories in the list
542@code{exec-path}; this list is initialized based on the environment 555@code{exec-path}; this list is initialized based on the environment
@@ -544,81 +557,65 @@ variable @env{PATH} when Emacs is started. Your init file can
544override either or both of these default initializations (@pxref{Init 557override either or both of these default initializations (@pxref{Init
545File}). 558File}).
546 559
547 Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete,
548unless you end the command with @samp{&} to make it asynchronous. To
549stop waiting, type @kbd{C-g} to quit; that terminates the shell
550command with the signal @code{SIGINT}---the same signal that @kbd{C-c}
551normally generates in the shell. Emacs then waits until the command
552actually terminates. If the shell command doesn't stop (because it
553ignores the @code{SIGINT} signal), type @kbd{C-g} again; this sends
554the command a @code{SIGKILL} signal which is impossible to ignore.
555
556 Asynchronous commands ending in @samp{&} feed their output into
557the buffer @samp{*Async Shell Command*}. Output arrives in that
558buffer regardless of whether it is visible in a window.
559
560 To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command 560 To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command
561@kbd{C-x @key{RET} c} immediately beforehand. @xref{Communication Coding}. 561@kbd{C-x @key{RET} c} immediately beforehand. @xref{Communication Coding}.
562 562
563@vindex shell-command-default-error-buffer 563@vindex shell-command-default-error-buffer
564 Error output from these commands is normally intermixed with the 564 By default, error output is intermixed with the regular output in
565regular output. But if the variable 565the output buffer. But if you change the value of the variable
566@code{shell-command-default-error-buffer} has a string as value, and 566@code{shell-command-default-error-buffer} to a string, error output is
567it's the name of a buffer, @kbd{M-!} and @kbd{M-|} insert error output 567inserted into a buffer of that name.
568before point in that buffer.
569 568
570@node Interactive Shell 569@node Interactive Shell
571@subsection Interactive Inferior Shell 570@subsection Interactive Subshell
572 571
573@findex shell 572@findex shell
574 To run a subshell interactively, use @kbd{M-x shell}. This creates 573 To run a subshell interactively, type @kbd{M-x shell}. This creates
575(or reuses) a buffer named @samp{*shell*} and runs a subshell with 574(or reuses) a buffer named @samp{*shell*}, and runs a shell subprocess
576input coming from and output going to that buffer. That is to say, 575with input coming from and output going to that buffer. That is to
577any ``terminal output'' from the subshell goes into the buffer, 576say, any terminal output from the subshell goes into the buffer,
578advancing point, and any ``terminal input'' for the subshell comes 577advancing point, and any terminal input for the subshell comes from
579from text in the buffer. To give input to the subshell, go to the end 578text in the buffer. To give input to the subshell, go to the end of
580of the buffer and type the input, terminated by @key{RET}. 579the buffer and type the input, terminated by @key{RET}.
581 580
582 Emacs does not wait for the subshell to do anything. You can switch 581 While the subshell is waiting or running a command, you can switch
583windows or buffers and edit them while the shell is waiting, or while it is 582windows or buffers and perform other editing in Emacs. Emacs inserts
584running a command. Output from the subshell waits until Emacs has time to 583the output from the subshell into the Shell buffer whenever it has
585process it; this happens whenever Emacs is waiting for keyboard input or 584time to process it (e.g.@: while waiting for keyboard input).
586for time to elapse.
587 585
588@cindex @code{comint-highlight-input} face 586@cindex @code{comint-highlight-input} face
589@cindex @code{comint-highlight-prompt} face 587@cindex @code{comint-highlight-prompt} face
590 Input lines, once you submit them, are displayed using the face 588 In the Shell buffer, prompts are displayed with the face
591@code{comint-highlight-input}, and prompts are displayed using the 589@code{comint-highlight-prompt}, and submitted input lines are
592face @code{comint-highlight-prompt}. This makes it easier to see 590displayed with the face @code{comint-highlight-input}. This makes it
593previous input lines in the buffer. @xref{Faces}. 591easier to distinguish input lines from the shell output.
594 592@xref{Faces}.
595 To make multiple subshells, you can invoke @kbd{M-x shell} with a 593
596prefix argument (e.g. @kbd{C-u M-x shell}), which will read a buffer 594 To make multiple subshells, invoke @kbd{M-x shell} with a prefix
597name and create (or reuse) a subshell in that buffer. You can also 595argument (e.g. @kbd{C-u M-x shell}). Then the command will read a
598rename the @samp{*shell*} buffer using @kbd{M-x rename-uniquely}, then 596buffer name, and create (or reuse) a subshell in that buffer. You can
599create a new @samp{*shell*} buffer using plain @kbd{M-x shell}. 597also rename the @samp{*shell*} buffer using @kbd{M-x rename-uniquely},
598then create a new @samp{*shell*} buffer using plain @kbd{M-x shell}.
600Subshells in different buffers run independently and in parallel. 599Subshells in different buffers run independently and in parallel.
601 600
602@vindex explicit-shell-file-name 601@vindex explicit-shell-file-name
603@cindex environment variables for subshells 602@cindex environment variables for subshells
604@cindex @env{ESHELL} environment variable 603@cindex @env{ESHELL} environment variable
605@cindex @env{SHELL} environment variable 604@cindex @env{SHELL} environment variable
606 The file name used to load the subshell is the value of the variable 605 To specify the shell file name used by @kbd{M-x shell}, customize
607@code{explicit-shell-file-name}, if that is non-@code{nil}. 606the variable @code{explicit-shell-file-name}. If this is @code{nil}
608Otherwise, the environment variable @env{ESHELL} is used, or the 607(the default), Emacs uses the environment variable @env{ESHELL} if it
609environment variable @env{SHELL} if there is no @env{ESHELL}. If the 608exists. Otherwise, it usually uses the variable
610file name specified is relative, the directories in the list 609@code{shell-file-name} (@pxref{Single Shell}); but if the default
611@code{exec-path} are searched; this list is initialized based on the 610directory is remote (@pxref{Remote Files}), it prompts you for the
612environment variable @env{PATH} when Emacs is started. Your init file 611shell file name.
613can override either or both of these default initializations.
614(@pxref{Init File}).
615 612
616 Emacs sends the new shell the contents of the file 613 Emacs sends the new shell the contents of the file
617@file{~/.emacs_@var{shellname}} as input, if it exists, where 614@file{~/.emacs_@var{shellname}} as input, if it exists, where
618@var{shellname} is the name of the file that the shell was loaded 615@var{shellname} is the name of the file that the shell was loaded
619from. For example, if you use bash, the file sent to it is 616from. For example, if you use bash, the file sent to it is
620@file{~/.emacs_bash}. If this file is not found, Emacs tries to fallback 617@file{~/.emacs_bash}. If this file is not found, Emacs tries with
621on @file{~/.emacs.d/init_@var{shellname}.sh}. 618@file{~/.emacs.d/init_@var{shellname}.sh}.
622 619
623 To specify a coding system for the shell, you can use the command 620 To specify a coding system for the shell, you can use the command
624@kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can 621@kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can
@@ -627,44 +624,46 @@ also change the coding system for a running subshell by typing
627Coding}. 624Coding}.
628 625
629@cindex @env{INSIDE_EMACS} environment variable 626@cindex @env{INSIDE_EMACS} environment variable
630 Emacs sets the environment variable @env{INSIDE_EMACS} in the
631subshell to a comma-separated list including the Emacs version.
632Programs can check this variable to determine whether they are running
633inside an Emacs subshell.
634
635@cindex @env{EMACS} environment variable 627@cindex @env{EMACS} environment variable
636 Emacs also sets the @env{EMACS} environment variable (to @code{t}) if 628 Emacs sets the environment variable @env{INSIDE_EMACS} in the
637it is not already defined. @strong{Warning:} This environment 629subshell to @samp{@var{version},comint}, where @var{version} is the
638variable is deprecated. Programs that check this variable should be 630Emacs version (e.g.@: @samp{24.1}). Programs can check this variable
639changed to check @env{INSIDE_EMACS} instead. 631to determine whether they are running inside an Emacs subshell. (It
632also sets the @env{EMACS} environment variable to @code{t}, if that
633environment variable is not already defined. However, this
634environment variable is deprecated; programs that use it should switch
635to using @env{INSIDE_EMACS} instead.)
640 636
641@node Shell Mode 637@node Shell Mode
642@subsection Shell Mode 638@subsection Shell Mode
643@cindex Shell mode 639@cindex Shell mode
644@cindex mode, Shell 640@cindex mode, Shell
645 641
646 Shell buffers use Shell mode, which defines several special keys 642 The major mode for Shell buffers is Shell mode. Many of its special
647attached to the @kbd{C-c} prefix. They are chosen to resemble the usual 643commands are bound to the @kbd{C-c} prefix, and resemble the usual
648editing and job control characters present in shells that are not under 644editing and job control characters present in ordinary shells, except
649Emacs, except that you must type @kbd{C-c} first. Here is a complete list 645that you must type @kbd{C-c} first. Here is a list of Shell mode
650of the special key bindings of Shell mode: 646commands:
651 647
652@table @kbd 648@table @kbd
653@item @key{RET} 649@item @key{RET}
654@kindex RET @r{(Shell mode)} 650@kindex RET @r{(Shell mode)}
655@findex comint-send-input 651@findex comint-send-input
656At end of buffer send line as input; otherwise, copy current line to 652Send the current line as input to the subshell
657end of buffer and send it (@code{comint-send-input}). Copying a line 653(@code{comint-send-input}). Any shell prompt at the beginning of the
658in this way omits any prompt at the beginning of the line (text output 654line is omitted (@pxref{Shell Prompts}). If point is at the end of
659by programs preceding your input). @xref{Shell Prompts}, for how 655buffer, this is like submitting the command line in an ordinary
660Shell mode recognizes prompts. 656interactive shell. However, you can also invoke @key{RET} elsewhere
657in the shell buffer to submit the current line as input.
661 658
662@item @key{TAB} 659@item @key{TAB}
663@kindex TAB @r{(Shell mode)} 660@kindex TAB @r{(Shell mode)}
664@findex comint-dynamic-complete 661@findex completion-at-point
665Complete the command name or file name before point in the shell buffer 662Complete the command name or file name before point in the shell
666(@code{comint-dynamic-complete}). @key{TAB} also completes history 663buffer (@code{completion-at-point}). This uses the usual Emacs
667references (@pxref{History References}) and environment variable names. 664completion rules (@pxref{Completion}), with the completion
665alternatives being file names, environment variable names, the shell
666command history, and history references (@pxref{History References}).
668 667
669@vindex shell-completion-fignore 668@vindex shell-completion-fignore
670@vindex comint-completion-fignore 669@vindex comint-completion-fignore
@@ -678,17 +677,16 @@ instead.
678@item M-? 677@item M-?
679@kindex M-? @r{(Shell mode)} 678@kindex M-? @r{(Shell mode)}
680@findex comint-dynamic-list-filename@dots{} 679@findex comint-dynamic-list-filename@dots{}
681Display temporarily a list of the possible completions of the file name 680Display temporarily a list of the possible completions of the file
682before point in the shell buffer 681name before point (@code{comint-dynamic-list-filename-completions}).
683(@code{comint-dynamic-list-filename-completions}).
684 682
685@item C-d 683@item C-d
686@kindex C-d @r{(Shell mode)} 684@kindex C-d @r{(Shell mode)}
687@findex comint-delchar-or-maybe-eof 685@findex comint-delchar-or-maybe-eof
688Either delete a character or send @acronym{EOF} 686Either delete a character or send @acronym{EOF}
689(@code{comint-delchar-or-maybe-eof}). Typed at the end of the shell 687(@code{comint-delchar-or-maybe-eof}). Typed at the end of the shell
690buffer, @kbd{C-d} sends @acronym{EOF} to the subshell. Typed at any other 688buffer, this sends @acronym{EOF} to the subshell. Typed at any other
691position in the buffer, @kbd{C-d} deletes a character as usual. 689position in the buffer, this deletes a character as usual.
692 690
693@item C-c C-a 691@item C-c C-a
694@kindex C-c C-a @r{(Shell mode)} 692@kindex C-c C-a @r{(Shell mode)}
@@ -784,8 +782,8 @@ Move backward across one shell command, but not beyond the current line
784(@code{shell-backward-command}). 782(@code{shell-backward-command}).
785 783
786@item M-x dirs 784@item M-x dirs
787Ask the shell what its current directory is, so that Emacs can agree 785Ask the shell for its working directory, and update the Shell buffer's
788with the shell. 786default directory. @xref{Directory Tracking}.
789 787
790@item M-x send-invisible @key{RET} @var{text} @key{RET} 788@item M-x send-invisible @key{RET} @var{text} @key{RET}
791@findex send-invisible 789@findex send-invisible
@@ -854,41 +852,38 @@ specializations of Shell mode.
854@node Shell Prompts 852@node Shell Prompts
855@subsection Shell Prompts 853@subsection Shell Prompts
856 854
857@vindex shell-prompt-pattern
858@vindex comint-prompt-regexp
859@vindex comint-use-prompt-regexp
860@cindex prompt, shell 855@cindex prompt, shell
861 A prompt is text output by a program to show that it is ready to 856 A prompt is text output by a program to show that it is ready to
862accept new user input. Normally, Comint mode (and thus Shell mode) 857accept new user input. Normally, Comint mode (and thus Shell mode)
863considers the prompt to be any text output by a program at the 858automatically figures out part of the buffer is a prompt, based on the
864beginning of an input line. However, if the variable 859output of the subprocess. (Specifically, it assumes that any received
865@code{comint-use-prompt-regexp} is non-@code{nil}, then Comint mode 860output line which doesn't end with a newline is a prompt.)
866uses a regular expression to recognize prompts. In Shell mode, 861
867@code{shell-prompt-pattern} specifies the regular expression. 862 Comint mode divides the buffer into two types of @dfn{fields}: input
868 863fields (where user input is typed) and output fields (everywhere
869 The value of @code{comint-use-prompt-regexp} also affects many 864else). Prompts are part of the output fields. Most Emacs motion
870motion and paragraph commands. If the value is non-@code{nil}, the 865commands do not cross field boundaries, unless they move over multiple
871general Emacs motion commands behave as they normally do in buffers 866lines. For instance, when point is in the input field on a shell
872without special text properties. However, if the value is @code{nil}, 867command line, @kbd{C-a} puts point at the beginning of the input
873the default, then Comint mode divides the buffer into two types of 868field, after the prompt. Internally, the fields are implemented using
874``fields'' (ranges of consecutive characters having the same 869the @code{field} text property (@pxref{Text Properties,,, elisp, the
875@code{field} text property): input and output. Prompts are part of 870Emacs Lisp Reference Manual}).
876the output. Most Emacs motion commands do not cross field boundaries, 871
877unless they move over multiple lines. For instance, when point is in 872@vindex comint-use-prompt-regexp
878input on the same line as a prompt, @kbd{C-a} puts point at the 873@vindex shell-prompt-pattern
879beginning of the input if @code{comint-use-prompt-regexp} is 874 If you change the variable @code{comint-use-prompt-regexp} to a
880@code{nil} and at the beginning of the line otherwise. 875non-@code{nil} value, then Comint mode recognize prompts using a
881 876regular expression (@pxref{Regexps}). In Shell mode, the regular
882 In Shell mode, only shell prompts start new paragraphs. Thus, a 877expression is specified by the variable @code{shell-prompt-pattern}.
883paragraph consists of a prompt and the input and output that follow 878The default value of @code{comint-use-prompt-regexp} is @code{nil},
884it. However, if @code{comint-use-prompt-regexp} is @code{nil}, the 879because this method for recognizing prompts is unreliable, but you may
885default, most paragraph commands do not cross field boundaries. This 880want to set it to a non-@code{nil} value in unusual circumstances. In
886means that prompts, ranges of input, and ranges of non-prompt output 881that case, Emacs does not divide the Comint buffer into fields, so the
887behave mostly like separate paragraphs; with this setting, numeric 882general motion commands behave as they normally do in buffers without
888arguments to most paragraph commands yield essentially undefined 883special text properties. However, you can use the paragraph motion
889behavior. For the purpose of finding paragraph boundaries, Shell mode 884commands to conveniently navigate the buffer (@pxref{Paragraphs}); in
890uses @code{shell-prompt-pattern}, regardless of 885Shell mode, Emacs uses @code{shell-prompt-pattern} as paragraph
891@code{comint-use-prompt-regexp}. 886boundaries.
892 887
893@node Shell History 888@node Shell History
894@subsection Shell Command History 889@subsection Shell Command History
@@ -945,11 +940,12 @@ Display the buffer's history of shell commands in another window
945(@code{comint-dynamic-list-input-ring}). 940(@code{comint-dynamic-list-input-ring}).
946@end table 941@end table
947 942
948 Shell buffers provide a history of previously entered shell commands. To 943 Shell buffers provide a history of previously entered shell
949reuse shell commands from the history, use the editing commands @kbd{M-p}, 944commands. To reuse shell commands from the history, use the editing
950@kbd{M-n}, @kbd{M-r} and @kbd{M-s}. These work just like the minibuffer 945commands @kbd{M-p}, @kbd{M-n}, @kbd{M-r} and @kbd{M-s}. These work
951history commands except that they operate on the text at the end of the 946just like the minibuffer history commands (@pxref{Minibuffer
952shell buffer, where you would normally insert text to send to the shell. 947History}), except that they operate within the Shell buffer rather
948than the minibuffer.
953 949
954 @kbd{M-p} fetches an earlier shell command to the end of the shell 950 @kbd{M-p} fetches an earlier shell command to the end of the shell
955buffer. Successive use of @kbd{M-p} fetches successively earlier 951buffer. Successive use of @kbd{M-p} fetches successively earlier
@@ -1076,39 +1072,40 @@ command @code{comint-magic-space}.
1076@vindex shell-popd-regexp 1072@vindex shell-popd-regexp
1077@vindex shell-cd-regexp 1073@vindex shell-cd-regexp
1078 Shell mode keeps track of @samp{cd}, @samp{pushd} and @samp{popd} 1074 Shell mode keeps track of @samp{cd}, @samp{pushd} and @samp{popd}
1079commands given to the inferior shell, so it can keep the 1075commands given to the subshell, in order to keep the Shell buffer's
1080@samp{*shell*} buffer's default directory the same as the shell's 1076default directory (@pxref{File Names}) the same as the shell's working
1081working directory. It recognizes these commands syntactically, by 1077directory. It recognizes these commands by examining lines of input
1082examining lines of input that are sent. 1078that you send.
1083 1079
1084 If you use aliases for these commands, you can tell Emacs to 1080 If you use aliases for these commands, you can tell Emacs to
1085recognize them also. For example, if the value of the variable 1081recognize them also, by setting the variables
1086@code{shell-pushd-regexp} matches the beginning of a shell command 1082@code{shell-pushd-regexp}, @code{shell-popd-regexp}, and
1087line, that line is regarded as a @code{pushd} command. Change this 1083@code{shell-cd-regexp} to the appropriate regular expressions
1088variable when you add aliases for @samp{pushd}. Likewise, 1084(@pxref{Regexps}). For example, if @code{shell-pushd-regexp} matches
1089@code{shell-popd-regexp} and @code{shell-cd-regexp} are used to 1085the beginning of a shell command line, that line is regarded as a
1090recognize commands with the meaning of @samp{popd} and @samp{cd}. 1086@code{pushd} command. These commands are recognized only at the
1091These commands are recognized only at the beginning of a shell command 1087beginning of a shell command line.
1092line.
1093
1094@ignore @c This seems to have been deleted long ago.
1095@vindex shell-set-directory-error-hook
1096 If Emacs gets an error while trying to handle what it believes is a
1097@samp{cd}, @samp{pushd} or @samp{popd} command, it runs the hook
1098@code{shell-set-directory-error-hook} (@pxref{Hooks}).
1099@end ignore
1100 1088
1101@findex dirs 1089@findex dirs
1102 If Emacs gets confused about changes in the current directory of the 1090 If Emacs gets confused about changes in the working directory of the
1103subshell, use the command @kbd{M-x dirs} to ask the shell what its 1091subshell, type @kbd{M-x dirs}. This command asks the shell for its
1104current directory is. This command works for shells that support the 1092working directory and updates the default directory accordingly. It
1105most common command syntax; it may not work for unusual shells. 1093works for shells that support the most common command syntax, but may
1094not work for unusual shells.
1106 1095
1107@findex dirtrack-mode 1096@findex dirtrack-mode
1108 You can also use @kbd{M-x dirtrack-mode} to enable (or disable) an 1097@cindex Dirtrack mode
1109alternative method of tracking changes in the current directory. This 1098@cindex mode, Dirtrack
1110method relies on your shell prompt containing the full current working 1099@vindex dirtrack-list
1111directory at all times. 1100 You can also use Dirtrack mode, a buffer-local minor mode that
1101implements an alternative method of tracking the shell's working
1102directory. To use this method, your shell prompt must contain the
1103working directory at all times, and you must supply a regular
1104expression for recognizing which part of the prompt contains the
1105working directory; see the documentation of the variable
1106@code{dirtrack-list} for details. To use Dirtrack mode, type @kbd{M-x
1107dirtrack-mode} in the Shell buffer, or add @code{dirtrack-mode} to
1108@code{shell-mode-hook} (@pxref{Hooks}).
1112 1109
1113@node Shell Options 1110@node Shell Options
1114@subsection Shell Mode Options 1111@subsection Shell Mode Options
@@ -1185,10 +1182,10 @@ subshell with input coming from your keyboard, and output going to
1185that buffer. 1182that buffer.
1186 1183
1187 The terminal emulator uses Term mode, which has two input modes. In 1184 The terminal emulator uses Term mode, which has two input modes. In
1188line mode, Term basically acts like Shell mode; see @ref{Shell Mode}. 1185line mode, Term basically acts like Shell mode (@pxref{Shell Mode}).
1189 1186
1190 In char mode, each character is sent directly to the inferior 1187 In char mode, each character is sent directly to the subshell, as
1191subshell, as ``terminal input.'' Any ``echoing'' of your input is the 1188``terminal input.'' Any ``echoing'' of your input is the
1192responsibility of the subshell. The sole exception is the terminal 1189responsibility of the subshell. The sole exception is the terminal
1193escape character, which by default is @kbd{C-c} (@pxref{Term Mode}). 1190escape character, which by default is @kbd{C-c} (@pxref{Term Mode}).
1194Any ``terminal output'' from the subshell goes into the buffer, 1191Any ``terminal output'' from the subshell goes into the buffer,
@@ -1204,8 +1201,8 @@ handles each one appropriately, changing the buffer so that the
1204appearance of the window matches what it would be on a real terminal. 1201appearance of the window matches what it would be on a real terminal.
1205You can actually run Emacs inside an Emacs Term window. 1202You can actually run Emacs inside an Emacs Term window.
1206 1203
1207 You can use Term mode to communicate with a device connected to a 1204 You can also Term mode to communicate with a device connected to a
1208serial port of your computer. @xref{Serial Terminal}. 1205serial port. @xref{Serial Terminal}.
1209 1206
1210 The file name used to load the subshell is determined the same way 1207 The file name used to load the subshell is determined the same way
1211as for Shell mode. To make multiple terminal emulators, rename the 1208as for Shell mode. To make multiple terminal emulators, rename the
@@ -1223,22 +1220,24 @@ and later.
1223@cindex mode, Term 1220@cindex mode, Term
1224 1221
1225 The terminal emulator uses Term mode, which has two input modes. In 1222 The terminal emulator uses Term mode, which has two input modes. In
1226line mode, Term basically acts like Shell mode; see @ref{Shell Mode}. 1223line mode, Term basically acts like Shell mode (@pxref{Shell Mode}).
1227In char mode, each character is sent directly to the inferior 1224In char mode, each character is sent directly to the subshell, except
1228subshell, except for the Term escape character, normally @kbd{C-c}. 1225for the Term escape character, normally @kbd{C-c}.
1229 1226
1230 To switch between line and char mode, use these commands: 1227 To switch between line and char mode, use these commands:
1231 1228
1232@table @kbd 1229@table @kbd
1233@kindex C-c C-j @r{(Term mode)} 1230@kindex C-c C-j @r{(Term mode)}
1234@findex term-char-mode 1231@findex term-line-mode
1235@item C-c C-j 1232@item C-c C-j
1236Switch to line mode. Do nothing if already in line mode. 1233Switch to line mode (@code{term-line-mode}). Do nothing if already in
1234line mode.
1237 1235
1238@kindex C-c C-k @r{(Term mode)} 1236@kindex C-c C-k @r{(Term mode)}
1239@findex term-line-mode 1237@findex term-char-mode
1240@item C-c C-k 1238@item C-c C-k
1241Switch to char mode. Do nothing if already in char mode. 1239Switch to char mode (@code{term-char-mode}). Do nothing if already in
1240char mode.
1242@end table 1241@end table
1243 1242
1244 The following commands are only available in char mode: 1243 The following commands are only available in char mode:
@@ -1253,28 +1252,23 @@ example, @kbd{C-c o} invokes the global binding of @kbd{C-x o}, which
1253is normally @samp{other-window}. 1252is normally @samp{other-window}.
1254@end table 1253@end table
1255 1254
1256@node Paging in Term 1255@cindex paging in Term mode
1257@subsection Page-At-A-Time Output 1256 Term mode has a page-at-a-time feature. When enabled, it makes
1258@cindex page-at-a-time 1257output pause at the end of each screenful:
1259
1260 Term mode has a page-at-a-time feature. When enabled it makes
1261output pause at the end of each screenful.
1262 1258
1263@table @kbd 1259@table @kbd
1264@kindex C-c C-q @r{(Term mode)} 1260@kindex C-c C-q @r{(Term mode)}
1265@findex term-pager-toggle 1261@findex term-pager-toggle
1266@item C-c C-q 1262@item C-c C-q
1267Toggle the page-at-a-time feature. This command works in both line 1263Toggle the page-at-a-time feature. This command works in both line
1268and char modes. When page-at-a-time is enabled, the mode-line 1264and char modes. When the feature is enabled, the mode-line displays
1269displays the word @samp{page}. 1265the word @samp{page}, and each time Term receives more than a
1266screenful of output, it pauses and displays @samp{**MORE**} in the
1267mode-line. Type @key{SPC} to display the next screenful of output, or
1268@kbd{?} to see your other options. The interface is similar to the
1269@code{more} program.
1270@end table 1270@end table
1271 1271
1272 With page-at-a-time enabled, whenever Term receives more than a
1273screenful of output since your last input, it pauses, displaying
1274@samp{**MORE**} in the mode-line. Type @key{SPC} to display the next
1275screenful of output. Type @kbd{?} to see your other options. The
1276interface is similar to the @code{more} program.
1277
1278@node Remote Host 1272@node Remote Host
1279@subsection Remote Host Shell 1273@subsection Remote Host Shell
1280@cindex remote host 1274@cindex remote host
@@ -1297,71 +1291,8 @@ happens automatically; there is no special password processing.)
1297of terminal you're using, by setting the @env{TERM} environment 1291of terminal you're using, by setting the @env{TERM} environment
1298variable in the environment for the remote login command. (If you use 1292variable in the environment for the remote login command. (If you use
1299bash, you do that by writing the variable assignment before the remote 1293bash, you do that by writing the variable assignment before the remote
1300login command, without separating comma.) Terminal types @samp{ansi} 1294login command, without a separating comma.) Terminal types
1301or @samp{vt100} will work on most systems. 1295@samp{ansi} or @samp{vt100} will work on most systems.
1302
1303@c If you are talking to a Bourne-compatible
1304@c shell, and your system understands the @env{TERMCAP} variable,
1305@c you can use the command @kbd{M-x shell-send-termcap}, which
1306@c sends a string specifying the terminal type and size.
1307@c (This command is also useful after the window has changed size.)
1308
1309@c You can of course run @samp{gdb} on that remote computer. One useful
1310@c trick: If you invoke gdb with the @code{--fullname} option,
1311@c it will send special commands to Emacs that will cause Emacs to
1312@c pop up the source files you're debugging. This will work
1313@c whether or not gdb is running on a different computer than Emacs,
1314@c as long as Emacs can access the source files specified by gdb.
1315
1316@ignore
1317 You cannot log in to a remote computer using the Shell mode.
1318@c (This will change when Shell is re-written to use Term.)
1319Instead, Emacs provides two commands for logging in to another computer
1320and communicating with it through an Emacs buffer using Comint mode:
1321
1322@table @kbd
1323@item M-x telnet @key{RET} @var{hostname} @key{RET}
1324Set up a Telnet connection to the computer named @var{hostname}.
1325@item M-x rlogin @key{RET} @var{hostname} @key{RET}
1326Set up an Rlogin connection to the computer named @var{hostname}.
1327@end table
1328
1329@findex telnet
1330 Use @kbd{M-x telnet} to set up a Telnet connection to another
1331computer. (Telnet is the standard Internet protocol for remote login.)
1332It reads the host name of the other computer as an argument with the
1333minibuffer. Once the connection is established, talking to the other
1334computer works like talking to a subshell: you can edit input with the
1335usual Emacs commands, and send it a line at a time by typing @key{RET}.
1336The output is inserted in the Telnet buffer interspersed with the input.
1337
1338@findex rlogin
1339@vindex rlogin-explicit-args
1340 Use @kbd{M-x rlogin} to set up an Rlogin connection. Rlogin is
1341another remote login communication protocol, essentially much like the
1342Telnet protocol but incompatible with it, and supported only by certain
1343systems. Rlogin's advantages are that you can arrange not to have to
1344give your user name and password when communicating between two machines
1345you frequently use, and that you can make an 8-bit-clean connection.
1346(To do that in Emacs, set @code{rlogin-explicit-args} to @code{("-8")}
1347before you run Rlogin.)
1348
1349 @kbd{M-x rlogin} sets up the default file directory of the Emacs
1350buffer to access the remote host via FTP (@pxref{File Names}), and it
1351tracks the shell commands that change the current directory, just like
1352Shell mode.
1353
1354@findex rlogin-directory-tracking-mode
1355 There are two ways of doing directory tracking in an Rlogin
1356buffer---either with remote directory names
1357@file{/@var{host}:@var{dir}/} or with local names (that works if the
1358``remote'' machine shares file systems with your machine of origin).
1359You can use the command @code{rlogin-directory-tracking-mode} to switch
1360modes. No argument means use remote directory names, a positive
1361argument means use local names, and a negative argument means turn
1362off directory tracking.
1363
1364@end ignore
1365 1296
1366@node Serial Terminal 1297@node Serial Terminal
1367@subsection Serial Terminal 1298@subsection Serial Terminal
@@ -1369,9 +1300,10 @@ off directory tracking.
1369@findex serial-term 1300@findex serial-term
1370 1301
1371 If you have a device connected to a serial port of your computer, 1302 If you have a device connected to a serial port of your computer,
1372you can use Emacs to communicate with it. @kbd{M-x serial-term} will 1303you can communicate with it by typing @kbd{M-x serial-term}. This
1373ask you for a serial port name and speed and will then open a new 1304command asks for a serial port name and speed, and switches to a new
1374window in @ref{Term Mode}. 1305Term mode buffer. Emacs communicates with the serial device through
1306this buffer just like it does with a terminal in ordinary Term mode.
1375 1307
1376 The speed of the serial port is measured in bits per second. The 1308 The speed of the serial port is measured in bits per second. The
1377most common speed is 9600 bits per second. You can change the speed 1309most common speed is 9600 bits per second. You can change the speed
@@ -1382,10 +1314,6 @@ the mode line. By default, a serial port is configured as ``8N1'',
1382which means that each byte consists of 8 data bits, No parity check 1314which means that each byte consists of 8 data bits, No parity check
1383bit, and 1 stopbit. 1315bit, and 1 stopbit.
1384 1316
1385 When you have opened the serial port connection, you will see output
1386from the device in the window. Also, what you type in the window is
1387sent to the device.
1388
1389 If the speed or the configuration is wrong, you cannot communicate 1317 If the speed or the configuration is wrong, you cannot communicate
1390with your device and will probably only see garbage output in the 1318with your device and will probably only see garbage output in the
1391window. 1319window.
@@ -1397,12 +1325,14 @@ window.
1397@cindex server, using Emacs as 1325@cindex server, using Emacs as
1398@cindex @env{EDITOR} environment variable 1326@cindex @env{EDITOR} environment variable
1399 1327
1400 Various programs such as @command{mail} can invoke your choice of 1328 Various programs can invoke your choice of editor to edit a
1401editor to edit a particular piece of text, such as a message that you 1329particular piece of text. For instance, version control programs
1402are sending. By convention, most of these programs use the 1330invoke an editor to enter version control logs (@pxref{Version
1403environment variable @env{EDITOR} to specify which editor to run. If 1331Control}), and the Unix @command{mail} utility invokes an editor to
1404you set @env{EDITOR} to @samp{emacs}, they invoke Emacs---but in an 1332enter a message to send. By convention, your choice of editor is
1405inconvenient way, by starting a new Emacs process. This is 1333specified by the environment variable @env{EDITOR}. If you set
1334@env{EDITOR} to @samp{emacs}, Emacs would be invoked, but in an
1335inconvenient way---by starting a new Emacs process. This is
1406inconvenient because the new Emacs process doesn't share buffers, a 1336inconvenient because the new Emacs process doesn't share buffers, a
1407command history, or other kinds of information with any existing Emacs 1337command history, or other kinds of information with any existing Emacs
1408process. 1338process.
@@ -1411,30 +1341,33 @@ process.
1411server}, so that it ``listens'' for external edit requests and acts 1341server}, so that it ``listens'' for external edit requests and acts
1412accordingly. There are two ways to start an Emacs server: 1342accordingly. There are two ways to start an Emacs server:
1413 1343
1344@itemize
1414@findex server-start 1345@findex server-start
1415 The first is to run the command @code{server-start} in an existing 1346@item
1416Emacs process: either type @kbd{M-x server-start}, or put the 1347Run the command @code{server-start} in an existing Emacs process:
1417expression @code{(server-start)} in your initialization file 1348either type @kbd{M-x server-start}, or put the expression
1418(@pxref{Init File}). The existing Emacs process is the server; when 1349@code{(server-start)} in your init file (@pxref{Init File}). The
1419you exit Emacs, the server dies with the Emacs process. 1350existing Emacs process is the server; when you exit Emacs, the server
1351dies with the Emacs process.
1420 1352
1421@cindex daemon, Emacs 1353@cindex daemon, Emacs
1422 The second way to start an Emacs server is to run Emacs as a 1354@item
1423@dfn{daemon}, using the @samp{--daemon} command-line option. 1355Run Emacs as a @dfn{daemon}, using the @samp{--daemon} command-line
1424@xref{Initial Options}. When Emacs is started this way, it calls 1356option. @xref{Initial Options}. When Emacs is started this way, it
1425@code{server-start} after initialization, and returns control to the 1357calls @code{server-start} after initialization, and returns control to
1426calling terminal instead of opening an initial frame; it then waits in 1358the calling terminal instead of opening an initial frame; it then
1427the background, listening for edit requests. 1359waits in the background, listening for edit requests.
1360@end itemize
1428 1361
1429@cindex @env{TEXEDIT} environment variable 1362@cindex @env{TEXEDIT} environment variable
1430 Once an Emacs server is set up, you can use a shell command called 1363 Either way, once an Emacs server is started, you can use a shell
1431@command{emacsclient} to connect to the existing Emacs process and 1364command called @command{emacsclient} to connect to the Emacs process
1432tell it to visit a file. If you set the @env{EDITOR} environment 1365and tell it to visit a file. You can then set the @env{EDITOR}
1433variable to @samp{emacsclient}, programs such as @command{mail} will 1366environment variable to @samp{emacsclient}, so that external programs
1434use the existing Emacs process for editing.@footnote{Some programs use 1367will use the existing Emacs process for editing.@footnote{Some
1435a different environment variable; for example, to make @TeX{} use 1368programs use a different environment variable; for example, to make
1436@samp{emacsclient}, set the @env{TEXEDIT} environment variable to 1369@TeX{} use @samp{emacsclient}, set the @env{TEXEDIT} environment
1437@samp{emacsclient +%d %s}.} 1370variable to @samp{emacsclient +%d %s}.}
1438 1371
1439@vindex server-name 1372@vindex server-name
1440 You can run multiple Emacs servers on the same machine by giving 1373 You can run multiple Emacs servers on the same machine by giving
@@ -1445,13 +1378,13 @@ server-name @key{RET} foo @key{RET}} sets the server name to
1445name, using the @samp{-s} option (@pxref{emacsclient Options}). 1378name, using the @samp{-s} option (@pxref{emacsclient Options}).
1446 1379
1447@findex server-eval-at 1380@findex server-eval-at
1448 If you have defined a server by a unique server name, you can 1381 If you have defined a server by a unique server name, it is possible
1449connect to this server from other Emacs instances and evaluate forms 1382to connect to the server from another Emacs instance and evaluate Lisp
1450on it by using the @code{server-eval-at} function. 1383expressions on the server, using the @code{server-eval-at} function.
1451 1384For instance, @code{(server-eval-at "foo" '(+ 1 2))} evaluates the
1452@code{(server-eval-at "foo" '(+ 1 2))} gives the result @code{3}, if 1385expression @code{(+ 1 2)} on the @samp{foo} server, and returns
1453there's a server with that name that is listening. If not, an error 1386@code{3}. (If there is no server with that name, an error is
1454will be signaled. 1387signaled.) Currently, this feature is mainly useful for developers.
1455 1388
1456@menu 1389@menu
1457* Invoking emacsclient:: Connecting to the Emacs server. 1390* Invoking emacsclient:: Connecting to the Emacs server.
@@ -1565,14 +1498,14 @@ precedence.
1565 1498
1566@item -c 1499@item -c
1567Create a new graphical frame, instead of using an existing Emacs 1500Create a new graphical frame, instead of using an existing Emacs
1568frame. Emacs 23 can create a graphical frame even if it was started 1501frame. Emacs can create a graphical frame even if it was started in a
1569in a text-only terminal, provided it is able to connect to a graphical 1502text-only terminal, provided it is able to connect to a graphical
1570display. If no graphical display is available, Emacs creates a new 1503display. If no graphical display is available, Emacs creates a new
1571text-only terminal frame (@pxref{Frames}). If you omit a filename 1504text-only terminal frame (@pxref{Frames}). If you omit a filename
1572argument while supplying the @samp{-c} option, the new frame displays 1505argument while supplying the @samp{-c} option, the new frame displays
1573the @samp{*scratch*} buffer (@pxref{Buffers}). 1506the @samp{*scratch*} buffer (@pxref{Buffers}).
1574 1507
1575@item -F 1508@item -F @var{alist}
1576@itemx --frame-parameters=@var{alist} 1509@itemx --frame-parameters=@var{alist}
1577Set the parameters for a newly-created graphical frame 1510Set the parameters for a newly-created graphical frame
1578(@pxref{Frame Parameters}). 1511(@pxref{Frame Parameters}).
@@ -1653,7 +1586,7 @@ server it finds. (This option is not supported on MS-Windows.)
1653@itemx --tty 1586@itemx --tty
1654@itemx -nw 1587@itemx -nw
1655Create a new Emacs frame on the current text-only terminal, instead of 1588Create a new Emacs frame on the current text-only terminal, instead of
1656using an existing Emacs frame. Emacs 23 can open a text-only terminal 1589using an existing Emacs frame. Emacs can open a text-only terminal
1657even if it was started in another text-only terminal, or on a 1590even if it was started in another text-only terminal, or on a
1658graphical display. If you omit a filename argument while supplying 1591graphical display. If you omit a filename argument while supplying
1659this option, the new frame displays the @samp{*scratch*} buffer. 1592this option, the new frame displays the @samp{*scratch*} buffer.
@@ -1677,23 +1610,23 @@ process, type @kbd{M-x kill-emacs}.
1677@cindex hardcopy 1610@cindex hardcopy
1678@cindex printing 1611@cindex printing
1679 1612
1680 Emacs provides commands for printing hard copies of either an entire 1613 Emacs provides commands for printing hardcopies of either an entire
1681buffer or just part of one, with or without page headers. You can 1614buffer or part of one. You can invoke the printing commands directly,
1682invoke the printing commands directly, as detailed in the following 1615as detailed below, or using the @samp{File} menu on the menu bar.
1683section, or using the @samp{File} menu on the menu bar.
1684 1616
1685@findex htmlfontify-buffer 1617@findex htmlfontify-buffer
1686 Aside from the commands described in this section, you can also 1618 Aside from the commands described in this section, you can also
1687``print'' an Emacs buffer to HTML with @kbd{M-x htmlfontify-buffer}. 1619print hardcopies from Dired (@pxref{Operating on Files}) and the diary
1688This command converts the current buffer to a HTML file, replacing 1620(@pxref{Displaying the Diary}). You can also ``print'' an Emacs
1689Emacs faces with CSS-based markup. In addition, see the hardcopy 1621buffer to HTML with the command @kbd{M-x htmlfontify-buffer}, which
1690commands of Dired (@pxref{Misc File Ops}) and the diary 1622converts the current buffer to a HTML file, replacing Emacs faces with
1691(@pxref{Displaying the Diary}). 1623CSS-based markup. Furthermore, Org mode allows you to ``print'' Org
1624files to a variety of formats, such as PDF (@pxref{Org Mode}).
1692 1625
1693@table @kbd 1626@table @kbd
1694@item M-x print-buffer 1627@item M-x print-buffer
1695Print hardcopy of current buffer with page headings containing the file 1628Print hardcopy of current buffer with page headings containing the
1696name and page number. 1629file name and page number.
1697@item M-x lpr-buffer 1630@item M-x lpr-buffer
1698Print hardcopy of current buffer without page headings. 1631Print hardcopy of current buffer without page headings.
1699@item M-x print-region 1632@item M-x print-region
@@ -1707,33 +1640,32 @@ Like @code{lpr-buffer} but print only the current region.
1707@findex lpr-buffer 1640@findex lpr-buffer
1708@findex lpr-region 1641@findex lpr-region
1709@vindex lpr-switches 1642@vindex lpr-switches
1710 The hardcopy commands (aside from the PostScript commands) pass extra 1643@vindex lpr-commands
1711switches to the @code{lpr} program based on the value of the variable 1644 On most operating system, the above hardcopy commands submit files
1712@code{lpr-switches}. Its value should be a list of strings, each string 1645for printing by calling the @command{lpr} program. To change the
1713an option starting with @samp{-}. For example, to specify a line width 1646printer program, customize the variable @code{lpr-command}. To
1714of 80 columns for all the printing you do in Emacs, set 1647specify extra switches to give the printer program, customize the list
1715@code{lpr-switches} like this: 1648variable @code{lpr-switches}. Its value should be a list of option
1716 1649strings, each of which should start with @samp{-} (e.g.@: the option
1717@example 1650string @code{"-w80"} specifies a line width of 80 columns). The
1718(setq lpr-switches '("-w80")) 1651default is the empty list, @code{nil}.
1719@end example
1720 1652
1721@vindex printer-name 1653@vindex printer-name
1722 You can specify the printer to use by setting the variable 1654@vindex lpr-printer-switch
1723@code{printer-name}. 1655 To specify the printer to use, set the variable @code{printer-name}.
1656The default, @code{nil}, specifies the default printer. If you set it
1657to a printer name (a string), that name is passed to @command{lpr}
1658with the @samp{-P} switch; if you are not using @command{lpr}, you
1659should specify the switch with @code{lpr-printer-switch}.
1724 1660
1725@vindex lpr-headers-switches 1661@vindex lpr-headers-switches
1726@vindex lpr-commands
1727@vindex lpr-add-switches 1662@vindex lpr-add-switches
1728 The variable @code{lpr-command} specifies the name of the printer 1663 The variable @code{lpr-headers-switches} similarly specifies the
1729program to run; the default value depends on your operating system type. 1664extra switches to use to make page headers. The variable
1730On most systems, the default is @code{"lpr"}. The variable 1665@code{lpr-add-switches} controls whether to supply @samp{-T} and
1731@code{lpr-headers-switches} similarly specifies the extra switches to 1666@samp{-J} options (suitable for @command{lpr}) to the printer program:
1732use to make page headers. The variable @code{lpr-add-switches} controls 1667@code{nil} means don't add them (this should be the value if your
1733whether to supply @samp{-T} and @samp{-J} options (suitable for 1668printer program is not compatible with @command{lpr}).
1734@code{lpr}) to the printer program: @code{nil} means don't add them.
1735@code{lpr-add-switches} should be @code{nil} if your printer program is
1736not compatible with @code{lpr}.
1737 1669
1738@menu 1670@menu
1739* PostScript:: Printing buffers or regions as PostScript. 1671* PostScript:: Printing buffers or regions as PostScript.
@@ -1776,28 +1708,17 @@ Generate/print PostScript for the current buffer as if handwritten.
1776@findex ps-print-buffer 1708@findex ps-print-buffer
1777@findex ps-print-region-with-faces 1709@findex ps-print-region-with-faces
1778@findex ps-print-buffer-with-faces 1710@findex ps-print-buffer-with-faces
1779 The PostScript commands, @code{ps-print-buffer} and 1711 The @code{ps-print-buffer} and @code{ps-print-region} commands print
1780@code{ps-print-region}, print buffer contents in PostScript form. One 1712buffer contents in PostScript form. One command prints the entire
1781command prints the entire buffer; the other, just the region. The 1713buffer; the other, just the region. The commands
1782corresponding @samp{-with-faces} commands, 1714@code{ps-print-buffer-with-faces} and
1783@code{ps-print-buffer-with-faces} and @code{ps-print-region-with-faces}, 1715@code{ps-print-region-with-faces} behave similarly, but use PostScript
1784use PostScript features to show the faces (fonts and colors) in the text 1716features to show the faces (fonts and colors) of the buffer text.
1785properties of the text being printed. The @samp{-with-faces} commands only
1786work if they are used in a window system, so it has a way to determine color
1787values.
1788 1717
1789 Interactively, when you use a prefix argument (@kbd{C-u}), the command 1718 Interactively, when you use a prefix argument (@kbd{C-u}), the command
1790prompts the user for a file name, and saves the PostScript image in that file 1719prompts the user for a file name, and saves the PostScript image in that file
1791instead of sending it to the printer. 1720instead of sending it to the printer.
1792 1721
1793 Noninteractively, the argument @var{filename} is treated as follows: if it is
1794@code{nil}, send the image to the printer. If @var{filename} is a string, save
1795the PostScript image in a file with that name.
1796
1797 If you are using a color display, you can print a buffer of program
1798code with color highlighting by turning on Font-Lock mode in that
1799buffer, and using @code{ps-print-buffer-with-faces}.
1800
1801@findex ps-spool-region 1722@findex ps-spool-region
1802@findex ps-spool-buffer 1723@findex ps-spool-buffer
1803@findex ps-spool-region-with-faces 1724@findex ps-spool-region-with-faces
@@ -1806,31 +1727,21 @@ buffer, and using @code{ps-print-buffer-with-faces}.
1806generate the PostScript output in an Emacs buffer instead of sending 1727generate the PostScript output in an Emacs buffer instead of sending
1807it to the printer. 1728it to the printer.
1808 1729
1809 Use the command @code{ps-despool} to send the spooled images to the printer.
1810
1811@findex ps-despool 1730@findex ps-despool
1812 This command sends the PostScript generated by @samp{-spool-} commands (see 1731 Use the command @code{ps-despool} to send the spooled images to the
1813commands above) to the printer. 1732printer. This command sends the PostScript generated by
1814 1733@samp{-spool-} commands (see commands above) to the printer. With a
1815 Interactively, when you use a prefix argument (@kbd{C-u}), the command 1734prefix argument (@kbd{C-u}), it prompts for a file name, and saves the
1816prompts the user for a file name, and saves the spooled PostScript image in 1735spooled PostScript image in that file instead of sending it to the
1817that file instead of sending it to the printer. 1736printer.
1818
1819 Noninteractively, the argument @var{filename} is treated as follows: if it is
1820@code{nil}, send the image to the printer. If @var{filename} is a string, save
1821the PostScript image in a file with that name.
1822 1737
1823@findex handwrite 1738@findex handwrite
1824@cindex handwriting 1739@cindex handwriting
1825@kbd{M-x handwrite} is more frivolous. It generates a PostScript 1740 @kbd{M-x handwrite} is more frivolous. It generates a PostScript
1826rendition of the current buffer as a cursive handwritten document. It 1741rendition of the current buffer as a cursive handwritten document. It
1827can be customized in group @code{handwrite}. This function only 1742can be customized in group @code{handwrite}. This function only
1828supports ISO 8859-1 characters. 1743supports ISO 8859-1 characters.
1829 1744
1830@ifnottex
1831 The following section describes variables for customizing these commands.
1832@end ifnottex
1833
1834@node PostScript Variables, Printing Package, PostScript, Printing 1745@node PostScript Variables, Printing Package, PostScript, Printing
1835@subsection Variables for PostScript Hardcopy 1746@subsection Variables for PostScript Hardcopy
1836 1747
@@ -2379,26 +2290,8 @@ key bindings.
2379@node Hyperlinking, Amusements, Emulation, Top 2290@node Hyperlinking, Amusements, Emulation, Top
2380@section Hyperlinking and Navigation Features 2291@section Hyperlinking and Navigation Features
2381 2292
2382@cindex hyperlinking 2293 The following subsections describe convenience features for handling
2383@cindex navigation 2294URLs and other types of links occurring in Emacs buffer text.
2384 Various modes documented elsewhere have hypertext features so that
2385you can follow links, usually by clicking @kbd{Mouse-2} on the link or
2386typing @key{RET} while point is on the link. Clicking @kbd{Mouse-1}
2387quickly on the link also follows it. (Hold @kbd{Mouse-1} for longer
2388if you want to set point instead.)
2389
2390 Info mode, Help mode and the Dired-like modes are examples of modes
2391that have links in the buffer. The Tags facility links between uses
2392and definitions in source files, see @ref{Tags}. Imenu provides
2393navigation amongst items indexed in the current buffer, see
2394@ref{Imenu}. Info-lookup provides mode-specific lookup of definitions
2395in Info indexes, see @ref{Documentation}. Speedbar maintains a frame
2396in which links to files, and locations in files are displayed, see
2397@ref{Speedbar}.
2398
2399 Other non-mode-specific facilities described in this section enable
2400following links from the current buffer in a context-sensitive
2401fashion.
2402 2295
2403@menu 2296@menu
2404* Browse-URL:: Following URLs. 2297* Browse-URL:: Following URLs.
@@ -2421,31 +2314,31 @@ fashion.
2421Load a URL into a Web browser. 2314Load a URL into a Web browser.
2422@end table 2315@end table
2423 2316
2424The Browse-URL package provides facilities for following URLs specifying 2317 The Browse-URL package allows you to easily follow URLs from within
2425links on the World Wide Web. Usually this works by invoking a web 2318Emacs. Most URLs are followed by invoking a web browser;
2426browser, but you can, for instance, arrange to invoke @code{compose-mail} 2319@samp{mailto:} URLs are followed by invoking the @code{compose-mail}
2427from @samp{mailto:} URLs. 2320Emacs command to send mail to the specified address (@pxref{Sending
2321Mail}).
2428 2322
2429 The general way to use this feature is to type @kbd{M-x browse-url}, 2323 The command @kbd{M-x browse-url} prompts for a URL, and follows it.
2430which displays a specified URL. If point is located near a plausible 2324If point is located near a plausible URL, that URL is offered as the
2431URL, that URL is used as the default. Other commands are available 2325default. The Browse-URL package also provides other commands which
2432which you might like to bind to keys, such as 2326you might like to bind to keys, such as @code{browse-url-at-point} and
2433@code{browse-url-at-point} and @code{browse-url-at-mouse}. 2327@code{browse-url-at-mouse}.
2434 2328
2329@vindex browse-url-mailto-function
2435@vindex browse-url-browser-function 2330@vindex browse-url-browser-function
2436 You can customize Browse-URL's behavior via various options in the 2331 You can customize Browse-URL's behavior via various options in the
2437@code{browse-url} Customize group, particularly 2332@code{browse-url} Customize group. In particular, the option
2438@code{browse-url-browser-function}. You can invoke actions dependent 2333@code{browse-url-mailto-function} lets you define how to follow
2439on the type of URL by defining @code{browse-url-browser-function} as 2334@samp{mailto:} URLs, while @code{browse-url-browser-function} lets you
2440an association list. The package's commentary available via @kbd{C-h 2335define how to follow other types of URLs. For more information, view
2441p} under the @samp{hypermedia} keyword provides more information. 2336the package commentary by typing @kbd{C-h P browse-url @key{RET}}.
2442Packages with facilities for following URLs should always go through
2443Browse-URL, so that the customization options for Browse-URL will
2444affect all browsing in Emacs.
2445 2337
2446@node Goto Address mode 2338@node Goto Address mode
2447@subsection Activating URLs 2339@subsection Activating URLs
2448@findex goto-address-mode 2340@findex goto-address-mode
2341@cindex mode, Goto Address
2449@cindex Goto Address mode 2342@cindex Goto Address mode
2450@cindex URLs, activating 2343@cindex URLs, activating
2451 2344
@@ -2454,20 +2347,23 @@ affect all browsing in Emacs.
2454Activate URLs and e-mail addresses in the current buffer. 2347Activate URLs and e-mail addresses in the current buffer.
2455@end table 2348@end table
2456 2349
2457 You can make URLs in the current buffer active with @kbd{M-x 2350@kindex C-c RET @r{(Goto Address mode)}
2458goto-address-mode}. This minor mode finds all the URLs in the buffer, 2351@findex goto-address-at-point
2459highlights them, and turns them into @dfn{buttons}: if you click on a 2352 You can make Emacs mark out URLs specially in the current buffer, by
2460URL with @kbd{Mouse-1} or @kbd{Mouse-2} (@pxref{Mouse References}), or 2353typing @kbd{M-x goto-address-mode}. When this buffer-local minor mode
2461move to the URL and type @kbd{C-c @key{RET}}, that displays the web 2354is enabled, it finds all the URLs in the buffer, highlights them, and
2462page that the URL specifies. For a @samp{mailto} URL, it sends mail 2355turns them into clickable buttons. You can follow the URL by typing
2463instead, using your selected mail-composition method (@pxref{Mail 2356@kbd{C-c @key{RET}} (@code{goto-address-at-point}) while point is on
2464Methods}). 2357its text; or by clicking with @kbd{Mouse-2}, or by clicking
2358@kbd{Mouse-1} quickly (@pxref{Mouse References}). Following a URL is
2359done by calling @code{browse-url} as a subroutine
2360(@pxref{Browse-URL}).
2465 2361
2466 It can be useful to add @code{goto-address-mode} to mode hooks and 2362 It can be useful to add @code{goto-address-mode} to mode hooks and
2467the hooks used to display an incoming message (e.g., 2363hooks for displaying an incoming message
2468@code{rmail-show-message-hook} for Rmail, and @code{mh-show-mode-hook} 2364(e.g.@: @code{rmail-show-message-hook} for Rmail, and
2469for MH-E). This is not needed for Gnus, which has a similar feature 2365@code{mh-show-mode-hook} for MH-E). This is not needed for Gnus,
2470of its own. 2366which has a similar feature of its own.
2471 2367
2472@node FFAP 2368@node FFAP
2473@subsection Finding Files and URLs at Point 2369@subsection Finding Files and URLs at Point
@@ -2478,24 +2374,24 @@ of its own.
2478@findex ffap-menu 2374@findex ffap-menu
2479@cindex finding file at point 2375@cindex finding file at point
2480 2376
2481 FFAP mode replaces certain key bindings for finding files, including 2377 The FFAP package replaces certain key bindings for finding files,
2482@kbd{C-x C-f}, with commands that provide more sensitive defaults. 2378such as @kbd{C-x C-f}, with commands that provide more sensitive
2483These commands behave like the ordinary ones when given a prefix 2379defaults. These commands behave like the ordinary ones when given a
2484argument. Otherwise, they get the default file name or URL from the 2380prefix argument. Otherwise, they get the default file name or URL
2485text around point. If what is found in the buffer has the form of a 2381from the text around point. If what is found in the buffer has the
2486URL rather than a file name, the commands use @code{browse-url} to 2382form of a URL rather than a file name, the commands use
2487view it. 2383@code{browse-url} to view it (@pxref{Browse-URL}).
2488 2384
2489 This feature is useful for following references in mail or news 2385 This feature is useful for following references in mail or news
2490buffers, @file{README} files, @file{MANIFEST} files, and so on. The 2386buffers, @file{README} files, @file{MANIFEST} files, and so on. For
2491@samp{ffap} package's commentary available via @kbd{C-h p} under the 2387more information, view the package commentary by typing @kbd{C-h P
2492@samp{files} keyword and the @code{ffap} Custom group provide details. 2388ffap @key{RET}}.
2493 2389
2494@cindex FFAP minor mode 2390@cindex FFAP minor mode
2495@findex ffap-mode 2391@findex ffap-mode
2496 You can turn on FFAP minor mode by calling @code{ffap-bindings} to 2392 To enable FFAP, type @kbd{M-x ffap-bindings}. This makes the
2497make the following key bindings and to install hooks for using 2393following key bindings, and also installs hooks for additional FFAP
2498@code{ffap} in Rmail, Gnus and VM article buffers. 2394functionality in Rmail, Gnus and VM article buffers.
2499 2395
2500@table @kbd 2396@table @kbd
2501@item C-x C-f @var{filename} @key{RET} 2397@item C-x C-f @var{filename} @key{RET}
@@ -2604,18 +2500,22 @@ bored, try an argument of 9. Sit back and watch.
2604@cindex Life 2500@cindex Life
2605 @kbd{M-x life} runs Conway's ``Life'' cellular automaton. 2501 @kbd{M-x life} runs Conway's ``Life'' cellular automaton.
2606 2502
2607@findex lm 2503@findex landmark
2608@cindex landmark game 2504@cindex landmark game
2609 @kbd{M-x lm} runs a relatively non-participatory game in which a 2505 @kbd{M-x landmark} runs a relatively non-participatory game in which
2610robot attempts to maneuver towards a tree at the center of the window 2506a robot attempts to maneuver towards a tree at the center of the
2611based on unique olfactory cues from each of the four directions. 2507window based on unique olfactory cues from each of the four
2508directions.
2612 2509
2613@findex morse-region 2510@findex morse-region
2614@findex unmorse-region 2511@findex unmorse-region
2512@findex nato-region
2615@cindex Morse code 2513@cindex Morse code
2616@cindex --/---/.-./.../. 2514@cindex --/---/.-./.../.
2617 @kbd{M-x morse-region} converts text in a region to Morse code and 2515 @kbd{M-x morse-region} converts the text in the region to Morse
2618@kbd{M-x unmorse-region} converts it back. No cause for remorse. 2516code; @kbd{M-x unmorse-region} converts it back. @kbd{M-x
2517nato-region} converts the text in the region to NATO phonetic
2518alphabet; @kbd{M-x denato-region} converts it back.
2619 2519
2620@findex pong 2520@findex pong
2621@cindex Pong game 2521@cindex Pong game
@@ -2635,9 +2535,11 @@ across other pegs.
2635 The command @kbd{M-x zone} plays games with the display when Emacs 2535 The command @kbd{M-x zone} plays games with the display when Emacs
2636is idle. 2536is idle.
2637 2537
2638 Finally, if you find yourself frustrated, try the famous Eliza 2538@findex doctor
2639program. Just do @kbd{M-x doctor}. End each input by typing 2539@cindex Eliza
2640@key{RET} twice. 2540 Finally, if you find yourself frustrated, try describing your
2541problems to the famous psychotherapist Eliza. Just do @kbd{M-x
2542doctor}. End each input by typing @key{RET} twice.
2641 2543
2642@ifnottex 2544@ifnottex
2643@lowersections 2545@lowersections
diff --git a/etc/NEWS b/etc/NEWS
index fc390df7743..a767aed2735 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -566,6 +566,7 @@ region (or with the left margin if there is no previous line).
566+++ 566+++
567** Archive Mode has basic support for browsing and updating 7z archives. 567** Archive Mode has basic support for browsing and updating 7z archives.
568 568
569+++
569** browse-url has a new variable `browse-url-mailto-function' 570** browse-url has a new variable `browse-url-mailto-function'
570specifies how mailto: URLs are handled. The default is `browse-url-mail'. 571specifies how mailto: URLs are handled. The default is `browse-url-mail'.
571 572
@@ -692,7 +693,7 @@ utf-8, and do the normal `undecided' decoding for the rest.
692exists, that is used instead. 693exists, that is used instead.
693 694
694** gdb-mi 695** gdb-mi
695 696+++
696*** GDB User Interface migrated to GDB Machine Interface and now 697*** GDB User Interface migrated to GDB Machine Interface and now
697supports multithread non-stop debugging and debugging of several 698supports multithread non-stop debugging and debugging of several
698threads simultaneously. 699threads simultaneously.
@@ -718,6 +719,7 @@ handy if you have many manuals in many Info buffers, and don't
718remember the name of the buffer visiting the manual you want to 719remember the name of the buffer visiting the manual you want to
719consult. 720consult.
720 721
722+++
721** The Landmark game is now invoked with `landmark', not `lm'. 723** The Landmark game is now invoked with `landmark', not `lm'.
722 724
723** MH-E has been upgraded to MH-E version 8.3.1. 725** MH-E has been upgraded to MH-E version 8.3.1.
@@ -742,9 +744,9 @@ This change was made in Emacs 23.1 but was not advertised at the time.
742Try using `rmail-show-message-hook' instead. 744Try using `rmail-show-message-hook' instead.
743 745
744** Shell mode 746** Shell mode
745 747+++
746*** Shell mode uses pcomplete rules, with the standard completion UI. 748*** Shell mode uses pcomplete rules, with the standard completion UI.
747 749+++
748*** The `shell' command prompts for the shell path name if the default 750*** The `shell' command prompts for the shell path name if the default
749directory is a remote file name and neither the environment variable 751directory is a remote file name and neither the environment variable
750$ESHELL nor the variable `explicit-shell-file-name' is set. 752$ESHELL nor the variable `explicit-shell-file-name' is set.
@@ -898,6 +900,7 @@ They are superseded by shift-select-mode enabled by default in 23.1.
898--- 900---
899*** `copyright-fix-years' can optionally convert consecutive years to ranges. 901*** `copyright-fix-years' can optionally convert consecutive years to ranges.
900 902
903+++
901*** New command `nato-region' converts text to NATO phonetic alphabet. 904*** New command `nato-region' converts text to NATO phonetic alphabet.
902 905
903 906