From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: file-name-sans-extension returns an absolute file name when given a relative path Date: Tue, 20 Jul 2004 10:04:54 -0600 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <40FD42A6.3090303@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1090339540 9543 80.91.224.253 (20 Jul 2004 16:05:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Jul 2004 16:05:40 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 20 18:05:15 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bmx7C-0002dM-00 for ; Tue, 20 Jul 2004 18:05:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bmx9v-0002zW-Tn for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Jul 2004 12:08:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bmx9t-0002yz-TT for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2004 12:08:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bmx9q-0002yG-E4 for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2004 12:08:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bmx9q-0002xz-Af for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2004 12:07:58 -0400 Original-Received: from [216.168.1.22] (helo=trinity.supernews.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Bmx6z-0007H9-1g for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2004 12:05:01 -0400 Original-Received: from mail.fu-berlin.de ([130.133.1.2]:1492) by trinity.supernews.net with esmtp (Exim 4.24; FreeBSD) id 1Bmx6x-0001XY-38 for gnu-emacs-bug@moderators.isc.org; Tue, 20 Jul 2004 16:04:59 +0000 Original-Received: by Mail.FU-Berlin.DE (Exim 4.40) from curry.zedat.fu-berlin.de ([160.45.10.36]) for gnu-emacs-bug@moderators.isc.org with esmtp id <1Bmx6p-0006an-Cd>; Tue, 20 Jul 2004 18:04:51 +0200 Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.uni-berlin.de with bsmtp id ; Tue, 20 Jul 2004 18:04:51 +0200 (MEST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 40 X-Orig-X-Trace: news.uni-berlin.de 3B4RFsGYl3YJHGNdI10oKgaHzd06Uyf593EAiPSflxNTFBjjU= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:8454 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:8454 In GNU Emacs 21.3.1 (i386-pc-solaris2.7, X toolkit) of 2003-04-24 on briard Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: nil default-enable-multibyte-characters: t file-name-sans-extension returns an absolute file name when given a relative path, whereas file-name-sans-versions returns a relative file name (as it should): ;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. (file-name-sans-extension "abc.xyz") "abc" ; OK (file-name-sans-extension "foo/abc.xyz") "/home/kevinr/foo/abc" ; bug (let ((default-directory nil)) (file-name-sans-extension "foo/abc.xyz")) "/foo/abc" ; bug (file-name-sans-versions "abc.~123.456~") "abc" ; OK (file-name-sans-versions "foo/abc.~123.456~") "foo/abc" ; OK -- Kevin Rodgers