System Call cannot write to temp file

140 views
Skip to first unread message

zzapper

unread,
Feb 25, 2008, 1:07:07 PM2/25/08
to vim_use
Hi
A system call in a script is generating

E484: Can't open file c:/temp/VIo1A08.tmp

I'm on Vista with Cygwin

Is this a slash problem or permissions problem?

zzapper

Charles E Campbell Jr

unread,
Feb 25, 2008, 1:10:35 PM2/25/08
to vim...@googlegroups.com
zzapper wrote:

Its probably not a slash problem; vim seems to understand /s with
Windows paths.
What script were you using? If it was netrw, please get the latest one from

http://mysite.verizon.net/astronaut/vim/index.html#NETRW

Regards,
Chip Campbell

zzapper

unread,
Feb 25, 2008, 1:30:56 PM2/25/08
to vim_use


> Its probably not a slash problem; vim seems to understand /s with
> Windows paths.
> What script were you using?  If it was netrw, please get the latest one from
>
>  http://mysite.verizon.net/astronaut/vim/index.html#NETRW
>
> Regards,
> Chip Campbell
Charles
It is http://www.vim.org/scripts/script.php?script_id=2124
post to twitter

zzapper

A.Politz

unread,
Feb 25, 2008, 2:35:51 PM2/25/08
to vim...@googlegroups.com
zzapper wrote:

Maybe the command vim builds is malformed such that it doesn't write it's
output to the file ( verbose >= 9 will tell ).

On linux
call system('foo(')
will run something like
( foo( ) > /tmp/xyz
,but fail and give the above error message.

-ap

--
:wq

John Beckett

unread,
Feb 25, 2008, 5:46:11 PM2/25/08
to vim...@googlegroups.com
zzapper wrote:
> E484: Can't open file c:/temp/VIo1A08.tmp
> I'm on Vista with Cygwin
> Is this a slash problem or permissions problem?

To check the permissions (and whether the directory exists etc), it would be
useful to try creating the file as the same user who was running Vim. For
example:

At command prompt:
echo Hello > c:\temp\VIo1A08.tmp

In Vim:
:w c:/temp/VIo1A08.tmp

John

Tony Mechelynck

unread,
Feb 26, 2008, 2:13:15 AM2/26/08
to vim...@googlegroups.com

system() calls the shell to interpret its parameter. On Cygwin, with a
Unix-like shell, the shell doesn't understand your Windows-like path: what
Windows calls C:\temp\VIolA08.tmp can be seen in Vim as c:/temp/VIolA08.tmp
but to your bash shell it is named /cygdrive/c/temp/VIolA08.tmp (or, IIRC,
`cygpath -u 'C:\temp\VIolA08.tmp'`).

I recommend using Vim-for-Cygwin from the Cygwin bash shell, or
Vim-for-native-Windows from either the Windows cmd.exe shell or typical
"Windows" invoking methods such as a desktop icon or an "Open with Vim"
menuitem in the right-click context menu on most files.


Best regards,
Tony.
--
Ankh if you love Isis.

ThoML

unread,
Feb 26, 2008, 3:18:31 AM2/26/08
to vim_use
> E484: Can't open file c:/temp/VIo1A08.tmp
>
> I'm on Vista with Cygwin

Do you run windows (g)vim from cygwin or cygwin's vim?

I once had similar problem and it had something to do with the
shellpipe or shellquote setting -- I can't remember which one it was.

Does the problem only occur with this specific plugin (in which case
escaping of some characters might be wrong) or always when invoking an
external command? (e.g. 1,1!ls).

What does the exact call to the external command look like? (Maybe run
it without silent or with 20verb).

The directory c:/temp does exist? Since to my knowledge, it isn't a
standard directory.
Reply all
Reply to author
Forward
0 new messages