all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
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	[thread overview]
Message-ID: <CAGP6POLpE4V42RAyi3FHMHT3R9bcX7KLFd0RjhUL2Jkc38PvCg@mail.gmail.com> (raw)
In-Reply-To: <83tum5but1.fsf@gnu.org>

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	other threads:[~2021-06-10 15:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-06-10 15:42     ` Óscar Fuentes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGP6POLpE4V42RAyi3FHMHT3R9bcX7KLFd0RjhUL2Jkc38PvCg@mail.gmail.com \
    --to=hongyi.zhao@gmail.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.