[PATCH] emacs: split-window-sensibly in tree mode with open message
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu May 21 14:56:46 PDT 2020
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20200521/71f4bec3/attachment.sig>
More information about the notmuch
mailing list