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#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers Date: Sun, 21 Nov 2021 19:41:51 +0200 Organization: LINKOV.NET Message-ID: <86h7c5qucg.fsf@mail.linkov.net> References: <87bl44qz5o.fsf@gmail.com> <87wnmgk6r7.fsf@gmail.com> <87tugrmi1j.fsf@gnus.org> <86pmqxuymw.fsf@mail.linkov.net> <87ee7cwqwj.fsf@gnus.org> <86r1bcpo5i.fsf@mail.linkov.net> <87zgpzrznf.fsf@gnus.org> <86y25imyna.fsf@mail.linkov.net> <87k0h1mogn.fsf@gnus.org> <87r1b92zea.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="22066"; 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: Lars Ingebrigtsen , 51016@debbugs.gnu.org To: Matthias Meulien Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 21 18:45:37 2021 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 1moquG-0005ZI-Px for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Nov 2021 18:45:36 +0100 Original-Received: from localhost ([::1]:35048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1moquE-0003RX-MB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Nov 2021 12:45:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moqtp-0003Qm-0V for bug-gnu-emacs@gnu.org; Sun, 21 Nov 2021 12:45:09 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34385) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1moqti-0003oY-JT for bug-gnu-emacs@gnu.org; Sun, 21 Nov 2021 12:45:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1moqti-0001tw-DW for bug-gnu-emacs@gnu.org; Sun, 21 Nov 2021 12:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Nov 2021 17:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51016 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51016-submit@debbugs.gnu.org id=B51016.16375166867272 (code B ref 51016); Sun, 21 Nov 2021 17:45:02 +0000 Original-Received: (at 51016) by debbugs.gnu.org; 21 Nov 2021 17:44:46 +0000 Original-Received: from localhost ([127.0.0.1]:45931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moqtR-0001tD-RC for submit@debbugs.gnu.org; Sun, 21 Nov 2021 12:44:46 -0500 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:39055) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moqtQ-0001so-Dv for 51016@debbugs.gnu.org; Sun, 21 Nov 2021 12:44:44 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id E59C6200005; Sun, 21 Nov 2021 17:44:36 +0000 (UTC) In-Reply-To: <87r1b92zea.fsf@gmail.com> (Matthias Meulien's message of "Sun, 21 Nov 2021 18:26:37 +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:220573 Archived-At: >> Perhaps we could just change the .+ thing to .* and see whether it >> breaks anything? > > Good point. > > But am I missing something or commit f0768d3145 didn't change > `diff-hunk-header-re' matching an entire line? I thus don't understand > why Juri is seing a regression w.r. to cycling after that commit has > been installed. Note that I've not been able to reproduce the "working" > behavior described by Juri after reverting that commit. > > Juri can you confirm there's a relation between cycling not working and > that commit? Otherwise should we open another bug? I confirm there is a relation because the commit f0768d3145 + (when (eq diff-buffer-type 'git) + (setq diff-outline-regexp + (concat "\\(^diff --git.*\n\\|" diff-hunk-header-re "\\)")) + (setq-local outline-level #'diff--outline-level)) + (setq-local outline-regexp diff-outline-regexp)) changed diff-outline-regexp to contain diff-hunk-header-re that matches an entire line. This commit replaced the default value of diff-outline-regexp that is (defvar diff-outline-regexp "\\([*+][*+][*+] [^0-9]\\|@@ ...\\|\\*\\*\\* [0-9].\\|--- [0-9]..\\)") that didn't match entire lines. However, changing the .+ thing to .* in outline-font-lock-keywords fixes this problem. So we need to decide whether to try to remove entire line mathing from diff-hunk-header-re (not sure how easy to do), or just change .+ to .* in outline-font-lock-keywords.