Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorter recipe when using defaults #17

Open
a13 opened this issue May 20, 2020 · 8 comments
Open

Shorter recipe when using defaults #17

a13 opened this issue May 20, 2020 · 8 comments

Comments

@a13
Copy link

a13 commented May 20, 2020

Most of :quelpa recipes I use are just downloaded from github so to avoid duplications I'd like to write them like:

(use-package fnhh
  :quelpa "a13/fnhh"
  :config
  (fnhh-mode 1))

instead of the current

(use-package fnhh
  :quelpa
  (fnhh :repo "a13/fnhh" :fetcher github)
  :config
  (fnhh-mode 1))

I think it's very easy to (and I'm ready to) implement such functionality in use-package-normalize/:quelpa, so we can get package name from name-symbol, the default :fetcher keyword can be a defcustom, which defaults to github.

@steckerhalter
Copy link
Member

you could use:

(use-package fnhh :quelpa)

and it will use the recipe from the store

@a13
Copy link
Author

a13 commented May 21, 2020

it will use the recipe from the store

what store? I use quelpa only for the packages that aren't anywhere, so I don't think a recipe does exist at all.

@steckerhalter
Copy link
Member

steckerhalter commented May 22, 2020

The recipes are pulled from a store in quelpa-melpa-recipe-stores. Usually it is configured with the dir where the recipes from melpa are located but you can add your own (either dirs with recipes or lists with recipes). When you use (use-package fnhh :quelpa) by default it will use the recipe from melpa.

@kiennq
Copy link
Member

kiennq commented May 22, 2020

@a13 I think this is quite nice idea, to be able to pull from github (given it's the most popular host out there) with so little syntax.
User don't need to do anything more complicated such as writing custom recipes or some thing to install package out of MELPA recipe store, which will be a huge point for Quelpa.
This is just a short hand for use-package, so core functionality of Quelpa will not be affected and become more complicated.
I agree we should support this.
@steckerhalter WDYT?

@a13
Copy link
Author

a13 commented May 22, 2020

@kiennq thanks!

@steckerhalter
Copy link
Member

yeah, why not. but then I would suggest to add it to quelpa itself since we could distinguish between a string and a list as a recipe. if it is a string it is the shorthand notation and if it's a list we do the normal thing

@a13
Copy link
Author

a13 commented May 26, 2020

@steckerhalter there's one thing - AFAICS quelpa itself doesn't know the package name, only quelpa-use-package does

@steckerhalter
Copy link
Member

@a13 yeah. I'm not sure if the package name is mandatory but it could be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants