From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Karl Chen Newsgroups: gmane.emacs.devel Subject: exec-path "/:" prefix; file-name-handler-*; start-process Date: Tue, 20 Aug 2002 01:28:04 -0700 (PDT) Sender: emacs-devel-admin@gnu.org Message-ID: Reply-To: Karl Chen NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1029832176 20930 127.0.0.1 (20 Aug 2002 08:29:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 20 Aug 2002 08:29:36 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17h4OJ-0005RR-00 for ; Tue, 20 Aug 2002 10:29:31 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17h4q8-0005S9-00 for ; Tue, 20 Aug 2002 10:58:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17h4PN-0006nu-00; Tue, 20 Aug 2002 04:30:37 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17h4My-0006kr-00 for emacs-devel@gnu.org; Tue, 20 Aug 2002 04:28:08 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17h4Mw-0006kW-00 for emacs-devel@gnu.org; Tue, 20 Aug 2002 04:28:08 -0400 Original-Received: from hkn.eecs.berkeley.edu ([128.32.138.82]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17h4Mw-0006kR-00 for emacs-devel@gnu.org; Tue, 20 Aug 2002 04:28:06 -0400 Original-Received: from quarl (helo=localhost) by hkn.eecs.berkeley.edu with local-esmtp id 17h4Mu-0007ZP-00 for ; Tue, 20 Aug 2002 01:28:04 -0700 Original-To: emacs-devel@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6671 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6671 Why does initializing `exec-path' need to prepend a "/:" to paths that "would otherwise be treated as magic" ? [emacs.c : decode_env_path (): ... tem = Ffind_file_name_handler (element, Qt); if (! NILP (tem)) element = concat2 (build_string ("/:"), element); ... ] All single-directory (single slash) paths in PATH such as /bin turn into /:/bin. This may be the fault of sloppy regexes in ange-ftp. Seems like a dirty hack, having to say "this is a normal path." At first I thought it was a bug - there are unresolved bug reports about it in debian archives. I even wrote a lisp kludge around it to get rid of all initial "/:"s in exec-path. I use (simplified): (setq explicit-shell-file-name (which "bash")) On many systems bash is first found in /bin. (which "bash") finds "/:/bin/bash" since (file-executable-p "/:/bin/bash") returns t. However, "/:/bin/bash" is not acceptable as an `explicit-shell-file-name' for `shell' since it eventually calls `comint-exec' which calls `start-process'. I think either the /: prefixing can/should be removed from decode_env_path(), or file-name-handler stuff should be expanded to start-process and possibly other functions. If it still is neccessary for exec-path to have "/:" for single-directory paths (probably is; I don't know anything about emacs internals), then it should at least be documented in `exec-path' that the default-generated directory names in it could have a superfluous /: prepended. Then it would have been easy to figure out to add a "s,^/:,," in which.el. -- Karl Chen / quarl@quarl.org