public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Editing zipped files with VIM under cygwin
@ 2001-11-01 20:30 Strohhaecker, Bernd
  2001-11-01 21:14 ` Corinna Vinschen
  2001-11-11  8:26 ` Strohhaecker, Bernd
  0 siblings, 2 replies; 20+ messages in thread
From: Strohhaecker, Bernd @ 2001-11-01 20:30 UTC (permalink / raw)
  To: vim, cygwin

> -----Ursprüngliche Nachricht-----
> Von:	Corinna Vinschen [SMTP:cygwin@cygwin.com]
> Gesendet am:	Montag, 12. November 2001 15:54
> An:	cygwin@cygwin.com
> Betreff:	Re: Editing zipped files with VIM under cygwin
> 
> On Mon, Nov 12, 2001 at 02:55:33PM +0100, Strohhaecker, Bernd wrote:
> > ...
> > 
> > "bzip2 --version >x 2>&1" seems to wait for an input/EOF ???
> 
> Dunno.  I've just checked it here in tty and notty mode and
> I don't have that problem.  Reading both, gzipped and bzipped
> files wors fine.  Are you using *gasp* cmd as shell?
> 
> Corinna

No, bash. Well, I'll try to be more exactly.

1. I'm using NT 4 SR 5 (german) with cygwin 1.3.5, vim 6.0.93-1, bzip
1.0.1-6
under GNU bash, version 2.05.0(8)-release (i686-pc-cygwin)

2. VIM checks the existance of a zip-prog with the function:
let e = executable(name)
This fails on my (cygwin-)system for any program:
:echo executable("bash")
Rufe Shell auf, um "(which bash) >/tmp/v645258/1 2>&1" auszuführen

Datei "/tmp/v645258/1" kann nicht gelesen werden-1

3. if the above check fails, VIM does a second one:
let r = system(name . " --version")
And this one fails only for bzip2 (not for gzip !). The same seems to
happens at the shell:

root@LBWSNT358 ~
$ bzip2 --version > xx 2>&1

--> No prompt here !!!

4. Meanwhile I've found a workaround. After changing my VIM-settings for
shellredir 
from '>%s 2>&1' to '>%s 2>1' also ':e xx.bz2' works, for whatever reasons.

But nevertheless there are IMO two bugs:
1. VIM's 'let e = executable(name)' doesn't work.
2. 'bzip2 --version > xx' doesn't finish.

Or do I miss anything here ?

Kind regards, 

Bernd

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-01 20:30 Editing zipped files with VIM under cygwin Strohhaecker, Bernd
@ 2001-11-01 21:14 ` Corinna Vinschen
  2001-11-01 21:24   ` Michael Schaap
  2001-11-11  8:26   ` Corinna Vinschen
  2001-11-11  8:26 ` Strohhaecker, Bernd
  1 sibling, 2 replies; 20+ messages in thread
From: Corinna Vinschen @ 2001-11-01 21:14 UTC (permalink / raw)
  To: cygwin

On Tue, Nov 13, 2001 at 12:03:19PM +0100, Strohhaecker, Bernd wrote:
> let e = executable(name)
> This fails on my (cygwin-)system for any program:
> :echo executable("bash")
> Rufe Shell auf, um "(which bash) >/tmp/v645258/1 2>&1" auszuf\xFChren
> 
> Datei "/tmp/v645258/1" kann nicht gelesen werden-1

Did you install the which package?  `which' is not a bash
internal command.

> 2. 'bzip2 --version > xx' doesn't finish.

I can reproduce that but don't know why that happens, currently.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-01 21:14 ` Corinna Vinschen
@ 2001-11-01 21:24   ` Michael Schaap
  2001-11-11  8:26     ` Michael Schaap
  2001-11-11  8:26   ` Corinna Vinschen
  1 sibling, 1 reply; 20+ messages in thread
From: Michael Schaap @ 2001-11-01 21:24 UTC (permalink / raw)
  To: cygwin

At 14:00 13-11-2001, Corinna Vinschen wrote:

> > 2. 'bzip2 --version > xx' doesn't finish.
>
>I can reproduce that but don't know why that happens, currently.

That seems to be a bzip2 feature/bug.  (It behaves the same on RedHat 7.1.)

--------------------8<--------------------
$ bzip2 --version
bzip2, a block-sorting file compressor.  Version 1.0.1, 23-June-2000.

    Copyright (C) 1996-2000 by Julian Seward.

    This program is free software; you can redistribute it and/or modify
    it under the terms set out in the LICENSE file, which is included
    in the bzip2-1.0 source distribution.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    LICENSE file for more details.

bzip2: I won't write compressed data to a terminal.
bzip2: For help, type: `bzip2 --help'.
-------------------->8--------------------

