[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: |
Eli Zaretskii |
Subject: |
Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names. |
Date: |
Wed, 05 Feb 2014 21:56:23 +0200 |
> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Wed, 05 Feb 2014 14:09:36 -0500
>
> > (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).
How is the 2nd one reasonable? It means we will pass it through
expand-file-name, which gives the following BS:
(expand-file-name "http://foo.com/wherever/index.html";)
=> "d:/gnu/bzr/emacs/trunk/http:/foo.com/wherever/index.html"
> 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.
By sheer luck, if you ask me.
> >> - 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.
If DOCUMENT doesn't have file handlers, it is more likely to be a
local file or directory.
> >> - 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.
I don't see how your proposal is simpler than what's already there, or
better, sorry.
- 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., 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, 2014/02/05
- Re: [Emacs-diffs] trunk r116230: Fix bug #16558 with w32-shell-execute on remote file names.,
Eli Zaretskii <=
- 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