Monday, January 20, 2014

Re: Help needed in reproducing an error with the mru plugin

On 2014-01-20, Yegappan Lakshmanan wrote:
> Hi all,
>
> If you are not an user of the MRU plugin, you can skip this e-mail.
>
> I need some help in reproducing a problem reported by a mru plugin user
> on stack overflow
> (http://stackoverflow.com/questions/15481723/vim-mru-plugin-issue).
>
> On opening the MRU window, the following error is seen:
>
> Error detected while processing function
> <SNR>10_MRU_Cmd..<SNR>10_MRU_Open_Window:
> line 125
> E21: Cannot make changes, 'modifiable' is off: $delete
>
> I am not able to reproduce this problem. He is using version 3.5 of the plugin.
> Is anyone else seeing this problem? Based on the plugin code, the MRU
> buffer should have the 'modifiable' option turned on.

I've used the MRU plugin since at least version 3.4 and used 3.5
from the time it was uploaded to vim.org until 3.6 was uploaded.
I've never seen this problem. In version 3.6, I think that line is
line 777 of the file, which begins with ":silent!", so that error
will no longer be seen.

I tried an experiment anyway, starting vim like this:

vim -c 'set nomodifiable' mru.vim

and executing ":MRU". The result was an empty __MRU_Files__ window.
That suggests that the user was viewing a buffer with 'nomodifiable'
set when he executed ":MRU".

If I start vim like this instead,

vim -c 'setlocal nomodifiable' mru.vim

the :MRU command opens the MRU list as it should, so 'nomodifiable'
has to be set globally for the error to occur, assuming that this is
the cause of the OP's problem.

In the MRU_Open_Window() function, I see only one place where
'modifiable' is set and that is at line 26 of the function, in a
branch that is not always executed. Maybe the plugin needs to
explicitly and always set 'modifiable' for the __MRU_Files__ buffer.

I wonder if the OP would respond to questions about a problem from
ten months ago.

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: