From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names. Date: Sun, 02 Feb 2014 17:54:50 +0200 Message-ID: <83iosx4iid.fsf@gnu.org> References: <83ob2q4nbv.fsf@gnu.org> <83k3de41sc.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1391356577 16664 80.91.229.3 (2 Feb 2014 15:56:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Feb 2014 15:56:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 02 16:56:24 2014 Return-path: Envelope-to: ged-emacs-devel@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 1W9zP0-0006Zc-TC for ged-emacs-devel@m.gmane.org; Sun, 02 Feb 2014 16:56:11 +0100 Original-Received: from localhost ([::1]:41693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9zP0-0007Kb-KP for ged-emacs-devel@m.gmane.org; Sun, 02 Feb 2014 10:56:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9zO5-0007IJ-3j for emacs-devel@gnu.org; Sun, 02 Feb 2014 10:56:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9zNw-0002kM-W9 for emacs-devel@gnu.org; Sun, 02 Feb 2014 10:55:12 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:42554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9zNw-0002hG-Nh for emacs-devel@gnu.org; Sun, 02 Feb 2014 10:55:04 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N0D00G00L8B3R00@mtaout25.012.net.il> for emacs-devel@gnu.org; Sun, 02 Feb 2014 17:54:27 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0D009M4LIR9S80@mtaout25.012.net.il>; Sun, 02 Feb 2014 17:54:27 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169345 Archived-At: > From: Stefan Monnier > Date: Sun, 02 Feb 2014 10:06:37 -0500 > Cc: emacs-devel@gnu.org > > >> >> > + * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for > >> >> > + DOCUMENT that is a "remote" file name, i.e. a file-handler exists > >> >> > + for it. (Bug#16558) > >> >> That means we don't call Ffile_exists_p for .gz files :-( > >> >> It seems arbitrary. > >> > What do you suggest? bind handlers-alist to nil? > >> Could you describe the problem we're trying to solve? > > What is unclear in its description in this bug report? > > I think the problem is in calling file-exists-p. Why is that a problem? Btw, find-file-name-handler returns nil for file-exists-p when the file name specifies a compressed file, so I'm not sure what bothered you in the first place. > IIUC we use it to decide whether to pass the file to > expand-file-name, right? More accurately, we use it to decide whether we need an absolute file name. > And the reason we do that is because some file names are "normal" and > others refer to non-files according to some w32 feature which can map > them to some other tools. The reason is described in the comment: if the file name is not absolute and its name is not relative to the directory passed to the system API, the API will fail. But we don't want to try to make non-file names "absolute", since that would munge them beyond recognition. > I don't know that w32 feature at all, so it's hard for me to figure out > what should be done, but it seems like file-exists-p is not the right > thing to do anyway since the file name might be "normal" but refer to > a file that doesn't exist yet. Yes, that might happen, but then the file will be created in a directory other than what the user expects it to, perhaps. > So, how does w32 decide whether a file name is "normal" or not? We cannot know: it's up to the application that is associated with DOCUMENT and OPERATION.