Automate standard replies

Cameron Simpson cs at cskk.id.au
Sun Mar 21 21:03:29 UTC 2021


On 21Mar2021 12:15, Francesco Ariis <fa-ml at ariis.it> wrote:
>    how can I automate typing standard replies?
>
>Example: say I want to type «lgtm» (top post) as a reply to a message,
>as now I have to:
>- press `r` (reply)
>- press `i` (my editor is Vim)
>- «lgtm»
>- then <C-[> (exit insert mode)
>- ZZ         (exit/save file)
>- finally `y` to send
>
>Is there a way to one-button this? I thought about a macro,
>but I suspect that wouldn’t work, since I am firing up an
>editor.
>Thanks in advance

If you're automating this, you don't want an editor do you?

Use <pipe-message> to send the raw message to a script of your own. Some 
random macros of my own:

    #macro index,pager ,x "<pipe-message>mailunpack -d ~/"
    macro index,pager V "<pipe-message>mail-open-attachments<enter>" "extract attachments to temp dir and open"
    macro index,pager H "<pipe-message>unhdr|a2urls|sort -u|less" "list URLs"

BTW, I've got "set autoedit=yes" and "set edit_headers=yes", drops you 
straight into an editor on reply etc.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Mutt-users mailing list