From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id B84346DE10B3 for ; Thu, 12 Dec 2019 13:47:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.397 X-Spam-Level: X-Spam-Status: No, score=0.397 tagged_above=-999 required=5 tests=[AWL=-0.255, SPF_NEUTRAL=0.652] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MJMVjxMOmgMb for ; Thu, 12 Dec 2019 13:47:56 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id B10296DE105F for ; Thu, 12 Dec 2019 13:47:54 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 6840C100084 for ; Thu, 12 Dec 2019 23:47:50 +0200 (EET) From: Tomi Ollila To: notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: Add notmuch-wash-citation-lines-elided-min and use it In-Reply-To: <20191212211743.23456-1-dme@dme.org> References: <20191212211743.23456-1-dme@dme.org> User-Agent: Notmuch/0.28.3+84~g41389bb (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2019 21:47:58 -0000 On Thu, Dec 12 2019, David Edmondson wrote: > When collapsing citations, if the collapsed region is less than > `notmuch-wash-citation-lines-elided-min' lines long, don't bother > collapsing it and simply show all of the lines. LGTM. Tomi > --- > emacs/notmuch-wash.el | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el > index 54108d93..556fd2ab 100644 > --- a/emacs/notmuch-wash.el > +++ b/emacs/notmuch-wash.el > @@ -117,6 +117,13 @@ collapse the remaining lines into a button." > :type 'integer > :group 'notmuch-wash) > > +(defcustom notmuch-wash-citation-lines-elided-min 1 > + "When collapsing a citation would remove less than > +`notmuch-wash-citation-lines-elided-min' lines, no collapsing > +takes place." > + :type 'integer > + :group 'notmuch-wash) > + > (defcustom notmuch-wash-wrap-lines-length nil > "Wrap line after at most this many characters. > > @@ -241,7 +248,7 @@ that PREFIX should not include a newline." > (overlay-put (make-overlay cite-start cite-end) 'face 'notmuch-wash-cited-text) > (when (> cite-lines (+ notmuch-wash-citation-lines-prefix > notmuch-wash-citation-lines-suffix > - 1)) > + notmuch-wash-citation-lines-elided-min)) > (goto-char cite-start) > (forward-line notmuch-wash-citation-lines-prefix) > (let ((hidden-start (point-marker))) > -- > 2.24.0 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch