On Sat 2020-05-02 20:11:09 -0400, Radu Butoi wrote:
> This uses the standard Emacs function `split-window-sensibly` to split a
> window horizontally or vertically depending on space when opening a
> message in tree view. By default, split-width-threshold is 160 columns
> (and -height- is nil), so screens wider than 160 will be split
> horizontally.
>
> This is based on an older proposal [1] which manually did the
> calculation of width. The main issues there were (1) lack of
> configurability and (2) lack of testing. I don't have an answer for
> testing, but this allows users to configure two thresholds using
> built-in variables, an improvement.
I like this proposal, and the simplification that it gives to the
notmuch-emacs codebase. However, this thread is the first place i've
learned about split-window-sensibly, so i'm probably not eligible to
really judge the merits here.
As far as testing goes, a test would be nice -- is this something you
could add to test/T460-emacs-tree.sh ? Testing UI/UX issues is always
pretty tough though, and it's not clear to me that we're actually
already testing the existing "(/ (window-height) 4)" business anyway.
--dkg