Subject: bug#2341: closed (Re: absolute file name arg of `true-filename': should/must?)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 03 Mar 2011 08:12:02 +0000

Your bug report

#2341: absolute file name arg of `true-filename': should/must?

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
2341: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2341
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: absolute file name arg of `true-filename': should/must?
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Thu, 03 Mar 2011 03:11:11 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.1

Clarified.

Subject: absolute file name arg of `true-filename': should/must?
From: Juanma Barranquero <[email-masked]>
To: Emacs Bug Tracker <[email-masked]>
Date: Mon, 16 Feb 2009 10:09:54 +0100

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