Closed bertulli closed 1 year ago
Hey, thanks for raising. Can you try configuring your API token?
If that works, I'll update the error message to be less cryptic
Hello, I also got this error after updating through melpa.
I don't think you can evaluate a function within a vector like this. It will be treated like a literal and that's why it tries to find a suffix called ','.
I'm referring to the change in the latest commit.
IIUC, The point seems to be that in transient
having code as the description of a group is not permitted. Backquoting the vector, using (eval ...)
or the :description
keyword also don't work. :-/
Thanks for the info, guys! Do you mind checking if this commit fixes the issue?
(Pretty hacky solution, let me know if you think there are edge cases here)
Partially. It does now compile and should work (I haven't tried an exercise yet). However, it still isn't providing the functionality you want: right now, it always display as the transient title "Exercism (no track selected yet)"
. IIUC, this is because the variable exercism--transient-name
does get updated, but the title of the transient is "installed" only when the macro transient-define-prefix
is evaluated. Therefore, inspecting the variable I see, for instance, "Exercism actions (current track: rust)"
, but the title is not updated, because it uses a copy created in the transient definition.
EDIT: yes, the basic functionalities work
Almost works, as @bertulli said.
The last touch that is needed is to:
Turn exercism--transient-name
into a function.
For example just this works:
(defun exercism--transient-name ()
exercism--transient-name)
Add :description
before exercism--transient-name
in exercism transient.
(transient-define-prefix exercism ()
"Bring up the Exercism action menu."
[:description exercism--transient-name
("c" "Configure" exercism-configure)
("t" "Set current track" exercism-set-track)
("o" "Open an exercise" exercism-open-exercise)
("s" "Submit" exercism-submit)
;; TODO Use a transient flag instead of a separate prefix
("S" "Submit (then open in browser)" exercism-submit-then-open-in-browser)])
Good! And I have an addition about the current status: when the code gets reloaded (for instance, upon Emacs restart) the title gets properly updated (as the transient prefix gets reinstalled with the correct title). @Trisk3lion do you want to do a PR or I'll do it?
Thanks for that @Trisk3lion @bertulli! I've pushed in a commit for it. PTAL, thanks
It seems it works now! :confetti_ball: 🎉 Thanks! If @Trisk3lion doesn't have anything else to add, I'd say this can be closed.
Nothing more from me! @bertulli you can close it.
Hi!
I've installed the package via
package.el
. If I callM-x exercism
, the minibuffer showsNo key for ,
, and the*Messages*
buffer the slightly more informativetransient-setup: No key for ,
message. Settingdebug-on-error
tot
, I see the following backtrace:What could be the cause?
It doesn't matter if I loaded the package via
require
oruse-package
. I'm on Arch Linux,GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6) of 2022-12-05
.Thanks!