As you can see, the --version flag doesn't stop bzip2 from trying to 
compress standard input.
Possible workarounds:

$bzip2 --version --help 2>qqq

$bzip2 --version </dev/null >/dev/null 2>qqq

  - Michael

-- 
     I always wondered about the meaning of life.   So I looked it
     up in the dictionary under "L" and there it was - the meaning
     of life.  It was not what I expected.                  - Dogbert 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-01 21:24   ` Michael Schaap
@ 2001-11-11  8:26     ` Michael Schaap
  0 siblings, 0 replies; 20+ messages in thread
From: Michael Schaap @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

At 14:00 13-11-2001, Corinna Vinschen wrote:

> > 2. 'bzip2 --version > xx' doesn't finish.
>
>I can reproduce that but don't know why that happens, currently.

That seems to be a bzip2 feature/bug.  (It behaves the same on RedHat 7.1.)

--------------------8<--------------------
$ bzip2 --version
bzip2, a block-sorting file compressor.  Version 1.0.1, 23-June-2000.

    Copyright (C) 1996-2000 by Julian Seward.

    This program is free software; you can redistribute it and/or modify
    it under the terms set out in the LICENSE file, which is included
    in the bzip2-1.0 source distribution.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    LICENSE file for more details.

bzip2: I won't write compressed data to a terminal.
bzip2: For help, type: `bzip2 --help'.
-------------------->8--------------------

As you can see, the --version flag doesn't stop bzip2 from trying to 
compress standard input.
Possible workarounds:

$bzip2 --version --help 2>qqq

$bzip2 --version </dev/null >/dev/null 2>qqq

  - Michael

-- 
     I always wondered about the meaning of life.   So I looked it
     up in the dictionary under "L" and there it was - the meaning
     of life.  It was not what I expected.                  - Dogbert 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-01 21:14 ` Corinna Vinschen
  2001-11-01 21:24   ` Michael Schaap
@ 2001-11-11  8:26   ` Corinna Vinschen
  1 sibling, 0 replies; 20+ messages in thread
From: Corinna Vinschen @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

On Tue, Nov 13, 2001 at 12:03:19PM +0100, Strohhaecker, Bernd wrote:
> let e = executable(name)
> This fails on my (cygwin-)system for any program:
> :echo executable("bash")
> Rufe Shell auf, um "(which bash) >/tmp/v645258/1 2>&1" auszuführen
> 
> Datei "/tmp/v645258/1" kann nicht gelesen werden-1

Did you install the which package?  `which' is not a bash
internal command.

> 2. 'bzip2 --version > xx' doesn't finish.

I can reproduce that but don't know why that happens, currently.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-01 20:30 Editing zipped files with VIM under cygwin Strohhaecker, Bernd
  2001-11-01 21:14 ` Corinna Vinschen
@ 2001-11-11  8:26 ` Strohhaecker, Bernd
  1 sibling, 0 replies; 20+ messages in thread
From: Strohhaecker, Bernd @ 2001-11-11  8:26 UTC (permalink / raw)
  To: vim, cygwin

> -----Ursprüngliche Nachricht-----
> Von:	Corinna Vinschen [SMTP:cygwin@cygwin.com]
> Gesendet am:	Montag, 12. November 2001 15:54
> An:	cygwin@cygwin.com
> Betreff:	Re: Editing zipped files with VIM under cygwin
> 
> On Mon, Nov 12, 2001 at 02:55:33PM +0100, Strohhaecker, Bernd wrote:
> > ...
> > 
> > "bzip2 --version >x 2>&1" seems to wait for an input/EOF ???
> 
> Dunno.  I've just checked it here in tty and notty mode and
> I don't have that problem.  Reading both, gzipped and bzipped
> files wors fine.  Are you using *gasp* cmd as shell?
> 
> Corinna

No, bash. Well, I'll try to be more exactly.

1. I'm using NT 4 SR 5 (german) with cygwin 1.3.5, vim 6.0.93-1, bzip
1.0.1-6
under GNU bash, version 2.05.0(8)-release (i686-pc-cygwin)

2. VIM checks the existance of a zip-prog with the function:
let e = executable(name)
This fails on my (cygwin-)system for any program:
:echo executable("bash")
Rufe Shell auf, um "(which bash) >/tmp/v645258/1 2>&1" auszuführen

Datei "/tmp/v645258/1" kann nicht gelesen werden-1

3. if the above check fails, VIM does a second one:
let r = system(name . " --version")
And this one fails only for bzip2 (not for gzip !). The same seems to
happens at the shell:

root@LBWSNT358 ~
$ bzip2 --version > xx 2>&1

--> No prompt here !!!

4. Meanwhile I've found a workaround. After changing my VIM-settings for
shellredir 
from '>%s 2>&1' to '>%s 2>1' also ':e xx.bz2' works, for whatever reasons.

But nevertheless there are IMO two bugs:
1. VIM's 'let e = executable(name)' doesn't work.
2. 'bzip2 --version > xx' doesn't finish.

Or do I miss anything here ?

Kind regards, 

Bernd

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
@ 2001-11-11  8:26 Strohhaecker, Bernd
  2001-11-11  8:26 ` Corinna Vinschen
  0 siblings, 1 reply; 20+ messages in thread
