From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: substitute-in-file-name is not distributive Date: Tue, 30 Oct 2012 17:24:45 -0400 Message-ID: References: <50750955.4020802@dancol.org> <5088B1F4.90302@dancol.org> <508F5319.4090604@dancol.org> <508FEBD8.8090505@dancol.org> <509034B4.7020301@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351632293 23710 80.91.229.3 (30 Oct 2012 21:24:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2012 21:24:53 +0000 (UTC) Cc: Emacs development discussions To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 30 22:25:02 2012 Return-path: Envelope-to: ged-emacs-devel@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 1TTJIz-00025j-Jg for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2012 22:25:01 +0100 Original-Received: from localhost ([::1]:53959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTJIr-0002sM-3N for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2012 17:24:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTJIo-0002sE-Em for emacs-devel@gnu.org; Tue, 30 Oct 2012 17:24:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTJIm-0003lm-V0 for emacs-devel@gnu.org; Tue, 30 Oct 2012 17:24:50 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:3748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTJIm-0003lU-Qg for emacs-devel@gnu.org; Tue, 30 Oct 2012 17:24:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+LET/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNEAETiBwFugmLHIUoA6MzgViDBYE7 X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="203184425" Original-Received: from 206-248-177-19.dsl.teksavvy.com (HELO pastel.home) ([206.248.177.19]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Oct 2012 17:24:46 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 0C5CF59419; Tue, 30 Oct 2012 17:24:45 -0400 (EDT) In-Reply-To: <509034B4.7020301@dancol.org> (Daniel Colascione's message of "Tue, 30 Oct 2012 13:12:36 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154593 Archived-At: > Relative file names come up during builds. Say I'm editing foo.c and > the build system outputs "objchk\x86\foo.o" in some message: I want to > be able to append this relative path and get back a full Cygwin path. What do you append it to? If the mapping is arbitrary, you first need to convert the Cywin name to Windows, the concat, then convert back, right? >> So Cygin itself treats "\\bin" and "/bin" as equivalent > No --- Cygwin treats "\\bin" just as Windows would: it's > a drive-letter-relative Windows path. "/bin" is a perfectly normal > POSIX path. Now I'm lost. So you're saying that Cygwin accepts backslash delimited file names and assumes they're Window file names? IOW Cygwin already accepts just as happily Windows file names? In this case, I'm wondering why you need s-i-f-n. Is it because Cygwin needs backslashes to recognize Windows file names whereas Emacs wants to turn all backslashes into slashes? Side related question: this seems to be related to your cygw32, yet at the same tine it seems to be more GUI-independent. How much of this affects Cygwin-X11 builds? Why has it not been a problem until now? >> If you limit yourself to: >> - rewrite "\\`[a-zA-Z]:" to "/cygdrive/c" (regardless if it is followed > Not all Cygwin installations use "cygdrive". I kind of know. > Every instance of the word "cygdrive" in Emacs is a bug. Feel free to fix them. > "/cygdrive/c/bin/ls.exe" and "/bin/ls.exe" refer to the same file, but > because the paths differ, Emacs will consider these as two distinct > files. Also, access semantics differ between drive-prefix-prefixed > paths and native Cygwin paths. That doesn't sound too terrible as a stop-gap until we can fix the underlying problem. Stefan