/[climacs]/climacs/Doc/climacs-user.texi
ViewVC logotype

Contents of /climacs/Doc/climacs-user.texi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (hide annotations)
Mon Jul 24 17:58:32 2006 UTC (7 years, 8 months ago) by thenriksen
Branch: MAIN
Changes since 1.12: +7 -1 lines
File MIME type: application/x-texinfo
Climacs entry point in in the CLIMACS package, add mention of
:new-process argument.
1 rstrandh 1.1 \input texinfo @c -*-texinfo-*-
2     @c %**start of header
3     @setfilename climacs-user
4     @settitle Climacs User Manual
5     @c %**end of header
6    
7     @copying
8     The Climacs User manual
9    
10     Copyright @copyright{} 2005 Robert Strandh.
11    
12     @end copying
13    
14     @titlepage
15     @title Climacs User Manual
16     @sp 2
17     @author Robert Strandh
18    
19     @page
20     @vskip 0pt plus 1filll
21     @insertcopying
22    
23     @end titlepage
24    
25     @contents
26    
27     @macro climacs{}
28     Climacs
29     @end macro
30    
31     @macro cl{}
32     Common Lisp
33     @end macro
34    
35     @node Top
36     @top
37    
38     @menu
39     * Introduction::
40     * Conventions::
41     * Concepts::
42     * Basic editing commands::
43     * Different editing modes::
44     * Kill ring::
45 rstrandh 1.3 * Advanced editing commands::
46 rstrandh 1.4 * Getting help::
47 rstrandh 1.7 * Proposal for new buffer/pane relations::
48 rstrandh 1.1 * Key Index::
49     * Concept Index::
50     @end menu
51    
52    
53     @node Introduction
54     @chapter Introduction
55    
56     @climacs{} is a text editor in the Emacs family. However, @climacs{}
57     differs from Emacs in various ways.
58    
59     For one thing, @climacs{} is written in Common Lisp rather than Emacs
60     Lisp. Common Lisp is a much more complete language than Emacs Lisp
61     with essential features such as packages, classes, etc.
62    
63     Moreover, @climacs{} uses the Common-Lisp Interface Manager (CLIM) as its
64     substrate for managing everything that has to do with user
65     interaction, including event handling, text rendering, and
66     multi-windowing (called panes in CLIM terminology).
67    
68     Also, since @climacs{} uses CLIM, there is no need for @climacs{} itself to
69     serve as the basis for other applications such as news readers, mail
70     readers, directory editors, web browsers, etc. the way it is done with
71     Emacs. Instead, such applications are better written as stand-alone
72     CLIM applications that can then communicate with @climacs{} using CLIM
73     and Common Lisp as the common substrate.
74    
75     The main purpose of @climacs{} is not to replace Emacs. Instead, it is
76     primarily intended as a text editor for Common Lisp developers.
77     Notice that this is not the same as a text editor for Common Lisp
78     @emph{development}, since Common Lisp developers might need other
79     features such as editing HTML or spell checking, etc., not directly
80     related to Common Lisp development.
81    
82     @node Conventions
83     @chapter Conventions
84    
85     Many @climacs{} commands are invoked by typing a sequence of
86     keystrokes. A complete sequence of keystrokes invokes a
87     @climacs{} @emph{command} which has a @emph{name}. Sometimes it is
88     useful to know that name, even though the command is usually invoked
89     by typing the key sequence. For that reason, in this manual we often
90     give the corresponding command name together with the key sequence to
91     invoke it.
92    
93     @node Concepts
94     @chapter Concepts
95    
96     In order to use @climacs{} effectively, you need to know some concepts
97     that are used by it, and referred to in this manual.
98    
99     @menu
100     * Buffer::
101     * Window and pane::
102     * Mark and point::
103     * Key sequence::
104     @end menu
105    
106     @node Buffer
107     @section Buffer
108    
109     A @climacs{} @emph{buffer}
110     @cindex buffer
111 thenriksen 1.12 is a named, editable sequence of arbitrary @cl{} objects. If the buffer
112 rstrandh 1.1 contains text, most of those objects will be @emph{Unicode
113 thenriksen 1.12 characters}. When editing a file, the contents of the file will be
114     loaded into a buffer with a name corresponding to the name of the file
115     (creating the buffer in the process), and all editing operations will be
116     performed on the buffer. Upon saving, the contents of the buffer will be
117     written to the file associated with it. @xref{Editing the contents of a
118     file}. A buffer does not necessarily have a file associated with it, for
119     example, the @emph{*scratch*} buffer automatically created upon
120     @climacs{} startup is not associated with any file.
121 rstrandh 1.1 @cindex character
122     @cindex Unicode
123    
124     @node Window and pane
125     @section Window and pane
126    
127     A @climacs{} buffer may or may not be on display. If it is, it is on
128 thenriksen 1.12 display in a @emph{pane}
129 rstrandh 1.1 @cindex pane
130     or a @emph{window}.
131     @cindex window
132 thenriksen 1.12 A pane does not necessarily contain a buffer, it may just be a pane
133     containing output from Climacs. These panes are known as @emph{typeout
134     panes},
135     @cindex typeout pane
136     and their contents are lost when they are destroyed.
137 rstrandh 1.1
138     @node Mark and point
139     @section Mark and point
140    
141     Positions into a @climacs{} buffer are determined by @emph{marks}
142     @cindex mark
143     which can be either @emph{left sticky},
144     @cindex left sticky
145     meaning that if an object is inserted where such a mark is, it ends up
146     @emph{to the left} of the newly inserted object, or @emph{right
147     sticky},
148     @cindex right sticky
149     meaning that if an object is inserted where such a mark is, it ends up
150     @emph{to the right} of the newly inserted object.
151    
152     A distinguished mark that is associated with each @climacs{} pane is
153     called the @emph{point}.
154     @cindex point
155     There is a point associated with each window. Each of several windows
156     that display the same buffer has its own point. In addition, a buffer
157     that is not on display has a point that is taken over by the first
158     window that displays the buffer. Points are right-sticky marks, even
159     when a language such as Arabic is edited, simply because by
160     convention, the @climacs{} buffer is considered as being organized
161 rstrandh 1.6 from left to right. It is a question of @emph{rendering} as to whether
162 rstrandh 1.1 the objects in the buffer are actually displayed from left to right,
163     from right to left, or in any other appropriate order.
164    
165     @node Key sequence
166     @section Key sequence
167    
168     Typically, @climacs{} is operated by @emph{key sequences}
169     @cindex key sequence
170     issued by the user. A key sequence is a sequence of key strokes,
171     where a key stroke can be a simple character such as @kbd{f} or
172     @kbd{&}, or a key with one or more @emph{modifiers}
173     @cindex modifier
174     such as @key{Control}, @key{Shift}, @key{Meta}, etc.
175    
176     Some key sequences result in the execution of a @climacs{}
177     @emph{command}.
178     @cindex command
179     Such a key sequence is called a @emph{complete key sequence}
180 rstrandh 1.6 @cindex complete key sequence
181     or an @emph{order}.
182 rstrandh 1.1 @cindex order
183    
184     @node Basic editing commands
185     @chapter Basic editing commands
186    
187     The basic editing commands of @climacs{} are identical or at least
188     similar to the corresponding Emacs commands. This is deliberate. We
189     do not believe in introducing gratuitous differences where such
190     differences have little or no importance. A typical Emacs user
191     should therefore feel quite comfortable with the basic editing
192     commands of @climacs{}.
193    
194     @menu
195 rstrandh 1.5 * Entering and exiting Climacs::
196 rstrandh 1.1 * Numeric arguments::
197     * Entering and deleting text::
198     * Moving around::
199     * Extended commands::
200 rstrandh 1.2 * Editing the contents of a file::
201 rstrandh 1.1 @end menu
202    
203 rstrandh 1.5 @node Entering and exiting Climacs
204     @section Entering and exiting Climacs
205 rstrandh 1.1
206     The typical way of entering @climacs{} is to type a @cl{}
207     @emph{expression} at the prompt of a @cl{} @emph{listener} such as:
208    
209     @lisp
210 thenriksen 1.13 CL-USER> (climacs:climacs)
211     @end lisp
212    
213     @climacs{} also has an option to start in a new thread:
214    
215     @lisp
216     CL-USER> (climacs:climacs :new-process t)
217 rstrandh 1.1 @end lisp
218    
219     You exit from @climacs{} by typing @kbd{C-x C-c} (@command{Quit}).
220     @kindex C-x C-c
221     If you have buffers
222     associated with files that have not been saved to their respective
223     files, @climacs{} will ask whether you would like those buffers
224     saved. In addition, if you answer no to any of those questions, you
225     will be asked to confirm that you want to quit @climacs{} anyway. The
226     reason for this pestering on the part of @climacs{} is that currently
227 rstrandh 1.6 when you quit @climacs{}, the buffer contents are lost.
228 rstrandh 1.1
229     @node Numeric arguments
230     @section Numeric arguments
231    
232     Many @climacs{} commands allow the use of a @emph{numeric argument}.
233     @cindex numeric argument
234     A numeric argument is used as a prefix to a @climacs{} command, and
235     modifies the behavior of that command in some useful way which varies
236     from command to command.
237    
238     Typically, a numeric argument prefix makes the command repeat its
239     action a number of times indicated by the numeric argument prefix.
240     For instance, the command @command{Delete Object}, usually associated
241     with the order @kbd{C-d}, normally deletes a single object from the
242     buffer. However, if given a numeric argument, it deletes that many
243     objects.
244    
245     Other commands modify their behavior according to whether a numeric
246     argument has been given, but do not take into account the specific
247     numeric value indicated. For instance, the command @command{Delete
248     Horizontal Space}, when given no numeric argument, deletes whitespace
249     both before and after point. With a numeric argument, it deletes only
250     whitespace @emph{before} point.
251    
252     Yet other commands may both modify what they do and repeat according
253     to the numeric value of the argument. For instance, the command
254     @command{Kill Line}, when given no numeric argument, kills to the end
255     of the line if point is not already at the end of the line, but does
256     not kill the newline character at the end of the line and kills the
257     newline character if point is at the end of a line. However, if given
258     a numeric argument, @command{Kill Line} kills that many lines.
259    
260     There are two ways of giving a numeric argument to a @climacs{}
261     command. One way is to first type @kbd{C-u},
262     @kindex C-u
263     then a sequence of
264     decimal digits, and finally the order that invokes the command. For
265     instance, to delete the next 15 objects after point, you could type
266     @kbd{C-u 1 5 C-d}. The other way is to hold down the @key{Meta} key
267     (usually the one marked @key{Alt}) while typing the decimal digits, as
268     in @kbd{M-1 M-5 C-d}.
269    
270     Some commands accept negative numeric arguments. In that case, start
271     the sequence with the minus sign as in @kbd{C-u - 1 5 C-d}, which in
272     this case will delete buffer objects @emph{before} the point rather
273     than after.
274    
275     @node Entering and deleting text
276     @section Entering and deleting text
277    
278     @menu
279     * Entering text::
280     * Deleting by objects::
281     * Deleting by words::
282     * Deleting by lines::
283     @end menu
284    
285     @node Entering text
286     @subsection Entering text
287    
288     In contrast to other text editors such as VI, @climacs{} does not have
289     a specific @emph{insert mode}. Instead, @climacs{} is always in
290     insert mode, in that characters that are typed on the keyboard
291     immediately get inserted at the @emph{point}.
292    
293     @node Deleting by objects
294     @subsection Deleting by objects
295    
296     To erase objects that have been inserted, you can use the
297     @key{Backspace} (@command{Backward Delete Object}
298     key, which deletes the object immediately to the left of the point.
299     To delete an object @emph{to the right} of the point, use the
300     @kbd{C-d}
301     @kindex C-d
302     (@command{Delete Object}) order. When used with a numeric
303     argument, these commands delete that many objects.
304    
305     @node Deleting by words
306     @subsection Deleting by words
307    
308     It is also possible to delete larger chunks of buffer contents. The
309     order @kbd{M-d}
310     @kindex M-d
311 rstrandh 1.2 (@command{Kill Word}) is used to delete the @emph{word}
312     @cindex word
313 rstrandh 1.1 @emph{following} point. If point is not at the beginning of a word,
314     then the part of the word that follows point is deleted. The order
315     @kbd{M-@key{Backspace}}
316     @kindex M-@key{Backspace}
317     (@command{Backward Kill Word}) is used to
318     delete the word @emph{preceding} point. If point is not at the end of
319     a word, then the part of the word that precedes point is deleted.
320     When used with a numeric argument, these commands delete that many
321     words. Since these command names contain the word @emph{kill}, they
322     use the kill-ring (@pxref{kill-ring}).
323    
324     @node Deleting by lines
325     @subsection Deleting by lines
326    
327     @climacs{} allows you to delete buffer objects one or more lines at a
328     time. The order @kbd{C-k}
329     @kindex C-k
330     (@command{Kill Line}) lets you do this. When point is @emph{not} at
331     the end of a line, then this command kills the buffer contents from
332     point up to, but not including the following newline object. When
333     instead point @emph{is} at the end of a line, only the following
334     newline object is removed.
335    
336     When used with a numeric argument, this command is not simply repeated
337     that many times. Instead, the number of lines indicated by the
338 rstrandh 1.6 numeric argument are removed.
339 rstrandh 1.1
340     Because this command name contains the word @emph{kill} it saves the
341     deleted objects on the @emph{kill ring} (@pxref{kill-ring}).
342    
343     @node Moving around
344     @section Moving around
345    
346     @menu
347     * Moving by objects::
348     * Moving by words::
349     * Moving by lines::
350     @end menu
351    
352     @node Moving by objects
353     @subsection Moving by objects
354    
355     @climacs{} allows you to move around in the buffer in various ways.
356     The most frequent way of moving around is by one buffer position at a
357     time.
358    
359     The order @kbd{C-f}
360     @kindex C-f
361     (@command{Forward Object}) allows you to
362     advance the position of point by one position. If given a numeric
363     argument, it advances by that many positions. The @command{Forward
364     Object} command is also associated with the @emph{right-arrow key}.
365    
366     The order @kbd{C-b}
367     @kindex C-b
368     (@command{Backward Object}) allows you to move the
369     position of point backward by one position. If given a numeric
370     argument, it moves back by that many positions. The @command{Backward
371     Object} command is also associated with the @emph{left-arrow key}.
372    
373     @node Moving by words
374     @subsection Moving by words
375    
376 rstrandh 1.6 @climacs{} will allow you to move around by larger units than
377 rstrandh 1.2 objects.
378    
379     The order @kbd{M-f}
380     @kindex M-f
381     (@command{Forward Word}) lets you move forward over the @emph{word}
382     @cindex word
383     following point. With a numeric argument, this command moves point
384     forward that many words.
385    
386     The order @kbd{M-b}
387     @kindex M-b
388     (@command{Backward Word}) lets you move backward over the @emph{word}
389     @cindex word
390     preceding point. With a numeric argument, this command moves point
391     backward that many words.
392    
393     Notice the analogy between the commands for moving by objects
394     (@kbd{C-f}, @kbd{C-b}) and those for moving by words (@kbd{M-f},
395     @kbd{M-b}).
396    
397 rstrandh 1.1 @node Moving by lines
398     @subsection Moving by lines
399    
400     @climacs{} has commands to move by one or several @emph{lines} at a
401     time.
402    
403     The order @kbd{C-p}
404     @kindex C-p
405     (@command{Previous Line}) allows you to
406     move point @emph{up} to the previous line. If given a numeric
407     argument, it moves up by that many lines. The command
408     @command{Previous Line} is also associated with the @emph{up-arrow
409     key}.
410    
411     The order @kbd{C-n}
412     @kindex C-n
413     (@command{Next Line}) allows you to
414     move point @emph{down} to the next line. If given a numeric
415     argument, it moves down by that many lines. The command
416     @command{Next Line} is also associated with the @emph{down-arrow
417     key}.
418    
419 rstrandh 1.6 When you move by lines, @climacs{} tries to be smart about which
420 rstrandh 1.1 @emph{column} point ends up in, in the following way: when a sequence
421     of commands that move by lines is given, the initial column of point
422     is remembered (this is called the @emph{goal column}). @climacs{}
423     then tries to position point in that column of the target line. If
424     the target line has fewer than that many columns, point is positioned
425     at the end of the target line. The goal column is discarded when the
426     sequence of commands is interrupted by some unrelated command.
427    
428     @node Extended commands
429     @section Extended commands
430    
431     In order to make editing as efficient as possible, many @climacs{}
432     commands can be invoked by key sequences. It is, however, possible to
433     invoke most @climacs{} commands by using the order @kbd{M-x} which
434     invokes the command @command{Extended Command} which lets you type the
435     @emph{name} of the command in the minibuffer at the prompt.
436     In general, you do not have to type the full name of the command,
437     because @climacs{} uses CLIM's completion mechanism so that you can
438     complete the name by typing some prefix and then use the @key{TAB} key
439     to complete.
440    
441     Some @climacs{} commands @emph{must} be invoked through the use of
442     @command{Extended Command}. The reason for this is that key sequences
443     are a precious resource, and for rarely-used commands, it is better
444     not to waste a key sequence.
445 rstrandh 1.2
446     @node Editing the contents of a file
447     @section Editing the contents of a file
448    
449     Transfering the contents of a text file into a @climacs{} buffer is
450     referred to as @emph{finding} the file.
451     @cindex finding a file
452    
453     There are two ways of transfering the contents of a buffer to a file.
454     One is to @emph{save} the buffer, which means to transfer the contents
455     to the file that is already associated with the buffer. The other is
456     to @emph{write} the buffer, which means to transfer the contents to a
457     different file than that associated with the buffer, or to write the
458     contents of a buffer that has no associated file to some file.
459    
460     @menu
461     * Finding a file:: Moving text from a file to a @climacs{} buffer
462     * Saving a buffer:: Moving text from a buffer to the associated file
463     * Writing a buffer:: Moving text from a buffer to a different file
464     @end menu
465    
466     @node Finding a file
467     @subsection Finding a file
468    
469     To find a file, use the order @kbd{C-x C-f}
470     @kindex C-x C-f
471     (@command{Find File}).
472    
473     @climacs{} will prompt for the name of a file. For typing the file
474     name, you can use @emph{completion} (using the @key{TAB} key), or you
475     can use the right mouse button to get a list of all the files that
476     match the prefix you typed.
477    
478     The result of finding a file is that a @emph{buffer} will be created
479     that has the name of the file, and the file will be associated with
480 rstrandh 1.6 that buffer when the content is saved.
481 rstrandh 1.2
482     @node Saving a buffer
483     @subsection Saving a buffer
484    
485     To save a buffer, use the order @kbd{C-x C-s}
486     @kindex C-x C-s
487     (@command{Save Buffer}).
488     The contents of the buffer will be transfered to the file associated
489     with the buffer if there is one. If the buffer has no file name
490     associated with it, then this command behaves just like @command{Write
491     Buffer} (@pxref{write-buffer}).
492    
493     @node Writing a buffer
494     @subsection Writing a buffer
495     @anchor{write-buffer}
496    
497     To write a buffer to a file, use the order @kbd{C-x C-w}
498     @kindex C-x C-w
499     (@command{Write Buffer}). @climacs{} will prompt for the name of a
500     file to save the buffer contents in. Completion (by using the
501     @key{TAB} key, or by using the right mouse button) can be used if the
502     name is that of an existing file.
503 rstrandh 1.1
504     @node Different editing modes
505     @chapter Different editing modes
506    
507     @menu
508     * Overwrite mode::
509     @end menu
510    
511     @node Overwrite mode
512     @section Overwrite mode
513    
514     Normally, typing ordinary characters to @climacs{} results in these
515     characters being @emph{inserted} at point. Sometimes, however, it is
516     useful to treat a line of objects as being of @emph{fixed length}, and
517 rstrandh 1.6 have @climacs{} @emph{replace} objects as new ones are being typed.
518 rstrandh 1.1
519     This is exactly the purpose of @climacs{} @emph{overwrite mode}. This
520     mode alters the insert commands so that the object after point is
521     first deleted.
522    
523     You can toggle between the normal mode of operation and overwrite mode
524     by using the @key{Insert}
525     @kindex @key{Insert}
526     (@command{Toggle Overwrite Mode}) key.
527    
528     @node Kill ring
529     @chapter Kill ring
530     @anchor{kill-ring}
531    
532     Many @climacs{} commands that remove objects from a buffer save these
533     objects on a global @emph{kill ring}.
534     @cindex kill ring
535    
536 rstrandh 1.3 @node Advanced editing commands
537     @chapter Advanced editing commands
538    
539     @menu
540     * Keyboard macros::
541     * Searching and replacing::
542     @end menu
543    
544     @node Keyboard macros
545     @section Keyboard macros
546    
547     Sometimes, it is useful to be able to repeat a sequence of keystrokes
548 rstrandh 1.6 several times. @climacs{} allows you to do this through a feature
549 rstrandh 1.3 called @emph{keyboard macros}.
550     @cindex keyboard macro
551     @climacs{} does this by @emph{recording} whatever the user types on
552 rstrandh 1.6 the keyboard, and then making it possibly to @emph{replay} the
553 rstrandh 1.3 recorded sequence.
554    
555     To start recording a sequence of keystrokes, use the order @kbd{C-x (}
556     @kindex C-x (
557     (@command{Start Kbd Macro}). You will see the word @samp{Def}
558     appearing on the mode line, indicating that a keyboard macro is being
559     defined. As long as recording is in effect, every keystroke will be
560     saved for later use.
561    
562     To stop recording a sequence of keystrokes, use the order @kbd{C-x )}
563     @kindex C-x )
564     (@command{End Kbd Macro}). The word @samp{Def} will disappear from
565     the mode line, indicating that keystrokes are no longer being
566     recorded.
567    
568     To replay a previously recorded sequence of keystrokes, use the order
569     @kbd{C-x e}
570     @kindex C-x e
571     (@command{Call Last Kbd Macro}). When used with a numeric argument,
572     this command will repeat the sequence of keystrokes that many times.
573    
574     @node Searching and replacing
575     @section Searching and replacing
576 rstrandh 1.4
577 thenriksen 1.11 @climacs{} has a number of useful searching and replacing commands. The
578 thenriksen 1.10 replacing commands come in two flavors - querying commands and
579     non-querying commands. The former will unconditionally replace all
580     matches, while the latter will query before each replacement. Note that
581     the searching and replacing commands only affect the buffer contents
582     after point.
583    
584     @menu
585     * Simple search::
586     * Incremental search::
587     * The isearch command loop::
588     * Replacing single strings::
589     * Replacing multiple different strings::
590     * The query-replace command loop::
591     @end menu
592    
593     @node Simple search
594     @subsection Simple search
595    
596     The simplest search command is @command{String Search}. It prompts for a
597     string and moves point to after the next occurrence of the
598     string. @command{Reverse String Search} is similar, but searches
599     backwards from point, and puts point before the first occurrence of the
600     string.
601    
602     The commands @command{Word Search} and @command{Reverse Word Search} are
603     very similar to @command{String Search} and @command{Reverse String
604     Search}, but only finds matches that are whole words.
605    
606     The commands @command{Regex Search Forward} and @command{Regex Search
607     Backward} are similar to @command{String Search} and @command{Reverse
608     Word Search}, but do not search for plain strings. Instead, they ask the
609     user to enter a regular expression and attempts to find a match in the
610     buffer.
611    
612     You can use the command @command{How Many} to count the number of
613     matches in the buffer for a given regular expression. When invoked, the
614     command will ask for a regular expression, and then proceed to search
615     through the buffer, counting each match for the regular expression, and
616     finally print the number of matches to the minibuffer.
617    
618     @node Incremental search
619     @subsection Incremental search
620    
621     Incremental search, or @emph{isearch} in common speech, is different
622     from string search, in that point is moved to matches in the buffer,
623     while the search string is being entered, thus, the user receives
624     immediate feedback while entering the search string. Incremental search
625     is controlled through a command loop. @xref{The isearch command loop}.
626    
627     Incremental search can be entered via two orders, @kbd{C-s}
628     @kindex C-s
629     (@command{Isearch Forward}) and @kbd{C-r}
630     @kindex C-r
631     (@command{Isearch Backward}). These commands starts a command loop that
632     searches forwards and backwards by default, respectively. Note that the
633     search direction can be changed from inside the command loop, no matter
634     which of these commands were used to start it.
635    
636     @node The isearch command loop
637     @subsection The isearch command loop
638    
639     The isearch command loop consists of the user typing in characters for
640 thenriksen 1.11 the search string, and @climacs{} moving point ahead to the most immediate
641 thenriksen 1.10 instance of the provided string, while the user is typing. Apart from
642     simply entering text, the user can manipulate the command loop by
643     entering the following orders:
644    
645     @table @kbd
646     @item C-s
647     Move to next match for current search string and set the search
648     direction to forward.
649     @item C-r
650     Move to previous match for current search string and set the search
651     direction to backward.
652     @item C-j
653     Append a ``newline'' character to the current search string.
654     @item C-w
655     Append the word at point to the current search string.
656     @item C-y
657     Append the line at point to the current search string.
658     @item M-y
659     Append the head of the kill ring to the search string.
660     @item @key{Backspace}
661     Delete the last element of the search string. This is not the same as
662     deleting the last character - for example, if the word at point has been
663     appended to the search string via @kbd{C-w}, this order will delete the
664     entire word, not just the last character of the word.
665     @item @key{Newline}
666     Exit the isearch command loop.
667     @end table
668    
669     @node Replacing single strings
670     @subsection Replacing single strings
671    
672     The basic string-replacement command can be accessed through the order
673     @kbd{C-x e}
674     @kindex C-x e
675     (@command{Replace String}). This command will prompt for two strings,
676     and replace all instances of the first string following point in the
677     current buffer, with the second string. This command is not querying,
678     and will thus not prompt before each replacement, so if you desire this
679     behavior, use the order @kbd{M-%}
680     @kindex M-%
681     (@command{Query Replace}) instead. @xref{The query-replace command loop}.
682    
683     @node Replacing multiple different strings
684     @subsection Replacing multiple different strings
685    
686     It is often desirable to be able to replace multiple, different strings
687     with one command - for instance, you might want to replace all
688     occurrences of ``foo'' with ``bar'' and all occurrences of ``bar'' with
689     ``baz'', without having the replacements affect each other. For this,
690 thenriksen 1.11 @climacs{} provides the command @command{Multiple Query Replace}, which
691 thenriksen 1.10 will prompt for pairs of strings, replacing the first with the second.
692     Entering an empty search string stops the prompting and starts the
693     query-replace command loop. It is also possible to use @command{Multiple
694     Query Replace From Buffer}, which will read the string pairs from a
695     buffer provided by the user.
696    
697     If you wish to exchange two strings for one another, use the command
698     @command{Query Exchange}, which will prompt for two strings, and replace
699     them for each other in the current buffer.
700    
701     @node The query-replace command loop
702     @subsection The query-replace command loop
703    
704     When invoking one of the querying replace commands, you will enter a
705     command loop with specialized commands for manipulating the replacement
706     process.
707    
708     The command loop will loop across the buffer, and for each match, the
709     command loop will read an order from the user. The following orders and
710     their corresponding commands are available:
711    
712     @table @kbd
713     @item y, @key{Space}
714     Replace the current match with the provided string, go to next
715     match.
716     @item n, @key{Rubout}, @key{Backspace}
717     Do not replace the current match, go to next match.
718     @item q, @key{Newline}
719     Quit the command loop, preserving all replacements already made.
720     @item .
721     Replace the current match with the provided string and quit the
722     command loop.
723     @item !
724     Replace all matches with the provided replacement strings.
725     @end table
726    
727 rstrandh 1.4 @node Getting help
728     @chapter Getting help
729    
730     In addition to this manual, @climacs{} contains an online help
731     facility. There are several different topics that you can get help
732     with. Most of these topics are obtained by some order using the
733     @kbd{C-h}
734     @kindex C-h
735 thenriksen 1.9 prefix key. The key following @kbd{C-h} determines what kind of help
736 rstrandh 1.4 information is displayed.
737    
738     @menu
739 thenriksen 1.10 * Help with a command::
740 rstrandh 1.4 * Help with a key binding::
741     * Help with a particular key sequence::
742 thenriksen 1.10 * Help finding a command::
743 rstrandh 1.4 * Help finding an order for a command::
744     @end menu
745    
746 thenriksen 1.9 @node Help with a command
747     @section Help with a command
748    
749     To get documentation about a particular command, use the order @kbd{C-h
750     f}
751     @kindex C-h f
752 thenriksen 1.12 (@command{Describe Command}). You will be prompted for the name of a
753     command, and if you provide a valid command name, a typeout pane
754 thenriksen 1.9 containing information about which function the command calls, which
755     gestures the command can be invoked through, as well as a description of
756     the command, will be displayed.
757    
758 rstrandh 1.4 @node Help with a key binding
759     @section Help with a key binding
760    
761     To obtain a list of all orders and the associated commands that are
762     valid in a particular context, use the order @kbd{C-h b}
763     @kindex C-h b
764     (@command{Describe Bindings}). A table with each command name and
765     associated order (if any) is displayed in a new window.
766    
767     @node Help with a particular key sequence
768     @section Help with a particular key sequence
769    
770     To obtain a description of what some putative order will do, use the
771 thenriksen 1.10 order @kbd{C-h c}p
772 rstrandh 1.4 @kindex C-h c
773 rstrandh 1.6 (@command{Describe Key Briefly}). You will be prompted for a key
774 rstrandh 1.4 sequence. If the key sequence you type is bound to a command, the
775 rstrandh 1.6 command name will be displayed in the minibuffer. Otherwise, a message
776 rstrandh 1.4 indicating that the key is not bound to a command will be displayed.
777    
778 thenriksen 1.9 For more detailed information, use the order @kbd{C-h c}
779     @kindex C-h k
780     (@command{Describe Key}). You will be prompted for a key sequence, and
781     if the key sequence you provide is bound to a command, documentation for
782     that command, as well as any arguments the given key binding calls the
783 thenriksen 1.12 command with, will be shown in a typeout pane.
784 thenriksen 1.9
785     @node Help finding a command
786 thenriksen 1.12 @section Help finding a command
787 thenriksen 1.9
788     If you do not know which commands are applicable to a given situation,
789     you can use the order @kbd{C-h a}
790     @kindex C-h a
791     (@command{Apropos Command}) to perform a keyword-based search for
792 thenriksen 1.12 commands. You will be prompted for a keyword, after which @climacs{}
793     will search through the available commands for commands that are
794     connected to the keyword. If commands are found, they will be displayed
795     in a typeout pane along with the gestures you can use to invoke
796     them. You can also click on the names of the commands to get more
797     thorough documentation.
798 thenriksen 1.9
799 rstrandh 1.4 @node Help finding an order for a command
800     @section Help finding an order for a command
801    
802     Sometimes, you know the name of a command, and would like to find out
803     whether it is bound to any order, and if so, which one(s). For that,
804     you can use the order @kbd{C-h w}
805     @kindex C-h w
806     (@command{Where Is}). You will be prompted for a command name
807     (completion can be used as usual), and if the command name given is
808     bound to an order, that order will displayed in the minibuffer.
809     Otherwise, a message indicating that the command is not bound to any
810     order will be displayed.
811 rstrandh 1.7
812     @node Proposal for new buffer/pane relations
813     @chapter Proposal for new buffer/pane relations
814    
815     There is a proposal on the table to make the way @climacs{} manages
816     buffers and panes incompatible with that of Emacs, and in the process
817     thus cleaning up 30 years of baggage.
818    
819     The proposal is to no longer allow buffers without panes. Instead, a
820     buffer will always be associated with at least one pane, though that
821     pane could be adopted or disowned to make it visible or invisible.
822     The advantage of this organization is that a buffer will no longer
823     contain a point. Also, panes can contain other things that buffers
824     such as buffer lists, debugger applications, etc.
825    
826     For this to work, we need to define how the effect of certain
827     commands related to buffers and windows will be altered. The proposal
828     is:
829    
830     C-x 2 creates an additional pane with its own point and that shares
831     the buffer of the current pane. It also adopts the new pane by the
832     same mechanism used now (creating a vbox pane containing the two. C-x
833     3 is similar except that it uses a hbox instead.
834    
835     C-x 0 does not destroy the pane, but just disowns it (by replacing the
836     rack it is in by the pane itself).
837    
838     C-x 1 does the equivalent of C-x 0 on all other visible panes.
839    
840     C-x k kills the current pane. If that happens to be the last pane
841     containing a particular buffer, then the buffer is lost as well.
842    
843     C-x b replaces the current pane by some arbitrary pane displaying the
844     buffer that has been requested (or creates a new buffer and a new pane
845     if the buffer requested does not exist?).
846 rstrandh 1.1
847     @node Key Index
848     @unnumbered Key Index
849    
850     @printindex ky
851    
852     @node Concept Index
853     @unnumbered Concept Index
854    
855     @printindex cp
856    
857     @bye

  ViewVC Help
Powered by ViewVC 1.1.5