From: Strohhaecker, Bernd @ 2001-11-11  8:26 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

> -----Ursprüngliche Nachricht-----
> Von:	Corinna Vinschen [SMTP:cygwin@cygwin.com]
> Gesendet am:	Dienstag, 13. November 2001 16:36
> An:	cygwin@sources.redhat.com
> Betreff:	Re: Editing zipped files with VIM under cygwin
> 
> ...
> $ SHELL=cmd vim foo.gz
>   Error detected while processing function <SNR>7_read..<SNR>7_check:
>   line    3:
>   Can't open file /tmp/v666361/0
>   line    5:
>   Can't open file /tmp/v666361/1
> 
> Does that look familiar?
> 

That's indeed what I get, but unfortunately also with:
$ SHELL=/bin/bash vim foo.gz

Nevertheless, thanks a lot.

Bernd

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-11  8:26 Strohhaecker, Bernd
@ 2001-11-11  8:26 ` Corinna Vinschen
  2001-11-11  8:26   ` Corinna Vinschen
  0 siblings, 1 reply; 20+ messages in thread
From: Corinna Vinschen @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

On Thu, Nov 15, 2001 at 11:57:50AM +0100, Strohhaecker, Bernd wrote:
> Seems I've been a little hasty when stating everything's ok :-(
> 
> Indeed, vim's function executable("name") returns 1 for everything, 
> also for not existing programs.
> 
> Looking at the sources I've found that:
> 
> 1. vim (6.0.93) tests the existance of 'name' in os_unix.c 
>    inside the function mch_can_exe with:
> 
>    sprintf((char *)buf, "which %s", name);
>    ...
>    retval = (*p != NUL && strstr((char *)p, "not found") == NULL);
>    return retval;
> 
> 2. which (which-1.4) returns, if the command wasn't found:
>    fprintf (stderr, "no %s in %s\n", cmd, PATH);
> 
> Which one should be changed ?
  ^^^^^

  Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-11  8:26 ` Corinna Vinschen
@ 2001-11-11  8:26   ` Corinna Vinschen
  0 siblings, 0 replies; 20+ messages in thread
From: Corinna Vinschen @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

On Thu, Nov 15, 2001 at 12:47:06PM +0100, Corinna Vinschen wrote:
> On Thu, Nov 15, 2001 at 11:57:50AM +0100, Strohhaecker, Bernd wrote:
> > Seems I've been a little hasty when stating everything's ok :-(
> > 
> > Indeed, vim's function executable("name") returns 1 for everything, 
> > also for not existing programs.
> > 
> > Looking at the sources I've found that:
> > 
> > 1. vim (6.0.93) tests the existance of 'name' in os_unix.c 
> >    inside the function mch_can_exe with:
> > 
> >    sprintf((char *)buf, "which %s", name);
> >    ...
> >    retval = (*p != NUL && strstr((char *)p, "not found") == NULL);
> >    return retval;
> > 
> > 2. which (which-1.4) returns, if the command wasn't found:
> >    fprintf (stderr, "no %s in %s\n", cmd, PATH);
> > 
> > Which one should be changed ?
>   ^^^^^
> 
>   Corinna

Just uploaded which-1.5-1.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-02  0:58 ` Corinna Vinschen
@ 2001-11-11  8:26   ` Corinna Vinschen
  0 siblings, 0 replies; 20+ messages in thread
From: Corinna Vinschen @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

On Tue, Nov 13, 2001 at 03:44:51PM +0100, Strohhaecker, Bernd wrote:
> Yes, I've installed latest/which/which-1.4.tar.gz

I just tried it by myself again, setting the environment variable
$SHELL to different values prior to starting vim:

$ SHELL=/bin/tcsh vim foo.gz		<-- worked

$ SHELL=/bin/bash vim foo.gz            <-- worked

$ SHELL=/bin/sh vim foo.gz		<-- worked

$ SHELL="" vim foo.gz
  Error detected while processing function <SNR>7_read..<SNR>7_check:
  line    3:
  E91: 'shell' option is empty
  Can't open file /tmp/v666347/0
  line    5:
  E91: 'shell' option is empty
  Can't open file /tmp/v666347/1

$ SHELL=cmd vim foo.gz
  Error detected while processing function <SNR>7_read..<SNR>7_check:
  line    3:
  Can't open file /tmp/v666361/0
  line    5:
  Can't open file /tmp/v666361/1

Does that look familiar?

> Is the following patch reasonable ?

Since that is a target independent problem, I assume you should
ask on the bzip mailing list.  But when the Cygwin bzip maintainer
is around, he wants to chime in here, perhaps.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
@ 2001-11-11  8:26 Strohhaecker, Bernd
  2001-11-11  8:26 ` Corinna Vinschen
  0 siblings, 1 reply; 20+ messages in thread
From: Strohhaecker, Bernd @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

Seems I've been a little hasty when stating everything's ok :-(

Indeed, vim's function executable("name") returns 1 for everything, 
also for not existing programs.

Looking at the sources I've found that:

1. vim (6.0.93) tests the existance of 'name' in os_unix.c 
   inside the function mch_can_exe with:

   sprintf((char *)buf, "which %s", name);
   ...
   retval = (*p != NUL && strstr((char *)p, "not found") == NULL);
   return retval;

2. which (which-1.4) returns, if the command wasn't found:
   fprintf (stderr, "no %s in %s\n", cmd, PATH);

Which one should be changed ?

Bernd

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-01 23:45 Strohhaecker, Bernd
  2001-11-02  0:58 ` Corinna Vinschen
@ 2001-11-11  8:26 ` Strohhaecker, Bernd
  1 sibling, 0 replies; 20+ messages in thread
From: Strohhaecker, Bernd @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

> -----Ursprüngliche Nachricht-----
> Von:	Corinna Vinschen [SMTP:cygwin@cygwin.com]
> Gesendet am:	Dienstag, 13. November 2001 14:01
> An:	cygwin@cygwin.com
> Betreff:	Re: Editing zipped files with VIM under cygwin
> 
> On Tue, Nov 13, 2001 at 12:03:19PM +0100, Strohhaecker, Bernd wrote:
> > let e = executable(name)
> > This fails on my (cygwin-)system for any program:
> > :echo executable("bash")
> > Rufe Shell auf, um "(which bash) >/tmp/v645258/1 2>&1" auszuführen
> > 
> > Datei "/tmp/v645258/1" kann nicht gelesen werden-1
> 
> Did you install the which package?  `which' is not a bash
> internal command.

Yes, I've installed latest/which/which-1.4.tar.gz

> > 2. 'bzip2 --version > xx' doesn't finish.
> 
> I can reproduce that but don't know why that happens, currently.
> 
> Corinna

> -----Ursprüngliche Nachricht-----
> Von:	Michael Schaap [SMTP:cygwin@mscha.com]
> Gesendet am:	Dienstag, 13. November 2001 14:35
> An:	cygwin@cygwin.com
> Betreff:	Re: Editing zipped files with VIM under cygwin
> 
> ...
> 
> As you can see, the --version flag doesn't stop bzip2 from trying to 
> compress standard input.
> Possible workarounds:
> 
> $bzip2 --version --help 2>qqq
> 
> $bzip2 --version </dev/null >/dev/null 2>qqq
> 
>   - Michael

Yes, thanks, taking a look at bzip2.c shows, that there's 
simply no exit-call after displaying the license.

Is the following patch reasonable ?

--
Bernd

$ diff -u bzip2.c.org bzip2.c
--- bzip2.c.org Tue Nov 13 14:43:09 2001
+++ bzip2.c     Tue Nov 13 14:44:20 2001
@@ -1632,6 +1632,7 @@
     "   \n",
     BZ2_bzlibVersion()
    );
+   exit(1);
 }


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Editing zipped files with VIM under cygwin
  2001-11-01 10:24 Strohhaecker, Bernd
  2001-11-01 10:35 ` Corinna Vinschen
@ 2001-11-11  8:26 ` Strohhaecker, Bernd
  1 sibling, 0 replies; 20+ messages in thread
