all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Emacs Bug Tracker <submit@emacsbugs.donarmstrong.com>
Subject: bug#2341: absolute file name arg of `true-filename': should/must?
Date: Mon, 16 Feb 2009 10:09:54 +0100	[thread overview]
Message-ID: <f7ccd24b0902160109q36d81f85nff60ff844156b6d7@mail.gmail.com> (raw)

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






             reply	other threads:[~2009-02-16  9:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-16  9:09 Juanma Barranquero [this message]
2011-03-03  8:11 ` bug#2341: absolute file name arg of `true-filename': should/must? Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7ccd24b0902160109q36d81f85nff60ff844156b6d7@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=2341@emacsbugs.donarmstrong.com \
    --cc=submit@emacsbugs.donarmstrong.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.