unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Radu Butoi <rbutoi@gmail.com>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: split-window-sensibly in tree mode with open message
Date: Fri, 22 May 2020 01:03:05 -0400	[thread overview]
Message-ID: <prg88shkpnna.fsf@butoi-macbookpro2.roam.corp.google.com> (raw)
In-Reply-To: <87367tj6jl.fsf@fifthhorseman.net>

Daniel Kahn Gillmor <dkg@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.

-Radu

[1]: git.savannah.gnu.org/cgit/emacs.git/commit/?id=8b10a2d19895041340296a703ba956c77541ec88

[2]: git.notmuchmail.org/git?p=notmuch;a=commit;h=3d92a257c8adbb36615bc61be9e668c8188006dc

[3]: https://gist.githubusercontent.com/rbutoi/78c5b30fc5e64585bda18abbc5bf1fbf/raw/cba7df184f3cd534c92a6fb9bf39aa121c19ecd7/gistfile1.txt

  reply	other threads:[~2020-05-22  5:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03  0:11 [PATCH] emacs: split-window-sensibly in tree mode with open message Radu Butoi
2020-05-03 11:19 ` David Bremner
2020-05-09 19:14   ` Radu Butoi
2020-05-21 21:56 ` Daniel Kahn Gillmor
2020-05-22  5:03   ` Radu Butoi [this message]
2020-05-22 18:58     ` Mark Walters
2020-05-23 19:32       ` Daniel Kahn Gillmor
2020-05-26 18:48         ` Radu Butoi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=prg88shkpnna.fsf@butoi-macbookpro2.roam.corp.google.com \
    --to=rbutoi@gmail.com \
    --cc=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).