From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#17330: files.el cd-absolute overcome false negative from file-executable-p Date: Sun, 04 May 2014 09:01:12 -0400 Message-ID: References: <41559D99-B080-4B34-B491-3A811FA9FEAE@bluewin.ch> <5364B437.2070106@bluewin.ch> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1399208551 19293 80.91.229.3 (4 May 2014 13:02:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 May 2014 13:02:31 +0000 (UTC) Cc: Philip Hodges , 17330@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 04 15:02:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wgw3h-000147-HW for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 May 2014 15:02:21 +0200 Original-Received: from localhost ([::1]:53306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wgw3g-0004or-PW for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 May 2014 09:02:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wgw3W-0004oi-C1 for bug-gnu-emacs@gnu.org; Sun, 04 May 2014 09:02:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wgw3O-0004qK-K1 for bug-gnu-emacs@gnu.org; Sun, 04 May 2014 09:02:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wgw3O-0004qF-HB for bug-gnu-emacs@gnu.org; Sun, 04 May 2014 09:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wgw3N-0002A3-SZ for bug-gnu-emacs@gnu.org; Sun, 04 May 2014 09:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 May 2014 13:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17330-submit@debbugs.gnu.org id=B17330.13992084828246 (code B ref 17330); Sun, 04 May 2014 13:02:01 +0000 Original-Received: (at 17330) by debbugs.gnu.org; 4 May 2014 13:01:22 +0000 Original-Received: from localhost ([127.0.0.1]:50392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wgw2i-00028v-Ua for submit@debbugs.gnu.org; Sun, 04 May 2014 09:01:21 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:48870) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wgw2g-00028T-73 for 17330@debbugs.gnu.org; Sun, 04 May 2014 09:01:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNLd/4Y/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCwsOJhIUGA0kLodWCNIZF456B4Q4BKkZgWqBcYFbIQ X-IPAS-Result: ArUGAIDvNVNLd/4Y/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCwsOJhIUGA0kLodWCNIZF456B4Q4BKkZgWqBcYFbIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="61447824" Original-Received: from 75-119-254-24.dsl.teksavvy.com (HELO ceviche.home) ([75.119.254.24]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 May 2014 09:01:12 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 26B7D66094; Sun, 4 May 2014 09:01:12 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Sun, 04 May 2014 00:16:17 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88627 Archived-At: > 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