> -----Original Message-----
> From: Eric Arnold [mailto:[EMAIL PROTECTED] 
> Sent: 24 May 2006 11:21
> To: Zdenek Sekera
> Cc: Yakov Lerner; vim-dev@vim.org
> Subject: Re: set readonly - strange?
> 
> On 5/24/06, Zdenek Sekera <[EMAIL PROTECTED]> wrote:
> > > -----Original Message-----
> > > From: Eric Arnold [mailto:[EMAIL PROTECTED]
> > > Sent: 23 May 2006 18:12
> > > To: Yakov Lerner
> > > Cc: Zdenek Sekera; vim-dev@vim.org
> > > Subject: Re: set readonly - strange?
> > >
> > > As far as I can tell, there are several instances where there are
> > > transitory buffers as vim is starting, opening a new tab, probably
> > > some in closing op.s.
> > >
> >
> > That may be true, but...
> >
> > > I don't know if I used the right word by saying the buffer is
> > > "undefined", but I don't think it it's guaranteed to be 
> usable until a
> > > certain point, which is after -u, and at the "first file 
> loaded", i.e.
> > > -c
> > >
> > > If you open a buffer explicitly from inside .vimtest , 
> then that's a
> > > different story.
> > >
> >
> > In my test case, buffer must exist, I am well passed the '-u ...'
> > phase because I can *see* the buffer when I do :set readable?'.
> > I think Yakov's test case is saying even more.
> 
> It's not clear that the buffer exists when the   :set ro  command is
> read according to the -u option, though it might exist in some form
> since no error occurs.  Even if a buffer does exist at that time, I'm
> fairly sure that is was transitory, and that it's not the same buffer
> that you actually see and type  :set ro?  at.
> 
> Secondly, you need to be past the -c or similar stage, where it states
> that files have been loaded.  It doesn't say that for -u.
> 
> You *are* past the loading state when you type  :set ro?  , but that's
> not the same as when the -u file is processed.
> 

I don't know to that depth as you do, but then we should
agree that 'set readonly' in .vimrc is useless, because
it would never work, right?
This is hard to accept. So it looks more and more just as a bug.

---Zdenek

> > > It's kinda bug-ish, but it's not a bug unless it's 
> contrary to stated
> > > behavior.  It'll be interesting to see how Bram addresses it.
> > >
> >
> > I also think it is bug.
> >
> > ---Zdenek
> >
> > > On 5/23/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> > > > > On 5/23/06, Zdenek Sekera <[EMAIL PROTECTED]> wrote:
> > > > > > create a file ~/.vimtest as follows:
> > > > > >
> > > > > > cat > .vimtest
> > > > > > set nocompatible
> > > > > > set readonly
> > > > > > <C-D>
> > > > > >
> > > > > > and execute (g)vim:
> > > > > >
> > > > > > vim .vimtest -u .vimtest
> > > > > >
> > > > > > try :set readonly? and you'll get 'noreadonly'.
> > > >
> > > > The buffer does exist when initfile is executed. The ':ls'
> > > in initfile shows it.
> > > > Adding more printouts to initfile shows interesting results:
> > > >
> > > > vim -u 1 1
> > > > ----------------- file called 1 ---------------
> > > > set nocompatible
> > > > ls
> > > > call input('before set readonly 111')
> > > > set readonly
> > > > set readonly?
> > > > ls
> > > > set readonly?
> > > > set readonly?
> > > > echo "&readonly=".&readonly
> > > > call input('after set readonly 222')
> > > > -----------------------------------------------------
> > > > In vim, ':verb set readonly?' shows that readonly is
> > > misteriously reset.
> > > > The output differs between vim6 and vim7.
> > > > --------------- vim7 output ------------------
> > > >   1 %    "1"                            line 1
> > > > before set readonly 111
> > > >   1 % =  "1"                            line 1
> > > >
> > > >
> > > > &readonly=1
> > > > after set readonly 222
> > > > ----------------------------------------
> > > > Note the missing output of ':set readonly?'!!! It prints neither
> > > > 'readonly' nor 'noreadonly'.
> > > > ----------------- vim6 output --------------------
> > > >
> > > >   1 %    "1"                            line 1
> > > > before set readonly 111
> > > >  before set readonly 111
> > > >   1 % =  "1"                            line 1
> > > >   readonly
> > > >   readonly
> > > > &readonly=1
> > > > after set readonly 222
> > > > -----------------------------------------------------
> > > >
> > > > Looks like a bug to me.
> > > >
> > > > Yakov
> > > >
> > >
> >
> 

Reply via email to