From: Strohhaecker, Bernd @ 2001-11-11  8:26 UTC (permalink / raw)
  To: vim, cygwin

Hello,

I'm using a German NT 4 SR 5 with cygwin's:
cygwin 1.3.5, vim 6.0.93-1, bzip 1.0.1-6

While trying VIM autocommands with zipped files, the following
problems occured when using cygwin's vim:

VIM - Vi IMproved 6.0 (2001 Sep 26, compiled Nov  8 2001 23:30:08)
Inclusive der Korrekturen: 1-20, 22, 21, 23-93
Übersetzt von corinna@COMPAQ

BTW, I don't have these problems with vim/gvim compiled with MS VC++ 6.0

editing *.gz-files works, but in 1st call there's an error message:

...
Ausführung von BufRead Auto-Kommandos für "*.gz"
Autokommando call s:read("gzip -d")
Rufe Shell auf, um "(which gzip) >/tmp/v568240/0 2>&1" auszuführen

Fehler beim Ausführen von "function <SNR>11_read..<SNR>11_check":
Zeile    3:
Datei "/tmp/v568240/0" kann nicht gelesen werden
Rufe Shell auf, um "(gzip --version) >/tmp/v568240/1 2>&1" auszuführen
                           d /tmp/v568240/2.gz) >/tmp/v568240/3 2>&1"
