bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21387: 24.3; ediff bug with french


From: Lars Ingebrigtsen
Subject: bug#21387: 24.3; ediff bug with french
Date: Mon, 28 Dec 2020 01:46:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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:

PNG image

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 via email to

[Prev in Thread] Current Thread [Next in Thread]