From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#51809: 29.0.50; [PATCH] Support for outline default state in Diff buffers Date: Sat, 13 Nov 2021 19:45:52 +0200 Organization: LINKOV.NET Message-ID: <86h7cgdk4v.fsf@mail.linkov.net> References: <87lf1sw6ji.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7271"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 51809@debbugs.gnu.org To: Matthias Meulien Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 13 18:49:28 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mlx9b-0001gb-Ut for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Nov 2021 18:49:27 +0100 Original-Received: from localhost ([::1]:36276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mlx9Z-0001Ck-P2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Nov 2021 12:49:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlx9D-0000p9-8O for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 12:49:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mlx9C-0000z4-WF for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 12:49:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mlx9C-0003x1-Ul for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 12:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Nov 2021 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51809 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51809-submit@debbugs.gnu.org id=B51809.163682573515163 (code B ref 51809); Sat, 13 Nov 2021 17:49:02 +0000 Original-Received: (at 51809) by debbugs.gnu.org; 13 Nov 2021 17:48:55 +0000 Original-Received: from localhost ([127.0.0.1]:48013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlx94-0003wV-SD for submit@debbugs.gnu.org; Sat, 13 Nov 2021 12:48:55 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlx91-0003vy-UP for 51809@debbugs.gnu.org; Sat, 13 Nov 2021 12:48:52 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id D650520002; Sat, 13 Nov 2021 17:48:44 +0000 (UTC) In-Reply-To: <87lf1sw6ji.fsf@gmail.com> (Matthias Meulien's message of "Sat, 13 Nov 2021 14:04:33 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219824 Archived-At: > Attached is a patch that adds support for an outline default state in > Diff buffers. Thanks. > One state makes only files and hunks headings visibles. Another one > outlines files with long hunks. A third value is proposed for users who > want to implement their own state. > > My point is that, when I first review a changeset, I am trying to get an > overview of the changes; And files cumulating long hunks often don't > help for that matter. > > Tell me if it's worth including in Emacs 29. I'm using outline-minor-mode in diff buffers all the time with (add-hook 'diff-mode-hook 'outline-minor-mode) and would like to understand how your patch improves this. Could the above hook be replaced with customization of diff-outline-default-state? > +;; - Support outlining files by name (eg to skip automatically > +;; generated files like package-lock.json in Javascript projects). >… > +(defcustom diff-file-outline-threshold 50 > + "Number of lines of hunks for a file to be outlined. Often the files that need to be hidden contain just one very long line without newlines such as in compiled assets, etc. and eventually make Emacs unresponsive. This is a big problem. Would it be possible in your patch to check the size of the hunk counting characters instead of lines?