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

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

Re: Refer to the directory of the currently being loaded elisp script fr


From: Hongyi Zhao
Subject: Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself.
Date: Thu, 10 Jun 2021 23:38:31 +0800

expand-file-name: Wrong type argument: stringp, nil

On Thu, Jun 10, 2021 at 11:34 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > Date: Thu, 10 Jun 2021 23:02:04 +0800
> >
> > (load-file (concat (file-name-directory load-file-name) "/auth.el.gpg"))
>
> Instead of 'concat', use 'expand-file-name'.

I tried with the following:

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

But meet the same error as the suggested method by Óscar Fuentes:

expand-file-name: Wrong type argument: stringp, nil

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



reply via email to

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