unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: file-name-sans-extension returns an absolute file name when given a relative path
Date: Tue, 20 Jul 2004 10:04:54 -0600	[thread overview]
Message-ID: <40FD42A6.3090303@yahoo.com> (raw)

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

                 reply	other threads:[~2004-07-20 16:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40FD42A6.3090303@yahoo.com \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).