[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: |
Óscar Fuentes |
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 17:42:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> 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
Eli is suggesting this:
(load-file (expand-file-name "auth.el.gpg"
(file-name-directory load-file-name)))
- Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself., (continued)
- Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself., Óscar Fuentes, 2021/06/10
- Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself., Hongyi Zhao, 2021/06/10
- Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself., Óscar Fuentes, 2021/06/10
- Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself., Hongyi Zhao, 2021/06/10
- Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself., Óscar Fuentes, 2021/06/10
- Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself., Hongyi Zhao, 2021/06/10
- Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself., Óscar Fuentes, 2021/06/11
- Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself., Hongyi Zhao, 2021/06/11
Re: Refer to the directory of the currently being loaded elisp script from within the Emacs lisp file itself., Eli Zaretskii, 2021/06/10