tecosaur / screenshot

Mirror of https://git.tecosaur.net/tec/screenshot.el
GNU General Public License v3.0
228 stars 14 forks source link

transient-setup: No key for screenshot--set-line-numbers-p #11

Closed shaunsingh closed 2 years ago

shaunsingh commented 3 years ago

Getting the above error after highlighting a region and doing M-x screenshot

sdvcrx commented 3 years ago

+1 . And I found out that it was caused by this commit: https://github.com/tecosaur/screenshot/commit/fdd1692a4c9cb0e616f9a5d264344f2803bec6b1

tecosaur commented 3 years ago

Interesting, I'm not sure what's going on with that...

ztlevi commented 3 years ago

yeah, same issue on my Nixos machine. Rolling back to f8204e82dc0c1158c401735d36a143e6f6d24cf5 solves the issue.

ctsk commented 2 years ago

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)

yangsheng6810 commented 2 years ago

Same here. Doom user.

Workaround: navigate to "screenshot.el" and eval-buffer.

codewylle commented 2 years ago

+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

bryce-carson commented 2 years ago

Hopefully this little bit from Spacemacs report issue function can help.


Description :octocat:

Screenshot.el is broken. :eyes:

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: The title of this issue.

Expected behaviour: :heart: :smile: Beautiful screenshot.

System Info :computer:

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.

donneyluckS commented 2 years ago

this help me fix bug thanks @yangsheng6810

SqrtMinusOne commented 2 years ago

Setting :build (:not compile) in the straight.el recipe seems to help with that

zackteo commented 2 years ago

^ 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)))

tecosaur commented 2 years ago

I'm think this has just been fixed by e7a8941d9ff2274c7f784c4d89c2ed4a70a45b0a (at long last!).