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

Re: simulating "Aborted unmodified message" condition



On Mon, Sep 11, 2006 at 03:20:18PM -0700, William Yardley wrote:
> On Mon, Sep 11, 2006 at 03:06:56PM -0700, Gary Johnson wrote:
> > On 2006-09-11, William Yardley <mutt-users@xxxxxxxxxxxxxxxxx> wrote:
> > > On Mon, Sep 11, 2006 at 02:38:31PM -0700, Gary Johnson wrote:
> > > > On 2006-09-11, William Yardley <mutt-users@xxxxxxxxxxxxxxxxx> wrote:

> > > > > I was wondering if there's an easy way to simulate the
> > > > > condition for "Aborted unmodified message" within a shell or
> > > > > perl script. 
 
> > > >     :set editor="true"
> > > > 
> > > > Is that what you had in mind?

> > > No, because I already have to set editor to be my script. I want
> > > to make it fail after opening the message with my "editor".
  
> > I don't really understand what you're trying to do.  If you want
> > that message, then the modification time of the message file when
> > your script ends needs to be the same as the modification time when
> > mutt wrote the file.  So your script needs to either not modify the
> > file, or to restore the original modification time.
 
> Well I'm not modifying the file in this case, though I do have
> $edit_headers set - maybe that's what I need to change.

Maybe a better way of explaining...

I'm trying to do the equivalent of what :q! does in vim within a script.

So what would be most helpful would be a simple explanation of how
message editing exactly works in mutt - the editor is invoked with a
temporary filename passed to it by mutt - how does mutt know when the
editor has written to the file or quit without writing to it?

w