Re: Help with "write" command--SUCCESS

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Help with "write" command--SUCCESS

R Sam
Very nice!!! Thanks Tim and Tony for your suggestion about using
the verbose command to tack the culprit.

Like I said I had a hunch on which script could be causing it since I only
recently started using a particular script. So I loaded it again and sure
enough my previously writeable buffers in that gvim session were now
unwriteable with the same error E142.

So I tried the below
:verbose set write?

and it returned the following:

.vim/plugin/pdftotext.vim

So then I look inside this script and the last thing it does is

    " make the buffer unwritable: we don't want to clobber the PDF file!
    set nowrite

For now, I am just going to edit my copy of the script to not do this.

Thanks again team!
-Sam


On 9/21/05, Tim Chase <[hidden email]> wrote:

> > E142: File not written: Writing is disabled by 'write' option
> >
> > Then for some reason after doing a lot of things I can
> > successfully write that file again. It is happening more often
> > now, so I thought of asking on the group.
>
> The next time it happens, you should be able to do
>
>         :verbose set write?
>
> or perhaps
>
>         :20 verbose set write?
>
> This should tell you where it's getting munged and perhaps afford
> an opportunity to track down the culprit.  You *should* be able
> to simply
>
>         :set write
>
> to reset the behavior, allowing you to write the file.  If that
> doesn't work, you may have tracked down a bug :)
>
> HTH,
>
> -tim
>
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Help with "write" command--SUCCESS

Charles E Campbell Jr
R Sam wrote:

>So then I look inside this script and the last thing it does is
>
>    " make the buffer unwritable: we don't want to clobber the PDF file!
>    set nowrite
>
>For now, I am just going to edit my copy of the script to not do this.
>  
>

I suggest changing it to

setlocal noma ro

ie. make the buffer (just the one buffer) not-modifiable and read-only.

Regards,
Chip Campbell



Reply | Threaded
Open this post in threaded view
|

Re: Help with "write" command--SUCCESS

R Sam
Hi Chip,
Thanks for your suggestion, I will try that. I was actually going to try
something like:
setlocal buftype=nowrite

Thanks,
-Sam

On 9/22/05, Charles E. Campbell, Jr. <[hidden email]> wrote:

> R Sam wrote:
>
> >So then I look inside this script and the last thing it does is
> >
> >    " make the buffer unwritable: we don't want to clobber the PDF file!
> >    set nowrite
> >
> >For now, I am just going to edit my copy of the script to not do this.
> >
> >
>
> I suggest changing it to
>
> setlocal noma ro
>
> ie. make the buffer (just the one buffer) not-modifiable and read-only.
>
> Regards,
> Chip Campbell
>
>
>
>