Hi Gary, On Mon, Jan 20, 2014 at 10:07 AM, Gary Johnson <[email protected]> wrote: > 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. >
Thanks for trying to reproduce the 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. > Yes. Other places in that function that modified the buffer already used "silent". I forgot to add silent for this line earlier. > > 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. > Thanks for the hint. I can reproduce the problem if I start vim with the "-M" argument which resets the 'modifiable' option. I am not sure whether the OP used this option though. > > 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. > Yes. I can always set the 'modifiable' option for the MRU buffer. I will make this change. > > I wonder if the OP would respond to questions about a problem from > ten months ago. > I will try posting to Stack Overflow. Thanks, Yegappan -- -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
