From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: Please confirm this file-name-directory behavior Date: Fri, 14 Sep 2007 21:26:54 -0400 Organization: Symantec Message-ID: References: <1189780284.881345.172130@o80g2000hse.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1189820445 19089 80.91.229.12 (15 Sep 2007 01:40:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Sep 2007 01:40:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 15 03:40:39 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IWMe9-0002Cd-8Z for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Sep 2007 03:40:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IWMe8-00027R-Iv for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Sep 2007 21:40:32 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Fri, 14 Sep 2007 20:26:54 -0500 Original-Newsgroups: gnu.emacs.help Mail-Copies-To: nobody User-Agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X) X-Copies-To: never Original-Lines: 26 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 24.34.108.171 Original-X-Trace: sv3-ha6ThEHp37m7CQzFKKOoJfRWNyEi44bnZzA/UAngF512NSThTFaIRCkOLhdVWr3fGNREhJb0S/kVjL5!qgUxSkEKx6d09HfEYpr3B6w0ht70hr/f1lirXpDc894sY778HaYkCPIMLv5oeQN2nnGh5XXp5ewf!L8Xbh1EkWLrKM9jhmq1ylkVOULNNPiGL2Oe1JoXY7g== Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.35 Original-Xref: shelby.stanford.edu gnu.emacs.help:152097 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:47607 In article , Eli Zaretskii wrote: > > From: Mirko > > Date: Fri, 14 Sep 2007 14:31:24 -0000 > > > > I am running Emacs 22.1.1 on Windows XP, and I observe that file-name- > > directory does not check whether the actual directory exists. It just > > parses the string argument for the directory & file parts. > > > > I am not complaining about it not checking whether the directory > > exists, I just want to confirm that this behavior is by design. > > It's by design. file-name-directory is driven by syntax of file > names, not by whether files or directories exist. And it's easy to explain why it works this way. Suppose you wanted a function that creates a file, as well as its directory if necessary. It will call file-name-directory to get the directory name, and then check whether the directory exists to determine if it needs to create it. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***