From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#19591: 24.4; file & buffer compare failures Date: Mon, 30 Sep 2019 03:08:50 +0200 Message-ID: References: <54B57886.4030107@g.nevcal.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="68949"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 19591-done@debbugs.gnu.org, Glenn Linderman To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 30 03:10:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iEkCa-000Hp2-FY for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Sep 2019 03:10:12 +0200 Original-Received: from localhost ([::1]:43030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEkCZ-0004Oh-BZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2019 21:10:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57240) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEkCS-0004OX-2L for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 21:10:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEkCQ-0000AS-TJ for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 21:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47489) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iEkCQ-0000AN-QT for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 21:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iEkCQ-0003wd-ER for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 21:10:02 -0400 In-Reply-To: <54B57886.4030107@g.nevcal.com> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2019 01:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 19591 X-GNU-PR-Package: emacs Mail-Followup-To: 19591@debbugs.gnu.org, stefan@marxist.se, v+python@g.nevcal.com Original-Received: via spool by 19591-done@debbugs.gnu.org id=D19591.156980575015055 (code D ref 19591); Mon, 30 Sep 2019 01:10:02 +0000 Original-Received: (at 19591-done) by debbugs.gnu.org; 30 Sep 2019 01:09:10 +0000 Original-Received: from localhost ([127.0.0.1]:56307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEkBZ-0003ul-Id for submit@debbugs.gnu.org; Sun, 29 Sep 2019 21:09:09 -0400 Original-Received: from mail-pf1-f182.google.com ([209.85.210.182]:43103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEkBX-0003uH-AC for 19591-done@debbugs.gnu.org; Sun, 29 Sep 2019 21:09:08 -0400 Original-Received: by mail-pf1-f182.google.com with SMTP id a2so4591914pfo.10 for <19591-done@debbugs.gnu.org>; Sun, 29 Sep 2019 18:09:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=yOn26JidFzjxPWmgFDLHEEwv7PIGOMS/DDSHg7kqSe4=; b=iZMdQJ1gudRAK+k3HOSf5Ta9dEbjn/AXwFK0mAMtbw8typB4FmOeGtnGXCAi0g7c9D UkSy0g8HwMxwDIHA8XWcnIfh6OK6/NGCo4ccslCYT07VXZaUSY9k3hdbNFHjypWd0SDh 5jZKEeF3Ci5hjakQiMZ99mDSmVdDSf15h4QK/GbfC9nMxdX0nsj79N1Am0z+8io32N4z c4LHcZmAMoglXpETSBiEN+a5wuTsLQkMgV8zzLOfudCfqk/kDz5x4mx7P6PWLnZbGtEF aX1EdLiqPx80kX3bcE8/jzjxkRkVCpyTu2znWaTIvVZVzCsE+NBbsrDAZFCrlEyK4qFZ Ir4g== X-Gm-Message-State: APjAAAUVC3Bml4t1nF9RGYdzSI8SP/0sFtLVqqxJ9Ymlr27D2dlO6fn3 7G96JjH12QE4vkqzseU3t4uXQrLIaSvxW67mhj0= X-Google-Smtp-Source: APXvYqy++YHtSks3rcJcRdMPU5lZEg6/EFa0OdXzjeJ+zd7tKqmQ1eOWgcBF6ITM2DmGqf7LvTlZwjwCRatuZ/cH2d0= X-Received: by 2002:a63:720f:: with SMTP id n15mr20732364pgc.198.1569805741693; Sun, 29 Sep 2019 18:09:01 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:167788 Archived-At: Eli Zaretskii writes: >> 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. With the above explanation, I'm closing this bug report. Best regards, Stefan Kagas