Burton Samograd wrote:
> Ah, i thought that might be the problem.  Would there be any way of
> actually doing what i'm trying to do?  Maybe setting up a macro and
> then calling that from send-hook?

You could try to use the push command to simulate keystrokes, but that
won't be executed until the next time mutt asks for input from the user,
not the point at which the send-hook is executed.  For instance, if you
have "set autoedit edit_hdrs", the macro you want to call would not be
executed until *after* you edited the message with the external editor,
when you have returned to the compose menu.  There is no way to get the
command to execute at the time the send-hook is executed.

Well, that's not technically true.  If you have a backtic command in a
send-hook, it does get executed.  You could make a script which emits a
harmless muttrc command (like "unignore nonexistent") and use something
like:

        send-hook . '`side_effect`'

where side_effect is a script like:

        #!/bin/sh

        # run a command, redirect output to /dev/null
        ... > /dev/null 2>&1

        # return dummy command to Mutt for execution
        echo unignore nonexistent

A bit of a hack, but it will allow you do what you want.

Reply via email to