Re: emacs: Split wide window vertically for tree mode message pane

Subject: Re: emacs: Split wide window vertically for tree mode message pane

Date: Thu, 10 May 2018 23:46:17 +0300

To: David Bremner, Prof Jayanth R Varma, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Wed, May 09 2018, David Bremner wrote:

> Prof Jayanth R Varma <jrvarma@gmail.com> writes:
>
>> This patch modifies the function notmuch-tree-show-message-in in 
>> notmuch-tree.el to split the window vertically while creating a 
>> message pane in tree-mode if the window is wider than 160 (so that 
>> after splitting, the message pane can show the standard 76 
>> character plain text email lines without wrapping).
>
> First, I'm sorry to take so long to review this.  A few comments.
>
> 1) I'm reluctant to add new features to notmuch without corresponding
>    tests. Currently all of our emacs tests use a standard terminal width
>    (I think 80). Perhaps Tomi knows how hard it would be to override for
>    a single test.

That would be pretty simple; we'd add variable for colums to be set before
test... buf for this particular case I don't know how there could be any
sensible test done 

> 2) I noticed that the horizontal splitting leads to truncation of tag
>    display. So I think not everyone will want this (it would be pretty
>    frustrating to widen the emacs frame to see a full tag list, just to
>    have it truncated). One option would be to control the splitting by a
>    variable specifying the minimum width at which to switch to horizonal
>    splitting.

I did some (outside of notmuch) experimentation

in emacs 25.3 

truncate-partial-width-windows is a variable defined in ‘C source code’.
Its value is 50

when I split 80-char emacs window horizontally, lines were truncated, but
when widening it enough (presumably over 101) the lines (started to) wrap
(again). Did this truncation of tag display happened (anyway?)

> 3) The commit message / NEWS talks about splitting the window
>    vertically, but that seems contrary to the emacs terminology (as
>    evinced by the source code in the patch)

That's bad ;/

Tomi
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: