aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-03-31 15:32:20 +0000
committerRichard M. Stallman2006-03-31 15:32:20 +0000
commitab1921073fe48bbceb17683b4da0a8402285907f (patch)
tree1d9bb2e8de171562ccb3a1f0b7da6c0fd384aba2
parentf73dbd9463f67a5fbab6d1e14a240917885303b0 (diff)
downloademacs-ab1921073fe48bbceb17683b4da0a8402285907f.tar.gz
emacs-ab1921073fe48bbceb17683b4da0a8402285907f.zip
Many cleanups.
(beginning): Add to summary of topics. (Shell): Put eshell xref at the end. Remove eshell from table. (Thumbnails): New node.
-rw-r--r--man/misc.texi202
1 files changed, 138 insertions, 64 deletions
diff --git a/man/misc.texi b/man/misc.texi
index d5b69eebf26..ba760a0a361 100644
--- a/man/misc.texi
+++ b/man/misc.texi
@@ -9,9 +9,10 @@
9else: reading netnews, running shell commands and shell subprocesses, 9else: reading netnews, running shell commands and shell subprocesses,
10using a single shared Emacs for utilities that expect to run an editor 10using a single shared Emacs for utilities that expect to run an editor
11as a subprocess, printing hardcopy, sorting text, narrowing display to 11as a subprocess, printing hardcopy, sorting text, narrowing display to
12part of the buffer, editing double-column files and binary files, saving 12part of the buffer, editing double-column files and binary files,
13an Emacs session for later resumption, emulating other editors, and 13saving an Emacs session for later resumption, following hyperlinks,
14various diversions and amusements. 14browsing images, emulating other editors, and various diversions and
15amusements.
15 16
16@end iftex 17@end iftex
17 18
@@ -49,15 +50,15 @@ To start Gnus, type @kbd{M-x gnus @key{RET}}.
49@node Buffers of Gnus 50@node Buffers of Gnus
50@subsection Gnus Buffers 51@subsection Gnus Buffers
51 52
52As opposed to most normal Emacs packages, Gnus uses a number of 53Unlike most Emacs packages, Gnus uses several buffers to display
53different buffers to display information and to receive commands. The 54information and to receive commands. The three Gnus buffers users use
54three buffers users spend most of their time in are the @dfn{group 55most are the @dfn{group buffer}, the @dfn{summary buffer} and the
55buffer}, the @dfn{summary buffer} and the @dfn{article buffer}. 56@dfn{article buffer}.
56 57
57The @dfn{group buffer} contains a list of groups. This is the first 58The @dfn{group buffer} contains a list of newsgroups. This is the
58buffer Gnus displays when it starts up. It normally displays only the 59first buffer Gnus displays when it starts up. It normally displays
59groups to which you subscribe and that contain unread articles. Use 60only the groups to which you subscribe and that contain unread
60this buffer to select a specific group. 61articles. Use this buffer to select a specific group.
61 62
62The @dfn{summary buffer} lists one line for each article in a single 63The @dfn{summary buffer} lists one line for each article in a single
63group. By default, the author, the subject and the line number are 64group. By default, the author, the subject and the line number are
@@ -67,9 +68,10 @@ in the group buffer, and is killed when you exit the group. Use this
67buffer to select an article. 68buffer to select an article.
68 69
69The @dfn{article buffer} displays the article. In normal Gnus usage, 70The @dfn{article buffer} displays the article. In normal Gnus usage,
70you don't select this buffer---all useful article-oriented commands work 71you see this buffer but you don't select it---all useful
71in the summary buffer. But you can select the article buffer, and 72article-oriented commands work in the summary buffer. But you can
72execute all Gnus commands from that buffer, if you want to. 73select the article buffer, and execute all Gnus commands from that
74buffer, if you want to.
73 75
74@node Gnus Startup 76@node Gnus Startup
75@subsection When Gnus Starts Up 77@subsection When Gnus Starts Up
@@ -111,9 +113,9 @@ displayed in the article buffer in a large window, below the summary
111buffer in its small window. 113buffer in its small window.
112@end enumerate 114@end enumerate
113 115
114 Each Gnus buffer has its own special commands; however, the meanings 116 Each Gnus buffer has its own special commands; the meanings of any
115of any given key in the various Gnus buffers are usually analogous, even 117given key in the various Gnus buffers are usually analogous, even if
116if not identical. Here are commands for the group and summary buffers: 118not identical. Here are commands for the group and summary buffers:
117 119
118@table @kbd 120@table @kbd
119@kindex q @r{(Gnus Group mode)} 121@kindex q @r{(Gnus Group mode)}
@@ -315,9 +317,6 @@ processes; it can also run a shell interactively with input and output
315to an Emacs buffer named @samp{*shell*} or run a shell inside a terminal 317to an Emacs buffer named @samp{*shell*} or run a shell inside a terminal
316emulator window. 318emulator window.
317 319
318There is a shell implemented entirely in Emacs, documented in a separate
319manual. @xref{Top,Eshell,Eshell, eshell, Eshell: The Emacs Shell}.
320
321@table @kbd 320@table @kbd
322@item M-! @var{cmd} @key{RET} 321@item M-! @var{cmd} @key{RET}
323Run the shell command line @var{cmd} and display the output 322Run the shell command line @var{cmd} and display the output
@@ -333,11 +332,12 @@ You can then give commands interactively.
333Run a subshell with input and output through an Emacs buffer. 332Run a subshell with input and output through an Emacs buffer.
334You can then give commands interactively. 333You can then give commands interactively.
335Full terminal emulation is available. 334Full terminal emulation is available.
336@item M-x eshell
337@findex eshell
338Start the Emacs shell.
339@end table 335@end table
340 336
337 @kbd{M-x eshell} invokes a shell implemented entirely in Emacs. It
338is documented in a separate manual. @xref{Top,Eshell,Eshell, eshell,
339Eshell: The Emacs Shell}.
340
341@menu 341@menu
342* Single Shell:: How to run one shell command and return. 342* Single Shell:: How to run one shell command and return.
343* Interactive Shell:: Permanent shell taking input via Emacs. 343* Interactive Shell:: Permanent shell taking input via Emacs.
@@ -379,37 +379,38 @@ uncompressed equivalent of @file{foo.gz} into the current buffer.
379For a synchronous shell command, @code{shell-command} returns the 379For a synchronous shell command, @code{shell-command} returns the
380command's exit status (0 means success), when it is called from a Lisp 380command's exit status (0 means success), when it is called from a Lisp
381program. You do not get any status information for an asynchronous 381program. You do not get any status information for an asynchronous
382command, since it hasn't finished yet. 382command, since it hasn't finished yet when @code{shell-command} returns.
383 383
384@kindex M-| 384@kindex M-|
385@findex shell-command-on-region 385@findex shell-command-on-region
386 @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!} but 386 @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!} but
387passes the contents of the region as the standard input to the shell 387passes the contents of the region as the standard input to the shell
388command, instead of no input. If a numeric argument is used, meaning 388command, instead of no input. With a numeric argument, meaning insert
389insert the output in the current buffer, then the old region is deleted 389the output in the current buffer, it deletes the old region and the
390first and the output replaces it as the contents of the region. It 390output replaces it as the contents of the region. It returns the
391returns the command's exit status when it is called from a Lisp program. 391command's exit status, like @kbd{M-!}.
392 392
393 One use for @kbd{M-|} is to run @code{gpg} to see what keys are in 393 One use for @kbd{M-|} is to run @code{gpg} to see what keys are in
394the buffer. For instance, if the buffer contains a GPG key, type 394the buffer. For instance, if the buffer contains a GPG key, type
395@kbd{C-x h M-| gpg @key{RET}} to feed the entire buffer contents 395@kbd{C-x h M-| gpg @key{RET}} to feed the entire buffer contents to
396to the @code{gpg} program. That program will ignore everything except 396the @code{gpg} program. That program will ignore everything except
397the encoded keys, and will output a list of the keys it contains. 397the encoded keys, and will output a list of the keys the buffer
398contains.
398 399
399@vindex shell-file-name 400@vindex shell-file-name
400 Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify the 401 Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify
401shell to use. This variable is initialized based on your @env{SHELL} 402the shell to use. This variable is initialized based on your
402environment variable when Emacs is started. If the file name does not 403@env{SHELL} environment variable when Emacs is started. If the file
403specify a directory, the directories in the list @code{exec-path} are 404name is relative, Emacs searches the directories in the list
404searched; this list is initialized based on the environment variable 405@code{exec-path}; this list is initialized based on the environment
405@env{PATH} when Emacs is started. Your @file{.emacs} file can override 406variable @env{PATH} when Emacs is started. Your @file{.emacs} file
406either or both of these default initializations.@refill 407can override either or both of these default initializations.
407 408
408 Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete, 409 Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete,
409unless you end the command with @samp{&} to make it asynchronous. To 410unless you end the command with @samp{&} to make it asynchronous. To
410stop waiting, type @kbd{C-g} to quit; that terminates the shell 411stop waiting, type @kbd{C-g} to quit; that terminates the shell
411command with the signal @code{SIGINT}---the same signal that @kbd{C-c} 412command with the signal @code{SIGINT}---the same signal that @kbd{C-c}
412normally generates in the shell. Emacs waits until the command 413normally generates in the shell. Emacs then waits until the command
413actually terminates. If the shell command doesn't stop (because it 414actually terminates. If the shell command doesn't stop (because it
414ignores the @code{SIGINT} signal), type @kbd{C-g} again; this sends 415ignores the @code{SIGINT} signal), type @kbd{C-g} again; this sends
415the command a @code{SIGKILL} signal which is impossible to ignore. 416the command a @code{SIGKILL} signal which is impossible to ignore.
@@ -422,10 +423,11 @@ buffer regardless of whether it is visible in a window.
422@kbd{C-x @key{RET} c} immediately beforehand. @xref{Communication Coding}. 423@kbd{C-x @key{RET} c} immediately beforehand. @xref{Communication Coding}.
423 424
424@vindex shell-command-default-error-buffer 425@vindex shell-command-default-error-buffer
425 Error output from the command is normally intermixed with the regular 426 Error output from these commands is normally intermixed with the
426output. If you set the variable 427regular output. But if the variable
427@code{shell-command-default-error-buffer} to a string, which is a buffer 428@code{shell-command-default-error-buffer} has a string as value, and
428name, error output is inserted before point in the buffer of that name. 429it's the name of a buffer, @kbd{M-!} and @kbd{M-|} insert error output
430before point in that buffer.
429 431
430@node Interactive Shell 432@node Interactive Shell
431@subsection Interactive Inferior Shell 433@subsection Interactive Inferior Shell
@@ -456,8 +458,8 @@ previous input lines in the buffer. @xref{Faces}.
456prefix argument (e.g. @kbd{C-u M-x shell}), which will read a buffer 458prefix argument (e.g. @kbd{C-u M-x shell}), which will read a buffer
457name and create (or reuse) a subshell in that buffer. You can also 459name and create (or reuse) a subshell in that buffer. You can also
458rename the @samp{*shell*} buffer using @kbd{M-x rename-uniquely}, then 460rename the @samp{*shell*} buffer using @kbd{M-x rename-uniquely}, then
459create a new @samp{*shell*} buffer using plain @kbd{M-x shell}. All the 461create a new @samp{*shell*} buffer using plain @kbd{M-x shell}.
460subshells in different buffers run independently and in parallel. 462Subshells in different buffers run independently and in parallel.
461 463
462@vindex explicit-shell-file-name 464@vindex explicit-shell-file-name
463@cindex environment variables for subshells 465@cindex environment variables for subshells
@@ -479,9 +481,10 @@ from. For example, if you use bash, the file sent to it is
479@file{~/.emacs_bash}. 481@file{~/.emacs_bash}.
480 482
481 To specify a coding system for the shell, you can use the command 483 To specify a coding system for the shell, you can use the command
482@kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can also 484@kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can
483specify a coding system after starting the shell by using @kbd{C-x 485also change the coding system for a running subshell by typing
484@key{RET} p} in the shell buffer. @xref{Communication Coding}. 486@kbd{C-x @key{RET} p} in the shell buffer. @xref{Communication
487Coding}.
485 488
486@cindex @env{EMACS} environment variable 489@cindex @env{EMACS} environment variable
487 Unless the environment variable @env{EMACS} is already defined, 490 Unless the environment variable @env{EMACS} is already defined,
@@ -505,10 +508,10 @@ of the special key bindings of Shell mode:
505@kindex RET @r{(Shell mode)} 508@kindex RET @r{(Shell mode)}
506@findex comint-send-input 509@findex comint-send-input
507At end of buffer send line as input; otherwise, copy current line to 510At end of buffer send line as input; otherwise, copy current line to
508end of buffer and send it (@code{comint-send-input}). When a line is 511end of buffer and send it (@code{comint-send-input}). Copying a line
509copied, any prompt at the beginning of the line (text output by 512in this way omits any prompt at the beginning of the line (text output
510programs preceding your input) is omitted. @xref{Shell Prompts}, for 513by programs preceding your input). @xref{Shell Prompts}, for how
511how Shell mode recognizes prompts. 514Shell mode recognizes prompts.
512 515
513@item @key{TAB} 516@item @key{TAB}
514@kindex TAB @r{(Shell mode)} 517@kindex TAB @r{(Shell mode)}
@@ -2185,7 +2188,7 @@ not use it.
2185key bindings. 2188key bindings.
2186@end table 2189@end table
2187 2190
2188@node Hyperlinking, Dissociated Press, Emulation, Top 2191@node Hyperlinking, Thumbnails, Emulation, Top
2189@section Hyperlinking and Navigation Features 2192@section Hyperlinking and Navigation Features
2190 2193
2191@cindex hyperlinking 2194@cindex hyperlinking
@@ -2351,7 +2354,77 @@ Display a menu of files and URLs mentioned in current buffer, then
2351find the one you select (@code{ffap-menu}). 2354find the one you select (@code{ffap-menu}).
2352@end table 2355@end table
2353 2356
2354@node Dissociated Press, Amusements, Hyperlinking, Top 2357@node Thumbnails, Dissociated Press, Hyperlinking, Top
2358@section Viewing Images as Thumbnails
2359@cindex tumme mode
2360@cindex thumbnails
2361
2362 Tumme is a facility for browsing image files. It provides viewing
2363of the original file, either as a thumbnail or in full size, inside
2364Emacs or in an external viewer.
2365
2366 To enter Tumme, type @kbd{M-x tumme}. It prompts for a directory;
2367specify one that has images files. This creates thumbnails for all
2368the images in that directory, and displays them all in the ``thumbnail
2369buffer''. This takes a long time if the directory contains many image
2370files, and it won't operate if the number of image files exceeds
2371@code{tumme-show-all-from-dir-max-files}.
2372
2373@kindex C-t d @r{(Tumme)}
2374@findex tumme-display-thumbs
2375 You can also enter Tumme through Dired. Mark the image files you
2376want to look at, using @kbd{m} as usual, then type @kbd{C-t d}
2377(@code{tumme-display-thumbs}). This too creates and switches to
2378a buffer containing thumbnails, corresponding to the marked files.
2379
2380 With point in the thumbnail buffer, type @kbd{RET}
2381(@code{tumme-display-thumbnail-original-image}) to display a sized
2382version of it in another window. This sizes the image to fit the
2383window. Use the arrow keys to move around in the buffer. For easy
2384browing, type @kbd{SPC} (@code{tumme-display-next-thumbnail-original})
2385to advance and display the next image. Typing @kbd{DEL}
2386(@code{tumme-display-previous-thumbnail-original}) backs up to the
2387previous thumbnail and displays that instead.
2388
2389@vindex tumme-external-viewer
2390 To view and the image in its original size, either provide a prefix
2391argument (@kbd{C-u}) before pressing @kbd{RET}, or type @kbd{C-@key{RET}}
2392(@code{tumme-thumbnail-display-external}) to display the image in an
2393external viewer. You must first configure
2394@code{tumme-external-viewer}.
2395
2396 You can delete images through Tumme also. Type @kbd{d}
2397(@code{tumme-flag-thumb-original-file}) to flag the image file for
2398deletion in the Dired buffer. You can also delete the thumbnail image
2399from the thumbnail buffer with @kbd{C-d} (@code{tumme-delete-char}).
2400
2401 More advanced features include @dfn{image tags}, which are metadata
2402used to categorize image files. The tags are stored in a plain text
2403file.
2404@c ??? What is the file name?
2405
2406 To tag image files, mark them in the dired buffer and type @kbd{C-t
2407t} (@code{tumme-tag-files}). You will be prompted for a tag. To mark
2408files having a certain tag, type @kbd{C-t f}
2409(@code{tumme-mark-tagged-files}). After marking image files with a
2410certain tag, you can use @kbd{C-t d} to view them.
2411
2412@c ??? Remove what? The tag?
2413 You can also tag a file from the thumbnail buffer by typing @kbd{t
2414t} and remove it by typing @kbd{t r}. There is also a special ``tag''
2415called ``comment'' for each file (it is not a tag in the exact same
2416sense as the other tags, it is handled slightly different). That is
2417used to enter a comment or description about the image. You comment a
2418file from the thumbnail buffer by typing @kbd{c}. You will be
2419prompted for a comment. Type @kbd{C-t c} to add a comment from Dired
2420(@code{tumme-dired-comment-files}).
2421
2422 Tumme also provides simple image manipulation. In the thumbnail
2423buffer, type @kbd{L} to rotate the original image 90 degrees anti
2424clockwise, and @kbd{R} to rotate it 90 degrees clockwise. This
2425rotation is lossless, and uses an external utility called JpegTRAN.
2426
2427@node Dissociated Press, Amusements, Thumbnails, Top
2355@section Dissociated Press 2428@section Dissociated Press
2356 2429
2357@findex dissociated-press 2430@findex dissociated-press
@@ -2376,12 +2449,13 @@ That is, if it has just output `president' and then decides to jump
2376to a different point in the file, it might spot the `ent' in `pentagon' 2449to a different point in the file, it might spot the `ent' in `pentagon'
2377and continue from there, producing `presidentagon'.@footnote{This 2450and continue from there, producing `presidentagon'.@footnote{This
2378dissociword actually appeared during the Vietnam War, when it was very 2451dissociword actually appeared during the Vietnam War, when it was very
2379appropriate.} Long sample texts produce the best results. 2452appropriate. Bush has made it appropriate again.} Long sample texts
2453produce the best results.
2380 2454
2381@cindex againformation 2455@cindex againformation
2382 A positive argument to @kbd{M-x dissociated-press} tells it to operate 2456 A positive argument to @kbd{M-x dissociated-press} tells it to operate
2383character by character, and specifies the number of overlap characters. A 2457character by character, and specifies the number of overlap characters. A
2384negative argument tells it to operate word by word and specifies the number 2458negative argument tells it to operate word by word, and specifies the number
2385of overlap words. In this mode, whole words are treated as the elements to 2459of overlap words. In this mode, whole words are treated as the elements to
2386be permuted, rather than characters. No argument is equivalent to an 2460be permuted, rather than characters. No argument is equivalent to an
2387argument of two. For your againformation, the output goes only into the 2461argument of two. For your againformation, the output goes only into the
@@ -2390,13 +2464,13 @@ buffer @samp{*Dissociation*}. The buffer you start with is not changed.
2390@cindex Markov chain 2464@cindex Markov chain
2391@cindex ignoriginal 2465@cindex ignoriginal
2392@cindex techniquitous 2466@cindex techniquitous
2393 Dissociated Press produces nearly the same results as a Markov chain 2467 Dissociated Press produces results fairly like those of a Markov
2394based on a frequency table constructed from the sample text. It is, 2468chain based on a frequency table constructed from the sample text. It
2395however, an independent, ignoriginal invention. Dissociated Press 2469is, however, an independent, ignoriginal invention. Dissociated Press
2396techniquitously copies several consecutive characters from the sample 2470techniquitously copies several consecutive characters from the sample
2397between random choices, whereas a Markov chain would choose randomly for 2471between random choices, whereas a Markov chain would choose randomly
2398each word or character. This makes for more plausible sounding results, 2472for each word or character. This makes for more plausible sounding
2399and runs faster. 2473results, and runs faster.
2400 2474
2401@cindex outragedy 2475@cindex outragedy
2402@cindex buggestion 2476@cindex buggestion
@@ -2405,7 +2479,7 @@ and runs faster.
2405@cindex developediment 2479@cindex developediment
2406@cindex userenced 2480@cindex userenced
2407 It is a mustatement that too much use of Dissociated Press can be a 2481 It is a mustatement that too much use of Dissociated Press can be a
2408developediment to your real work. Sometimes to the point of outragedy. 2482developediment to your real work, sometimes to the point of outragedy.
2409And keep dissociwords out of your documentation, if you want it to be well 2483And keep dissociwords out of your documentation, if you want it to be well
2410userenced and properbose. Have fun. Your buggestions are welcome. 2484userenced and properbose. Have fun. Your buggestions are welcome.
2411 2485
@@ -2429,7 +2503,7 @@ which plays the game Go Moku with you.
2429@findex mpuz 2503@findex mpuz
2430@findex 5x5 2504@findex 5x5
2431@cindex puzzles 2505@cindex puzzles
2432 @kbd{M-x blackbox}, @kbd{M-x mpuz} and @kbd{M-x 5x5} are kinds of puzzles. 2506 @kbd{M-x blackbox}, @kbd{M-x mpuz} and @kbd{M-x 5x5} are puzzles.
2433@code{blackbox} challenges you to determine the location of objects 2507@code{blackbox} challenges you to determine the location of objects
2434inside a box by tomography. @code{mpuz} displays a multiplication 2508inside a box by tomography. @code{mpuz} displays a multiplication
2435puzzle with letters standing for digits in a code that you must 2509puzzle with letters standing for digits in a code that you must