all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthieu Dubuget <matthieu.dubuget@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 49808@debbugs.gnu.org
Subject: bug#49808: 27.1; ediff assumes user's language is English
Date: Mon, 22 Aug 2022 14:49:28 +0200	[thread overview]
Message-ID: <b0f0afd3-6a71-9577-64be-87ff296a3c1f@gmail.com> (raw)
In-Reply-To: <877d30a6kf.fsf@gnus.org>

I managed to reproduce the problem on a linux virtual machine ran from 
my new work machine.

First, some context (note that "tutu" one-line file does not have a 
carriage return):

```bash
madu@alienmadu:~$ cat /etc/issue
Debian GNU/Linux 11 \n \l

madu@alienmadu:~$ uname -a
Linux alienmadu 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 
22:23:49 UTC 2021 x86_64 GNU/Linux
madu@alienmadu:~$ emacs --version
GNU Emacs 27.1
Copyright (C) 2020 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
madu@alienmadu:~$ cat toto
auiea
madu@alienmadu:~$ cat tutu
eaiamadu@alienmadu:~$ locale
LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
madu@alienmadu:~$ diff toto tutu
1c1
< auiea
---
 > eaia
\ Pas de fin de ligne à la fin du fichier
madu@alienmadu:~$
```

Then:
- emacs -Q
- M-x ediff-files


Just to be sure, I did `dpkg-reconfigure locales` and:

```bash
madu@alienmadu:~$ sudo dpkg-reconfigure locales
[sudo] Mot de passe de madu :
Generating locales (this might take a while)...
   en_US.UTF-8... done
Generation complete.
madu@alienmadu:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
madu@alienmadu:~$ diff toto tutu
1c1
< auiea
---
 > eaia
\ No newline at end of file
madu@alienmadu:~$
```

And this time, I could ediff my two files from emacs.

Best regards


Le 22/08/2022 à 12:58, Lars Ingebrigtsen a écrit :
> Matthieu Dubuget <matthieu.dubuget@gmail.com> writes:
>
>> When using Ediff with a non-English locale, errors returned by diff are
>> not recognized by Ediff.
>>
>> When diff outputs a localized version of "\ No newline at end of file",
>> ediff do not recognize it and fails to display the differences.
>>
>> See https://stackoverflow.com/q/9242651/3407924
>> and this post for a clear explanation of the problem:
>> https://stackoverflow.com/a/9244759/3407924
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> Do you have a recipe to reproduce this problem, starting from "emacs
> -Q"?
>
> I tried starting Emacs with
>
> LANG=de_DE.UTF-8 emacs -Q
>
> and then using ediff, but I was unable to reproduce the problem






  parent reply	other threads:[~2022-08-22 12:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01 10:55 bug#49808: 27.1; ediff assumes user's language is English Matthieu Dubuget
2021-08-01 15:59 ` Eli Zaretskii
2021-08-02  7:28   ` Andreas Schwab
2021-08-02 11:23     ` Eli Zaretskii
2022-08-22 10:58 ` Lars Ingebrigtsen
     [not found]   ` <e3883fd0-be7e-8a86-d903-28fb0898dfc3@gmail.com>
2022-08-22 11:20     ` Lars Ingebrigtsen
2022-08-22 12:49   ` Matthieu Dubuget [this message]
2022-08-23  9:33     ` Lars Ingebrigtsen

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=b0f0afd3-6a71-9577-64be-87ff296a3c1f@gmail.com \
    --to=matthieu.dubuget@gmail.com \
    --cc=49808@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /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.