emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

file-relative-name returns "." instead of "./"


From: Drew Adams
Subject: file-relative-name returns "." instead of "./"
Date: Tue, 11 Oct 2005 13:32:20 -0700

emacs -q
M-: (file-relative-name "" default-directory)
This returns ".", but it should return "./" (IMO).

That's what it did in Emacs 20, and that makes more sense to me.

"." means nothing as a filename; it is "./" that is an abbreviation
for the current _directory_, and it is "./", not "." which, combined
with the default-directory, is "equivalent to FILENAME when used with
that default directory as the default" (from the doc string). This
property, advertised in the doc string, is not true of ".".

Apparently this was changed long ago when moving from Emacs 20 to 21,
but it seems quite wrong to me.


In GNU Emacs 22.0.50.1 (i386-mingw-nt5.1.2600)
 of 2005-06-26 on NONIQPC
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc
(3.3) --cflags -I../../jpeg-6b-3/include -I../../libpng-1.2.8/include -I../.
./tiff-3.6.1-2/include -I../../xpm-nox-4.2.0/include -I../../zlib-1.2.2/incl
ude'

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: ENU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t





reply via email to

[Prev in Thread] Current Thread [Next in Thread]