all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#2341: absolute file name arg of `true-filename': should/must?
@ 2009-02-16  9:09 Juanma Barranquero
  2011-03-03  8:11 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Juanma Barranquero @ 2009-02-16  9:09 UTC (permalink / raw)
  To: Emacs Bug Tracker

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






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-03  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-16  9:09 bug#2341: absolute file name arg of `true-filename': should/must? Juanma Barranquero
2011-03-03  8:11 ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.