[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Concerning the new `ido-use-virtual-buffers' feature
From: |
Leo |
Subject: |
Re: Concerning the new `ido-use-virtual-buffers' feature |
Date: |
Fri, 28 May 2010 02:45:52 +0100 |
On 28 May 2010 02:21, Leo <address@hidden> wrote:
>>> I think it is in the added code in ido-exhibit which is run in
>>> post-command-hook if I remember correctly.
>>>
>>> When your input doesn't match any (including virtual ones), the code
>>> in ido-exhibit tells ido (the big LOOP in ido-read-internal) to
>>> rebuild the buffer list and there isn't any match so it rebuild again
>>> and again. Go into a infinite loop.
>>>
>>> You could try creating a new let-bound variable to detect such a
>>> situation and avoid the infinite loop.
>>
>> Thanks for that. Here's a new patch which uses a new dynamic variable.
>> It seems to work as far as I can tell, but it would be great if you
>> could give it a test drive.
>>
>> One other wishlist item would be to remove virtual buffers from the
>> completion list as soon as the input string matches a normal buffer
>> again, because the user deleted some chars from the input...
>>
>> Bye,
>> Tassilo
>
> I slightly modified the patch and implemented the wishlist item.
>
> For buffers, if a let-bound variable can be added in
> ido-buffers-internal I usually avoid adding it in ido-read-internal.
>
> To remove virtual buffers as soon as input matches existing ones, the
> idea is to build a list of existing buffers (ignored buffers are not
> included) and then match the input against it in ido-exhibit. My
> testing is very brief though it seems working fine. Could you test it
> more thoroughly? Also remember to try the toggle virtual buffers key
> C-o too. Thanks.
>
> Leo
>
The can be changed
@@ -3427,7 +3431,9 @@ for first matching file."
(if default
(setq ido-temp-list
(cons default (delete default ido-temp-list))))
- (if ido-use-virtual-buffers
+ (if (or (eq ido-use-virtual-buffers 'always)
+ (and (boundp ido-virtual-buffers-enabled)
+ ido-virtual-buffers-enabled))
(ido-add-virtual-buffers-to-list))
(run-hooks 'ido-make-buffer-list-hook)
ido-temp-list))
to:
@@ -2736,7 +2739,8 @@ C-x C-f ... C-d enter `dired' on current directory."
See `ido-use-virtual-buffers' for explanation of virtual buffer."
(interactive)
(when (and ido-mode (eq ido-cur-item 'buffer))
- (setq ido-use-virtual-buffers (not ido-use-virtual-buffers))
+ (setq ido-virtual-buffers-enabled
+ (not ido-virtual-buffers-enabled))
(setq ido-text-init ido-text)
(setq ido-exit 'refresh)
(exit-minibuffer)))
Leo
- Re: Concerning the new `ido-use-virtual-buffers' feature, (continued)
Re: Concerning the new `ido-use-virtual-buffers' feature, Leo, 2010/05/27
- Re: Concerning the new `ido-use-virtual-buffers' feature, Tassilo Horn, 2010/05/27
- Re: Concerning the new `ido-use-virtual-buffers' feature, Leo, 2010/05/27
- Re: Concerning the new `ido-use-virtual-buffers' feature, Tassilo Horn, 2010/05/27
- Re: Concerning the new `ido-use-virtual-buffers' feature, Leo, 2010/05/27
- Re: Concerning the new `ido-use-virtual-buffers' feature,
Leo <=
- Re: Concerning the new `ido-use-virtual-buffers' feature, Tassilo Horn, 2010/05/28
- Re: Concerning the new `ido-use-virtual-buffers' feature, Leo, 2010/05/28
- Re: Concerning the new `ido-use-virtual-buffers' feature, Leo, 2010/05/28
- Re: Concerning the new `ido-use-virtual-buffers' feature, Juanma Barranquero, 2010/05/28
- Re: Concerning the new `ido-use-virtual-buffers' feature, Leo, 2010/05/28
- Re: Concerning the new `ido-use-virtual-buffers' feature, Tassilo Horn, 2010/05/28
- Re: Concerning the new `ido-use-virtual-buffers' feature, Leo, 2010/05/29