auszuführe
n
Ausführung von BufEnter Auto-Kommandos für "*"
...

Editing *.bz2-files does not work, the 1st call shows:

...
Ausführung von BufRead Auto-Kommandos für "*.bz2"
Autokommando call s:read("bzip2 -d")
Rufe Shell auf, um "(which bzip2) >/tmp/v568240/6 2>&1" auszuführen

Fehler beim Ausführen von "function <SNR>11_read..<SNR>11_check":
Zeile    3:
Datei "/tmp/v568240/6" kann nicht gelesen werden
Rufe Shell auf, um "(bzip2 --version) >/tmp/v568240/7 2>&1" auszuführen

Zeile    5:
Datei "/tmp/v568240/7" kann nicht gelesen werden
...

"bzip2 --version >x 2>&1" seems to wait for an input/EOF ???

--
Bernd

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-01 10:35 ` Corinna Vinschen
@ 2001-11-11  8:26   ` Corinna Vinschen
  0 siblings, 0 replies; 20+ messages in thread
From: Corinna Vinschen @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

On Mon, Nov 12, 2001 at 02:55:33PM +0100, Strohhaecker, Bernd wrote:
> BTW, I don't have these problems with vim/gvim compiled with MS VC++ 6.0
> 
> editing *.gz-files works, but in 1st call there's an error message:
> 
> ...
> Ausführung von BufRead Auto-Kommandos für "*.gz"
> Autokommando call s:read("gzip -d")
> Rufe Shell auf, um "(which gzip) >/tmp/v568240/0 2>&1" auszuführen
> 
> Fehler beim Ausführen von "function <SNR>11_read..<SNR>11_check":
> Zeile    3:
> Datei "/tmp/v568240/0" kann nicht gelesen werden
> Rufe Shell auf, um "(gzip --version) >/tmp/v568240/1 2>&1" auszuführen
>                            d /tmp/v568240/2.gz) >/tmp/v568240/3 2>&1"
> auszuführe
> n
> Ausführung von BufEnter Auto-Kommandos für "*"
> ...
> 
> Editing *.bz2-files does not work, the 1st call shows:
> 
> ...
> Ausführung von BufRead Auto-Kommandos für "*.bz2"
> Autokommando call s:read("bzip2 -d")
> Rufe Shell auf, um "(which bzip2) >/tmp/v568240/6 2>&1" auszuführen
> 
> Fehler beim Ausführen von "function <SNR>11_read..<SNR>11_check":
> Zeile    3:
> Datei "/tmp/v568240/6" kann nicht gelesen werden
> Rufe Shell auf, um "(bzip2 --version) >/tmp/v568240/7 2>&1" auszuführen
> 
> Zeile    5:
> Datei "/tmp/v568240/7" kann nicht gelesen werden
> ...
> 
> "bzip2 --version >x 2>&1" seems to wait for an input/EOF ???

