E505, File is write-protected

2006-08-21 Thread Wolfgang Schmidt


   Hi vimmers,

when I try to write (:w) a certain buffer, I get E505 (~ file XXX is 
write-protected, override with w!).
The protection seems to be set by Vim, not the OS (WinXP). So I looked 
for the readonly option value,
but it's set to noreadonly. I also checked write, which is set to 
write. Nevertheless, everytime I try to
:w the file, I get this E505 dialog. Any hints? I'm running Gvim 7.0 on 
Win XP)


Thanx in advance

   Wolfgang


Re: E505, File is write-protected

2006-08-21 Thread Jürgen Krämer

Hi,

Wolfgang Schmidt wrote:
 
 when I try to write (:w) a certain buffer, I get E505 (~ file XXX is 
 write-protected, override with w!).
 The protection seems to be set by Vim, not the OS (WinXP). So I looked 
 for the readonly option value,
 but it's set to noreadonly. I also checked write, which is set to 
 write. Nevertheless, everytime I try to
 :w the file, I get this E505 dialog. Any hints? I'm running Gvim 7.0 on 
 Win XP)

are you able to write the file with :w!? If not, the file might be
opened exclusively or with write-access denied by another program.

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)



Re: E505, File is write-protected

2006-08-21 Thread Wolfgang Schmidt

Wolfgang Schmidt wrote:
when I try to write (:w) a certain buffer, I get E505 (~ file XXX is 
write-protected, override with w!).
The protection seems to be set by Vim, not the OS (WinXP). So I looked 
for the readonly option value,
but it's set to noreadonly. I also checked write, which is set to 
write. Nevertheless, everytime I try to
:w the file, I get this E505 dialog. Any hints? I'm running Gvim 7.0 on 
Win XP)



are you able to write the file with :w!? If not, the file might be
opened exclusively or with write-access denied by another program.

Regards,
Jürgen

  


With :w! the file can be written, so this can't be the problem.

Thanks, though ...

   Wolfgang





Re: E505, File is write-protected

2006-08-21 Thread A.J.Mechelynck

Wolfgang Schmidt wrote:

Wolfgang Schmidt wrote:
when I try to write (:w) a certain buffer, I get E505 (~ file XXX is 
write-protected, override with w!).
The protection seems to be set by Vim, not the OS (WinXP). So I 
looked for the readonly option value,
but it's set to noreadonly. I also checked write, which is set to 
write. Nevertheless, everytime I try to
:w the file, I get this E505 dialog. Any hints? I'm running Gvim 7.0 
on Win XP)



are you able to write the file with :w!? If not, the file might be
opened exclusively or with write-access denied by another program.

Regards,
Jürgen

  


With :w! the file can be written, so this can't be the problem.

Thanks, though ...

   Wolfgang







Then the file might be write-protected by Windows (any program can 
override that if it takes extra steps for it). Try


attrib filename.ext

in CMD.EXE (where filename.ext is the name of the file). There are 
four possible attributes, each of which may either appear or be replaced 
by a space or period:


H hidden : doesn't appear in DIR listings
S system : a special kind of hidden file
	R readonly : the file cannot be written, except by clearing this flag 
first

A archive : the file has been archived.

To be normally writable, the file should have either no flags at all, 
or else only A.


To change the flags, use for instance

attrib -R +A filename.ext

(minus to clear, plus to set).


Best regards,
Tony.


Re: E505, File is write-protected

2006-08-21 Thread A.J.Mechelynck

Wolfgang Schmidt wrote:

A.J.Mechelynck wrote:
Then the file might be write-protected by Windows (any program can 
override that if it takes extra steps for it). Try


attrib filename.ext

in CMD.EXE (where filename.ext is the name of the file). There are 
four possible attributes, each of which may either appear or be 
replaced by a space or period:


H hidden : doesn't appear in DIR listings
S system : a special kind of hidden file
R readonly : the file cannot be written, except by clearing this 
flag first

A archive : the file has been archived.

To be normally writable, the file should have either no flags at 
all, or else only A.


To change the flags, use for instance

attrib -R +A filename.ext

(minus to clear, plus to set).


Best regards,
Tony.


Thanx Tony, but this didn't work either. I executed attrib -R +A 
filename.ext as proposed, but still got the described behaviour.


I have closed my Gvim session now and retried all with console vim. So I 
executed the attrib command as proposed, so the file's
attribute is now set to A. I then started a console Vim to edit the 
file. The file was marked as [RO] when loading, so the readonly
was set. I reset it with :set noreadonly and the [RO] mark 
disappeared. After this I again tried writing the file with :w, and 
again I

got this E505 Message. Why does Vim think, this file would be [RO]?

Wolfgang


I don't know. I'm sending this to the list so someone else may answer. 
(Please use Reply to all next time.)



Best regards,
Tony.


Re: E505, File is write-protected - Problem solved

2006-08-21 Thread Wolfgang Schmidt
I don't know. I'm sending this to the list so someone else may answer. 
(Please use Reply to all next time.) 

Best regards,
Tony.


I got rid of the problem finally now by - rebooting. I looks like 
another nice  feature of this obscure NTFS file system.


Thanx Tony and Jürgen for your proposals,

   Wolfgang