help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get the directory of a package?


From: Marcin Borkowski
Subject: How to get the directory of a package?
Date: Wed, 03 Feb 2021 05:50:12 +0100
User-agent: mu4e 1.1.0; emacs 28.0.50

Hello,

assume that I'm writing a package which wants to use a file from the
same directory the .el (or .elc) file of the package is located in.  How
can the package know where in the filesystem it is located?

Bonus points for a method which works not only with `require', but also
with `load-file' and `eval-buffer' (in the last case,
`default-directory' will probably work, but I skimmed through all
variables and functions matching `directory$' and nothing seemed to be
what I'm looking for).

TIA,

-- 
Marcin Borkowski
http://mbork.pl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]