Dunno.  I've just checked it here in tty and notty mode and
I don't have that problem.  Reading both, gzipped and bzipped
files wors fine.  Are you using *gasp* cmd as shell?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
@ 2001-11-11  8:26 Strohhaecker, Bernd
  0 siblings, 0 replies; 20+ messages in thread
From: Strohhaecker, Bernd @ 2001-11-11  8:26 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

> -----Ursprüngliche Nachricht-----
> Von:	Corinna Vinschen [SMTP:cygwin@cygwin.com]
> Gesendet am:	Mittwoch, 14. November 2001 14:08
> 
> ...
> 
> Another guess:  You have $VIM set to a directory containing
> a native windows version of vim.  And there's a global vimrc
> file containining a `set shell=...' line.  Or $VIMRUNTIME.
> Or $VIMINIT.
> 
> Or did you check that you don't have a .exrc and  .vimrc
> file, containing different settings?
> 
Also no. My shell was certainly bash. I think I've had a general
problem with any part of my installation, which I couldn't find.
After de- and re-installing whole cygwin everything works. 
Even after restoring ~ with all my personal settings.

Also today I've absolutely no idea what was wrong.

Anyhow, I hope I didn't waste too much of your time.
And thanks a lot for your efforts,

Bernd

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-11  8:26 Strohhaecker, Bernd
@ 2001-11-11  8:26 ` Corinna Vinschen
  0 siblings, 0 replies; 20+ messages in thread
From: Corinna Vinschen @ 2001-11-11  8:26 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

On Wed, Nov 14, 2001 at 01:25:53PM +0100, Strohhaecker, Bernd wrote:
> > -----Ursprüngliche Nachricht-----
> > Von:	Corinna Vinschen [SMTP:cygwin@cygwin.com]
> > Gesendet am:	Dienstag, 13. November 2001 16:36
> > An:	cygwin@sources.redhat.com
> > Betreff:	Re: Editing zipped files with VIM under cygwin
> > 
> > ...
> > $ SHELL=cmd vim foo.gz
> >   Error detected while processing function <SNR>7_read..<SNR>7_check:
> >   line    3:
> >   Can't open file /tmp/v666361/0
> >   line    5:
> >   Can't open file /tmp/v666361/1
> > 
> > Does that look familiar?
> > 
> 
> That's indeed what I get, but unfortunately also with:
> $ SHELL=/bin/bash vim foo.gz
> 
> Nevertheless, thanks a lot.

Another guess:  You have $VIM set to a directory containing
a native windows version of vim.  And there's a global vimrc
file containining a `set shell=...' line.  Or $VIMRUNTIME.
Or $VIMINIT.

Or did you check that you don't have a .exrc and  .vimrc
file, containing different settings?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-01 23:45 Strohhaecker, Bernd
@ 2001-11-02  0:58 ` Corinna Vinschen
  2001-11-11  8:26   ` Corinna Vinschen
  2001-11-11  8:26 ` Strohhaecker, Bernd
  1 sibling, 1 reply; 20+ messages in thread
From: Corinna Vinschen @ 2001-11-02  0:58 UTC (permalink / raw)
  To: cygwin

On Tue, Nov 13, 2001 at 03:44:51PM +0100, Strohhaecker, Bernd wrote:
> Yes, I've installed latest/which/which-1.4.tar.gz

I just tried it by myself again, setting the environment variable
$SHELL to different values prior to starting vim:

$ SHELL=/bin/tcsh vim foo.gz		<-- worked

$ SHELL=/bin/bash vim foo.gz            <-- worked

$ SHELL=/bin/sh vim foo.gz		<-- worked

$ SHELL="" vim foo.gz
  Error detected while processing function <SNR>7_read..<SNR>7_check:
  line    3:
  E91: 'shell' option is empty
  Can't open file /tmp/v666347/0
  line    5:
  E91: 'shell' option is empty
  Can't open file /tmp/v666347/1

$ SHELL=cmd vim foo.gz
  Error detected while processing function <SNR>7_read..<SNR>7_check:
  line    3:
  Can't open file /tmp/v666361/0
  line    5:
  Can't open file /tmp/v666361/1

Does that look familiar?

> Is the following patch reasonable ?

