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

From: Juri Linkov <[email-masked]>
Date: Tue, 28 Dec 2021 20:32:22 +0200

> @@ -353,7 +353,9 @@ outline-mode
> +  (add-hook 'change-major-mode-hook #'outline-show-all nil t)
> +  (add-hook 'hack-local-variables-hook
> +	    #'outline-apply-default-state))
>
> @@ -436,7 +438,9 @@ outline-minor-mode
> +        (add-hook 'hack-local-variables-hook
> +	          #'outline-apply-default-state))

Are you sure about modifying the global value of hack-local-variables-hook
instead of the buffer-local hook with `nil t' at the end?

> Here is a file used to test this feature:
>
> # -*- mode: outline; -*-
> [...]
> # Local Variables:
> # outline-default-state: 2
> # outline-default-state-subtree-visibility: ((match-regexp . "TOHIDE") subtree-has-long-lines subtree-is-long)
> # outline-long-line-threshold: 200
> # outline-line-count-threshold: 100
> # End:

When this feature will be used a lot, even variable names will affect
usability - with longer names usability deteriorates, and 40 characters of
'outline-default-state-subtree-visibility' takes half of the standard window width.
Would it be possible to find a shorter name?

Since it defines the rules, how about 'outline-default-rules'?
It has the same length as 'outline-default-state', so these names
will align nicely:

# Local Variables:
# outline-default-state: 1
# outline-default-rules: ((match-regexp . "ChangeLog"))
# mode: outline-minor
# End:

Also outline-long-line-threshold and outline-line-count-threshold could share
the same prefix, maybe:

# outline-default-long-line: 200
# outline-default-line-count: 100