Neomutt: Show index and body of emails in a horizontal split (side-by-side)

Created on 9 Jun 2018  ·  4Comments  ·  Source: neomutt/neomutt

What does NeoMutt currently do?

This feature request relates to this question on StackExchange, which I will summarise as follows. NeoMutt is currently capable of splitting the email index and body in vertical panes, i.e. the index on top of the body. For example, in ~/.muttrc

set pager_index_lines   = 10    # number of index lines to show
set pager_context       = 3     # number of context lines to show

This looks as follows:

  62 r   Jul 22 Sender 1        (783K) Subject 1
  63     Sep 03 Sender 2        (2.9K) Subject 2
  64 r   Sep 17 Sender 3        (2.0K) Subject 3
  65 r   Sep 17 Sender 4        (4.9K) Subject 4
  66 r   Sep 18 Sender 5        (835K) Subject 5
  67     Sep 21 Sender 6        (2.3K) Subject 6
  68     Sep 21 Sender 7        (136K) Subject 7
  69     Sep 24 Sender 8        ( 37K) Subject 8
  70 r   Sep 26 Sender 9        (3.8K) Subject 9
───────────────────[ 71 messages ]───────────────────────────────────────────────────────
Date: Thu, 17 Sep 2015 09:19:22 +0000
From: Sender 3 <[email protected]>
To: Me <[email protected]>
Subject: Subject 3
user-agent: foo/bar

Body here. Luctus inceptos tortor parturient bibendum diam. Posuere diam, pharetra
purus nibh posuere, mi feugiat arcu, ve. Dis nostra inceptos, urna, et habitasse a
purus in est ante. Nisi eni lorem. Nonummy non. Leo, dictum venenatis. Mollis.
Dignissim est. Potenti diam et convallis proin aptent ipsum adipiscing dapibus.

What would you like to be able to do?

Screens often have excess horizontal room, and limited vertical space. For emails with large blocks of text, I sometimes find myself narrowing the width so my eyes can more easily follow the lines, even if I am limited in vertical height. Hence, it'd be neat if these panels could sit horizontally, side-by-side, utilising the width of the screen.

62 r   Jul 22 Sender 1   (783K) Subject 1 | Date: Thu, 17 Sep 2015 09:19:22 +0000
63     Sep 03 Sender 2   (2.9K) Subject 2 | From: Sender 3 <[email protected]>
64 r   Sep 17 Sender 3   (2.0K) Subject 3 | To: Me <[email protected]>
65 r   Sep 17 Sender 4   (4.9K) Subject 4 | Subject: Subject 3
66 r   Sep 18 Sender 5   (835K) Subject 5 | user-agent: foo/bar
67     Sep 21 Sender 6   (2.3K) Subject 6 |
68     Sep 21 Sender 7   (136K) Subject 7 | Body here. Luctus inceptos tortor parturient bibendum diam. Posuere diam, pharetra
69     Sep 24 Sender 8   ( 37K) Subject 8 | purus nibh posuere, mi feugiat arcu, ve. Dis nostra inceptos, urna, et habitasse a
70 r   Sep 26 Sender 9   (3.8K) Subject 9 | purus in est ante. Nisi eni lorem. Nonummy non. Leo, dictum venenatis. Mollis.

What needs to change in NeoMutt?

It would be excellent if NeoMutt had an option to allow this.

hard enhancement

Most helpful comment

Yes, that would be nice.
Add to this a hook tied into SIGWINCH (the signal that occurs when the window-size changes).

window-hook (w<80)  set sidebar_visible=no  widescreen=no
window-hook (w<121) set sidebar_visible=yes widescreen=no
window-hook (w>120) set sidebar_visible=yes widescreen=yes

Currently, the 'windows' are non-overlapping regions of the screen.
They are all managed centrally in mutt_window_reflow().
This _works_, but it's not very maintainable.

The 'hack-ish' solution is to mess with this function.
(then the index and pager should draw where they're told to)

The elegant solution is to create a set of nested windows (this is how most GUIs layout their windows).
This is the direction I'd like to go. It would simplify the code and also make the eveny handling easier.
(but it's a lot of work)

Would anyone like to volunteer?

All 4 comments

Yes, that would be nice.
Add to this a hook tied into SIGWINCH (the signal that occurs when the window-size changes).

window-hook (w<80)  set sidebar_visible=no  widescreen=no
window-hook (w<121) set sidebar_visible=yes widescreen=no
window-hook (w>120) set sidebar_visible=yes widescreen=yes

Currently, the 'windows' are non-overlapping regions of the screen.
They are all managed centrally in mutt_window_reflow().
This _works_, but it's not very maintainable.

The 'hack-ish' solution is to mess with this function.
(then the index and pager should draw where they're told to)

The elegant solution is to create a set of nested windows (this is how most GUIs layout their windows).
This is the direction I'd like to go. It would simplify the code and also make the eveny handling easier.
(but it's a lot of work)

Would anyone like to volunteer?

Moving this to the long-term wish list.

Thanks @flatcap. I had a look around, but couldn't find it. Where is the long-term wish list? Is that it here?

I decided to use the difficulty:hard for the "blue sky" ideas.
(things we'd love to do, but just don't have time)

There's also my mega-list of all ideas -- unsorted and not pretty.

Finally, there's the Wiki which I'm just using as a staging area for the Help Wanted issues.

Was this page helpful?
0 / 5 - 0 ratings