bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51809: 29.0.50; [PATCH] Support for outline default state in Diff bu


From: Juri Linkov
Subject: bug#51809: 29.0.50; [PATCH] Support for outline default state in Diff buffers
Date: Sat, 13 Nov 2021 19:45:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]