GNU bug report logs - #78269
diff-outline-regexp

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Mon, 5 May 2025 19:12:01 UTC

Severity: normal

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 78269 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 78269 <at> debbugs.gnu.org
Subject: Re: bug#78269: diff-outline-regexp
Date: Wed, 07 May 2025 09:31:20 +0300
close 78269 31.0.50
thanks

>> -    (setq diff-outline-regexp
>> +    (setq-local diff-outline-regexp
>
> LGTM, thanks.
>
>> Probably no one noticed this problem because its current default value
>> is not useful to anyone:
>>
>>   (defvar diff-outline-regexp
>>     "\\([*+][*+][*+] [^0-9]\\|@@ ...\\|\\*\\*\\* [0-9].\\|--- [0-9]..\\)")
>
> I think the idea was to recognize file header and hunk headers, in the
> case where the "diff" command itself is absent (as is the case in the
> output of the (non-recursive) `diff` command).
>
>> Maybe the default should be replaced with something like
>>
>>   (defvar diff-outline-regexp
>>     (concat "\\(^diff -.*\\|" diff-hunk-header-re "\\)"))
>
> LGTM (I'd even drop the `-` after `diff`).  AFAICT nowadays the "diff
> ..." command is absent only in cases where there's only one file in the
> diff, so matching the file header is not very useful, indeed.

So now pushed.




This bug report was last modified 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.