Daniel Kahn Gillmor <d...@fifthhorseman.net> writes:

> 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.

For some historical context, split-window-sensibly was introduced in 2009 [1] 
and the (split-window-vertically (/ (window-height) 4)) code in 2012 [2]. The 
two functions seem pretty interchangeable.

> 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.

I did look at that file, and there is no tests for the current split 
functionality. All of the tests use the test-output function which outputs the 
contents of a buffer -- we need the whole frame. This might need to be done at 
a layer above Emacs and may complicate the test. I took a "screenshot" by 
copying my terminal contents with tmux, but I'm not sure how that would look 
like in a test.

If I manually do the split on the test case [3], the fourth line does cut off 
some of the text since it goes beyond 160 columns, the default threshold. It is 
still viewable by pressing C-e, like anything too long.

So I agree that testing would be nice but it seems to be an existing problem 
here. I'm not sure how, or if, other Emacs packages do character-perfect tests 
like these.




notmuch mailing list

Reply via email to