On Mon, Aug 24, 2026 at 09:30:35PM -0000, Jeffery Small wrote:
Xubuntu 24.04.4
Mutt: 2.3.1

In the index, the "$" key is associated with "sync-mailbox".

I have a shell script called "mm" that forces the mailbox icon to sync
immediately with the master mailbox contents -- i.e., indicate whether
there is or isn't new mail.  I can create a macro that calls this script
but what I want to do is have "$" sync the mailbox and also call the
external script in one step. I have not been able to create either an index
binding or an index macro that combines these two steps.  Am I missing
something obvious or is it not possible to perform this combo action with a
single key press?

There are a few checks mutt makes that will flush the macro buffer on error. For example, in the sync case, if you try to sync a mailbox with no messages in it or if the mailbox is read only. It's possible that is interfering with the whole macro running.

But in the normal case, something like this should work:
  macro index $ "<sync-mailbox><shell-escape>~/bin/mm<enter>"

You could try appending a mutt echo command to give yourself visual confirmation it ran to the end:
  macro index $ \
  "<sync-mailbox><shell-escape>~/bin/mm<enter><enter-command>echo 'mm 
ran'<enter>"

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to