GNU bug report logs - #6273
dired-current-directory with `t' arg returns empty string in top-level mount-point "/"

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Tue, 25 May 2010 21:19:02 UTC

Severity: minor

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: MON KEY <monkey <at> sandpframing.com>
To: 6273 <at> debbugs.gnu.org
Subject: bug#6273: dired-current-directory with `t' arg returns empty string in  top-level mount-point "/"
Date: Tue, 25 May 2010 17:18:40 -0400
(dired-current-directory t) returns the empty string
when in a `top-level' mount point, e.g. "/"

(progn
  (dired "/" )
  (dired-current-directory t))
 => ""

,---- (documentation 'dired-current-directory)
| {...}
| This returns a string with trailing slash, like `default-directory'.
| Optional argument means return a file name relative to `default-directory'.
`----

In the case at hand it does not return a string with trailing slash...
and appears in contrast to the return value of following forms:

(progn
  (dired "/")
  (file-relative-name default-directory))
 => "./"

(progn
  (dired "/")
  (file-relative-name (dired-default-directory)))
 => "./"

which are likewise at odds with each of the following:

(progn
  (dired "/")
  (dired-make-relative (dired-default-directory)))
  => ""

(progn
  (dired "/")
  (dired-make-relative (dired-make-absolute default-directory)))
 => "/"

So which is the correct return value? Relatively speaking...

GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-05-10

--
/s_P\




This bug report was last modified 9 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.