From: Matthias Meulien <orontee@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>, 54034@debbugs.gnu.org
Subject: bug#54034: 29.0.50; Diff prettify broken for empty files
Date: Fri, 01 Jul 2022 20:56:23 +0200 [thread overview]
Message-ID: <87edz44q7c.fsf@gmail.com> (raw)
In-Reply-To: <jwvzghvnvzt.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 29 Jun 2022 14:55:18 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Wouldn't it be safer to simply disable prettification of the "diff
>> header" when diff-buffer-type isn't equal to git?
>
> Could be, tho I think the current code ends up doing something similar.
>
> FWIW, I tend to prefer using the buffer's content rather than the value
> of a buffer-local variable (to the extend possible) when deciding
> whether a given diff header can be prettified.
The buffer-local variable is currently initialized from the buffer
content!
>
> [ After all, some diffs may be the result of running several commands,
> some of which are Git but not all, so the "type" may be different for
> different headers in the same buffer. ]
Ok, I understand your point.
I can't see how a regex can distinguish diff output generated in
the context of a call to diff-buffers (where compared files are
temporary files and a prettified message should refer to the
corresponding buffer names) and a generic diff output where a user may
have used any diff option including --label for whatever reason.
--
Matthias
next prev parent reply other threads:[~2022-07-01 18:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 7:47 bug#54034: 29.0.50; Diff prettify broken for empty files Matthias Meulien
2022-02-20 7:58 ` Matthias Meulien
2022-02-20 14:40 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-20 16:50 ` Matthias Meulien
2022-02-21 22:23 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-21 23:00 ` Matthias Meulien
2022-02-21 23:10 ` Matthias Meulien
2022-02-21 23:55 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-22 6:58 ` Matthias Meulien
2022-04-06 22:51 ` Matthias Meulien
2022-04-07 7:11 ` Matthias Meulien
2022-04-07 7:19 ` Matthias Meulien
2022-04-07 12:15 ` Matthias Meulien
2022-04-07 20:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-08 19:41 ` Matthias Meulien
2022-06-23 22:36 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-29 15:47 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-29 18:04 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-29 18:22 ` Matthias Meulien
2022-06-29 18:55 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-01 18:56 ` Matthias Meulien [this message]
2022-06-29 19:40 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-22 7:16 ` Matthias Meulien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87edz44q7c.fsf@gmail.com \
--to=orontee@gmail.com \
--cc=54034@debbugs.gnu.org \
--cc=contovob@tcd.ie \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).