all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself.
@ 2021-06-10 15:02 Hongyi Zhao
  2021-06-10 15:24 ` Óscar Fuentes
  2021-06-10 15:31 ` Eli Zaretskii
  0 siblings, 2 replies; 12+ messages in thread
From: Hongyi Zhao @ 2021-06-10 15:02 UTC (permalink / raw)
  To: help-gnu-emacs

I'm writing an elisp script which will load another file in the same
directory as this elisp script itself. The currently used command is
as follows:

(load-file (expand-file-name
"~/Public/repo/github.com/DvdMgr/screen2latex.el.git/auth.el.gpg"))

I want to construct the loaded file's path with the directory of the
elisp script itself, and I tried with the following but failed to do
the trick:

(load-file (concat (file-name-directory load-file-name) "/auth.el.gpg"))

Any hints/comments/suggestions for this problem?

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China



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

end of thread, other threads:[~2021-06-11 14:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-10 15:02 Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself Hongyi Zhao
2021-06-10 15:24 ` Óscar Fuentes
2021-06-10 15:31   ` Hongyi Zhao
2021-06-10 15:40     ` Óscar Fuentes
2021-06-10 23:55       ` Hongyi Zhao
2021-06-11  1:14         ` Óscar Fuentes
2021-06-11  3:47           ` Hongyi Zhao
2021-06-11 13:49             ` Óscar Fuentes
2021-06-11 14:26               ` Hongyi Zhao
2021-06-10 15:31 ` Eli Zaretskii
2021-06-10 15:38   ` Hongyi Zhao
2021-06-10 15:42     ` Óscar Fuentes

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.