From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: how having the basename of a file or directory Date: Mon, 31 Jan 2011 13:07:52 +0100 Message-ID: References: <8739o9ilfs.fsf@gmail.com> <877hdl4grd.fsf@uwakimon.sk.tsukuba.ac.jp> <87y661h2ju.fsf@gmail.com> <877hdl5o99.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1296475689 10158 80.91.229.12 (31 Jan 2011 12:08:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 12:08:09 +0000 (UTC) Cc: "Stephen J. Turnbull" , emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 31 13:08:03 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PjsY7-0001DV-4P for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2011 13:08:03 +0100 Original-Received: from localhost ([127.0.0.1]:52905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjsY5-00019Y-Qj for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2011 07:08:01 -0500 Original-Received: from [140.186.70.92] (port=49290 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjsY0-00019J-RQ for emacs-devel@gnu.org; Mon, 31 Jan 2011 07:07:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjsXz-0002R3-F4 for emacs-devel@gnu.org; Mon, 31 Jan 2011 07:07:56 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.10]:38423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjsXz-0002Qx-7P for emacs-devel@gnu.org; Mon, 31 Jan 2011 07:07:55 -0500 Original-Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 39142188B58E; Mon, 31 Jan 2011 13:07:53 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 961271C000A0; Mon, 31 Jan 2011 13:07:53 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id 0bwNcJrxwWm6; Mon, 31 Jan 2011 13:07:52 +0100 (CET) Original-Received: from hase (ppp-88-217-107-21.dynamic.mnet-online.de [88.217.107.21]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 31 Jan 2011 13:07:52 +0100 (CET) X-Yow: Go on, EMOTE! I was RAISED on thought balloons!! In-Reply-To: <877hdl5o99.fsf@gmail.com> (Thierry Volpiatto's message of "Mon, 31 Jan 2011 12:03:14 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 212.18.0.10 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:135297 Archived-At: Thierry Volpiatto writes: > Andreas Schwab writes: > >> Thierry Volpiatto writes: >> >>> (file-name-nondirectory "path/to/a/directory") >>> should return ==> directory >> >> It does. > Not really. > It does if PATH doesn't end with "/" otherwise no, it's why file-name-nondirectory doesn't care whether the argument is a directory or not, it looks only at the contents of the string. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."