On Mon, Dec 05, 2022 at 04:12:01PM -0800, Kevin J. McCarthy wrote:
set muttlisp_inline_eval

bind index j (if (equal $sidebar_visible "yes")  \
                'sidebar-next'                  \
                'next-undeleted')

I realized after I sent that you might be wanting to dynamically determine if the sidebar is visible. The above just affects what is bound to 'j' when evaluated.

To do that, you could try a macro:

macro index j '<enter-command>run (if (equal $sidebar_visible "yes")  \
                 "exec sidebar-next"                 \
                 "exec next-undeleted")<enter>'

It's a bit less efficient, so if that's a concern, you could just use a macro to toggle $sidebar_visible and at the same time source a file with the special "sidebar toggling" bind commands.

--
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