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

From: Juri Linkov <[email-masked]>
Date: Sat, 05 Feb 2022 20:45:30 +0200

> I see one problem: Once one has some default state configured for Diff
> mode, it applies to patch embedded in Gnus Article buffers, but there
> the outline-minor-mode keymap isn't active and there's no way to toggle
> headings visibility... No idea how to improve this situation...

Oh, I see now it's a real problem.  Some patches are not displayed
because their hunks are hidden.  Fro example, a patch from bug#53770
attached below, becomes hidden with these settings:

  (add-hook 'diff-mode-hook
            (lambda ()
              (setq-local outline-default-state 2)
              (outline-minor-mode 1)))

For some unknown reason, outline--show-headings-up-to-level
first hides all sublevels, but never shows them again,
because or some level problem - it uses the level 21.

--- woman.el.orig	2022-02-04 14:08:54.188622150 +1100
+++ woman.el	2022-02-04 14:08:51.254677185 +1100
@@ -2299,9 +2299,9 @@
       (replace-match woman-unpadded-space-string t t))
 
     ;; Discard optional hyphen \%; concealed newlines \<newline>;
-    ;; point-size change function \sN,\s+N, \s-N:
+    ;; kerning \/, \,; point-size change function \sN,\s+N, \s-N:
     (goto-char from)
-    (while (re-search-forward "\\\\\\([%\n]\\|s[-+]?[0-9]+\\)" nil t)
+    (while (re-search-forward "\\\\\\([%\n/,]\\|s[-+]?[0-9]+\\)" nil t)
       (woman-delete-match 0))
 
     ;; BEWARE: THIS SHOULD PROBABLY ALL BE DONE MUCH LATER!!!!!