unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21387: 24.3; ediff bug with french
@ 2015-08-31 14:38 Mathieu Brisson
  2020-12-28  0:46 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Brisson @ 2015-08-31 14:38 UTC (permalink / raw)
  To: 21387

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.
Thanks! BTW, emacs is a great tool, thank s for developping this awesome
editor!
Bye,
Mathieu.







^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21387: 24.3; ediff bug with french
  2015-08-31 14:38 bug#21387: 24.3; ediff bug with french Mathieu Brisson
@ 2020-12-28  0:46 ` Lars Ingebrigtsen
  2021-05-26 22:38   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-28  0:46 UTC (permalink / raw)
  To: Mathieu Brisson; +Cc: 21387

[-- 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#21387: 24.3; ediff bug with french
  2020-12-28  0:46 ` Lars Ingebrigtsen
@ 2021-05-26 22:38   ` Lars Ingebrigtsen
  2021-05-27  6:56     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-26 22:38 UTC (permalink / raw)
  To: Mathieu Brisson; +Cc: 21387

Lars Ingebrigtsen <larsi@gnus.org> writes:

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

There were no comments, so I've now pushed this change.

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21387: 24.3; ediff bug with french
  2021-05-26 22:38   ` Lars Ingebrigtsen
@ 2021-05-27  6:56     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2021-05-27  6:56 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: brissonmathieu, 21387

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 27 May 2021 00:38:56 +0200
> Cc: 21387@debbugs.gnu.org
> 
> Lars Ingebrigtsen <larsi@gnus.org> writes:
> 
> > Any comments?  Is this the best way to do this sort of stuff?  The
> > LOCALE/LANGUAGE/LC_* variables can be kinda confusing.
> 
> There were no comments, so I've now pushed this change.

FTR, please note that this fix is 100% reliable only on Posix systems.
MS-Windows's setlocale doesn't heed the LC_* environment variables,
unless the program was built with the Gnulib replacement for
setlocale, or took special care to access the environment from the
application code.  Some programs do, others don't, so don't expect
this to work for every port of Diff out there.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-27  6:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-31 14:38 bug#21387: 24.3; ediff bug with french Mathieu Brisson
2020-12-28  0:46 ` Lars Ingebrigtsen
2021-05-26 22:38   ` Lars Ingebrigtsen
2021-05-27  6:56     ` Eli Zaretskii

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).