Since that is a target independent problem, I assume you should
ask on the bzip mailing list.  But when the Cygwin bzip maintainer
is around, he wants to chime in here, perhaps.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
@ 2001-11-01 23:45 Strohhaecker, Bernd
  2001-11-02  0:58 ` Corinna Vinschen
  2001-11-11  8:26 ` Strohhaecker, Bernd
  0 siblings, 2 replies; 20+ messages in thread
From: Strohhaecker, Bernd @ 2001-11-01 23:45 UTC (permalink / raw)
  To: cygwin

> -----Ursprüngliche Nachricht-----
> Von:	Corinna Vinschen [SMTP:cygwin@cygwin.com]
> Gesendet am:	Dienstag, 13. November 2001 14:01
> An:	cygwin@cygwin.com
> Betreff:	Re: Editing zipped files with VIM under cygwin
> 
> On Tue, Nov 13, 2001 at 12:03:19PM +0100, Strohhaecker, Bernd wrote:
> > let e = executable(name)
> > This fails on my (cygwin-)system for any program:
> > :echo executable("bash")
> > Rufe Shell auf, um "(which bash) >/tmp/v645258/1 2>&1" auszuführen
> > 
> > Datei "/tmp/v645258/1" kann nicht gelesen werden-1
> 
> Did you install the which package?  `which' is not a bash
> internal command.

Yes, I've installed latest/which/which-1.4.tar.gz

> > 2. 'bzip2 --version > xx' doesn't finish.
> 
> I can reproduce that but don't know why that happens, currently.
> 
> Corinna

> -----Ursprüngliche Nachricht-----
> Von:	Michael Schaap [SMTP:cygwin@mscha.com]
> Gesendet am:	Dienstag, 13. November 2001 14:35
> An:	cygwin@cygwin.com
> Betreff:	Re: Editing zipped files with VIM under cygwin
> 
> ...
> 
> As you can see, the --version flag doesn't stop bzip2 from trying to 
> compress standard input.
> Possible workarounds:
> 
> $bzip2 --version --help 2>qqq
> 
> $bzip2 --version </dev/null >/dev/null 2>qqq
> 
>   - Michael

Yes, thanks, taking a look at bzip2.c shows, that there's 
simply no exit-call after displaying the license.

Is the following patch reasonable ?

--
Bernd

$ diff -u bzip2.c.org bzip2.c
--- bzip2.c.org Tue Nov 13 14:43:09 2001
+++ bzip2.c     Tue Nov 13 14:44:20 2001
@@ -1632,6 +1632,7 @@
     "   \n",
     BZ2_bzlibVersion()
    );
+   exit(1);
 }


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Editing zipped files with VIM under cygwin
  2001-11-01 10:24 Strohhaecker, Bernd
@ 2001-11-01 10:35 ` Corinna Vinschen
  2001-11-11  8:26   ` Corinna Vinschen
  2001-11-11  8:26 ` Strohhaecker, Bernd
  1 sibling, 1 reply; 20+ messages in thread
From: Corinna Vinschen @ 2001-11-01 10:35 UTC (permalink / raw)
  To: cygwin

On Mon, Nov 12, 2001 at 02:55:33PM +0100, Strohhaecker, Bernd wrote:
> BTW, I don't have these problems with vim/gvim compiled with MS VC++ 6.0
> 
> editing *.gz-files works, but in 1st call there's an error message:
> 
> ...
> Ausf\xFChrung von BufRead Auto-Kommandos f\xFCr "*.gz"
> Autokommando call s:read("gzip -d")
> Rufe Shell auf, um "(which gzip) >/tmp/v568240/0 2>&1" auszuf\xFChren
> 
> Fehler beim Ausf\xFChren von "function <SNR>11_read..<SNR>11_check":
> Zeile    3:
> Datei "/tmp/v568240/0" kann nicht gelesen werden
> Rufe Shell auf, um "(gzip --version) >/tmp/v568240/1 2>&1" auszuf\xFChren
>                            d /tmp/v568240/2.gz) >/tmp/v568240/3 2>&1"
> auszuf\xFChre
> n
> Ausf\xFChrung von BufEnter Auto-Kommandos f\xFCr "*"
> ...
> 
> Editing *.bz2-files does not work, the 1st call shows:
> 
> ...
> Ausf\xFChrung von BufRead Auto-Kommandos f\xFCr "*.bz2"
> Autokommando call s:read("bzip2 -d")
> Rufe Shell auf, um "(which bzip2) >/tmp/v568240/6 2>&1" auszuf\xFChren
> 
> Fehler beim Ausf\xFChren von "function <SNR>11_read..<SNR>11_check":
> Zeile    3:
> Datei "/tmp/v568240/6" kann nicht gelesen werden
> Rufe Shell auf, um "(bzip2 --version) >/tmp/v568240/7 2>&1" auszuf\xFChren
> 
> Zeile    5:
> Datei "/tmp/v568240/7" kann nicht gelesen werden
> ...
> 
> "bzip2 --version >x 2>&1" seems to wait for an input/EOF ???

