Open tjtrabue opened 1 year ago
So, I'm afraid I must tuck my tail. I discovered that the problem was indeed with straight.el
, after all, and I apologize for not digging into their documentation before I opened this issue. Apparently in the last 6 months or so, straight.el
enabled an experimental native-compilation feature if one is using Emacs built with native-compilation support, which I am. Thus, straight.el
will automatically attempt to compile all packages it installs by default, and for some reason helpful.el
throws that wrong type argument error when compiled. Anyways, the fix was to add the following configuration to my use-package
directive:
(use-package helpful
:ensure t
:defer t
;; THIS IS THE NEW PART
:straight
(helpful :type git :host github :repo "Wilfred/helpful"
;; Disable native-compilation when installing helpful to avoid compile-time error.
:build (:not native-compile))
:general
(general-def
;; Replace standard help functions with helpful functions.
"C-h f" 'helpful-callable
"C-h v" 'helpful-variable
"C-h k" 'helpful-key
;; Other useful keybindings.
"C-h C" 'helpful-command
"C-h F" 'helpful-function)
(my/user-leader-def
"C-d" 'helpful-at-point)
(general-def 'normal emacs-lisp-mode-map
"K" 'helpful-at-point))
EDIT: This did not solve my problem. Please see the next comment for a true fix.
Ok, this really baked my noodle, but I finally figured out what the real problem was. My second comment was incorrect. The problem has nothing to do with straight.el
's native-compilation feature. In fact, the issue has nothing to do with helpful
at all! It was one of helpful
's dependencies: elisp-refs
. For some reason, straight.el
cannot generate the autoloads file for elisp-refs
. I'm not sure why, but it's definitely the autoloads step of straight
's build process that fails with the Wrong type error: listp, 1
exception.
The solution was to add a specific build recipe for elisp-refs
to my ~/.emacs
file that skips the autoloads phase:
;; We have to specify how to install and load elisp-refs.el
(use-package elisp-refs
:demand t
:straight
(elisp-refs :type git :host github :repo "Wilfred/elisp-refs"
;; Skip the autoloads phase because straight.el can't seem to get it right.
:build (:not autoloads)))
(use-package helpful
;; THIS IS NEW: We must wait until elisp-refs has loaded, otherwise helpful will try its own
;; recipe for installing elisp-refs, which will break.
:after elisp-refs
:ensure t
:defer t
;; No need for a :straight directive at all anymore.
:general
(general-def
;; Replace standard help functions with helpful functions.
"C-h f" 'helpful-callable
"C-h v" 'helpful-variable
"C-h k" 'helpful-key
;; Other useful keybindings.
"C-h C" 'helpful-command
"C-h F" 'helpful-function)
(my/user-leader-def
"C-d" 'helpful-at-point)
(general-def 'normal emacs-lisp-mode-map
"K" 'helpful-at-point))
Greetings everyone,
First of all, just let me say thank you for this amazing plugin. I've used
helpful
for years, and I absolutely love it! In fact, I find it hard to get around Emacs' help system without it now that I'm used tohelpful
's amazing output.Recently, I upgraded to Emacs version 30.0.50, the latest master branch commit (specifically
42f46913884c5e431a0e6cc80b1808fc0ca636cf
), and ever since then when I try to installhelpful
using thestraight.el
package manager I am met with the following error:I would love to provide you with a full stack-trace of the error in question, but even when I run
(setq debug-on-error t)
in my~/.emacs
file I never get presented with the full trace. I don't know why since that usually works. Instead of popping open a debug buffer, I see only that short error message about the wrong type argument presented in another window, as well as the usual Emacs advice telling me to re-run emacs from the command line with the--debug-init
option, although even after running emacs with that option I get the same result.I should note that, before this event, I have never had a problem installing
helpful
usingstraight.el
, so I don't think it's a problem withstraight.el
. Here's myuse-package
directive I use to installhelpful
(and note that I have configureduse-package
to always install packages usingstraight.el
):This has been my configuration for years, too, so I don't think it's a configuration problem. Has anyone else had this problem installing
helpful
?Thank you all so much,
-Tom Trabue