unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: elisp: isn't default-directory always the dir of current file??
Date: Mon, 02 Mar 2009 21:06:15 -0700	[thread overview]
Message-ID: <goiabm$6u1$2@ger.gmane.org> (raw)
In-Reply-To: <3fde486e-8b96-49d3-a69e-a727216ca5bf@k9g2000prh.googlegroups.com>

Xah Lee wrote:
> What i sought is load-file-name or buffer-file-name.
> (file-name-directory (if load-file-name load-file-name buffer-file-
> name))

(file-name-directory (or load-file-name buffer-file-name))

is the idiomatic way to express that.

-- 
Kevin Rodgers
Denver, Colorado, USA





      reply	other threads:[~2009-03-03  4:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02  6:54 elisp: isn't default-directory always the dir of current file?? Xah Lee
2009-03-02  7:27 ` Xah Lee
2009-03-02  7:46   ` Xah Lee
2009-03-02 10:32     ` Lennart Borgman
     [not found]     ` <mailman.2198.1235989932.31690.help-gnu-emacs@gnu.org>
2009-03-02 20:32       ` Xah Lee
2009-03-03 16:45         ` Mike Mattie
     [not found]         ` <mailman.2298.1236115585.31690.help-gnu-emacs@gnu.org>
2009-03-03 22:49           ` Xah Lee
2009-03-02 13:12 ` Alan Mackenzie
2009-03-02 20:38   ` Xah Lee
2009-03-03  4:06     ` Kevin Rodgers [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='goiabm$6u1$2@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).