From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names.
Date: Wed, 05 Feb 2014 14:09:36 -0500 [thread overview]
Message-ID: <jwviostfkoe.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <83ha8d1r1c.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Feb 2014 18:07:59 +0200")
> (file-name-directory "http://foo.com/wherever/index.html")
> => "http://foo.com/wherever/"
> (file-name-absolute-p "http://foo.com/wherever/index.html")
> => nil
That look reasonable (and didn't involve any remote connection or any
such problem).
And faccess("http://foo.com/wherever/") should presumably tell you that
dir doesn't exist. So it behaves just as well as the current code.
> Moreover, no one said that any particular DOCUMENT that is passed to
> this function will have an Emacs file handler.
Indeed, I made no such assumption.
>> But we could also let-bind file-name-handlers-alist to nil around those
>> calls (or use lower level code which does something similar).
> We do the latter. I don't think the former is a good idea, because I
> think at least expand-file-name should allow its handler to run,
> e.g. for use cases like cygwin-mount.
I can agree for expand-file-name. I was talking only about the
file-name-directory and file-name-absolute-p calls.
>> - we don't check file-name-handlers
> Why is that a good idea? If a file name has a handler, any success in
> faccess etc. can only be a (rare) coincidence.
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.
>> - we only check (faccess dir) rather than (faccess file), and only if
>> there's a "dir".
> What is "dir" here?
See my sample code: (file-name-directory file)
>> - we don't bother with any of it if the file is already absolute.
> See above: deciding whether it is absolute is not easy.
I think we only need to use w32's own notion of "absolute". But using
file-name-absolute-p should work as well.
Stefan
next prev parent reply other threads:[~2014-02-05 19:09 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1W9Wnn-0004N6-IY@vcs.savannah.gnu.org>
2014-02-01 19:26 ` [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names Stefan Monnier
2014-02-01 19:58 ` Eli Zaretskii
2014-02-02 0:44 ` Stefan Monnier
2014-02-02 3:43 ` Eli Zaretskii
2014-02-02 15:06 ` Stefan Monnier
2014-02-02 15:54 ` Eli Zaretskii
2014-02-03 2:33 ` Stefan Monnier
2014-02-03 4:12 ` David Kastrup
2014-02-03 5:57 ` Eli Zaretskii
2014-02-03 5:55 ` Eli Zaretskii
2014-02-03 14:06 ` Stefan Monnier
2014-02-03 16:17 ` Eli Zaretskii
2014-02-04 3:39 ` Stefan Monnier
2014-02-04 16:31 ` Eli Zaretskii
2014-02-04 20:35 ` Stefan Monnier
2014-02-04 21:01 ` Eli Zaretskii
2014-02-05 2:38 ` Stefan Monnier
2014-02-05 3:56 ` Eli Zaretskii
2014-02-05 14:10 ` Stefan Monnier
2014-02-05 16:07 ` Eli Zaretskii
2014-02-05 19:09 ` Stefan Monnier [this message]
2014-02-05 19:56 ` Eli Zaretskii
2014-02-05 21:53 ` Stefan Monnier
2014-02-06 11:47 ` Eli Zaretskii
2014-02-02 7:45 ` Stefan-W. Hahn
2014-02-05 17:21 grischka
2014-02-05 17:29 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwviostfkoe.fsf-monnier+emacsdiffs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.