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: Tue, 04 Feb 2014 23:01:17 +0200 Message-ID: <83vbwu1tk2.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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1391547694 6100 80.91.229.3 (4 Feb 2014 21:01:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Feb 2014 21:01:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 04 22:01:41 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 1WAn7k-0004wm-BO for ged-emacs-devel@m.gmane.org; Tue, 04 Feb 2014 22:01:40 +0100 Original-Received: from localhost ([::1]:55592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAn7j-00054n-Vl for ged-emacs-devel@m.gmane.org; Tue, 04 Feb 2014 16:01:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAn7b-0004ut-IC for emacs-devel@gnu.org; Tue, 04 Feb 2014 16:01:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAn7W-00088F-8A for emacs-devel@gnu.org; Tue, 04 Feb 2014 16:01:31 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:60664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAn7W-000883-0p for emacs-devel@gnu.org; Tue, 04 Feb 2014 16:01:26 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0N0H00M00OIRRR00@mtaout24.012.net.il> for emacs-devel@gnu.org; Tue, 04 Feb 2014 23:00:44 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0H00MV9P18E530@mtaout24.012.net.il>; Tue, 04 Feb 2014 23:00:44 +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.180 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:169395 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Tue, 04 Feb 2014 15:35:25 -0500 > > > The problem that led me to introduce this call is that this succeeds: > > (w32-shell-execute "open" "file") > > but this fails: > > (w32-shell-execute "open" "dir/file") > > IOW, the DOCUMENT arg must either be an absolute file name, or live > > inside default-directory, not in one of its subdirectories. > > Ah, that makes it more clear. We should include this example in the comments. Please see the new-and-improved commentary there. > It does beg the question: what does > > (w32-shell-execute "open" "dir/file") > > do, then? You say it "fails", but does it signal an error? Yes, it says the file was not found (a.k.a. ENOENT). > If so, why? Looks like a limitation of the OS API we use there. The error code comes directly from the API. > My world view is very POSIX-centric, so I'm probably missing the obvious. This API uses the "file association" infrastructure to find the application registered to open a file. Perhaps that infrastructure cannot cope with relative file names that have leading directories? That's a guess; the MS documentation doesn't say this clearly, which is why this code was not written like that to begin with.