]> code.delx.au - gnu-emacs/blob - doc/misc/ido.texi
Merge from trunk after a lot of time.
[gnu-emacs] / doc / misc / ido.texi
1 \input texinfo @c -*-texinfo-*-
2 @setfilename ../../info/ido
3 @settitle Interactive Do
4 @include emacsver.texi
5
6 @copying
7 This file documents the Ido package for GNU Emacs.
8
9 Copyright @copyright{} 2013 Free Software Foundation, Inc.
10
11 @quotation
12 Permission is granted to copy, distribute and/or modify this document
13 under the terms of the GNU Free Documentation License, Version 1.3 or
14 any later version published by the Free Software Foundation; with no
15 Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
16 and with the Back-Cover Texts as in (a) below. A copy of the license
17 is included in the section entitled ``GNU Free Documentation License''.
18
19 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
20 modify this GNU manual.''
21 @end quotation
22 @end copying
23
24 @dircategory Emacs lisp libraries
25 @direntry
26 * Ido: (ido). Interactively do things with buffers and files.
27 @end direntry
28
29 @finalout
30
31 @titlepage
32 @sp 6
33 @center @titlefont{Interactive Do}
34 @sp 4
35 @center For GNU Emacs
36 @sp 1
37 @center as distributed with Emacs @value{EMACSVER}
38 @sp 5
39 @center Kim F. Storm
40 @center storm@@cua.dk
41 @page
42 @vskip 0pt plus 1filll
43 @insertcopying
44 @end titlepage
45
46 @contents
47
48 @ifnottex
49 @node Top
50 @top Interactive Do
51
52 @insertcopying
53 @end ifnottex
54
55 @menu
56 * Overview:: Basics, activation.
57 * Matching:: Interactivity, matching, scrolling.
58 * Highlighting:: Highlighting of matching items.
59 * Hidden Buffers and Files:: Hidden buffers, files, and directories.
60 * Customization:: Change the Ido functionality.
61 * Misc:: Various other features.
62
63 Appendices
64 * GNU Free Documentation License:: The license for this documentation.
65
66 Indexes
67 * Variable Index:: An entry for each documented variable.
68
69 @detailmenu
70 --- The Detailed Node Listing ---
71
72 Overview
73
74 * Activation:: How to use this package.
75 * Working Directories:: Where files have most recently been opened.
76
77 Matching
78
79 * Interactive Substring Matching:: Interactivity, matching, scrolling.
80 * Prefix Matching:: Standard completion.
81 * Flexible Matching:: More flexible matching.
82 * Regexp Matching:: Matching using regular expression.
83
84 Customization
85
86 * Changing List Order:: Changing the list of files.
87 * Find File At Point:: Make Ido guess the context.
88 * Ignoring:: Ignorance is bliss.
89 * Misc Customization:: Miscellaneous customization for Ido.
90
91 Miscellaneous
92
93 * All Matching:: Seeing all the matching buffers or files.
94 * Replacement:: Replacement for @code{read-buffer} and @code{read-file-name}.
95 * Other Packages:: Don't want to depend on @code{ido-everywhere}?
96
97 @end detailmenu
98 @end menu
99
100 @node Overview
101 @chapter Overview
102 @cindex overview
103
104 @noindent
105 This document describes a set of features that can interactively do
106 things with buffers and files. All the features are described here
107 in detail.
108
109 The @dfn{Ido} package can let you switch between buffers and visit
110 files and directories with a minimum of keystrokes. It is a superset
111 of Iswitchb, the interactive buffer switching package by Stephen
112 Eglen.
113
114 @cindex author of Ido
115 @cindex Iswitchb
116 This package was originally written by Kim F. Storm, based on the
117 @file{iswitchb.el} package by Stephen Eglen.
118
119 @menu
120 * Activation:: How to use this package.
121 * Working Directories:: Where files have most recently been opened.
122 @end menu
123
124 @node Activation
125 @section Activation
126 @cindex activation
127 @cindex installation
128
129 @noindent
130 This package is distributed with Emacs, so there is no need to install
131 any additional files in order to start using it. To activate, use
132 @kbd{M-x ido-mode}.
133
134 @noindent
135 You may wish to add the following expressions to your initialization
136 file (@pxref{Init File,,The Emacs Initialization File, emacs, GNU
137 Emacs Manual}), if you make frequent use of features from this
138 package.
139
140 @example
141 (require 'ido)
142 (ido-mode t)
143 @end example
144
145 @node Working Directories
146 @section Working Directories
147 @cindex working directories
148
149 @vindex ido-work-directory-list
150 @noindent
151 @dfn{Working directories} are directories where files have most
152 recently been opened. The current directory is inserted at the front
153 of this @code{ido-work-directory-list} whenever a file is opened with
154 @code{ido-find-file} and other file-related functions.
155
156 @c @cindex merge
157 @c or maybe a new node for ``merge''
158
159 @c @deffn Command ido-merge-work-directories
160
161 @c @deffn Command ido-prev-work-directory
162
163 @c @deffn Command ido-next-work-directory
164
165 @c @deffn Command ido-forget-work-directory
166
167 @c @defvar ido-use-merged-list
168 @c @defvar ido-try-merged-list
169 @c @defvar ido-pre-merge-state
170
171 @defopt ido-max-work-directory-list
172 This user option specifies maximum number of working directories to
173 record.
174 @end defopt
175
176 @c see (info "(elisp) File Name Completion")
177 @defopt ido-max-dir-file-cache
178 This user option specifies maximum number of working directories to be
179 cached. This is the size of the cache of
180 @code{file-name-all-completions} results. Each cache entry is time
181 stamped with the modification time of the directory. Some systems,
182 like MS-Windows, have unreliable directory modification times, so you
183 may choose to disable caching on such systems, or explicitly refresh
184 the cache contents using the command @code{ido-reread-directory}
185 (usually @kbd{C-l}) in the minibuffer.
186 @end defopt
187
188 @node Matching
189 @chapter Matching
190 @cindex matching
191
192 @noindent
193 This section describes features of this package that have to
194 do with various kinds of @emph{matching}: among buffers, files, and directories.
195
196 @menu
197 * Interactive Substring Matching:: Interactivity, matching, scrolling.
198 * Prefix Matching:: Standard completion.
199 * Flexible Matching:: More flexible matching.
200 * Regexp Matching:: Matching using regular expression.
201 @end menu
202
203 @node Interactive Substring Matching
204 @section Interactive Substring Matching
205 @cindex interactive substring matching
206 @cindex substring, interactive matching
207 @cindex matching, using substring
208
209 @noindent
210 As you type in a substring, the list of buffers or files currently
211 matching the substring are displayed as you type. The list is
212 ordered so that the most recent buffers or files visited come at
213 the start of the list.
214
215 The buffer or file at the start of the list will be the one visited
216 when you press @key{RET}. By typing more of the substring, the list
217 is narrowed down so that gradually the buffer or file you want will be
218 at the top of the list. Alternatively, you can use @kbd{C-s} and
219 @kbd{C-r} (or the right and left arrow keys) to rotate buffer or file
220 names in the list until the one you want is at the top of the list.
221
222 Completion is also available so that you can see what is common to
223 all of the matching buffers or files as you type.
224
225 For example, if there are two buffers called @file{123456} and
226 @file{123}, with @file{123456} the most recent, when using
227 @code{ido-switch-buffer}, you first of all get presented with the list
228 of all the buffers
229
230 @example
231 Buffer: @{123456 | 123@}
232 @end example
233
234 If you then press @kbd{2}:
235
236 @example
237 Buffer: 2[3]@{123456 | 123@}
238 @end example
239
240 The list in @{...@} are the matching buffers, most recent first
241 (buffers visible in the current frame are put at the end of the list
242 by default). At any time you can select the item at the head of the
243 list by pressing @key{RET}. You can also put the first element at the
244 end of the list by pressing @kbd{C-s} or @kbd{<right>}, or bring the
245 last element to the head of the list by pressing @kbd{C-r} or
246 @kbd{<left>}.
247
248 The item in [...] indicates what can be added to your input by
249 pressing @key{TAB} (@code{ido-complete}). In this case, you will get
250 "3" added to your input.
251
252 So, press @key{TAB}:
253
254 @example
255 Buffer: 23@{123456 | 123@}
256 @end example
257
258 At this point, you still have two matching buffers. If you want the
259 first buffer in the list, you can simply press @key{RET}. If you want
260 the second in the list, you can press @kbd{C-s} to move it to the top
261 of the list and then press @kbd{RET} to select it.
262
263 However, if you type @kbd{4}, you'll only have one match left:
264
265 @example
266 Buffer: 234[123456]
267 @end example
268
269 Since there is only one matching buffer left, it is given in [] and it
270 is shown in the @code{ido-only-match} face (ForestGreen). You can now
271 press @key{TAB} or @key{RET} to go to that buffer.
272
273 If you want to create a new buffer named @file{234}, you can press
274 @kbd{C-j} (@code{ido-select-text}) instead of @key{TAB} or @key{RET}.
275
276 If instead, you type @kbd{a}:
277
278 @example
279 Buffer: 234a [No match]
280 @end example
281
282 There are no matching buffers. If you press @key{RET} or @key{TAB},
283 you can be prompted to create a new buffer called @file{234a}.
284
285 Of course, where this function comes in really useful is when you can
286 specify the buffer using only a few keystrokes. In the above example,
287 the quickest way to get to the @file{123456} file would be just to
288 type @kbd{4} and then @key{RET} (assuming there isn't any newer buffer
289 with @kbd{4} in its name).
290
291 Likewise, if you use @kbd{C-x C-f} (@code{ido-find-file}), the list of
292 files and directories in the current directory is provided in the same
293 fashion as the buffers above. The files and directories are normally
294 sorted in alphabetical order, but the most recently visited directory
295 is placed first to speed up navigating to directories that you have
296 visited recently.
297
298 In addition to scrolling through the list using @kbd{<right>} and
299 @kbd{<left>}, you can use @kbd{<up>} and @kbd{<down>} to quickly
300 scroll the list to the next or previous subdirectory.
301
302 To go down into a subdirectory, and continue the file selection on
303 the files in that directory, simply move the directory to the head
304 of the list and hit @key{RET}.
305
306 To go up to the parent directory, delete any partial file name already
307 specified (e.g. using @key{DEL}) and hit @key{DEL}.
308
309 @c @deffn Command ido-delete-backward-updir
310
311 @cindex root directory
312 @cindex home directory
313 To go to the root directory (on the current drive), enter two slashes.
314 On MS-DOS or Windows, to select the root of another drive, enter
315 @samp{X:/} where @samp{X} is the drive letter. To go to the home
316 directory, enter @samp{~/}. To enter Dired for this directory, use
317 @kbd{C-d}.
318
319 @c TODO: a new node for ftp hosts
320 @cindex ftp hosts
321 You can also visit files on other hosts using the ange-ftp
322 notations @samp{/host:} and @samp{/user@@host:}.
323 @c @defopt ido-record-ftp-work-directories
324 @c @defopt ido-merge-ftp-work-directories
325 @c @defopt ido-cache-ftp-work-directory-time
326 @c @defopt ido-slow-ftp-hosts
327 @c @defopt ido-slow-ftp-host-regexps
328
329 You can type @kbd{M-p} and @kbd{M-n} to change to previous/next
330 directories from the history, @kbd{M-s} to search for a file matching
331 your input, and @kbd{M-k} to remove the current directory from the history.
332
333 If for some reason you cannot specify the proper file using
334 @code{ido-find-file}, you can press @kbd{C-f} to enter the normal
335 @code{find-file}. You can also press @kbd{C-b} to drop into
336 @code{ido-switch-buffer}.
337
338 @c @kindex C-x b
339 @c @deffn Command ido-switch-buffer
340 @c This command switch to another buffer interactively.
341 @c @end deffn
342
343 @c @kindex C-x C-f
344 @c @deffn Command ido-find-file
345 @c Edit file with name obtained via minibuffer.
346 @c @end deffn
347
348 @c @kindex C-x d
349 @c @findex ido-dired
350 @c @deffn Command ido-dired
351 @c Call Dired the Ido way.
352 @c @end deffn
353
354 @node Prefix Matching
355 @section Prefix Matching
356 @cindex prefix matching
357 @cindex matching, using prefix
358 @cindex standard way of completion
359
360 @noindent
361 The standard way of completion with *nix shells and Emacs is to insert
362 a @dfn{prefix} and then hitting @key{TAB} (or another completion key).
363 Cause of this behavior has become second nature to a lot of Emacs
364 users Ido offers in addition to the default substring matching method
365 (look above) also the prefix matching method. The kind of matching is
366 the only difference to the description of the substring matching
367 above.
368
369 You can toggle prefix matching with @kbd{C-p}
370 (@code{ido-toggle-prefix}).
371
372 For example, if you have two buffers @file{123456} and @file{123} then
373 hitting @kbd{2} does not match because @kbd{2} is not a prefix in any
374 of the buffer names.
375
376 @node Flexible Matching
377 @section Flexible Matching
378 @cindex flexible matching
379
380 @defopt ido-enable-flex-matching
381 If non-@code{nil}, Ido will do flexible string matching. Flexible
382 matching means that if the entered string does not match any item, any
383 item containing the entered characters in the given sequence will
384 match.
385 @end defopt
386
387 @noindent
388 If @code{ido-enable-flex-matching} is non-@code{nil}, Ido will do a
389 more flexible matching (unless regexp matching is active) to find
390 possible matches among the available buffer or file names if no
391 matches are found using the normal prefix or substring matching.
392
393 The flexible matching implies that any item which simply contains all
394 of the entered characters in the specified sequence will match.
395
396 For example, if you have four files @file{alpha}, @file{beta},
397 @file{gamma}, and @file{delta}, entering @samp{aa} will match
398 @file{alpha} and @file{gamma}, while @samp{ea} matches @file{beta} and
399 @file{delta}. If prefix matching is also active, @samp{aa} only
400 matches @file{alpha}, while @samp{ea} does not match any files.
401
402 @node Regexp Matching
403 @section Regular Expression Matching
404 @cindex regexp matching
405 @cindex matching, using regular expression
406
407 @noindent
408 There is limited provision for regexp matching within Ido, enabled
409 through @code{ido-enable-regexp} (toggle with @kbd{C-t}). This allows
410 you to type @samp{[ch]$} for example and see all file names ending in
411 @samp{c} or @samp{h}.
412
413 @defopt ido-enable-regexp
414 If the value of this user option is non-@code{nil}, Ido will do regexp
415 matching. The value of this user option can be toggled within
416 ido-mode using @code{ido-toggle-regexp}.
417 @end defopt
418
419 @strong{Please notice:} Ido-style completion is inhibited when you
420 enable regexp matching.
421
422 @node Highlighting
423 @chapter Highlighting
424 @cindex highlighting
425
426 @noindent
427 The highlighting of matching items is controlled via
428 @code{ido-use-faces}. The faces used are @code{ido-first-match},
429 @code{ido-only-match} and @code{ido-subdir}.
430
431 Coloring of the matching item was suggested by Carsten Dominik.
432
433 @node Hidden Buffers and Files
434 @chapter Hidden Buffers and Files
435 @cindex hidden buffers and files
436
437 Normally, Ido does not include hidden buffers (whose name starts with
438 a space) and hidden files and directories (whose name starts with
439 @samp{.}) in the list of possible completions. However, if the
440 substring you enter does not match any of the visible buffers or
441 files, Ido will automatically look for completions among the hidden
442 buffers or files.
443
444 You can toggle display of the hidden buffers and files with @kbd{C-a}
445 (@code{ido-toggle-ignore}).
446
447 @c @deffn Command ido-toggle-ignore
448
449 @node Customization
450 @chapter Customization
451 @cindex customization
452
453 @noindent
454 You can customize the @code{ido} group to change Ido functionality:
455
456 @example
457 M-x customize-group RET ido RET
458 @end example
459
460 @noindent
461 or customize a certain variable:
462
463 @example
464 M-x customize-variable RET ido-xxxxx
465 @end example
466
467 To modify the keybindings, use the @code{ido-setup-hook}. For example:
468
469 @example
470 (add-hook 'ido-setup-hook 'ido-my-keys)
471
472 (defun ido-my-keys ()
473 "Add my keybindings for Ido."
474 (define-key ido-completion-map " " 'ido-next-match))
475 @end example
476
477 @c @defopt ido-setup-hook
478 @c a new node for Ido hooks?
479
480 @menu
481 * Changing List Order:: Changing the list of files.
482 * Find File At Point:: Make Ido guess the context.
483 * Ignoring:: Ignorance is bliss.
484 * Misc Customization:: Miscellaneous customization for Ido.
485 @end menu
486
487 @node Changing List Order
488 @section Changing List Order
489 @cindex changing order of the list
490
491 @noindent
492 By default, the list of current files is most recent first,
493 oldest last, with the exception that the files visible in the
494 current frame are put at the end of the list. A hook exists to
495 allow other functions to order the list. For example, if you add:
496
497 @example
498 (add-hook 'ido-make-buffer-list-hook 'ido-summary-buffers-to-end)
499 @end example
500
501 @noindent
502 then all files matching "Summary" are moved to the end of the list.
503 (I find this handy for keeping the INBOX Summary and so on out of the
504 way.) It also moves files matching @samp{output\*$} to the end of the
505 list (these are created by AUCTeX when compiling.) Other functions
506 could be made available which alter the list of matching files (either
507 deleting or rearranging elements.)
508
509 @node Find File At Point
510 @section Find File At Point
511 @cindex find file at point
512 @cindex ffap
513
514 @noindent
515 Find File At Point, also known generally as ``ffap'', is an
516 intelligent system for opening files, and URLs.
517
518 The following expression will make Ido guess the context:
519
520 @example
521 (setq ido-use-filename-at-point 'guess)
522 @end example
523
524 @c @defopt ido-use-filename-at-point
525 @c If the value of this user option is non-@code{nil}, ...
526 @c @end defopt
527
528 You can disable URL ffap support by toggling
529 @code{ido-use-url-at-point}.
530
531 @defopt ido-use-url-at-point
532 If the value of this user option is non-@code{nil}, Ido will look for
533 a URL at point. If found, call @code{find-file-at-point} to visit it.
534 @end defopt
535
536 @node Ignoring
537 @section Ignoring Buffers and Files
538 @cindex ignoring
539 @cindex regexp, ignore buffers and files
540
541 @noindent
542 Ido is capable of ignoring buffers, directories, files and extensions
543 using regular expression.
544
545 @defopt ido-ignore-buffers
546 This variable takes a list of regular expressions for buffers to
547 ignore in @code{ido-switch-buffer}.
548 @end defopt
549
550 @defopt ido-ignore-directories
551 This variable takes a list of regular expressions for (sub)directories
552 names to ignore in @code{ido-dired} and @code{ido-find-file}.
553 @end defopt
554
555 @defopt ido-ignore-files
556 This variable takes a list of regular expressions for files to ignore
557 in @code{ido-find-file}.
558 @end defopt
559
560 @defopt ido-ignore-unc-host-regexps
561 This variable takes a list of regular expressions matching UNC hosts
562 to ignore. The letter case will be ignored if
563 @code{ido-downcase-unc-hosts} is non-@code{nil}.
564 @end defopt
565
566 @c FIXME: Where to add this variable? This node or ``working directory''?
567 @c @defopt ido-work-directory-list-ignore-regexps
568
569 To make Ido use @code{completion-ignored-extensions} you need to
570 enable it:
571
572 @example
573 (setq ido-ignore-extensions t)
574 @end example
575
576 Now you can customize @code{completion-ignored-extensions} as well.
577 Go ahead and add all the useless object files, backup files, shared
578 library files and other computing flotsam you don’t want Ido to show.
579
580 @strong{Please notice:} Ido will still complete the ignored elements
581 if it would otherwise not show any other matches. So if you type out
582 the name of an ignored file, Ido will still let you open it just fine.
583
584 @node Misc Customization
585 @section Miscellaneous Customization
586 @cindex miscellaneous customization for Ido
587
588 @c Variables described in this sections may be moved to new nodes in
589 @c the future.
590
591 @defopt ido-mode
592 This user option determines for which functional group (buffer and
593 files) Ido behavior should be enabled.
594 @end defopt
595
596 @defopt ido-case-fold
597 If the value of this user option is non-@code{nil}, searching of
598 buffer and file names should ignore case.
599 @end defopt
600
601 @defopt ido-show-dot-for-dired
602 If the value of this user option is non-@code{nil}, always put
603 @samp{.} as the first item in file name lists. This allows the
604 current directory to be opened immediately with Dired
605 @end defopt
606
607 @defopt ido-enable-dot-prefix
608 If the value of this user option is non-@code{nil}, Ido will match
609 leading dot as prefix. I.e., hidden files and buffers will match only
610 if you type a dot as first char (even if @code{ido-enable-prefix} is
611 @code{nil}).
612 @end defopt
613
614 @defopt ido-confirm-unique-completion
615 If the value of this user option is non-@code{nil}, even a unique
616 completion must be confirmed. This means that @code{ido-complete}
617 (@key{TAB}) must always be followed by @code{ido-exit-minibuffer}
618 (@key{RET}) even when there is only one unique completion.
619 @end defopt
620
621 @defopt ido-cannot-complete-command
622 When @code{ido-complete} can't complete any more, it will run the
623 command specified by this user option. The most useful values are
624 @code{ido-completion-help}, which pops up a window with completion
625 alternatives, or @code{ido-next-match} or @code{ido-prev-match}, which
626 cycle the buffer list.
627 @end defopt
628
629 @defopt ido-max-file-prompt-width
630 This user option specifies the upper limit of the prompt string. If
631 its value is an integer, it specifies the number of characters of the
632 string. If its value is a floating point number, it specifies a
633 fraction of the frame width.
634 @end defopt
635
636 @defopt ido-max-window-height
637 If the value of this user option is non-@code{nil}, its value will
638 override the variable @code{max-mini-window-height}, which is the
639 maximum height for resizing mini-windows (the minibuffer and the echo
640 area). If it's a floating point number, it specifies a fraction of
641 the mini-window frame's height. If it's an integer, it specifies the
642 number of lines.
643 @end defopt
644
645 @defopt ido-record-commands
646 If the value of this user option is non-@code{nil}, Ido will record
647 commands in the variable @code{command-history}. Note that non-Ido
648 equivalent is recorded.
649 @end defopt
650
651 @defopt ido-all-frames
652 This user option will be passed to @code{walk-windows} as its
653 @var{all-frames} argument when Ido is finding buffers. @xref{Cyclic
654 Window Ordering, , Cyclic Ordering of Windows, elisp, GNU Emacs Lisp
655 Reference Manual}.
656 @end defopt
657
658 @defopt ido-minibuffer-setup-hook
659 This hook variable contains Ido-specific customization of minibuffer
660 setup. It is run during minibuffer setup if Ido is active, and is
661 intended for use in customizing ido for interoperation with other
662 packages.
663 @end defopt
664
665 @c @defopt ido-enable-tramp-completion
666 @c cross-reference to tramp.texi
667
668 @c @cindex UNC host names, completion
669 @c @defopt ido-unc-hosts
670 @c @defopt ido-downcase-unc-hosts
671 @c @defopt ido-cache-unc-host-shares-time
672
673 @c @defopt ido-enable-last-directory-history
674 @c @defopt ido-max-work-file-list
675 @c @defopt ido-work-directory-match-only
676 @c @defopt ido-auto-merge-work-directories-length
677 @c @defopt ido-auto-merge-delay-time
678 @c @defopt ido-auto-merge-inhibit-characters-regexp
679 @c @defopt ido-merged-indicator
680 @c @defopt ido-max-directory-size
681 @c @defopt ido-rotate-file-list-default
682 @c @defopt ido-enter-matching-directory
683 @c @defopt ido-create-new-buffer
684 @c @defopt ido-separator
685 @c @defopt ido-decorations
686 @c @defopt ido-use-virtual-buffers
687 @c @defopt ido-use-faces
688 @c @defopt ido-make-file-list-hook
689 @c @defopt ido-make-dir-list-hook
690 @c @defopt ido-make-buffer-list-hook
691 @c @defopt ido-rewrite-file-prompt-functions
692 @c @defopt ido-completion-buffer
693 @c @defopt ido-completion-buffer-all-completions
694 @c @defopt ido-save-directory-list-file
695 @c @defopt ido-read-file-name-as-directory-commands
696 @c @defopt ido-read-file-name-non-ido
697 @c @defopt ido-before-fallback-functions
698 @c @defopt ido-buffer-disable-smart-matches
699
700 @node Misc
701 @chapter Miscellaneous
702 @cindex miscellaneous
703
704 @noindent
705 After @kbd{C-x b} (@code{ido-switch-buffer}), the buffer at the head
706 of the list can be killed by pressing @kbd{C-k}. If the buffer needs
707 saving, you will be queried before the buffer is killed.
708
709 Likewise, after @kbd{C-x C-f}, you can delete (i.e., physically
710 remove) the file at the head of the list with @kbd{C-k}. You will
711 always be asked for confirmation before deleting the file.
712
713 If you enter @kbd{C-x b} to switch to a buffer visiting a given file,
714 and you find that the file you are after is not in any buffer, you can
715 press @kbd{C-f} to immediately drop into @code{ido-find-file}. And
716 you can switch back to buffer selection with @kbd{C-b}.
717
718 @c @deffn Command ido-magic-forward-char
719 @c @deffn Command ido-magic-backward-char
720
721 You can also use Ido in your Emacs Lisp programs:
722
723 @example
724 (setq my-pkgs (list "CEDET" "Gnus" "Rcirc" "Tramp" "Org" "all-of-them"))
725 (ido-completing-read "What's your favorite package? " my-pkgs)
726 @end example
727
728 @menu
729 * All Matching:: Seeing all the matching buffers or files.
730 * Replacement:: Replacement for @code{read-buffer} and @code{read-file-name}.
731 * Other Packages:: Don't want to depend on @code{ido-everywhere}?
732 @end menu
733
734 @node All Matching
735 @section All Matching
736 @cindex all matching
737 @cindex seeing all the matching buffers or files
738
739 @noindent
740 If you have many matching files, they may not all fit onto one line of
741 the minibuffer. Normally, the minibuffer window will grow to show you
742 more of the matching files (depending on the value of the variables
743 @code{resize-mini-windows} and @code{max-mini-window-height}). If you
744 want Ido to behave differently from the default minibuffer resizing
745 behavior, set the variable @code{ido-max-window-height}.
746
747 Also, to improve the responsiveness of Ido, the maximum number of
748 matching items is limited to 12, but you can increase or removed this
749 limit via the @code{ido-max-prospects} user option.
750
751 @c @defopt ido-max-prospects
752
753 To see a full list of all matching buffers in a separate buffer, hit
754 @kbd{?} or press @key{TAB} when there are no further completions to
755 the substring. Repeated @key{TAB} presses will scroll you through
756 this separate buffer.
757
758 @node Replacement
759 @section Replacement
760
761 @noindent
762 @code{ido-read-buffer} and @code{ido-read-file-name} have been written
763 to be drop in replacements for the normal buffer and file name reading
764 functions @code{read-buffer} and @code{read-file-name}.
765
766 To use ido for all buffer and file selections in Emacs, customize the
767 variable @code{ido-everywhere}.
768
769 @c @deffn Command ido-everywhere
770 @c @defopt ido-everywhere
771
772 @node Other Packages
773 @section Other Packages
774 @cindex other packages
775 @cindex used by other packages
776
777 @noindent
778 If you don't want to rely on the @code{ido-everywhere} functionality,
779 @code{ido-read-buffer}, @code{ido-read-file-name}, and
780 @code{ido-read-directory-name} can be used by other packages to read a
781 buffer name, a file name, or a directory name in the @emph{Ido} way.
782
783 @c @node Cheatsheet
784
785 @c * History and Acknowledgments:: How Ido came into being
786 @c @node History and Acknowledgments
787 @c @appendix History and Acknowledgments
788
789 @node GNU Free Documentation License
790 @appendix GNU Free Documentation License
791 @include doclicense.texi
792
793 @c @node Function Index
794 @c @unnumbered Function Index
795
796 @c @printindex fn
797
798 @node Variable Index
799 @unnumbered Variable Index
800
801 @printindex vr
802
803 @bye