[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute o
From: |
Stefan Monnier |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> (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
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., (continued)
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Stefan Monnier, 2014/02/03
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Eli Zaretskii, 2014/02/03
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Stefan Monnier, 2014/02/03
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Eli Zaretskii, 2014/02/04
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Stefan Monnier, 2014/02/04
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Eli Zaretskii, 2014/02/04
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Stefan Monnier, 2014/02/04
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Eli Zaretskii, 2014/02/04
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Stefan Monnier, 2014/02/05
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Eli Zaretskii, 2014/02/05
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names.,
Stefan Monnier <=
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Eli Zaretskii, 2014/02/05
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Stefan Monnier, 2014/02/05
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Eli Zaretskii, 2014/02/06
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names., Stefan-W. Hahn, 2014/02/02