With a fresh Emacs profile (for instance using HOME=/alternative/path/ emacs), add the following to .emacs.d/init.el:
(custom-set-variables
'(package-archives
(quote
(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))))
(package-initialize)
(package-refresh-contents)
(setq packages-to-install '(epkg))
(dolist (package packages-to-install)
(unless
(package-installed-p package)
(package-install package)))
(setq epkg-repository "/path/to/existing/epkg/repo") ;; This isn't necessary, but saves time cloning the repo
Open Emacs, run M-x epkg-list-packages and try to select one of the packages (with the mouse or clicking enter).
Expected result:
epkg and its dependencies are installed without errors, M-x epkg-list-packages lists the packages and selecting one of the packages displays information about it.
Actual result:
During the byte-compilation of epkg the following (non-fatal) warning is raised:
Warning (bytecomp): Unused lexical argument ‘ident’
Warning (bytecomp): ‘(row (car (emacsql db [:select * :from $i1 :where (= $i2 $s3)] (oref-default class closql-table) (oref-default class closql-primary-key) ident)))’ is a malformed function
Warning (bytecomp): reference to free variable ‘row’
Warning (bytecomp): the function ‘when-let’ is not known to be defined.
M-x epkg-list-packages works as expected. However, trying to select a package results in the following error message (and no information displayed):
Invalid function: (row (car (emacsql db [:select * :from $i1 :where (= $i2 $s3)] (oref-default class closql-table) (oref-default class closql-primary-key) ident)))
Further information
Weirdly, if use-package is installed before epkg none of the above issues occur (i.e. there's no warning message during compilation and selecting packages works). Hence, an init.el with:
(custom-set-variables
'(package-archives
(quote
(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))))
(package-initialize)
(package-refresh-contents)
(setq packages-to-install '(use-package epkg))
(dolist (package packages-to-install)
(unless
(package-installed-p package)
(package-install package)))
(setq epkg-repository "/path/to/existing/epkg/repo") ;; This isn't necessary, but saves time cloning the repo
will result in a functioning epkg.
In contrast, one with the order of installation of epkg and use-package switched:
(custom-set-variables
'(package-archives
(quote
(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))))
(package-initialize)
(package-refresh-contents)
(setq packages-to-install '(epkg use-package))
(dolist (package packages-to-install)
(unless
(package-installed-p package)
(package-install package)))
(setq epkg-repository "/path/to/existing/epkg/repo") ;; This isn't necessary, but saves time cloning the repo
results in a broken epkg (all of the above-mentioned issues are present).
If one diffs the .emacs.d directory trees corresponding to these two cases (use-package installed first or second), the only differing file is the byte-compiled .emacs.d/elpa/closql-20180616.2122/closql.elc, so it's possible that the actual bug is with closql and it only propages to epkg.
(Even more weirdly, it seems that if one tries to install epkg in a later Emacs session than the one when use-package was installed — i.e. one installs use-package, closes/kills Emacs, restarts Emacs, requires use-package, and then installs epkg — all the above issues are still present.)
Thanks for a great package — in the cases where I can get epkg to work, the interface is really lovely!
To reproduce:
With a fresh Emacs profile (for instance using
HOME=/alternative/path/ emacs
), add the following to.emacs.d/init.el
:Open Emacs, run
M-x epkg-list-packages
and try to select one of the packages (with the mouse or clicking enter).Expected result:
epkg
and its dependencies are installed without errors,M-x epkg-list-packages
lists the packages and selecting one of the packages displays information about it.Actual result:
During the byte-compilation of
epkg
the following (non-fatal) warning is raised:M-x epkg-list-packages
works as expected. However, trying to select a package results in the following error message (and no information displayed):Further information
Weirdly, if
use-package
is installed beforeepkg
none of the above issues occur (i.e. there's no warning message during compilation and selecting packages works). Hence, aninit.el
with:will result in a functioning
epkg
.In contrast, one with the order of installation of
epkg
anduse-package
switched:results in a broken
epkg
(all of the above-mentioned issues are present).If one diffs the
.emacs.d
directory trees corresponding to these two cases (use-package installed first or second), the only differing file is the byte-compiled.emacs.d/elpa/closql-20180616.2122/closql.elc
, so it's possible that the actual bug is withclosql
and it only propages toepkg
.(Even more weirdly, it seems that if one tries to install
epkg
in a later Emacs session than the one whenuse-package
was installed — i.e. one installsuse-package
, closes/kills Emacs, restarts Emacs,require
suse-package
, and then installsepkg
— all the above issues are still present.)Thanks for a great package — in the cases where I can get
epkg
to work, the interface is really lovely!