Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 26 Feb 2003 16:01:40 -0500
From: Ajay Simha <asimha@cisco.com>
To: cygwin@cygwin.com
Cc: Ajay Simha <asimha@cisco.com>
Subject: Re: cygstart, mutt or mailcap?
Message-ID: <20030226210140.GC2716@cisco.com>
References: <20030226201613.GB2716@cisco.com> <Pine.GSO.4.44.0302261535020.8104-100000@slinky.cs.nyu.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.GSO.4.44.0302261535020.8104-100000@slinky.cs.nyu.edu>
User-Agent: Mutt/1.4i

..snip....
> > > Ajay,
> > >
> > > Does it fail in the same way if you use the rule I proposed?  Does
> > > /tmp/blah.doc remain behind?  What is the timestamp on it?  Can you
> > > compare it to the saved version (which does work)?
> > >
> > > It makes a lot of sense, with the rule I proposed, that the document would
> > > get corrupted if you try to open a second Word doc -- since I'm using a
> > > constant filename, the second Word doc overwrites the first...  I assume
> > > it doesn't actually get corrupted on any other occasion with that rule...
> > >
> > > So here are a couple of other proposals for the .doc rule:
> > >
> > > Application/MSWORD;      cp %s /tmp/mutt-%s.doc && cygstart /tmp/mutt-%s.doc; copiousoutput;
> >
> > BTW the above line in mailcap stops after the copy to /tmp. Cygstart never runs.
> >
> > -ajay
> > >
> > > This should make sure the filenames are distinct for every Word document
> > > you review...
> > >
> > > Application/MSWORD;      cygstart %s && sleep 15; copiousoutput;
> > >
> > > This should give Word enough time to start...
> > >
> > > Let me know if either of them works.
> > >       Igor
> 
> Hmm, I may be a bit confused about the .mailcap format.  You may need to
> quote the '&&'.  You may also need to invoke the shell to process it, e.g.,

tried both same result. However, I had tried to wrap this into a shell where I copied the
file to a different filename and launched it, I seemed to have the same result.

-ajay
> 
> Application/MSWORD;      /bin/sh -c "cp %s /tmp/mutt-%s.doc && cygstart /tmp/mutt-%s.doc"; copiousoutput;
> 
> and
> 
> Application/MSWORD;      /bin/sh -c "cygstart %s && sleep 15"; copiousoutput;
> 
> The idea is to run 2 commands in sequence.
> 	Igor
> -- 
> 				http://cs.nyu.edu/~pechtcha/
>       |\      _,,,---,,_		pechtcha@cs.nyu.edu
> ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
>      |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
>     '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
> 
> Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
>   -- /usr/games/fortune
> 

--
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/

