<<< Date Index >>>     <<< Thread Index >>>

Re: Collapse all threads except the one you are on



On Fri, Oct 24, 2003 at 10:43:32AM -0400, David Fishburn wrote:
> So basically, I need to do something like this (can someone help me with
> the syntax):
> macro ,C collapse-thread | next-unread | collapse-thread
> How do you issue multiple commands in a macro?

You just run them together..
macro index ,C "<collapse-thread><next-unread><collapse-thread>"
As far as I know, this doesn't work with plain command names as you
used above.  One caveat to using <foo> is that if "foo" isn't defined
in the current map, the macro ends up being "<" "f" "o" "o" ">" (which
might end up being a scroll up, some weird stuff, and a scroll down,
depending on your keybindings)

> There does not appear to be a command to uncollapse a thread, only a
> command to toggle whether the thread is collapsed or not.  If my macro
> above is going to work, I need to be able to close or open (don't
> toggle).

This is one of the points on which I am disappointed with mutt's
macros (if you want a list, ask me, and I'll compile it and post
separately.) However, if you can assume that all your threads will be
collapsed except the one containing the current message, then your
macro should always work as expected.

Where you'll run into problems is if you use the ,C macro to jump into
a thread, then move off the thread with plain old "next-entry" or
something, and use ,C again.  If you've moved to a collapsed thread
head, you could potentially end up with 3 threads uncollapsed.
Fortunately none of the commands in the ,C macro are destructive, so
you could always clean up your thread-collapsedness by hand.

Another option would be to use <collapse-all> in place of the first
<collapse-thread>.  That way, unless you used ,C on a 100% collapsed
view, it would collapse everything before moving to the next unread
message.

Arrivederci,
 Allister

-- 
Allister MacLeod <amacleod@xxxxxxxx>
 Elen síla lúmenn'omentielvo.