bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17330: files.el cd-absolute overcome false negative from file-execut


From: Stefan Monnier
Subject: bug#17330: files.el cd-absolute overcome false negative from file-executable-p
Date: Sun, 04 May 2014 09:01:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> I'm finding this rather abstract.  I think a reproducible example of
> the same kind of issue on a Unix platform would be helpful.

It's probably somewhere between hard and impossible to reproduce on
a Unix platform.

The problem is that cd-absolute wants to signal an error if the
directory specified can't be used, whereas within Emacs any string can
be used for the "current directory" (it's just that some choices lead
to errors later on, such as when trying to get to a relative-named file
or when trying to spawn a process).

AFAIK, the only moment where Emacs cares whether the OS can use
something as a current directory (i.e. when it does "chdir") is when it
spawn a process via call-process or start-process.

So, we could solve this problem either by dropping this error, or by
using call-process instead of file-executable-p.  Yet another way would
be to provide a new subroutine that gives access to chdir somehow
(e.g. "file-chdirable-p").

I think the simplest solution for now is to turn the error into a warning.


        Stefan





reply via email to

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