From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#1183: 23.0.60; ediff-buffers is broken Date: Sat, 18 Oct 2008 22:17:06 -0400 Message-ID: References: <00a101c92fbf$998d19b0$c2b22382@us.oracle.com> <00eb01c92fd0$1be49cc0$c2b22382@us.oracle.com> <002501c93078$21bf8c60$0200a8c0@us.oracle.com> <20081017130533.3c3070bc@kiferserv> <002a01c9307c$3af9fef0$0200a8c0@us.oracle.com> <004901c93087$2c0345e0$0200a8c0@us.oracle.com> <20081017231731.28a0382f@kiferserv> Reply-To: Stefan Monnier , 1183@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224383422 27325 80.91.229.12 (19 Oct 2008 02:30:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Oct 2008 02:30:22 +0000 (UTC) Cc: 1183@emacsbugs.donarmstrong.com, kifer@cs.sunysb.edu, handa@m17n.org, bug-gnu-emacs@gnu.org, kifer@cs.stonybrook.edu To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 19 04:31:25 2008 connect(): Connection refused 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 1KrO4i-00037b-Qv for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Oct 2008 04:31:25 +0200 Original-Received: from localhost ([127.0.0.1]:49325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrO3d-0005kN-Ce for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Oct 2008 22:30:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KrO3Z-0005i2-3l for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 22:30:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KrO3W-0005ed-MZ for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 22:30:12 -0400 Original-Received: from [199.232.76.173] (port=46167 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrO3W-0005ea-Gz for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 22:30:10 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:54717) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KrO3V-0006pK-V8 for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 22:30:10 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9J2U0lh013129; Sat, 18 Oct 2008 19:30:01 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9J2P4xU012028; Sat, 18 Oct 2008 19:25:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 19 Oct 2008 02:25:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1183 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122438263710615 (code B ref -1); Sun, 19 Oct 2008 02:25:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 19 Oct 2008 02:17:17 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9J2HD8a010606 for ; Sat, 18 Oct 2008 19:17:14 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KrNqy-0002w6-Tu for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 22:17:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KrNqw-0002tz-U8 for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 22:17:12 -0400 Original-Received: from [199.232.76.173] (port=36652 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrNqw-0002tp-Oq for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 22:17:10 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:1224) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KrNqv-0005bF-N2; Sat, 18 Oct 2008 22:17:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiUFAEQ1+khMCpQ6/2dsb2JhbACBcr8Ag2yBCg X-IronPort-AV: E=Sophos;i="4.33,441,1220241600"; d="scan'208";a="28565301" Original-Received: from 76-10-148-58.dsl.teksavvy.com (HELO pastel.home) ([76.10.148.58]) by ironport2-out.teksavvy.com with ESMTP; 18 Oct 2008 22:17:08 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id B88417F20; Sat, 18 Oct 2008 22:17:06 -0400 (EDT) In-Reply-To: (Eli Zaretskii's message of "Sat, 18 Oct 2008 11:07:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 18 Oct 2008 22:30:12 -0400 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:21665 Archived-At: >> Ediff-buffers does almost the right thing (at least, was doing until >> things changed in emacs). It would save the buffers in temp files >> using the *same* encoding, so all that crap is pushed out of the >> way. Then it would run diff on the temp files. Since the encodings >> are the same, diff would find what is different and then ediff will >> display that. (With all its complexity, ediff is just a front-end for >> diff.) So, for ediff-buffers, the question is which encoding to use. > The right encoding in Emacs 23 is utf-8-emacs-unix. Indeed. This encoding is now also available under the new name `emacs-internal'. [ As you may have seen, I also added it to the Emacs-22 branch, although I doubt we'll release anything from that branch. ] > The problem with that is that ediff-exec-process then uses raw-text to > read the output from Diff back into Emacs. Yes, raw-text is wrong. It should probably use undecided at least, or otherwise try to be more clever and use the encoding used by the source files. > While raw-text is probably OK for reading Diff output from comparing > _files_, There's worse, but for Unicode files (or for latin-1 files, or for ...) it's kind of ugly. I suspect that for utf-16 and Chinese it's even worse. > I'm afraid it will not be TRT for reading output from > comparing 2 temporary files encoded in utf-8-emacs-unix. If my fears > are justified, I guess we will have to modify ediff-exec-process so as > to use utf-8-emacs-unix when ediff-job-name has "buffers" in it. Yes, that's part of the problem. >> Back then Stefan suggested emacs-mule instead of no-conversion, but for some >> reason this was not done--don't remember why. > No special reason. Actually, after looking at it a little bit, there are some reasons: the encoding is currently set in ediff-make-temp-file which is used in many different circumstances, some of which should use emacs-internal, but maybe not all. So there's more work to do in ediff to handle encoding issues reliably. Stefan