unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* file-name-sans-extension returns an absolute file name when given a relative path
@ 2004-07-20 16:04 Kevin Rodgers
  0 siblings, 0 replies; only message in thread
From: Kevin Rodgers @ 2004-07-20 16:04 UTC (permalink / 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-20 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-20 16:04 file-name-sans-extension returns an absolute file name when given a relative path Kevin Rodgers

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).