On 2016-03-23, Gary Johnson wrote:
> Steve,
> 
> I don't know exactly when this might have started.  I don't use
> Splice all that often.  I keep my Vim instances pretty much up to
> date and your Splice plugin worked okay a month or so ago, but
> failed today using Vim 7.4.1628 and 7.4.1641.
> 
> I was performing an 'hg unshelve' in my vim directory after an 'hg
> shelve' and 'hg pull -u' when a conflict between the repo and
> shelved versions of vim/src/testdir/test_quickfix.vim triggered a
> merge, which automatically executed Vim with Splice.  The following
> messages then appeared:
> 
>     "/tmp/test_quickfix.vim~base.BgkftJ" 639L, 18293C
>     Error detected while processing function splice#SpliceInit:
>     line    3:
>     Traceback (most recent call last):
>       File "<string>", line 1, in <module>
>       File "/home/gary/.vim/splice/autoload/splice.py", line 19, in SpliceInit
>       splice.init()
>       File "/home/gary/.vim/splice/autoload/splicelib/init.py", line 103, in 
> init
>       setlocal_buffers()
>       File "/home/gary/.vim/splice/autoload/splicelib/init.py", line 62, in 
> setlocal_buffers
>       vim.command('set filetype=%s' % filetype)
>     vim.error: Vim(setlocal):E21: Cannot make changes, 'modifiable' is off: 
> fileformat=unix
> 
> Instead of the usual five-window display, Vim opened with only two
> windows:  the tmp file shown above in the upper window and
> src/testdir/test_quickfix.vim in the lower window, modified.
> 
> I am using Red Hat Enterprise Linux 7.1.  I can't find version or
> revision information in any of the Splice files.  All the files have
> modification dates of 2013-03-25 except for
> autoload/splicelib/util/bufferlib.py which has a modification date
> of 2013-08-21.

I found the problem.  It was my doing.

I have an after ftplugin for vim files, ~/.vim/after/ftplugin/vim.vim,
that forces the 'fileformat' of all vim files to "unix" by executing

    :setlocal fileformat=unix

One of the buffers used by Splice had 'modifiable' set to "off", and
contained a vim file, so when my plugin tried to set the 'fileformat',
Vim rejected the setting with the error message shown.

The reason I hadn't seen the error before was that this was probably
the first vim file I had encountered that needing merging.  It had
nothing to do with this being a recent version of Vim.

My solution will be to not make that setting if the buffer is not
modifiable.

Sorry for the noise.

Regards,
Gary

-- 
-- 
You received this message from the "vim_dev" 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_dev" 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/d/optout.

Raspunde prin e-mail lui