On Fri, Jan 07, 2000 at 01:31:03PM -0600, Aaron Schrab wrote:
> At 11:25 +0200 07 Jan 2000, Mikko Hänninen <[EMAIL PROTECTED]> wrote:
> > Timothy Ball <[EMAIL PROTECTED]> wrote on Thu, 06 Jan 2000:
> > > Is there a way to give vim a single keystroke to at once both save and
> > > send a letter in mutt?
> > 
> > On the theoretical level, Mutt can't get any information back from the
> > editor beyond the exit code and the contents of the saved file, so there
> > is no way from the editor to send back information about what action
> > should be done next (unless exit codes are used for this, which might
> 
> Not true.  Mutt could also look at the permission bits of the temp file.
> For example, it could be coded to send the message immediately if the
> sticky bit was set.  Then a macro could be used in the editor to set
> that bit and exit.  For example, for vim:
> 
> map ,x :r!chmod +t %^M:wq!^M
> 
> Note, I'm just saying that this could be done, not that it should.  I
> don't have a problem with having to explicitly send the message from the
> compose menu.

Well, if it's just about passing info, one could always set up an
empty side-band file. E.g., if the editor is passed
/tmp/mutt-host-num-num, create an empty /tmp/mutt-host-num-num.ctl. If 
it's used by the editor, great, if not, no big deal. Lots of room for
expansion, no gratuitous double meanings.

That said, I don't advocate such a scheme. The editor's job is to edit 
the message, not dictate all sorts of things to mutt. In the
particular case above, I suspect there is (or could be without much
trouble) a quadoption to send immediately. I'd want "no" for myself,
but it's way simpler than having the editor need to know about talking 
to mutt.

-- 
- Jeff Abrahamson
  [EMAIL PROTECTED]
  610/270-4845

Reply via email to