[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:40:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>> BTW, the correct method for concatenating a directory and a file name is
>>
>> (load-file
>> (concat
>> (file-name-as-directory (file-name-directory load-file-name))
>> "auth.el.gpg"))
>
> I tried you above code, it still doesn't work with the following info:
>
> file-name-as-directory: Wrong type argument: stringp, nil [2 times]
> Mark set
load-file-name is defined while the file is being loaded, after that it
is nil. So if you tried with `C-x C-e' or some other interactive command
it wont work.
Once the code above is in the correct file, save it, start Emacs and
report back what happens.
- 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 <=
- 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