Update copyright year to 2014 by running admin/update-copyright.
[emacs.git] / doc / misc / ido.texi
blob40afa69877779e8790837453ac380a79b1cbf2b6
1 \input texinfo    @c -*-texinfo-*-
2 @setfilename ../../info/ido
3 @settitle Interactive Do
4 @include emacsver.texi
6 @copying
7 This file documents the Ido package for GNU Emacs.
9 Copyright @copyright{} 2013-2014 Free Software Foundation, Inc.
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''.
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
24 @dircategory Emacs misc features
25 @direntry
26 * Ido: (ido).                   Interactively do things with buffers and files.
27 @end direntry
29 @finalout
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
46 @contents
48 @ifnottex
49 @node Top
50 @top Interactive Do
52 @insertcopying
53 @end ifnottex
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.
63 Appendices
64 * GNU Free Documentation License::  The license for this documentation.
66 Indexes
67 * Variable Index::              An entry for each documented variable.
69 @detailmenu
70  --- The Detailed Node Listing ---
72 Overview
74 * Activation::                  How to use this package.
75 * Working Directories::         Where files have most recently been opened.
77 Matching
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.
84 Customization
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.
91 Miscellaneous
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}?
97 @end detailmenu
98 @end menu
100 @node Overview
101 @chapter Overview
102 @cindex overview
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.
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.
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.
119 @menu
120 * Activation::                  How to use this package.
121 * Working Directories::         Where files have most recently been opened.
122 @end menu
124 @node Activation
125 @section Activation
126 @cindex activation
127 @cindex installation
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}.
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.
140 @example
141 (require 'ido)
142 (ido-mode t)
143 @end example
145 @node Working Directories
146 @section Working Directories
147 @cindex working directories
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.
156 @c @cindex merge
157 @c or maybe a new node for ``merge''
159 @c @deffn Command ido-merge-work-directories
161 @c @deffn Command ido-prev-work-directory
163 @c @deffn Command ido-next-work-directory
165 @c @deffn Command ido-forget-work-directory
167 @c @defvar ido-use-merged-list
168 @c @defvar ido-try-merged-list
169 @c @defvar ido-pre-merge-state
171 @defopt ido-max-work-directory-list
172 This user option specifies maximum number of working directories to
173 record.
174 @end defopt
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
188 @node Matching
189 @chapter Matching
190 @cindex matching
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.
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
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
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.
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.
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.
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
230 @example
231 Buffer: @{123456 | 123@}
232 @end example
234 If you then press @kbd{2}:
236 @example
237 Buffer: 2[3]@{123456 | 123@}
238 @end example
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>}.
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.
252 So, press @key{TAB}:
254 @example
255 Buffer: 23@{123456 | 123@}
256 @end example
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 @key{RET} to select it.
263 However, if you type @kbd{4}, you'll only have one match left:
265 @example
266 Buffer: 234[123456]
267 @end example
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.
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}.
276 If instead, you type @kbd{a}:
278 @example
279 Buffer: 234a [No match]
280 @end example
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}.
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).
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.
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.
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}.
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}.
309 @c @deffn Command ido-delete-backward-updir
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}.
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
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.
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}.
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
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
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
354 @node Prefix Matching
355 @section Prefix Matching
356 @cindex prefix matching
357 @cindex matching, using prefix
358 @cindex standard way of completion
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.
369 @cindex toggle prefix matching
370 You can toggle prefix matching with @kbd{C-p}
371 (@code{ido-toggle-prefix}).
373 For example, if you have two buffers @file{123456} and @file{123} then
374 hitting @kbd{2} does not match because @kbd{2} is not a prefix in any
375 of the buffer names.
377 @node Flexible Matching
378 @section Flexible Matching
379 @cindex flexible matching
381 @defopt ido-enable-flex-matching
382 If non-@code{nil}, Ido will do flexible string matching.  Flexible
383 matching means that if the entered string does not match any item, any
384 item containing the entered characters in the given sequence will
385 match.
386 @end defopt
388 @noindent
389 If @code{ido-enable-flex-matching} is non-@code{nil}, Ido will do a
390 more flexible matching (unless regexp matching is active) to find
391 possible matches among the available buffer or file names if no
392 matches are found using the normal prefix or substring matching.
394 The flexible matching implies that any item which simply contains all
395 of the entered characters in the specified sequence will match.
397 For example, if you have four files @file{alpha}, @file{beta},
398 @file{gamma}, and @file{delta}, entering @samp{aa} will match
399 @file{alpha} and @file{gamma}, while @samp{ea} matches @file{beta} and
400 @file{delta}.  If prefix matching is also active, @samp{aa} only
401 matches @file{alpha}, while @samp{ea} does not match any files.
403 @node Regexp Matching
404 @section Regular Expression Matching
405 @cindex regexp matching
406 @cindex matching, using regular expression
408 @noindent
409 There is limited provision for regexp matching within Ido, enabled
410 through @code{ido-enable-regexp} (toggle with @kbd{C-t}).  This allows
411 you to type @samp{[ch]$} for example and see all file names ending in
412 @samp{c} or @samp{h}.
414 @defopt ido-enable-regexp
415 If the value of this user option is non-@code{nil}, Ido will do regexp
416 matching.  The value of this user option can be toggled within
417 ido-mode using @code{ido-toggle-regexp}.
418 @end defopt
420 @strong{Please notice:} Ido-style completion is inhibited when you
421 enable regexp matching.
423 @node Highlighting
424 @chapter Highlighting
425 @cindex highlighting
427 @noindent
428 The highlighting of matching items is controlled via
429 @code{ido-use-faces}.  The faces used are @code{ido-first-match},
430 @code{ido-only-match} and @code{ido-subdir}.
432 Coloring of the matching item was suggested by Carsten Dominik.
434 @node Hidden Buffers and Files
435 @chapter Hidden Buffers and Files
436 @cindex hidden buffers and files
438 Normally, Ido does not include hidden buffers (whose name starts with
439 a space) and hidden files and directories (whose name starts with
440 @samp{.}) in the list of possible completions.  However, if the
441 substring you enter does not match any of the visible buffers or
442 files, Ido will automatically look for completions among the hidden
443 buffers or files.
445 You can toggle display of the hidden buffers and files with @kbd{C-a}
446 (@code{ido-toggle-ignore}).
448 @c @deffn Command ido-toggle-ignore
450 @node Customization
451 @chapter Customization
452 @cindex customization
454 @noindent
455 You can customize the @code{ido} group to change Ido functionality:
457 @example
458 M-x customize-group RET ido RET
459 @end example
461 @noindent
462 or customize a certain variable:
464 @example
465 M-x customize-variable RET ido-xxxxx
466 @end example
468 To modify the keybindings, use the @code{ido-setup-hook}.  For example:
470 @example
471 (add-hook 'ido-setup-hook 'ido-my-keys)
473 (defun ido-my-keys ()
474  "Add my keybindings for Ido."
475  (define-key ido-completion-map " " 'ido-next-match))
476 @end example
478 @c @defopt ido-setup-hook
479 @c a new node for Ido hooks?
481 @menu
482 * Changing List Order::         Changing the list of files.
483 * Find File At Point::          Make Ido guess the context.
484 * Ignoring::                    Ignorance is bliss.
485 * Misc Customization::          Miscellaneous customization for Ido.
486 @end menu
488 @node Changing List Order
489 @section Changing List Order
490 @cindex changing order of the list
492 @noindent
493 By default, the list of current files is most recent first,
494 oldest last, with the exception that the files visible in the
495 current frame are put at the end of the list.  A hook exists to
496 allow other functions to order the list.  For example, if you add:
498 @example
499 (add-hook 'ido-make-buffer-list-hook 'ido-summary-buffers-to-end)
500 @end example
502 @noindent
503 then all files matching "Summary" are moved to the end of the list.
504 (I find this handy for keeping the INBOX Summary and so on out of the
505 way.)  It also moves files matching @samp{output\*$} to the end of the
506 list (these are created by AUCTeX when compiling.)  Other functions
507 could be made available which alter the list of matching files (either
508 deleting or rearranging elements.)
510 @node Find File At Point
511 @section Find File At Point
512 @cindex find file at point
513 @cindex ffap
515 @noindent
516 Find File At Point, also known generally as ``ffap'', is an
517 intelligent system for opening files, and URLs.
519 The following expression will make Ido guess the context:
521 @example
522 (setq ido-use-filename-at-point 'guess)
523 @end example
525 @c @defopt ido-use-filename-at-point
526 @c If the value of this user option is non-@code{nil}, ...
527 @c @end defopt
529 You can disable URL ffap support by toggling
530 @code{ido-use-url-at-point}.
532 @defopt ido-use-url-at-point
533 If the value of this user option is non-@code{nil}, Ido will look for
534 a URL at point.  If found, call @code{find-file-at-point} to visit it.
535 @end defopt
537 @node Ignoring
538 @section Ignoring Buffers and Files
539 @cindex ignoring
540 @cindex regexp, ignore buffers and files
542 @noindent
543 Ido is capable of ignoring buffers, directories, files and extensions
544 using regular expression.
546 @defopt ido-ignore-buffers
547 This variable takes a list of regular expressions for buffers to
548 ignore in @code{ido-switch-buffer}.
549 @end defopt
551 @defopt ido-ignore-directories
552 This variable takes a list of regular expressions for (sub)directories
553 names to ignore in @code{ido-dired} and @code{ido-find-file}.
554 @end defopt
556 @defopt ido-ignore-files
557 This variable takes a list of regular expressions for files to ignore
558 in @code{ido-find-file}.
559 @end defopt
561 @defopt ido-ignore-unc-host-regexps
562 This variable takes a list of regular expressions matching UNC hosts
563 to ignore.  The letter case will be ignored if
564 @code{ido-downcase-unc-hosts} is non-@code{nil}.
565 @end defopt
567 @c FIXME: Where to add this variable?  This node or ``working directory''?
568 @c @defopt ido-work-directory-list-ignore-regexps
570 To make Ido use @code{completion-ignored-extensions} you need to
571 enable it:
573 @example
574 (setq ido-ignore-extensions t)
575 @end example
577 Now you can customize @code{completion-ignored-extensions} as well.
578 Go ahead and add all the useless object files, backup files, shared
579 library files and other computing flotsam you don’t want Ido to show.
581 @strong{Please notice:} Ido will still complete the ignored elements
582 if it would otherwise not show any other matches.  So if you type out
583 the name of an ignored file, Ido will still let you open it just fine.
585 @node Misc Customization
586 @section Miscellaneous Customization
587 @cindex miscellaneous customization for Ido
589 @c Variables described in this sections may be moved to new nodes in
590 @c the future.
592 @defopt ido-mode
593 This user option determines for which functional group (buffer and
594 files) Ido behavior should be enabled.
595 @end defopt
597 @defopt ido-case-fold
598 If the value of this user option is non-@code{nil}, searching of
599 buffer and file names should ignore case.
600 @end defopt
602 @defopt ido-show-dot-for-dired
603 If the value of this user option is non-@code{nil}, always put
604 @samp{.}  as the first item in file name lists.  This allows the
605 current directory to be opened immediately with Dired
606 @end defopt
608 @defopt ido-enable-dot-prefix
609 If the value of this user option is non-@code{nil}, Ido will match
610 leading dot as prefix.  I.e., hidden files and buffers will match only
611 if you type a dot as first char (even if @code{ido-enable-prefix} is
612 @code{nil}).
613 @end defopt
615 @defopt ido-confirm-unique-completion
616 If the value of this user option is non-@code{nil}, even a unique
617 completion must be confirmed.  This means that @code{ido-complete}
618 (@key{TAB}) must always be followed by @code{ido-exit-minibuffer}
619 (@key{RET}) even when there is only one unique completion.
620 @end defopt
622 @defopt ido-cannot-complete-command
623 When @code{ido-complete} can't complete any more, it will run the
624 command specified by this user option.  The most useful values are
625 @code{ido-completion-help}, which pops up a window with completion
626 alternatives, or @code{ido-next-match} or @code{ido-prev-match}, which
627 cycle the buffer list.
628 @end defopt
630 @defopt ido-max-file-prompt-width
631 This user option specifies the upper limit of the prompt string.  If
632 its value is an integer, it specifies the number of characters of the
633 string.  If its value is a floating point number, it specifies a
634 fraction of the frame width.
635 @end defopt
637 @defopt ido-max-window-height
638 If the value of this user option is non-@code{nil}, its value will
639 override the variable @code{max-mini-window-height}, which is the
640 maximum height for resizing mini-windows (the minibuffer and the echo
641 area).  If it's a floating point number, it specifies a fraction of
642 the mini-window frame's height.  If it's an integer, it specifies the
643 number of lines.
644 @end defopt
646 @defopt ido-record-commands
647 If the value of this user option is non-@code{nil}, Ido will record
648 commands in the variable @code{command-history}.  Note that non-Ido
649 equivalent is recorded.
650 @end defopt
652 @defopt ido-all-frames
653 This user option will be passed to @code{walk-windows} as its
654 @var{all-frames} argument when Ido is finding buffers.  @xref{Cyclic
655 Window Ordering, , Cyclic Ordering of Windows, elisp, GNU Emacs Lisp
656 Reference Manual}.
657 @end defopt
659 @defopt ido-minibuffer-setup-hook
660 This hook variable contains Ido-specific customization of minibuffer
661 setup.  It is run during minibuffer setup if Ido is active, and is
662 intended for use in customizing ido for interoperation with other
663 packages.
664 @end defopt
666 @c @defopt ido-enable-tramp-completion
667 @c cross-reference to tramp.texi
669 @c @cindex UNC host names, completion
670 @c @defopt ido-unc-hosts
671 @c @defopt ido-downcase-unc-hosts
672 @c @defopt ido-cache-unc-host-shares-time
674 @c @defopt ido-enable-last-directory-history
675 @c @defopt ido-max-work-file-list
676 @c @defopt ido-work-directory-match-only
677 @c @defopt ido-auto-merge-work-directories-length
678 @c @defopt ido-auto-merge-delay-time
679 @c @defopt ido-auto-merge-inhibit-characters-regexp
680 @c @defopt ido-merged-indicator
681 @c @defopt ido-max-directory-size
682 @c @defopt ido-rotate-file-list-default
683 @c @defopt ido-enter-matching-directory
684 @c @defopt ido-create-new-buffer
685 @c @defopt ido-separator
686 @c @defopt ido-decorations
687 @c @defopt ido-use-virtual-buffers
688 @c @defopt ido-use-faces
689 @c @defopt ido-make-file-list-hook
690 @c @defopt ido-make-dir-list-hook
691 @c @defopt ido-make-buffer-list-hook
692 @c @defopt ido-rewrite-file-prompt-functions
693 @c @defopt ido-completion-buffer
694 @c @defopt ido-completion-buffer-all-completions
695 @c @defopt ido-save-directory-list-file
696 @c @defopt ido-read-file-name-as-directory-commands
697 @c @defopt ido-read-file-name-non-ido
698 @c @defopt ido-before-fallback-functions
699 @c @defopt ido-buffer-disable-smart-matches
701 @node Misc
702 @chapter Miscellaneous
703 @cindex miscellaneous
705 @noindent
706 After @kbd{C-x b} (@code{ido-switch-buffer}), the buffer at the head
707 of the list can be killed by pressing @kbd{C-k}.  If the buffer needs
708 saving, you will be queried before the buffer is killed.
710 Likewise, after @kbd{C-x C-f}, you can delete (i.e., physically
711 remove) the file at the head of the list with @kbd{C-k}.  You will
712 always be asked for confirmation before deleting the file.
714 If you enter @kbd{C-x b} to switch to a buffer visiting a given file,
715 and you find that the file you are after is not in any buffer, you can
716 press @kbd{C-f} to immediately drop into @code{ido-find-file}.  And
717 you can switch back to buffer selection with @kbd{C-b}.
719 @c @deffn Command ido-magic-forward-char
720 @c @deffn Command ido-magic-backward-char
722 You can also use Ido in your Emacs Lisp programs:
724 @example
725 (setq my-pkgs (list "CEDET" "Gnus" "Rcirc" "Tramp" "Org" "all-of-them"))
726 (ido-completing-read "What's your favorite package? " my-pkgs)
727 @end example
729 @menu
730 * All Matching::                Seeing all the matching buffers or files.
731 * Replacement::                 Replacement for @code{read-buffer} and @code{read-file-name}.
732 * Other Packages::              Don't want to depend on @code{ido-everywhere}?
733 @end menu
735 @node All Matching
736 @section All Matching
737 @cindex all matching
738 @cindex seeing all the matching buffers or files
740 @noindent
741 If you have many matching files, they may not all fit onto one line of
742 the minibuffer.  Normally, the minibuffer window will grow to show you
743 more of the matching files (depending on the value of the variables
744 @code{resize-mini-windows} and @code{max-mini-window-height}).  If you
745 want Ido to behave differently from the default minibuffer resizing
746 behavior, set the variable @code{ido-max-window-height}.
748 Also, to improve the responsiveness of Ido, the maximum number of
749 matching items is limited to 12, but you can increase or removed this
750 limit via the @code{ido-max-prospects} user option.
752 @c @defopt ido-max-prospects
754 To see a full list of all matching buffers in a separate buffer, hit
755 @kbd{?} or press @key{TAB} when there are no further completions to
756 the substring.  Repeated @key{TAB} presses will scroll you through
757 this separate buffer.
759 @node Replacement
760 @section Replacement
762 @noindent
763 @code{ido-read-buffer} and @code{ido-read-file-name} have been written
764 to be drop in replacements for the normal buffer and file name reading
765 functions @code{read-buffer} and @code{read-file-name}.
767 To use ido for all buffer and file selections in Emacs, customize the
768 variable @code{ido-everywhere}.
770 @c @deffn Command ido-everywhere
771 @c @defopt ido-everywhere
773 @node Other Packages
774 @section Other Packages
775 @cindex other packages
776 @cindex used by other packages
778 @noindent
779 If you don't want to rely on the @code{ido-everywhere} functionality,
780 @code{ido-read-buffer}, @code{ido-read-file-name}, and
781 @code{ido-read-directory-name} can be used by other packages to read a
782 buffer name, a file name, or a directory name in the @emph{Ido} way.
784 @c @node Cheatsheet
786 @c * History and Acknowledgments::     How Ido came into being
787 @c @node History and Acknowledgments
788 @c @appendix History and Acknowledgments
790 @node GNU Free Documentation License
791 @appendix GNU Free Documentation License
792 @include doclicense.texi
794 @c @node Function Index
795 @c @unnumbered Function Index
797 @c @printindex fn
799 @node Variable Index
800 @unnumbered Variable Index
802 @printindex vr
804 @bye