[Top][All Lists]

[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: Thu, 06 Feb 2014 13:47:25 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Wed, 05 Feb 2014 16:53:51 -0500
> >> That look reasonable (and didn't involve any remote connection or any
> >> such problem).
> > How is the 2nd one reasonable?
> Why shouldn't it be?  It's in a context where url-handler-mode is
> deactivated, so Emacs has no reason to presume that it's a URL.
> > It means we will pass it through
> > expand-file-name,
> Which might be the right thing to do.
> >   (expand-file-name "http://foo.com/wherever/index.html";)
> >     => "d:/gnu/bzr/emacs/trunk/http:/foo.com/wherever/index.html"
> If d:/gnu/bzr/emacs/trunk/http:/foo.com/wherever/ exists, then I'd argue
> it was the right thing to do.

We are talking about Windows, where such file names are impossible.

> >> 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.
> The correlation is weak.  I don't think this heuristic is worth much if
> anything in this context.

Even a weak correlation is something.  And this was introduced in
response to a bug report that clearly had to do with a file which did
have a handler.

> > I don't see how your proposal is simpler than what's already there, or
> > better, sorry.
> It's better because all the checks are *directly* related to the problem
> at hand: detecting non-absolute file names which include
> a directory component.
> If you only care about simpler, then we can just remove the
> file-name-handler check and only rely on the faccess check.
> That should work just as well.

The existing code also works, and is extensively commented to describe
the problem it solves.  I would like to refrain from unnecessary
changes, certainly during the freeze, unless you insist.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]