Dunno.  I've just checked it here in tty and notty mode and
I don't have that problem.  Reading both, gzipped and bzipped
files wors fine.  Are you using *gasp* cmd as shell?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Editing zipped files with VIM under cygwin
@ 2001-11-01 10:24 Strohhaecker, Bernd
  2001-11-01 10:35 ` Corinna Vinschen
  2001-11-11  8:26 ` Strohhaecker, Bernd
  0 siblings, 2 replies; 20+ messages in thread
From: Strohhaecker, Bernd @ 2001-11-01 10:24 UTC (permalink / raw)
  To: vim, cygwin

Hello,

I'm using a German NT 4 SR 5 with cygwin's:
cygwin 1.3.5, vim 6.0.93-1, bzip 1.0.1-6

While trying VIM autocommands with zipped files, the following
problems occured when using cygwin's vim:

VIM - Vi IMproved 6.0 (2001 Sep 26, compiled Nov  8 2001 23:30:08)
Inclusive der Korrekturen: 1-20, 22, 21, 23-93
Übersetzt von corinna@COMPAQ

BTW, I don't have these problems with vim/gvim compiled with MS VC++ 6.0

editing *.gz-files works, but in 1st call there's an error message:

...
Ausführung von BufRead Auto-Kommandos für "*.gz"
Autokommando call s:read("gzip -d")
Rufe Shell auf, um "(which gzip) >/tmp/v568240/0 2>&1" auszuführen

Fehler beim Ausführen von "function <SNR>11_read..<SNR>11_check":
Zeile    3:
Datei "/tmp/v568240/0" kann nicht gelesen werden
Rufe Shell auf, um "(gzip --version) >/tmp/v568240/1 2>&1" auszuführen
                           d /tmp/v568240/2.gz) >/tmp/v568240/3 2>&1"
auszuführe
n
Ausführung von BufEnter Auto-Kommandos für "*"
...

Editing *.bz2-files does not work, the 1st call shows:

...
Ausführung von BufRead Auto-Kommandos für "*.bz2"
Autokommando call s:read("bzip2 -d")
Rufe Shell auf, um "(which bzip2) >/tmp/v568240/6 2>&1" auszuführen

Fehler beim Ausführen von "function <SNR>11_read..<SNR>11_check":
Zeile    3:
Datei "/tmp/v568240/6" kann nicht gelesen werden
Rufe Shell auf, um "(bzip2 --version) >/tmp/v568240/7 2>&1" auszuführen

Zeile    5:
Datei "/tmp/v568240/7" kann nicht gelesen werden
...

"bzip2 --version >x 2>&1" seems to wait for an input/EOF ???

--
Bernd

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2001-11-15 11:58 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-01 20:30 Editing zipped files with VIM under cygwin Strohhaecker, Bernd
2001-11-01 21:14 ` Corinna Vinschen
2001-11-01 21:24   ` Michael Schaap
2001-11-11  8:26     ` Michael Schaap
2001-11-11  8:26   ` Corinna Vinschen
2001-11-11  8:26 ` Strohhaecker, Bernd
  -- strict thread matches above, loose matches on Subject: below --
2001-11-11  8:26 Strohhaecker, Bernd
2001-11-11  8:26 ` Corinna Vinschen
2001-11-11  8:26   ` Corinna Vinschen
2001-11-11  8:26 Strohhaecker, Bernd
2001-11-11  8:26 Strohhaecker, Bernd
2001-11-11  8:26 ` Corinna Vinschen
2001-11-01 23:45 Strohhaecker, Bernd
2001-11-02  0:58 ` Corinna Vinschen
2001-11-11  8:26   ` Corinna Vinschen
2001-11-11  8:26 ` Strohhaecker, Bernd
2001-11-01 10:24 Strohhaecker, Bernd
2001-11-01 10:35 ` Corinna Vinschen
2001-11-11  8:26   ` Corinna Vinschen
2001-11-11  8:26 ` Strohhaecker, Bernd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).