Kevin, thanks a lot!
This was exactly what I was looking for.

> The muttlisp can't be inside quotes, so I removed the outer single
> quotes.
Is this only true for "bind" lines?
Because in the macro the muttlisp code is inside quotes:
> 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.
Good idea but how would I set the key bindings depending on the visibility
state of the sidebar?  I'd need some kind of if-then-else because the
toggle macro doesn't "know" the state.  Or can you think of a smart method
to do that?

My first guess would have been like this:
macro index ^ "\
<enter-command>toggle sidebar_visible<enter>\
<enter-command>bind index,pager j next-undeleted<enter>\    <---- this line 
depends
" \
"hide mutt sidebar and set key bindings"

Thanks,
 Andy

-- 
 If it's true that we are here to help others, then what
 exactly are the OTHERS here for?

Reply via email to