From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Is `make-process' doing this? Date: Sun, 16 Oct 2016 22:15:12 +0300 Message-ID: <83inssyukf.fsf@gnu.org> References: <87lgxodsm8.fsf@fastmail.fm> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1476645332 15311 195.159.176.226 (16 Oct 2016 19:15:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Oct 2016 19:15:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Joost Kremers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 16 21:15:28 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvqu2-0002gM-To for ged-emacs-devel@m.gmane.org; Sun, 16 Oct 2016 21:15:23 +0200 Original-Received: from localhost ([::1]:57531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvqu5-0008UJ-1U for ged-emacs-devel@m.gmane.org; Sun, 16 Oct 2016 15:15:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvqtw-0008U8-QU for emacs-devel@gnu.org; Sun, 16 Oct 2016 15:15:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvqtt-0002KY-Lj for emacs-devel@gnu.org; Sun, 16 Oct 2016 15:15:16 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvqtt-0002KU-Iy; Sun, 16 Oct 2016 15:15:13 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2720 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bvqts-0005M5-Sc; Sun, 16 Oct 2016 15:15:13 -0400 In-reply-to: <87lgxodsm8.fsf@fastmail.fm> (message from Joost Kremers on Sun, 16 Oct 2016 21:02:55 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:208338 Archived-At: > From: Joost Kremers > Date: Sun, 16 Oct 2016 21:02:55 +0200 > > Run `emacs -Q', start IELM (for convenience) and type: > > IELM> (start-process "some-process" nil "evince" > "~/path/to/some.pdf") > > (Assuming that ~/path/to/some.pdf is an existing pdf file, of > course). This brings up an evince window with the error message: > > Unable to open document "file:///home/joost/~/path/to/some.pdf". > > The point is that if I do this from a shell (either some terminal > emulator, or even eshell or M-x shell in Emacs), it works fine. > So: > > ~ $ evince ~/path/to/some.pdf > > starts evince and opens the file without issue. Because the shell expands the tilde. See the hint from Andreas. > So I was wondering if it is `make-process' that adds the > "file:///home/joost/" part, or if it is evince, and if the latter, > if there is something about `make-process' that keeps evince from > recognising the argument as an absolute path inspite of the fact > that it starts with a tilde. Neither 'start-process' nor 'make-process' can expand arguments via 'expand-file-name', because they simply don't know which arguments are file names and which aren't, with the single exception: the program's executable file name. So it's up to your code to do that for any other arguments that you know are file names.