From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matthieu Dubuget Newsgroups: gmane.emacs.bugs Subject: bug#49808: 27.1; ediff assumes user's language is English Date: Mon, 22 Aug 2022 14:49:28 +0200 Message-ID: References: <02744305-31e7-06d8-6af9-ab8a40b2fcb5@gmail.com> <877d30a6kf.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4269"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Cc: 49808@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 22 21:13:14 2022 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 1oQCrK-0000us-Ng for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Aug 2022 21:13:14 +0200 Original-Received: from localhost ([::1]:57218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQCrJ-0001uX-7P for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Aug 2022 15:13:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQAVz-00052d-V3 for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2022 12:43:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQAVz-0004JY-Cu for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2022 12:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQAVz-0003s4-8x for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2022 12:43:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matthieu Dubuget Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Aug 2022 16:43:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49808 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 49808-submit@debbugs.gnu.org id=B49808.166118653814804 (code B ref 49808); Mon, 22 Aug 2022 16:43:03 +0000 Original-Received: (at 49808) by debbugs.gnu.org; 22 Aug 2022 16:42:18 +0000 Original-Received: from localhost ([127.0.0.1]:41597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQAVE-0003qf-EE for submit@debbugs.gnu.org; Mon, 22 Aug 2022 12:42:18 -0400 Original-Received: from mail-wr1-f47.google.com ([209.85.221.47]:45994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQ6s4-00056N-Qr for 49808@debbugs.gnu.org; Mon, 22 Aug 2022 08:49:37 -0400 Original-Received: by mail-wr1-f47.google.com with SMTP id bq11so6502762wrb.12 for <49808@debbugs.gnu.org>; Mon, 22 Aug 2022 05:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=aw5zHZeoeEpHLL+73dMtYeWmytELIAWvxDg9jz9rs5E=; b=ga0CH9gBe5lIWlBgjUiJv0fXtQ5b/Q3qq2XM54GeQmF8BN7sCWi1CsWar9aPJD7lkB IxZE98Shnv87/tXbW/x+gUJYrbwsBOB62QRdoqraEk5+bLHhUJRF7QWV+dpul1xhWFCf gDClbNiC3MiK0CCfOGI8BmaOwlqu7qJnL7ZQERf+CgJnQsCu4uh1QVO72BrEEnOBP4vW tXsM0JO/G3E+xsDJ4fk/UyXpfPqX7rTW2KQxdz8DG50Inz1Oz59tw5x6Pk5Yk3Uv/lS+ gKxz3jAMFL+Q+AjhHUFReR4kK6IyI1/EByR64rw2EtKQXI+U+jIa/vLqjRMoQ95qascu O4/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=aw5zHZeoeEpHLL+73dMtYeWmytELIAWvxDg9jz9rs5E=; b=6O2h2EKVVeoejt+eSjTwjZwZ4cXVU5k11Ps+wnVtW6aFEpoMbTzK6veaR6DWoGy1e6 YUXIOJ/qa6mEZz4N+55J1v76yFNDUZzr8iHxeUxOdItM6iR1Pc8ksfgeIVFLveDOWMFi NgStsphb+59I+2F657AakAGkplrGSm2ti9w4XGP3r3JWjLIVshNiI9QfxHY2FIuRU4OR 09nn4tHYIJg4WB8TyyaYjCWHGk118Lx5xw/XT7sTSvdDaPavhgr6acJ/vn1ByUAGOmLp QxcOQf6UfjEcqaY/MqZB4/VVUkNixPSmRCqEkLwNNzylSiVHWCp+OAh50OnvvPRjU5cU ThGA== X-Gm-Message-State: ACgBeo26ctKE+P5V93V78dZ550BmcSoBoCDUMmiqF8huUNR4a9qFqBUB wHuOo8s+13mU5PopAlODg1A= X-Google-Smtp-Source: AA6agR4c/JleGALXINtw3JjFxC89wW1SA0wu5e1o1yEfPQlTVwGcY78xvm+yhcbFz1vyYGRDl95PPQ== X-Received: by 2002:a5d:620f:0:b0:225:32fc:cea3 with SMTP id y15-20020a5d620f000000b0022532fccea3mr10249057wru.270.1661172570883; Mon, 22 Aug 2022 05:49:30 -0700 (PDT) Original-Received: from ?IPV6:2a01:e0a:501:9e0:1115:2dfc:5869:bb0? ([2a01:e0a:501:9e0:1115:2dfc:5869:bb0]) by smtp.gmail.com with ESMTPSA id i21-20020a05600c355500b003a5ee64cc98sm20105417wmq.33.2022.08.22.05.49.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Aug 2022 05:49:30 -0700 (PDT) Content-Language: fr In-Reply-To: <877d30a6kf.fsf@gnus.org> X-Mailman-Approved-At: Mon, 22 Aug 2022 12:42:15 -0400 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:240458 Archived-At: 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 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