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, 29 Jan 2022 21:12:55 +0200 Organization: LINKOV.NET Message-ID: <86mtjenyo8.fsf@mail.linkov.net> References: <87lf1sw6ji.fsf@gmail.com> <86h7cgdk4v.fsf@mail.linkov.net> <87ee7kvshn.fsf@gmail.com> <87a6i7x5iq.fsf@gmail.com> <86k0hbam7r.fsf@mail.linkov.net> <878rxrmy7q.fsf@gmail.com> <86y256uc0v.fsf@mail.linkov.net> <87r1ajknsr.fsf@gmail.com> <86ilvu6w6k.fsf@mail.linkov.net> <871r2hc51a.fsf@gmail.com> <87r19zs662.fsf@gmail.com> <871r1zm7ji.fsf@gmail.com> <87wnjrkrwd.fsf@gmail.com> <86ilv8pnf3.fsf@mail.linkov.net> <87k0fouzxs.fsf@gmail.com> <86sftumahu.fsf@mail.linkov.net> <87pmouw9qr.fsf@gmail.com> <87a6fuvzj9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33740"; 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 Jan 29 20:16:57 2022 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 1nDtDV-0008ZY-9C for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Jan 2022 20:16:57 +0100 Original-Received: from localhost ([::1]:42622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDtDO-000889-TG for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Jan 2022 14:16:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDtBe-00084o-7J for bug-gnu-emacs@gnu.org; Sat, 29 Jan 2022 14:15:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41933) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDtBd-0006aN-PW for bug-gnu-emacs@gnu.org; Sat, 29 Jan 2022 14:15:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDtBd-0005Ow-Md for bug-gnu-emacs@gnu.org; Sat, 29 Jan 2022 14:15:01 -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, 29 Jan 2022 19:15:01 +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: fixed patch Original-Received: via spool by 51809-submit@debbugs.gnu.org id=B51809.164348366820685 (code B ref 51809); Sat, 29 Jan 2022 19:15:01 +0000 Original-Received: (at 51809) by debbugs.gnu.org; 29 Jan 2022 19:14:28 +0000 Original-Received: from localhost ([127.0.0.1]:34833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDtB5-0005NY-Q5 for submit@debbugs.gnu.org; Sat, 29 Jan 2022 14:14:27 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:42013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDtB3-0005NE-9a for 51809@debbugs.gnu.org; Sat, 29 Jan 2022 14:14:25 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 0227760003; Sat, 29 Jan 2022 19:14:17 +0000 (UTC) In-Reply-To: <87a6fuvzj9.fsf@gmail.com> (Matthias Meulien's message of "Mon, 17 Jan 2022 22:10:50 +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:225559 Archived-At: > 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.