Macros sending unwanted keypresses

Cameron Simpson cs at cskk.id.au
Thu Feb 23 00:11:16 UTC 2023


On 22Feb2023 21:53, Francesco Ariis <fa-ml at ariis.it> wrote:
>    I have this macro I use inside mutt to download new messages from
>various mailboxes.
>
>    macro generic \e0 '<shell-escape>bash -ic "k echo Checking...; agm; agmnu; agmsoc; agmpec; echo over"<enter><check-new>'
>
>When I call it in `browser` menu, everything is fine.
>
>But when I call it in the `index` something strange happens; once the
>bash command has finished running I find myself in vim (my $EDITOR) as if
>I had pressed ‘e’ (“edit the raw message).

The <check-new> function doesn't work in the index menu. From section 
13.2 of the manual:

     Outside the index menu the directory browser supports checking for 
     new mail using the <check-new> function which is unbound by default.

I'm not sure what's actually going on for you specificly.

I know I've got a bunch of core macros and shims for this kind of 
context dependent functionality, eg this disabled pair:

     #macro index,pager ,x "<pipe-message>mailunpack -d ~/"
     #macro attach ,x q,x

or this:

     macro index ,D ":set auto_tag=no<enter><untag-pattern>~T<enter><tag-pattern>~=<enter><tag-prefix-cond><delete-message><untag-pattern>~T<enter><end-cond>:set auto_tag=yes<enter>"
     macro pager ,D "q,D"

or this:

     macro pager ";" "q;"

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


More information about the Mutt-users mailing list