reddit / emacs

Use-package: Unrecognized keyword: :straight

waterstrider123 · 2022-01-30 16:34
I want to incorporate this feature into my emacs workflow so I can insert LaTex equations by copy paste. [https://github.com/jethrokuan/mathpix.el](https://github.com/jethrokuan/mathpix.el) However, I get the following error when I try out the sample setup on the github page: `(error "use-package: Unrecognized keyword: :straight")` I was wondering how I can fix it because the feature seems to be very useful.
xircon · 2022-01-30 16:40
Have you bootstrapped straight? https://github.com/raxod502/straight.el
franburstall · 2022-01-30 16:51
If you are not already using `straight` (sounds like you aren't): simply download `mathpix.el`; put it somewhere in yr load-path; byte-compile it and do (require 'mathpix) in yr init.
TheTratz · 2022-01-31 04:08
I'm not sure the OP even knows what straight is. They may be assuming that straight is a normal option for use package. It is not. The documentation for this package needs to be more basic
deaddyfreddy · 2022-01-31 09:56
use-package has `:load-path` keyword
basicfn · 2022-01-31 11:20
Are you even using straight.el??
c256 · 2022-01-31 11:43
use-package is an add-on for emacs that makes it simpler to add and customize other add-ons, as long as they are bundled up _and distributed_ in a certain way. (Details: this means, roughly, as long as they use emacs’s built-in package format, AND as long as they are available from the standard package archive. The list of package archives can be extended quite easily to other package archives. Emacs ships with GNU ELPA (aka Emacs Lisp Package Archive), plus newer versions will also have Non-GNU ELPA (which includes free-software approved packages that haven’t taken the extra steps to be included in GNU ELPA), and many people use MELPA, a third-party archive that includes _lots_ of packages on an as-is basis. There are others, but these are the current big three. One of the nice features of use-package is that it can simplify upgrading the packages that it “uses” when new versions come out. straight is an emacs add-on that implements some alternatives to the built-in package system. In particular, it implements the ability to run code “straight from the local repository” — that is, without first being bundled into a package. When straight and use-package are both installed, they can work together; use-package continues to be an easy way to add and customize “packages”, but it can also use straight to run the code “straight” rather than bundled. In this case, it’s trying to run the code straight from GitHub — that is, if use-package doesn’t find the code (for mathpix) already on your system, it will first go out and grab a copy from GitHub, put it on your computer, and then configure and run it.) Starting from a plain, fresh emacs (such as an unconfigured emacs or emacs run with the ‘-Q’ command-line switch), you would either need to load mathpix directly (download a copy, put it into place, and then turn it on inside emacs), or you could install use-package and straight, and have them do it for you. Neither way is very hard, but both will require some series of emacs commands. Additionally, the mathpix package itself requires an ‘app id’ and ‘app key’ from the mathpix service. If you would like help with any of these steps, just ask.