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

Re: Q: Better list of mailboxes?



On Tue, Jul 10, 2007 at 02:51:30PM +0200, Kai Grossjohann wrote:
> I have added all my (important) mail folders to the mailboxes list, and
> I am now very fond of y to browse them.  Some small features are
> missing, though, so I thought I'd ask here for ideas:
> 
> [...]
> 
>   - How to show the total number of messages / the number of unread
>     messages in each mailbox?
> 
>   - How to elide information from each line, such as the permissions and
>     ownerships of the directories?

I've now adopted an approach using the sidebar patch.  It (almost) gives
me the right feeling, but it seems to be somewhat fragile.  Please do
tell me what you think and keep the suggestions coming :-).

In ~/.mutt/muttrc I have the following:

| # Sidebar
| set sidebar_width=40
| color sidebar_new red default
| bind index B bounce-message
| bind pager B bounce-message
| 
| # This stanza for Gnus-like interface
| macro index b '<enter-command>source ~/.mutt/sidebar-on<enter>'
| macro pager b '<enter-command>source ~/.mutt/sidebar-on<enter>'

And ~/.mutt/sidebar-on looks like this:

| set sidebar_visible
| bind index j sidebar-next
| bind index k sidebar-prev
| macro index b '<enter-command>source ~/.mutt/sidebar-off<enter>'
| macro index <space> '<enter-command>source ~/.mutt/sidebar-off<enter>'
| macro index <return> '<enter-command>source ~/.mutt/sidebar-off<enter>'

So I can navigate the groups with j/k and choose one with space or
return or b.  Finally, ~/.mutt/sidebar-off looks like this:

| exec sidebar-open
| bind index j next-undeleted
| bind index k previous-undeleted
| bind index <space> display-message
| macro index b '<enter-command>source ~/.mutt/sidebar-on<enter>'
| unset sidebar_visible

Functionality-wise, it would feel even more like Gnus with the following
changes:

  - On startup, show the sidebar.
  - In the index, q shows the sidebar.
  - In the pager, q shows the index.
  - In the sidebar, q quits.

Conceptually, that would achieve a three-level hierarchy: (1) list of
folders, (2) list of messages, (3) list of lines in a message.  Mutt
would start in (1), and <space> always goes from level N to level N+1,
and 'q' always goes from level N+1 back to level N.  And on every level,
j/k navigate down/up.

I don't dare to implement that just yet, though.

Kai