all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Knowing the name of a file from the file itself
Date: Tue, 21 Oct 2008 03:28:57 +0200	[thread overview]
Message-ID: <1224552889.48382@arno.fh-trier.de> (raw)
In-Reply-To: <47ec3b12-d424-4b0f-8a90-d6ee3ca2add8@m73g2000hsh.googlegroups.com>

abc wrote:
> Hi everyone,
> 
> I'm a recent Emacs convert. I'm structuring my .emacs.d directory
> which has become quite messy.
> 
> For that purpose, I'd like to know if it's possible to know the name
> of a file and the path to it from the file itself, like in many other
> languages, e.g. Ruby.
> 
> I've looked for a variable or function for this with no luck.
> 
> 
> Thanks in advance.

I think `load-file-name' is what you are looking for.


,----[ C-h v load-file-name RET ]
| load-file-name is a variable defined in `C source code'.
| Its value is nil
|
|
| Documentation:
| Full name of file being loaded by `load'.
|
`----


-ap


  parent reply	other threads:[~2008-10-21  1:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-20 23:04 Knowing the name of a file from the file itself abc
2008-10-21  0:25 ` Andy Stewart
2008-10-21  1:28 ` Andreas Politz [this message]
2008-10-21 10:13   ` abc

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=1224552889.48382@arno.fh-trier.de \
    --to=politza@fh-trier.de \
    --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.
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.