The first time (at least) when I compile I won't have anything
available in ‘~/.emacs.d’, so load relative to the directory the
compilation is happening in.
On Windows it will likely always be the case that ‘~/.emacs.d’ is
running behind the directory compilation is happening in, since it
doesn’t support proper symbolic links, and will probably get a special
‘install’ target in the Makefile to copy all the compiled files over.
- Rename to “ensure-library”, since I’m really trying to make sure a
certain library is installed and calling something like the following
is just silly:
(ensure-package geiser-impl :package geiser)
- Rename the “:from” keyword parameter to “:package” since it is
ambiguous when a “:path” keyword parameter is added, which could also
be considered to determine from where a library is loaded.
- Add the “:path” keyword parameter, some libraries aren’t managed by
package.el but by me. This parameter adds its value to the load path
before attempting to check if it has been installed.
- Instead of checking if the package is installed and can be located,
just try requiring it. This is easier for libraries not managed by
package.el, since they will technically not be installed.