On Tue Oct27'26 09:40:38AM, Tim Chase wrote:
> From: Tim Chase <[email protected]>
> Date: Tue, 27 Oct 2026 09:40:38 -0500
> To: Mutt list <[email protected]>
> Subject: Re: how to mark all unread messages read in mutt?
> 
> On 2026-10-27 07:37, Mutt list wrote:
> > On Tue, 2026/10/27 at 00:06:46 -0500, Mutt User List wrote:
> > > Thank you! And what would I do if I wanted Ctrl-Alt-z? So a
> > > three-key combination, with Ctrl-Alt-z all pressed together to
> > > activate the operation?
> > 
> > Ctrl-z in linux will suspend the current application in a shell, so that
> > combination is out. I tried the following combinations instead
> > macro index <esc><C-.>
> > macro index <C-A-.>
> > macro index <C-\e-.>
> > macro index <\e-C-.>
> > and neither of them worked (as I had expected).
> 
> Typically the "alt is being held down" is transmitted by prefixing a
> character(-sequence) with Esc (0x1B), and the control character gets
> transmitted by effectively masking off the top 0x1F bits ("& !0x1F") of
> letters.  So for ctrl+alt+z, I'd expect it so send
> 
>   <esc><ctrl-z>
> 
> but if the ^Z suspends mutt, then Sirius correctly establishes
> that you'd have to use a different key.  But you also can't send
> control+period because it's not a letter.
> 
> So you'd likely have to try
> 
>   control+alt+{letter}
> 
> Where {letter} isn't Z because ^Z suspends, or possibly C because ^C is
> a break, G because ^G is sometimes a cancel, or S/Q because ^S/^Q are
> flow-control characters that your terminal might intercept).
> 
> At least that's where I'd start with testing :-)

Thank you! I tried a few combinations and failed, so I finally made peace with 
<esc>r which is a key combination I do not expect to be using all that much 
anyway. So, I ended up with:

macro index <esc>r "<tag-pattern>~U<enter><tag-prefix><clear-flag>n" 

Btw, I wanted to also have a macro to delete all unread emails (such as from a 
high-volume mailing list that I have not seen for a few days). I guess I should 
change the "clear-flag" above. 

Is this the correct macro to tie alt-d to this operation?

macro index <esc>d "<tag-pattern>~U<enter><tag-prefix><d>n" 

Many thanks again, and best wishes,
Ranjan


Reply via email to