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 18:31:24 +0200 Message-ID: <837g9a3kmb.fsf@gnu.org> References: <83ob2q4nbv.fsf@gnu.org> <83k3de41sc.fsf@gnu.org> <83iosx4iid.fsf@gnu.org> <83txcg3fle.fsf@gnu.org> <83lhxs2mru.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1391534328 635 80.91.229.3 (4 Feb 2014 17:18:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Feb 2014 17:18:48 +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 18:18:55 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 1WAje9-0001sT-EQ for ged-emacs-devel@m.gmane.org; Tue, 04 Feb 2014 18:18:53 +0100 Original-Received: from localhost ([::1]:53529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAje8-0004yg-RX for ged-emacs-devel@m.gmane.org; Tue, 04 Feb 2014 12:18:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAjZn-00035p-Fn for emacs-devel@gnu.org; Tue, 04 Feb 2014 12:18:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAiuL-0002wo-2f for emacs-devel@gnu.org; Tue, 04 Feb 2014 11:33:47 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:34163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAiuK-0002wd-Qy for emacs-devel@gnu.org; Tue, 04 Feb 2014 11:31:33 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0N0H00500CEGLD00@mtaout29.012.net.il> for emacs-devel@gnu.org; Tue, 04 Feb 2014 18:33:21 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0H000DLCNKVI60@mtaout29.012.net.il>; Tue, 04 Feb 2014 18:33:21 +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.185 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:169387 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Mon, 03 Feb 2014 22:39:30 -0500 > > >> I guess the question for me now is "why call Fexpand_file_name"? > [...] > >> But I don't know which problem it was trying to solve. > > The problem happened when using a function in shr.el that no longer > > exists. To recreate that, I'd need to restore that function and trace > > through that. The result I do remember: w32-shell-execute failed > > because DOCUMENT was a non-absolute file name, but not in the > > directory where the function expected it to be. > > So maybe the simplest solution is to remove this call to > expand-file-name. Not sure which problem needs a solution here, but in any case, removing the expand-file-name call will get us back the original bug, described below. 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. It cannot be a relative file name that includes leading directories. > I suspect that if expand-file-name is needed it can always be called > before entering w32-shell-execute. That would be unusual: Emacs primitives generally expand their file-name arguments internally, they don't require that their callers do that. Why should this primitive be different?