From: Eli Zaretskii <eliz@gnu.org>
To: Joost Kremers <joostkremers@fastmail.fm>
Cc: emacs-devel@gnu.org
Subject: Re: Is `make-process' doing this?
Date: Sun, 16 Oct 2016 22:15:12 +0300 [thread overview]
Message-ID: <83inssyukf.fsf@gnu.org> (raw)
In-Reply-To: <87lgxodsm8.fsf@fastmail.fm> (message from Joost Kremers on Sun, 16 Oct 2016 21:02:55 +0200)
> From: Joost Kremers <joostkremers@fastmail.fm>
> 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.
prev parent reply other threads:[~2016-10-16 19:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-16 19:02 Is `make-process' doing this? Joost Kremers
2016-10-16 19:07 ` Andreas Schwab
2016-10-16 20:31 ` Joost Kremers
2016-10-16 19:15 ` Eli Zaretskii [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83inssyukf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=joostkremers@fastmail.fm \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).