screenshot
screenshot copied to clipboard
transient-setup: No key for screenshot--set-line-numbers-p
Getting the above error after highlighting a region and doing M-x screenshot
+1 . And I found out that it was caused by this commit: https://github.com/tecosaur/screenshot/commit/fdd1692a4c9cb0e616f9a5d264344f2803bec6b1
Interesting, I'm not sure what's going on with that...
~~yeah, same issue on my Nixos machine. Rolling back to f8204e82dc0c1158c401735d36a143e6f6d24cf5 solves the issue.~~
Rolling back doesn't seem to fix it for me. From what I can tell, the issue is that the bytecompiled file isn't loaded, so all functions that are generated at compile time (such as screenshot--set-line-numbers-p
) aren't found. (I really don't see why the above fix should work)
- I've installed it using doom by adding
(package! screenshot :recipe (:host github :repo "tecosaur/screenshot"))
to $DOOMDIR/packages.el - I'm using Emacs with nativecomp enabled (now that I say it out loud, this could be a cause)
- A fix that worked for me: Forcing emacs to load the byte-compiled file by including
(load-file (locate-library "screenshot.elc"))
in my $DOOMDIR/config.el
Same here. Doom user.
Workaround: navigate to "screenshot.el" and eval-buffer
.
+1. I'm using snapshot version of emacs
(load-file (locate-library "screenshot.elc"))
doesn't fix error, but (load-file (locate-library "screenshot.el"))
does
Hopefully this little bit from Spacemacs report issue function can help.
Description :octocat:
Screenshot.el is broken. :eyes:
Reproduction guide :beetle:
- Start Emacs
- Install screenshot.el using Quelpa.
-
M-x screenshot
Observed behaviour: :eyes: :broken_heart: The title of this issue.
Expected behaviour: :heart: :smile: Beautiful screenshot.
System Info :computer:
- OS: darwin
- Emacs: 27.2
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. 500335a2c)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
((python :variables python-backend 'anaconda)
markdown html helm auto-completion better-defaults emacs-lisp
(ess :variables ess-r-fetch-ESSR-on-remotes 't ess-r-backend 'lsp)
themes-megapack git org)
- System configuration features: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER GMP
Backtrace :paw_prints:
Debugger entered--Lisp error: (error "No key for screenshot--set-line-numbers-p")
apply(debug (error (error "No key for screenshot--set-line-numbers-p")))
transient--exit-and-debug(error (error "No key for screenshot--set-line-numbers-p"))
signal(error ("No key for screenshot--set-line-numbers-p"))
error("No key for %s" screenshot--set-line-numbers-p)
#f(compiled-function (obj) #<bytecode 0x1ff8d8837049>)(#<transient-suffix transient-suffix-1ff8d7391128>)
apply(#f(compiled-function (obj) #<bytecode 0x1ff8d8837049>) #<transient-suffix transient-suffix-1ff8d7391128> nil)
transient--init-suffix-key(#<transient-suffix transient-suffix-1ff8d7391128>)
transient--init-suffix(nil (1 transient-suffix (:command screenshot--set-line-numbers-p)))
transient--init-child(nil (1 transient-suffix (:command screenshot--set-line-numbers-p)))
#f(compiled-function (c) #<bytecode 0x1ff8d73910f1>)((1 transient-suffix (:command screenshot--set-line-numbers-p)))
mapcan(#f(compiled-functi
eval-buffer
on screenshot.el does work as reported here.
this help me fix bug thanks @yangsheng6810
Setting :build (:not compile)
in the straight.el recipe seems to help with that
^ the above solves this for me if anyone is wondering ... the line I have for Doom Emacs is
(package! screenshot :recipe (:host github :repo "tecosaur/screenshot" :branch "master" :build (:not compile)))
I'm think this has just been fixed by e7a8941d9ff2274c7f784c4d89c2ed4a70a45b0a (at long last!).