all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 65049@debbugs.gnu.org, habamax@gmail.com, juri@linkov.net
Subject: bug#65049: Minor update to the repro steps
Date: Mon, 28 Aug 2023 01:32:57 +0300	[thread overview]
Message-ID: <02a7f7fe-74c2-a59a-7d7d-1da9d3270c8a@gutov.dev> (raw)
In-Reply-To: <831qfpkpx7.fsf@gnu.org>

On 27/08/2023 08:36, Eli Zaretskii wrote:
>> Date: Sun, 27 Aug 2023 04:14:11 +0300
>> Cc: juri@linkov.net, habamax@gmail.com, 65049@debbugs.gnu.org
>> From: Dmitry Gutov <dmitry@gutov.dev>
>>
>> On 26/08/2023 11:50, Eli Zaretskii wrote:
>>
>> I'm guessing that if we try hard enough with files encoded in an "alien"
>> coding system, we will see a similar difference between vc-diff and
>> vc-root-diff.
> 
> We could.  The 'undecided-unix' value is a good default, but if the
> fileset includes files with different incompatible encodings, there's
> no single coding-system that could satisfy that, and what Emacs
> guesses will probably be okay for the first file, but not necessarily
> for the rest.

And it only guesses when passed a file or list of them (e.g. from a 
selection in vc-dir).

>>>     . The line you suggest to remove should IMO stay, because your
>>>       suggestion is based on what you see with plain-ASCII files.  If
>>>       the files have some non-trivial text encoding, failing to use the
>>>       right encoding for the diffs will produce mojibake.  The EOL
>>>       conversion produced by vc-coding-system-for-diff is indeed
>>>       problematic, see above; but the text-conversion part is not, and
>>>       should stay.
>>>
>>> Therefore, I propose the patch below, which incorporates the above
>>> change, for the emacs-29 branch.  I think it is safe to use the 'unix
>>> EOL conversion on all systems, in the vc-git.el part of the changeset,
>>> but if you feel uneasy about that on the release branch, we could make
>>> it Windows-specific on emacs-29 and remove the condition on master.
>>
>> LGTM for emacs-29, thank you. In case anybody reports a problem, we can
>> add that OS limitation later.
> 
> Thanks, installed on the emacs-29 branch.

Thanks for the fix.

>> Regarding your paragraph above about mojibake, though. That makes a lot
>> of sense, but I feel I have to stress: this mechanism doesn't work for
>> vc-root-diff (C-x v D).
> 
> Not sure I understand.  Can you show a recipe for "doesn't work"?

It's the same recipe as what you proposed I test (a file with dos line 
ending on unix). But you don't even have to test that.

Try edebug-instrumenting vc-diff-internal and then calling vc-root-diff 
anywhere (C-x v D). When the execution reaches the line that we have 
been discussing, you'll see that (vc-coding-system-for-diff (car files)) 
evaluates to 'undecided because (car files) is a directory.

So this mechanism is always unused in vc-root-diff.





  reply	other threads:[~2023-08-27 22:32 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04  7:50 bug#65049: 29.1; vc-do-command fails in windows emacs 29.1 Maxim Kim
2023-08-04  8:02 ` bug#65049: Minor update to the repro steps Maxim Kim
2023-08-04 11:05   ` Eli Zaretskii
2023-08-04 11:24     ` Maxim Kim
2023-08-04 17:56     ` Juri Linkov
2023-08-06 23:04       ` Maxim Kim
2023-08-07  1:09     ` Maxim Kim
2023-08-07 16:24       ` Eli Zaretskii
2023-08-07 23:17         ` Maxim Kim
2023-08-20 16:49         ` Juri Linkov
2023-08-20 18:25           ` Eli Zaretskii
2023-08-21  6:53             ` Juri Linkov
2023-08-21 11:00               ` Eli Zaretskii
2023-08-21 11:39                 ` Maxim Kim
2023-08-21 12:18                   ` Eli Zaretskii
2023-08-21 23:10             ` Maxim Kim
2023-08-22 12:52               ` Eli Zaretskii
2023-08-22 13:12                 ` Maxim Kim
2023-08-22 13:17                   ` Eli Zaretskii
2023-08-22 23:43                     ` Maxim Kim
2023-08-23  4:28                     ` Maxim Kim
2023-08-23 16:21                       ` Eli Zaretskii
2023-08-23 17:42                         ` Juri Linkov
2023-08-23 18:43                           ` Eli Zaretskii
2023-08-23 20:13                         ` Dmitry Gutov
2023-08-24  4:54                           ` Eli Zaretskii
2023-08-24 21:06                             ` Dmitry Gutov
2023-08-24 21:35                               ` Dmitry Gutov
2023-08-24 21:44                                 ` Dmitry Gutov
2023-08-25  6:18                                   ` Eli Zaretskii
2023-08-26  0:45                                     ` Dmitry Gutov
2023-08-26  8:50                                       ` Eli Zaretskii
2023-08-27  1:14                                         ` Dmitry Gutov
2023-08-27  5:36                                           ` Eli Zaretskii
2023-08-27 22:32                                             ` Dmitry Gutov [this message]
2023-08-28 12:12                                               ` Eli Zaretskii
2023-08-28 13:45                                                 ` Dmitry Gutov
2023-08-28 16:12                                                   ` Eli Zaretskii
2023-08-28 16:51                                                     ` Dmitry Gutov
2023-08-28 16:57                                                       ` Eli Zaretskii
2023-08-28 17:39                                                         ` Dmitry Gutov
2023-08-28 18:26                                                           ` Eli Zaretskii
2023-08-31  2:07                                                             ` Richard Stallman
2023-08-31  2:14                                                               ` Dmitry Gutov
2023-08-31  6:00                                                                 ` Eli Zaretskii
2023-08-23 23:46                         ` Maxim Kim

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02a7f7fe-74c2-a59a-7d7d-1da9d3270c8a@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=65049@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=habamax@gmail.com \
    --cc=juri@linkov.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.