From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Re: Problem with non-valid file names on w32 Date: Thu, 30 Nov 2006 15:08:02 +0100 Message-ID: References: <456ED855.9070006@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1164895780 25687 80.91.229.2 (30 Nov 2006 14:09:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Nov 2006 14:09:40 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 30 15:09:35 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GpmbB-0006EB-VU for ged-emacs-devel@m.gmane.org; Thu, 30 Nov 2006 15:09:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpmbB-0007UB-Fr for ged-emacs-devel@m.gmane.org; Thu, 30 Nov 2006 09:09:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gpma5-0006xn-NT for emacs-devel@gnu.org; Thu, 30 Nov 2006 09:08:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gpma4-0006wT-1Y for emacs-devel@gnu.org; Thu, 30 Nov 2006 09:08:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gpma3-0006wN-UT for emacs-devel@gnu.org; Thu, 30 Nov 2006 09:08:03 -0500 Original-Received: from [66.249.92.169] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gpma3-0000Np-Du for emacs-devel@gnu.org; Thu, 30 Nov 2006 09:08:03 -0500 Original-Received: by ug-out-1314.google.com with SMTP id j3so2309016ugf for ; Thu, 30 Nov 2006 06:08:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jdzpYk3DbLIUGGnV6Ehv66y4WeM5UYe6lSxJHaMpJ0AemuRhmvyqunFh+AZSrbVnnPBcWJSEEQ9s7fV09IBl+CW6tqcl00kynl4qvYaMGAeNdrz1POv8PUu5xzeiZh/P17dePy0MqcKtJXdg+3EKyJ18T9l34noPONMKaIqyfnA= Original-Received: by 10.82.127.15 with SMTP id z15mr825595buc.1164895682098; Thu, 30 Nov 2006 06:08:02 -0800 (PST) Original-Received: by 10.82.147.2 with HTTP; Thu, 30 Nov 2006 06:08:02 -0800 (PST) Original-To: "Lennart Borgman" In-Reply-To: <456ED855.9070006@student.lu.se> Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63134 Archived-At: On 11/30/06, Lennart Borgman wrote: > When you try to save the file Emacs will be noted about the problem and > tell the user. So maybe it is not that catastrophic, but it is not > pretty IMO. If you have shared resources, the rules governing file name validity could be different in some mounted volumes. How do you plan to say that to Emacs? > It gets a bit worse if you have file names like > "c:/some/path/d:hidden.txt". In this case Emacs will not complain when > saving the file. Instead a hidden stream is created. That is a feature (if unintended). foo:bar is not an invalid name in Windows. Moreover, it will only happen for the infamous C:foo case. If you try C:/my/dir/d:/another/dir/file.txt the buffer will be saved (assuming it exists) on "d:/another/dir/file.txt". > This seems to be the way our > famous relative Notepad does it. (Except for the awkward hidden case.) Why do you call it "awkward"? It's a feature, and that's its syntax. CMD does not do a very good job of handling streams, but for example in 4NT you can do: C:\> copy con foo:bar con => foo:bar foobar fubar ^Z 1 file copied C:\> type foo:bar foobar fubar C:\> dir /: foo Volume in drive C is unlabeled Serial number is 0836:9fa9 Directory of C:\foo 30/11/2006 14:52 0 foo 14 bar:$DATA 14 bytes in 1 file and 0 dirs 0 bytes allocated 175.102.554.112 bytes free C:\> /L/e/k/t/u