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: Thu, 06 Feb 2014 13:47:25 +0200 Message-ID: <83ha8czcmq.fsf@gnu.org> References: <83ob2q4nbv.fsf@gnu.org> <83k3de41sc.fsf@gnu.org> <83iosx4iid.fsf@gnu.org> <83txcg3fle.fsf@gnu.org> <83lhxs2mru.fsf@gnu.org> <837g9a3kmb.fsf@gnu.org> <83vbwu1tk2.fsf@gnu.org> <83r47i1acs.fsf@gnu.org> <83ha8d1r1c.fsf@gnu.org> <83d2j11ggo.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1391687257 30357 80.91.229.3 (6 Feb 2014 11:47:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Feb 2014 11:47:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 06 12:47:44 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 1WBNQj-0001W9-Ro for ged-emacs-devel@m.gmane.org; Thu, 06 Feb 2014 12:47:41 +0100 Original-Received: from localhost ([::1]:35813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBNQj-0006Ji-I5 for ged-emacs-devel@m.gmane.org; Thu, 06 Feb 2014 06:47:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBNQc-0006Jc-TO for emacs-devel@gnu.org; Thu, 06 Feb 2014 06:47:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBNQY-0007bH-0L for emacs-devel@gnu.org; Thu, 06 Feb 2014 06:47:34 -0500 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:52285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBNQX-0007b8-Jv for emacs-devel@gnu.org; Thu, 06 Feb 2014 06:47:29 -0500 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0N0K00P00OM60Y00@mtaout26.012.net.il> for emacs-devel@gnu.org; Thu, 06 Feb 2014 13:46:17 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0K00FH8OP50QA0@mtaout26.012.net.il>; Thu, 06 Feb 2014 13:46:17 +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.182 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:169432 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Wed, 05 Feb 2014 16:53:51 -0500 > > >> That look reasonable (and didn't involve any remote connection or any > >> such problem). > > How is the 2nd one reasonable? > > Why shouldn't it be? It's in a context where url-handler-mode is > deactivated, so Emacs has no reason to presume that it's a URL. > > > It means we will pass it through > > expand-file-name, > > Which might be the right thing to do. > > > (expand-file-name "http://foo.com/wherever/index.html") > > => "d:/gnu/bzr/emacs/trunk/http:/foo.com/wherever/index.html" > > If d:/gnu/bzr/emacs/trunk/http:/foo.com/wherever/ exists, then I'd argue > it was the right thing to do. We are talking about Windows, where such file names are impossible. > >> The connection between the core problem of detecting the case of > >> (w32-shell-execute "dir/file") and the check of file-name-handlers is > >> really non-obvious. > > If DOCUMENT doesn't have file handlers, it is more likely to be a > > local file or directory. > > The correlation is weak. I don't think this heuristic is worth much if > anything in this context. Even a weak correlation is something. And this was introduced in response to a bug report that clearly had to do with a file which did have a handler. > > I don't see how your proposal is simpler than what's already there, or > > better, sorry. > > It's better because all the checks are *directly* related to the problem > at hand: detecting non-absolute file names which include > a directory component. > > If you only care about simpler, then we can just remove the > file-name-handler check and only rely on the faccess check. > That should work just as well. The existing code also works, and is extensively commented to describe the problem it solves. I would like to refrain from unnecessary changes, certainly during the freeze, unless you insist.