unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Mathieu Brisson <brissonmathieu@ovh.fr>
Cc: 21387@debbugs.gnu.org
Subject: bug#21387: 24.3; ediff bug with french
Date: Mon, 28 Dec 2020 01:46:20 +0100	[thread overview]
Message-ID: <877dp269lv.fsf@gnus.org> (raw)
In-Reply-To: <55E466FA.8030308@ovh.fr> (Mathieu Brisson's message of "Mon, 31 Aug 2015 16:38:50 +0200")

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

Mathieu Brisson <brissonmathieu@ovh.fr> writes:

> ediff fails with the same symptom present in
> http://stackoverflow.com/questions/9242651/emacs-ediff-error-no-newline-at-end-of-file
> but in french. I assume it is a bug, and not a misconfiguration on my
> side.

Steps to reproduce:

echo -n foo > /tmp/foo1
echo bar > /tmp/foo2

LANGUAGE=de_DE src/emacs -Q /tmp/di.el

(ediff-files "/tmp/foo1" "/tmp/foo2")

Result:


[-- Attachment #2: Type: image/png, Size: 52800 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1021 bytes --]


Well, we obviously can't add all the languages in the world to
`ediff-diff-ok-lines-regexp', but we can run diff in a known
environment.

Any comments?  Is this the best way to do this sort of stuff?  The
LOCALE/LANGUAGE/LC_* variables can be kinda confusing.

diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el
index adb6ce8053..38c546729e 100644
--- a/lisp/vc/ediff-diff.el
+++ b/lisp/vc/ediff-diff.el
@@ -1146,7 +1146,10 @@ ediff-exec-process
 	 (if (string-match "buffer" (symbol-name ediff-job-name))
 	     ediff-coding-system-for-write
 	   ediff-coding-system-for-read))
-	args)
+        (process-environment
+         ;; Avoid localization of messages so we can parse the output.
+         (cons "LC_MESSAGES=C" process-environment))
+        args)
     (setq args (append (split-string options)
                        (mapcar (lambda (file)
                                  (when (stringp file)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

  reply	other threads:[~2020-12-28  0:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31 14:38 bug#21387: 24.3; ediff bug with french Mathieu Brisson
2020-12-28  0:46 ` Lars Ingebrigtsen [this message]
2021-05-26 22:38   ` Lars Ingebrigtsen
2021-05-27  6:56     ` Eli Zaretskii

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=877dp269lv.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=21387@debbugs.gnu.org \
    --cc=brissonmathieu@ovh.fr \
    /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).