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

Re: [ANNOUNCE] mutt 1.5.16 released



Vincent Lefevre typed (on Mon, Jun 11, 2007 at 03:13:44AM +0200):
| On 2007-06-10 16:27:39 -0400, Jean-Pierre Radley wrote:
| > Brendan Cully typed (on Sat, Jun 09, 2007 at 09:03:59PM -0700):
| > | It's that time again. 
| > 
| > I think line 165 of curs_lib.c, which reads
| > 
| >         if (mutt_system (cmd))
| > 
| > should instead be:
| > 
| >          if (mutt_system (cmd) == -1)
| 
| No, it is important that if the editor returns with a nonzero exit
| status, one gets an error.
| 
| > Otherwise, after composing a message and exiting the editor, one
| > gets an error:
| > 
| >         Error running "/usr/bin/vi '/usr/tmp/mutt-jpradley-0-23020-1'"!
| 
| This is a problem with your editor.

Under Posix 2004 rules, I'm not sure what exit status vi will present,
but the vi on all variants of Unix from SCO, as well as the vi on
Solaris 10, adhere to the Posix 2001 standard, which includes in the
clause 'consequences of errors' "... or when an error is detected that
is a consequence of data (not) present in the file, ..." and "ex/vi
shall terminate with a nonzero exit status."

So on my Unix, or on Solaris 10, one will increment vi's exit status for
each unsuccessful command, like failed pattern searches, out-of-bound
line-moves, writes to an inexistent directory, etc.

What I suggested is to revert this change:

        2007-04-02 17:56 -0700  Brendan Cully  <brendan@xxxxxxxxxx>
        (15f8a55220a7)
         .....
        * curs_lib.c: Make mutt_edit_file display error if editor
        return is non-zero. (closes #1638)

-- 
JP
        ==> http://www.frappr.com/cusm <==