ido.texi 26 KB

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