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: Tue, 11 Jan 2022 19:46:05 +0200 Organization: LINKOV.NET Message-ID: <86sftumahu.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10071"; 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 Tue Jan 11 19:06:40 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 1n7LXb-0002RT-I1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Jan 2022 19:06:39 +0100 Original-Received: from localhost ([::1]:33204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7LXa-000090-KI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Jan 2022 13:06:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7LFa-0004wT-60 for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 12:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34336) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7LFZ-0004pd-T1 for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 12:48:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n7LFZ-0001f4-QX for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 12:48: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: Tue, 11 Jan 2022 17:48: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: patch Original-Received: via spool by 51809-submit@debbugs.gnu.org id=B51809.16419232274408 (code B ref 51809); Tue, 11 Jan 2022 17:48:01 +0000 Original-Received: (at 51809) by debbugs.gnu.org; 11 Jan 2022 17:47:07 +0000 Original-Received: from localhost ([127.0.0.1]:55472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7LEg-00018s-Ju for submit@debbugs.gnu.org; Tue, 11 Jan 2022 12:47:06 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:44551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7LEb-000106-85 for 51809@debbugs.gnu.org; Tue, 11 Jan 2022 12:47:05 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id F062460002; Tue, 11 Jan 2022 17:46:53 +0000 (UTC) In-Reply-To: <87k0fouzxs.fsf@gmail.com> (Matthias Meulien's message of "Tue, 28 Dec 2021 23:28:31 +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:223951 Archived-At: >> (...) Also xref works nicely, although I don't know why it requires >> `outline-apply-default-state' after enabling `outline-minor-mode': > > It's a mistake to rely on `hack-local-variables-hook' to call > `outline-apply-default-state' when Outline minor mode is enabled since > `hack-local-variables-hook' is run after processing a file's local > variable specs. There is also such a case possible where the file begins with a prop-line: # -*- mode: outline-minor; -*- and ends with the Local Variables section, e.g.: # outline-default-state: 2 `hack-local-variables-hook' can handle such case in `outline-minor-mode'. > I'll send an updated patch after some time using this. Now you can take in use a new hook added in bug#52855 that allows applying the default state after vc-diff finishes: (add-hook 'vc-diff-finish-functions 'outline-apply-default-state)