[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question regarding load-path handling for ELPA packages
From: |
Michael Heerdegen |
Subject: |
Re: Question regarding load-path handling for ELPA packages |
Date: |
Sun, 19 May 2024 22:11:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Xiyue Deng <manphiz@gmail.com> writes:
> Actually I'd like to make dh-elpa handle `load-path' of its package
> installation directory (by default it's
> `/usr/share/emacs/site-lisp/elpa/foo') the same as how package.el
> handles any ELPA package, a.k.a. only add the installation path to
> `load-path' but not its subdirectories recursively. Hopefully with your
> pointer I can figure this out, which make take a while.
Does dh-elpa generate autoloads? Can that process maybe even just call
`package-generate-autoloads'?
Anyway, all the magic is the addition of this (constant!) expression:
#+begin_src emacs-lisp
(add-to-list 'load-path
(or (and load-file-name
(directory-file-name
(file-name-directory load-file-name)))
(car load-path)))
#+end_src
to the generated loaddefs files. "Constant" means: file names are not
substituted in that expression - i.e. really that expression literally.
This works because when the according autoloads file is loaded the
variable `load-file-name' then contains the according current file name
and ... etc, you get it?
Anyway, ask as many question as you need to understand the process.
If you do want to ask a developer more involved you can for example CC
Stefan Monnier <monnier@iro.umontreal.ca> though, I think so far I
answered your questions correctly.
Michael.
- Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/09
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/17
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/17
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/17
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/18
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/18
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/19
- Re: Question regarding load-path handling for ELPA packages,
Michael Heerdegen <=
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/20
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/22
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/22
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/26
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/27
Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/17