GNU bug report logs -
#2341
absolute file name arg of `true-filename': should/must?
Previous Next
Reported by: Juanma Barranquero <lekktu <at> gmail.com>
Date: Mon, 16 Feb 2009 09:20:03 UTC
Severity: normal
Fixed in version 24.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Package: emacs,documentation
According to true-filename's docstring:
Return the truename of filename, which should be absolute.
In (elisp)25.6.3 Truenames:
The function `file-truename' returns the truename of the file
FILENAME. The argument must be an absolute file name.
OTOH,
(file-truename "test") => "C:/emacs/test"
and some functions seem to use it as expecting that it expands the
argument. For example, `find-buffer-visiting':
(defun find-buffer-visiting (filename &optional predicate)
"..."
(let ((predicate (or predicate #'identity))
(truename (abbreviate-file-name (file-truename filename))))
;; ...
where the argument FILENAME of `find-buffer-visiting' is usually not
an absolute file name.
The current behavior seems to be: "SHOULD be an absolute filename; if
it is not, it will be expanded using `default-directory'." Is that
intended, and if so, shouldn't it be documented?
Juanma
This bug report was last modified 14 years and 87 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.