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, 29 Jan 2022 21:12:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

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

A hackish way would be something like this:

diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index c40c38a95f..49cac01e2f 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -532,7 +532,8 @@ mm-display-inline-fontify
                  (funcall mode))
            (let ((auto-mode-alist
                   (delq (rassq 'doc-view-mode-maybe auto-mode-alist)
-                        (copy-sequence auto-mode-alist))))
+                        (copy-sequence auto-mode-alist)))
+                  outline-default-state)
              ;; Don't run hooks that might assume buffer-file-name
              ;; really associates buffer with a file (bug#39190).
              (delay-mode-hooks (set-auto-mode))

But OTOH, when long lines is a problem, then it's natural to expect that
the user would want to hide long lines in Gnus Article buffers as well.
And it's still possible to use outline cycling commands after saving an
attachment to a file.





reply via email to

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