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 20:28:07 +0200 Message-ID: <834mrt43pk.fsf@gnu.org> References: <54B57886.4030107@g.nevcal.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1421260161 28822 80.91.229.3 (14 Jan 2015 18:29:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2015 18:29:21 +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 19:29:15 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 1YBSgp-00075I-OM for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Jan 2015 19:29:11 +0100 Original-Received: from localhost ([::1]:47678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBSgo-0003s7-O7 for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Jan 2015 13:29:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBSgj-0003mf-Ms for bug-gnu-emacs@gnu.org; Wed, 14 Jan 2015 13:29:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBSgg-0008R3-HF for bug-gnu-emacs@gnu.org; Wed, 14 Jan 2015 13:29:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBSgg-0008Qz-Ev for bug-gnu-emacs@gnu.org; Wed, 14 Jan 2015 13:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YBSgg-00045f-3f for bug-gnu-emacs@gnu.org; Wed, 14 Jan 2015 13:29: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 18:29: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.142126008515656 (code B ref 19591); Wed, 14 Jan 2015 18:29:02 +0000 Original-Received: (at 19591) by debbugs.gnu.org; 14 Jan 2015 18:28:05 +0000 Original-Received: from localhost ([127.0.0.1]:57080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YBSfl-00044S-4q for submit@debbugs.gnu.org; Wed, 14 Jan 2015 13:28:05 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:41526) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YBSfi-00043x-HE for 19591@debbugs.gnu.org; Wed, 14 Jan 2015 13:28:03 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NI600000J2GXG00@a-mtaout20.012.net.il> for 19591@debbugs.gnu.org; Wed, 14 Jan 2015 20:27:55 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NI60006UJAIY500@a-mtaout20.012.net.il>; Wed, 14 Jan 2015 20:27:55 +0200 (IST) In-reply-to: <54B57886.4030107@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:98353 Archived-At: > Date: Tue, 13 Jan 2015 11:56:54 -0800 > From: Glenn Linderman > > However, the auxiliary program diff when launched by emacs still doesn't > accept files with such characters. The latest version of diff for > windows that I can find is 2.8.7. The error message from diff in the > error buffer seems to contain the proper characters for the file name, > but diff reports it cannot find the file so I tihnk it is a deficiency > in diff, like was in emacs versions prior to 24.4, using the > "bytes" version of open instead of the "widechars" version. Yes, Diff, as all the other native ports of GNU software to Windows, uses the ANSI APIs to access files and its command-line arguments. It is hardly the job of the Emacs team to fix programs that are not part of the Emacs package. So I'm not sure what exactly did you expect of the Emacs project in this matter. You should know that the Emacs support for non-ASCII characters outside of the current system codepage stops short of extending that support to subprocesses invoked by Emacs, for this very reason: there are no native ports known to me of popular programs, such as Diff, Grep, find/xargs, etc. that can handle such file names. So being able to pass such non-ASCII file names to those programs would be a waste of effort, since they cannot handle them. > While it may be somewhat inefficient, it would be possible for emacs to > work around the deficiency of diff by saving temporary copies of the > buffers to be compared using generated names in the ANSI subset. This is not practical. The place in Emacs sources where command-line arguments of subprocesses are constructed and encoded has no idea which of these arguments are file names and which aren't. (There are also additional technical difficulties to do that, too boring to go into here.) Only the application level -- the Lisp program that needs to invoke Diff or whatever -- knows that. So what you suggest would mean we need to add this kind of work-around in each and every place where some Lisp invokes some program, too many places to do that. On top of that, this would be inefficient: a file could be very large. So I don't think this problem could or should be solved in Emacs. Let people who produce the ports of Diff etc. add support for these characters first, then there will be a good reason for Emacs to do the same. Thanks.