On 23Oct2014 12:54, Josh Hoff <randomendu...@gmail.com> wrote:
When trying to write macros for collapsing and deleting a thread I ran
into an issue. If I'm on the index page, I have no way of knowing if a
thread is collapsed or not (in a macro). It'd be useful to have a
`collapse-thread` command, which would have no effect on an already
collapsed thread. That way it doesn't matter that I can't conditionally
collapse threads.
I think it'd be useful for all the `toggle-` commands to have associated
on/off versions of their commands, to work around the lack of
conditionals in commands. Here are some I found in the manual:
toggle-new
toggle-write
toggle-quoted
toggle-unlink
toggle-mailboxes
toggle-subscribed
collapse-thread
(change to toggle-thread and add collapse/uncollapse-thread)
collapse-all
(change to toggle-all and add collapse/uncollapse-all)
There might be others, but I'm not sure. Some of these might not seem to
be sensible to have collapse/uncollapse versions, but I bet there's some
circumstance where someone would find a use for them. Thanks for your
consideration and the great mail client!
+1
You're not alone in wanting non-toggle version of the toggle commands.
Toggling's ok for purely interactive eyeball on the affected things use. But it
is quite frustrating if you're trying to program.
Example, my "collapse thread" macro:
macro index '{' ':set my_oldcollapse_unread=$collapse_unread<enter>:set
collapse_unread=yes<enter><collapse-thread>:set
collapse_unread=$my_oldcollapse_unread<enter>' 'Collapse thread.'
And my "uncollapse thread" macro:
macro index '}' "{" '(Un)collapse thread.'
Seems a little simplistic, eh?
Cheers,
Cameron Simpson <c...@zip.com.au>
I fit in my suit, my suit fits in my suitcase, hence i fit in my suitcase.
- Cees Keyer <c...@htsa.hva.nl>