24 |
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
25 |
;; Boston, MA 02110-1301, USA. |
;; Boston, MA 02110-1301, USA. |
26 |
|
|
|
;;; Acknowledgements |
|
|
|
|
|
;; Infinite amounts of gratitude goes to Stephen Eglen <stephen@cns.ed.ac.uk> |
|
|
;; who wrote iswitch-buffer mode - from which I ripped off 99% of the code |
|
|
;; for ido-switch-buffer and found the inspiration for ido-find-file. |
|
|
;; The ido package would never have existed without his work. |
|
|
|
|
|
;; Also thanks to Klaus Berndl, Rohit Namjoshi, Robert Fenk, Alex |
|
|
;; Schroeder, Bill Benedetto, Stephen Eglen, and many others for bug |
|
|
;; fixes and improvements. |
|
|
|
|
|
;;; History |
|
|
|
|
|
;; Since I discovered Stephen Eglen's excellent iswitchb package, I just |
|
|
;; couldn't live without it, but once being addicted to switching buffers |
|
|
;; with a minimum of keystrokes, I soon found that opening files in the |
|
|
;; old-fashioned way was just too slow - so I decided to write a package |
|
|
;; which could open files with the same speed and ease as iswitchb could |
|
|
;; switch buffers. |
|
|
|
|
|
;; I originally wrote a separate ifindf.el package based on a copy of |
|
|
;; iswitchb.el, which did for opening files what iswitchb did for |
|
|
;; switching buffers. Along the way, I corrected a few errors in |
|
|
;; ifindf which could have found its way back into iswitchb, but since |
|
|
;; most of the functionality of the two package was practically |
|
|
;; identical, I decided that the proper thing to do was to merge my |
|
|
;; ifindf package back into iswitchb. |
|
|
;; |
|
|
;; This is basically what ido (interactively do) is all about; but I |
|
|
;; found it ackward to merge my changes into the "iswitchb-" namespace, |
|
|
;; so I invented a common "ido-" namespace for the merged packages. |
|
|
;; |
|
|
;; This version is based on ido.el version 1.57 released on |
|
|
;; gnu.emacs.sources adapted for emacs 22.1 to use command remapping |
|
|
;; and optionally hooking the read-buffer and read-file-name functions. |
|
|
;; |
|
|
;; Prefix matching was added by Klaus Berndl <klaus.berndl@sdm.de> based on |
|
|
;; an idea of Yuji Minejima <ggb01164@nifty.ne.jp> and his mcomplete-package. |
|
|
|
|
27 |
|
|
28 |
;;; Commentary: |
;;; Commentary: |
29 |
|
|
55 |
;; most recent, when I use ido-switch-buffer, I first of all get |
;; most recent, when I use ido-switch-buffer, I first of all get |
56 |
;; presented with the list of all the buffers |
;; presented with the list of all the buffers |
57 |
;; |
;; |
58 |
;; Buffer: {123456,123} |
;; Buffer: {123456 | 123} |
59 |
;; |
;; |
60 |
;; If I then press 2: |
;; If I then press 2: |
61 |
;; Buffer: 2[3]{123456,123} |
;; Buffer: 2[3]{123456 | 123} |
62 |
;; |
;; |
63 |
;; The list in {...} are the matching buffers, most recent first |
;; The list in {...} are the matching buffers, most recent first |
64 |
;; (buffers visible in the current frame are put at the end of the |
;; (buffers visible in the current frame are put at the end of the |
71 |
;; pressing TAB. In this case, I will get "3" added to my input. |
;; pressing TAB. In this case, I will get "3" added to my input. |
72 |
|
|
73 |
;; So, I press TAB: |
;; So, I press TAB: |
74 |
;; Buffer: 23{123456,123} |
;; Buffer: 23{123456 | 123} |
75 |
;; |
;; |
76 |
;; At this point, I still have two matching buffers. |
;; At this point, I still have two matching buffers. |
77 |
;; If I want the first buffer in the list, I simply press RET. If I |
;; If I want the first buffer in the list, I simply press RET. If I |
79 |
;; top of the list and then RET to select it. |
;; top of the list and then RET to select it. |
80 |
;; |
;; |
81 |
;; However, if I type 4, I only have one match left: |
;; However, if I type 4, I only have one match left: |
82 |
;; Buffer: 234[123456] [Matched] |
;; Buffer: 234[123456] |
83 |
|
;; |
84 |
|
;; Since there is only one matching buffer left, it is given in [] and |
85 |
|
;; it is shown in the `ido-only-match' face (ForestGreen). I can now |
86 |
|
;; press TAB or RET to go to that buffer. |
87 |
;; |
;; |
88 |
;; Since there is only one matching buffer left, it is given in [] and we |
;; If I want to create a new buffer named "234", I press C-j instead of |
89 |
;; see the text [Matched] afterwards. I can now press TAB or RET to go |
;; TAB or RET. |
|
;; to that buffer. |
|
90 |
;; |
;; |
91 |
;; If however, I now type "a": |
;; If instead, I type "a": |
92 |
;; Buffer: 234a [No match] |
;; Buffer: 234a [No match] |
93 |
;; There are no matching buffers. If I press RET or TAB, I can be |
;; There are no matching buffers. If I press RET or TAB, I can be |
94 |
;; prompted to create a new buffer called "234a". |
;; prompted to create a new buffer called "234a". |
282 |
;; can be used by other packages to read a buffer name, a file name, |
;; can be used by other packages to read a buffer name, a file name, |
283 |
;; or a directory name in the `ido' way. |
;; or a directory name in the `ido' way. |
284 |
|
|
285 |
|
;;; Acknowledgements |
286 |
|
|
287 |
|
;; Infinite amounts of gratitude goes to Stephen Eglen <stephen@cns.ed.ac.uk> |
288 |
|
;; who wrote iswitch-buffer mode - from which I ripped off 99% of the code |
289 |
|
;; for ido-switch-buffer and found the inspiration for ido-find-file. |
290 |
|
;; The ido package would never have existed without his work. |
291 |
|
|
292 |
|
;; Also thanks to Klaus Berndl, Rohit Namjoshi, Robert Fenk, Alex |
293 |
|
;; Schroeder, Bill Benedetto, Stephen Eglen, and many others for bug |
294 |
|
;; fixes and improvements. |
295 |
|
|
296 |
|
;;; History |
297 |
|
|
298 |
|
;; Since I discovered Stephen Eglen's excellent iswitchb package, I just |
299 |
|
;; couldn't live without it, but once being addicted to switching buffers |
300 |
|
;; with a minimum of keystrokes, I soon found that opening files in the |
301 |
|
;; old-fashioned way was just too slow - so I decided to write a package |
302 |
|
;; which could open files with the same speed and ease as iswitchb could |
303 |
|
;; switch buffers. |
304 |
|
|
305 |
|
;; I originally wrote a separate ifindf.el package based on a copy of |
306 |
|
;; iswitchb.el, which did for opening files what iswitchb did for |
307 |
|
;; switching buffers. Along the way, I corrected a few errors in |
308 |
|
;; ifindf which could have found its way back into iswitchb, but since |
309 |
|
;; most of the functionality of the two package was practically |
310 |
|
;; identical, I decided that the proper thing to do was to merge my |
311 |
|
;; ifindf package back into iswitchb. |
312 |
|
;; |
313 |
|
;; This is basically what ido (interactively do) is all about; but I |
314 |
|
;; found it ackward to merge my changes into the "iswitchb-" namespace, |
315 |
|
;; so I invented a common "ido-" namespace for the merged packages. |
316 |
|
;; |
317 |
|
;; This version is based on ido.el version 1.57 released on |
318 |
|
;; gnu.emacs.sources adapted for emacs 22.1 to use command remapping |
319 |
|
;; and optionally hooking the read-buffer and read-file-name functions. |
320 |
|
;; |
321 |
|
;; Prefix matching was added by Klaus Berndl <klaus.berndl@sdm.de> based on |
322 |
|
;; an idea of Yuji Minejima <ggb01164@nifty.ne.jp> and his mcomplete-package. |
323 |
|
|
324 |
|
|
325 |
;;; Code: |
;;; Code: |
326 |
|
|