From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Wells Newsgroups: gmane.emacs.bugs Subject: ediff-files uses wrong coding system for temporary file Date: Wed, 15 Aug 2007 14:10:24 +0100 Message-ID: <86fy2laqpr.fsf@macs.hw.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1187183559 17492 80.91.229.12 (15 Aug 2007 13:12:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Aug 2007 13:12:39 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 15 15:12:36 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ILIfr-0000RG-7S for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Aug 2007 15:12:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILIfq-0008HC-Ai for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Aug 2007 09:12:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ILIfo-0008Gx-80 for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2007 09:12:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ILIfm-0008Gl-KL for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2007 09:12:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILIfm-0008Gi-Gi for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2007 09:12:30 -0400 Original-Received: from izanami.macs.hw.ac.uk ([137.195.13.6]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ILIfm-0007cA-13 for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2007 09:12:30 -0400 Original-Received: from lxultra1.macs.hw.ac.uk ([137.195.27.173]:41962 helo=127.0.0.1) by izanami.macs.hw.ac.uk with smtp (Exim 4.51) id 1ILIfg-0002O9-U7 for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2007 14:12:25 +0100 Original-Received: (nullmailer pid 6009 invoked by uid 1001); Wed, 15 Aug 2007 13:10:24 -0000 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16364 Archived-At: To reproduce: 1. Pick a UTF-8-encoded file with lots of non-ASCII characters. (For example, you can pick =E2=80=9Clatin-ltx.el=E2=80=9D from the Emacs dist= ribution.) Assume for the sake of discussion that this file is named =E2=80=9CX=E2= =80=9D. This file should be uncompressed. (If it is compressed, adjust the following instructions to make an _uncompressed_ copy of it.) 2. Copy this file to a fresh name: cp X /tmp/Y 3. Compress the copy: gzip /tmp/Y 4. Start a fresh Emacs: emacs -Q 5. Use ediff-files on the original file and its compressed copy: M-x ediff-files RET X RET /tmp/Y RET 6. Observe many differences reported, despite the fact that the files should be considered identical. The cause of the problem is that Ediff uses ediff-make-temp-file to make a temporary uncompressed version of the compressed file to use as input to =E2=80=9Cdiff=E2=80=9D. It uses the value of ediff-coding-system-= for-write for the coding system when writing this temporary file. The value of ediff-coding-system-for-write at this point in time differs from the coding system of the original file. It should probably instead use the coding system of the compressed file. I hope this report is helpful. Joe =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D In GNU Emacs 22.1.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20) of 2007-06-27 on artemis Windowing system distributor `The X.Org Foundation', version 11.0.70000000 configured using `configure '--prefix=3D/home/jbw/local2' '--enable-debug'= '--disable-nls' '--with-x-toolkit=3Dgtk' 'CFLAGS=3D-O0 -g3 -ggdb'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: jbw value of $LANG: nil locale-coding-system: utf-8 default-enable-multibyte-characters: t Minor modes in effect: shell-dirtrack-mode: t outline-minor-mode: t desktop-save-mode: t url-handler-mode: t partial-completion-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t temp-buffer-resize-mode: t size-indication-mode: t line-number-mode: t transient-mark-mode: t