<<< Date Index >>>     <<< Thread Index >>>

Re: mutt compose error?



On Wed, Dec 03, 2008 at 10:53:35AM -0600, David Champion wrote:
> > I recently updated to the latest mutt source, and the behavior has  
> > changed in an annoying way. When I compose messages now, mutt *always*  
> > thinks that my editor has returned a non-zero exit code (specifically:  
> > 1). I use vim, and as far as I can tell, it always exits with a 0 exit  
> > code.
> 
> FWIW, I often get this using /usr/bin/vi on opensolaris.  It's not
> always (it didn't happen with this message, for example) but it does
> happen quite often.  I've been ignoring it, but it is somewhat annoying.

I remember reading a thread somewhere at some unremembered past time,
discussing that some versions of vi exit with a non-zero exit code any
time some error occured during the editing session; e.g. if you tried
to write to a file that you didn't have permissions to write to, etc.
As is increasingly the case these days, my memory of the specifics is
rather foggy...  I think the thread suggested that such things as
mundane as searching for a particular pattern, and failing to find it,
would also result in a non-zero exit code.  Very lame, Milhouse.

Whether or not that is the issue here, one suggestion would be to
write a wrapper script, called say, myvim, like so:

  #!/bin/sh
  vim "$@"
  exit 0

Then set mutt to use that as your editor.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.

Attachment: pgpT7ZBCZBrK5.pgp
Description: PGP signature