345 |
;;;###autoload |
;;;###autoload |
346 |
(defcustom ido-mode nil |
(defcustom ido-mode nil |
347 |
"Determines for which functional group \(buffer and files) ido behavior |
"Determines for which functional group \(buffer and files) ido behavior |
348 |
should be enabled. The following values are possible: |
should be enabled. The following values are possible: |
349 |
- `buffer': Turn only on ido buffer behavior \(switching, killing, |
- `buffer': Turn only on ido buffer behavior \(switching, killing, |
350 |
displaying...) |
displaying...) |
351 |
- `file': Turn only on ido file behavior \(finding, writing, inserting...) |
- `file': Turn only on ido file behavior \(finding, writing, inserting...) |
414 |
"*List of file extensions specifying preferred order of file selections. |
"*List of file extensions specifying preferred order of file selections. |
415 |
Each element is either a string with `.' as the first char, an empty |
Each element is either a string with `.' as the first char, an empty |
416 |
string matching files without extension, or t which is the default order |
string matching files without extension, or t which is the default order |
417 |
of for files with an unlisted file extension." |
for files with an unlisted file extension." |
418 |
:type '(repeat (choice string |
:type '(repeat (choice string |
419 |
(const :tag "Default order" t))) |
(const :tag "Default order" t))) |
420 |
:group 'ido) |
:group 'ido) |
453 |
`otherframe' Show new file in another frame |
`otherframe' Show new file in another frame |
454 |
`maybe-frame' If a file is visible in another frame, prompt to ask if you |
`maybe-frame' If a file is visible in another frame, prompt to ask if you |
455 |
you want to see the file in the same window of the current |
you want to see the file in the same window of the current |
456 |
frame or in the other frame. |
frame or in the other frame |
457 |
`always-frame' If a file is visible in another frame, raise that |
`always-frame' If a file is visible in another frame, raise that |
458 |
frame. Otherwise, visit the file in the same window." |
frame; otherwise, visit the file in the same window" |
459 |
:type '(choice (const samewindow) |
:type '(choice (const samewindow) |
460 |
(const otherwindow) |
(const otherwindow) |
461 |
(const display) |
(const display) |
466 |
|
|
467 |
(defcustom ido-default-buffer-method 'always-frame |
(defcustom ido-default-buffer-method 'always-frame |
468 |
"*How to switch to new buffer when using `ido-switch-buffer'. |
"*How to switch to new buffer when using `ido-switch-buffer'. |
469 |
See ido-default-file-method for details." |
See `ido-default-file-method' for details." |
470 |
:type '(choice (const samewindow) |
:type '(choice (const samewindow) |
471 |
(const otherwindow) |
(const otherwindow) |
472 |
(const display) |
(const display) |
530 |
(defcustom ido-max-prospects 12 |
(defcustom ido-max-prospects 12 |
531 |
"*Non-zero means that the prospect list will be limited to than number of items. |
"*Non-zero means that the prospect list will be limited to than number of items. |
532 |
For a long list of prospects, building the full list for the minibuffer can take a |
For a long list of prospects, building the full list for the minibuffer can take a |
533 |
non-negletable amount of time; setting this variable reduces that time." |
non-negligible amount of time; setting this variable reduces that time." |
534 |
:type 'integer |
:type 'integer |
535 |
:group 'ido) |
:group 'ido) |
536 |
|
|
615 |
(defcustom ido-slow-ftp-hosts nil |
(defcustom ido-slow-ftp-hosts nil |
616 |
"*List of slow ftp hosts where ido prompting should not be used. |
"*List of slow ftp hosts where ido prompting should not be used. |
617 |
If an ftp host is on this list, ido automatically switches to the non-ido |
If an ftp host is on this list, ido automatically switches to the non-ido |
618 |
equivalent function, e.g. find-file rather than ido-find-file." |
equivalent function, e.g. `find-file' rather than `ido-find-file'." |
619 |
:type '(repeat string) |
:type '(repeat string) |
620 |
:group 'ido) |
:group 'ido) |
621 |
|
|
706 |
:group 'ido) |
:group 'ido) |
707 |
|
|
708 |
(defcustom ido-setup-hook nil |
(defcustom ido-setup-hook nil |
709 |
"*Hook run after the ido variables and keymap has been setup. |
"*Hook run after the ido variables and keymap have been setup. |
710 |
The dynamic variable `ido-cur-item' contains the current type of item that |
The dynamic variable `ido-cur-item' contains the current type of item that |
711 |
is read by ido, possible values are file, dir, buffer, and list. |
is read by ido, possible values are file, dir, buffer, and list. |
712 |
Additional keys can be defined in `ido-mode-map'." |
Additional keys can be defined in `ido-mode-map'." |
727 |
4th element is the string inserted at the end of a truncated list of prospects, |
4th element is the string inserted at the end of a truncated list of prospects, |
728 |
5th and 6th elements are used as brackets around the common match string which |
5th and 6th elements are used as brackets around the common match string which |
729 |
can be completed using TAB, |
can be completed using TAB, |
730 |
7th element is the string displayed when there are a no matches, and |
7th element is the string displayed when there are no matches, and |
731 |
8th element is displayed if there is a single match (and faces are not used). |
8th element is displayed if there is a single match (and faces are not used), |
732 |
9th element is displayed when the current directory is non-readable. |
9th element is displayed when the current directory is non-readable, |
733 |
10th element is displayed when directory exceeds `ido-max-directory-size'." |
10th element is displayed when directory exceeds `ido-max-directory-size'." |
734 |
:type '(repeat string) |
:type '(repeat string) |
735 |
:group 'ido) |
:group 'ido) |
864 |
(defcustom ido-read-file-name-as-directory-commands '() |
(defcustom ido-read-file-name-as-directory-commands '() |
865 |
"List of commands which uses read-file-name to read a directory name. |
"List of commands which uses read-file-name to read a directory name. |
866 |
When `ido-everywhere' is non-nil, the commands in this list will read |
When `ido-everywhere' is non-nil, the commands in this list will read |
867 |
the directory using ido-read-directory-name." |
the directory using `ido-read-directory-name'." |
868 |
:type '(repeat symbol) |
:type '(repeat symbol) |
869 |
:group 'ido) |
:group 'ido) |
870 |
|
|
871 |
(defcustom ido-read-file-name-non-ido '() |
(defcustom ido-read-file-name-non-ido '() |
872 |
"List of commands which shall not read file names the ido way. |
"List of commands which shall not read file names the ido way. |
873 |
When `ido-everywhere' is non-nil, the commands in this list will read |
When `ido-everywhere' is non-nil, the commands in this list will read |
874 |
the file name using normal read-file-name style." |
the file name using normal `read-file-name' style." |
875 |
:type '(repeat symbol) |
:type '(repeat symbol) |
876 |
:group 'ido) |
:group 'ido) |
877 |
|
|
895 |
(defvar ido-work-directory-list nil |
(defvar ido-work-directory-list nil |
896 |
"List of actual working directory names. |
"List of actual working directory names. |
897 |
The current directory is inserted at the front of this list whenever a |
The current directory is inserted at the front of this list whenever a |
898 |
file is opened with ido-find-file and family.") |
file is opened with `ido-find-file' and family.") |
899 |
|
|
900 |
(defvar ido-work-file-list nil |
(defvar ido-work-file-list nil |
901 |
"List of actual work file names. |
"List of actual work file names. |
909 |
|
|
910 |
(defvar ido-ignore-item-temp-list nil |
(defvar ido-ignore-item-temp-list nil |
911 |
"List of items to ignore in current ido invocation. |
"List of items to ignore in current ido invocation. |
912 |
Intended to be let-bound by functions which calls ido repeatedly. |
Intended to be let-bound by functions which call ido repeatedly. |
913 |
Should never be set permanently.") |
Should never be set permanently.") |
914 |
|
|
915 |
;; Temporary storage |
;; Temporary storage |
949 |
selected.") |
selected.") |
950 |
|
|
951 |
(defvar ido-current-directory nil |
(defvar ido-current-directory nil |
952 |
"Current directory for ido-find-file.") |
"Current directory for `ido-find-file'.") |
953 |
|
|
954 |
(defvar ido-auto-merge-timer nil |
(defvar ido-auto-merge-timer nil |
955 |
"Delay timer for auto merge.") |
"Delay timer for auto merge.") |
2271 |
|
|
2272 |
(defun ido-magic-forward-char () |
(defun ido-magic-forward-char () |
2273 |
"Move forward in user input or perform magic action. |
"Move forward in user input or perform magic action. |
2274 |
If no user input is present or at end of input, perform magic actions: |
If no user input is present, or at end of input, perform magic actions: |
2275 |
C-x C-b ... C-f switch to ido-find-file. |
C-x C-b ... C-f switch to ido-find-file. |
2276 |
C-x C-f ... C-f fallback to non-ido find-file. |
C-x C-f ... C-f fallback to non-ido find-file. |
2277 |
C-x C-d ... C-f fallback to non-ido brief dired. |
C-x C-d ... C-f fallback to non-ido brief dired. |
2414 |
(exit-minibuffer)) |
(exit-minibuffer)) |
2415 |
|
|
2416 |
(defun ido-enter-find-file () |
(defun ido-enter-find-file () |
2417 |
"Drop into find-file from buffer switching." |
"Drop into `find-file' from buffer switching." |
2418 |
(interactive) |
(interactive) |
2419 |
(setq ido-exit 'find-file) |
(setq ido-exit 'find-file) |
2420 |
(exit-minibuffer)) |
(exit-minibuffer)) |
2421 |
|
|
2422 |
(defun ido-enter-switch-buffer () |
(defun ido-enter-switch-buffer () |
2423 |
"Drop into ido-switch-buffer from file switching." |
"Drop into `ido-switch-buffer' from file switching." |
2424 |
(interactive) |
(interactive) |
2425 |
(setq ido-exit 'switch-to-buffer) |
(setq ido-exit 'switch-to-buffer) |
2426 |
(exit-minibuffer)) |
(exit-minibuffer)) |
3016 |
(defun ido-make-buffer-list (default) |
(defun ido-make-buffer-list (default) |
3017 |
;; Return the current list of buffers. |
;; Return the current list of buffers. |
3018 |
;; Currently visible buffers are put at the end of the list. |
;; Currently visible buffers are put at the end of the list. |
3019 |
;; The hook `ido-make-buflist-hook' is run after the list has been |
;; The hook `ido-make-buffer-list-hook' is run after the list has been |
3020 |
;; created to allow the user to further modify the order of the buffer names |
;; created to allow the user to further modify the order of the buffer names |
3021 |
;; in this list. If DEFAULT is non-nil, and corresponds to an existing buffer, |
;; in this list. If DEFAULT is non-nil, and corresponds to an existing buffer, |
3022 |
;; it is put to the start of the list. |
;; it is put to the start of the list. |
3496 |
;;; VISIT CHOSEN BUFFER |
;;; VISIT CHOSEN BUFFER |
3497 |
(defun ido-visit-buffer (buffer method &optional record) |
(defun ido-visit-buffer (buffer method &optional record) |
3498 |
"Visit file named FILE according to METHOD. |
"Visit file named FILE according to METHOD. |
3499 |
Record command in command-history if optional RECORD is non-nil." |
Record command in `command-history' if optional RECORD is non-nil." |
3500 |
|
|
3501 |
(let (win newframe) |
(let (win newframe) |
3502 |
(cond |
(cond |
3569 |
|
|
3570 |
As you type in a string, all of the buffers matching the string are |
As you type in a string, all of the buffers matching the string are |
3571 |
displayed if substring-matching is used \(default). Look at |
displayed if substring-matching is used \(default). Look at |
3572 |
`ido-enable-prefix' and `ido-toggle-prefix'. When you have found the |
`ido-enable-prefix' and `ido-toggle-prefix'. When you have found the |
3573 |
buffer you want, it can then be selected. As you type, most keys have their |
buffer you want, it can then be selected. As you type, most keys have |
3574 |
normal keybindings, except for the following: \\<ido-mode-map> |
their normal keybindings, except for the following: \\<ido-mode-map> |
3575 |
|
|
3576 |
RET Select the buffer at the front of the list of matches. If the |
RET Select the buffer at the front of the list of matches. If the |
3577 |
list is empty, possibly prompt to create new buffer. |
list is empty, possibly prompt to create new buffer. |
3654 |
default is to show it in the same window, unless it is already |
default is to show it in the same window, unless it is already |
3655 |
visible in another frame. |
visible in another frame. |
3656 |
|
|
3657 |
The file name is selected interactively by typing a substring. As you type |
The file name is selected interactively by typing a substring. As you |
3658 |
in a string, all of the filenames matching the string are displayed if |
type in a string, all of the filenames matching the string are displayed |
3659 |
substring-matching is used \(default). Look at `ido-enable-prefix' and |
if substring-matching is used \(default). Look at `ido-enable-prefix' and |
3660 |
`ido-toggle-prefix'. When you have found the filename you want, it can |
`ido-toggle-prefix'. When you have found the filename you want, it can |
3661 |
then be selected. As you type, most keys have their normal keybindings, |
then be selected. As you type, most keys have their normal keybindings, |
3662 |
except for the following: \\<ido-mode-map> |
except for the following: \\<ido-mode-map> |
3663 |
|
|
3664 |
RET Select the file at the front of the list of matches. If the |
RET Select the file at the front of the list of matches. If the |
4171 |
Return the name of a buffer selected. |
Return the name of a buffer selected. |
4172 |
PROMPT is the prompt to give to the user. DEFAULT if given is the default |
PROMPT is the prompt to give to the user. DEFAULT if given is the default |
4173 |
buffer to be selected, which will go to the front of the list. |
buffer to be selected, which will go to the front of the list. |
4174 |
If REQUIRE-MATCH is non-nil, an existing-buffer must be selected." |
If REQUIRE-MATCH is non-nil, an existing buffer must be selected." |
4175 |
(let* ((ido-current-directory nil) |
(let* ((ido-current-directory nil) |
4176 |
(ido-directory-nonreadable nil) |
(ido-directory-nonreadable nil) |
4177 |
(ido-directory-too-big nil) |
(ido-directory-too-big nil) |