From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19591: 24.4; file & buffer compare failures Date: Wed, 14 Jan 2015 21:53:23 +0200 Message-ID: <831tmx3zrg.fsf@gnu.org> References: <54B57886.4030107@g.nevcal.com> <834mrt43pk.fsf@gnu.org> <54B6C620.6050909@g.nevcal.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1421265260 17181 80.91.229.3 (14 Jan 2015 19:54:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2015 19:54:20 +0000 (UTC) Cc: 19591@debbugs.gnu.org To: Glenn Linderman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 14 20:54:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YBU15-0003A5-Cs for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Jan 2015 20:54:11 +0100 Original-Received: from localhost ([::1]:47904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBU14-0007Ws-HJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Jan 2015 14:54:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBU10-0007WX-W6 for bug-gnu-emacs@gnu.org; Wed, 14 Jan 2015 14:54:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBU0w-00088u-OF for bug-gnu-emacs@gnu.org; Wed, 14 Jan 2015 14:54:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBU0w-00088p-Kk for bug-gnu-emacs@gnu.org; Wed, 14 Jan 2015 14:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YBU0w-0006EI-6I for bug-gnu-emacs@gnu.org; Wed, 14 Jan 2015 14:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Jan 2015 19:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19591 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19591-submit@debbugs.gnu.org id=B19591.142126520323890 (code B ref 19591); Wed, 14 Jan 2015 19:54:02 +0000 Original-Received: (at 19591) by debbugs.gnu.org; 14 Jan 2015 19:53:23 +0000 Original-Received: from localhost ([127.0.0.1]:57130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YBU0I-0006DF-PF for submit@debbugs.gnu.org; Wed, 14 Jan 2015 14:53:23 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:46632) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YBU0F-0006Cy-Db for 19591@debbugs.gnu.org; Wed, 14 Jan 2015 14:53:20 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NI600M00MXJ6O00@a-mtaout23.012.net.il> for 19591@debbugs.gnu.org; Wed, 14 Jan 2015 21:53:12 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NI600MU2N8N1IA0@a-mtaout23.012.net.il>; Wed, 14 Jan 2015 21:53:12 +0200 (IST) In-reply-to: <54B6C620.6050909@g.nevcal.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98357 Archived-At: [Please keep the bug address on the CC list.] > Date: Wed, 14 Jan 2015 11:40:16 -0800 > From: Glenn Linderman > > I didn't expect a fix for diff from the emacs team, but I do know that the > excellent file comparison is one huge reason that people use emacs... I know > people that use vi for most editing, but fire up emacs for file comparison... > probably works on Unix even with funny names... Most Unix systems use UTF-8 to encode file names, which is why Diff doesn't have a problem on such systems. > I was sort of thinking, though, that the case of buffer comparison is a case > where emacs is creating the files to do the diff, and that it creates temp > files with names derived from the buffer name, which is, I suppose somewhat > mnemonic when looking at the error message, but temporary file names such as > "compare-buffer-1.txt" and "compare-buffer-2.txt" would be just as useful. And > the file has to be written before the compare can be done in that case anyway. If you are talking about comparing buffers, not files, then yes, perhaps Emacs can do something about the issue, if it exists. But please provide a reproducible recipe, starting from "emacs -Q", that shows the problem. > Of course, the other approach, since diff is invoked with very specific options > by buffer/file compare, would be to reimplement that aspect of diff internally, > which would actually be an optimization (not needed to write the files, call > the external program, and read its results) that would also sidestep the need > for file names at all. Emacs tries not to reinvent the wheels that already exist. > It does seem, though, that the correct file names are being passed to the > external programs, at least, the error message seen in emacs has the correct > file name... it is just that diff isn't smart enough to use the right API to > open it. Or else the incorrect name being passed isn't being included in the > error message. I think just the error message, being generated inside Emacs, shows the correct file names, what Diff gets are file names butchered by conversion to the ANSI codepage. Once again, if you show the command you issued and the error message you've got in response, we could look into that and tell what really happens in your case.