From: No Wayman <iarchivedmywholelife@gmail.com>
To: Philip Kaludercic <philipk@posteo.net>
Cc: Tony Zorman <soliditsallgood@mailbox.org>, 69410@debbugs.gnu.org
Subject: bug#69410: 30.0.50; [WISHLIST] Use-package: allow :ensure to accept package spec instead of separate :vc keyword
Date: Mon, 08 Jul 2024 22:30:23 -0400 [thread overview]
Message-ID: <87wmlvmh4w.fsf@gmail.com> (raw)
In-Reply-To: <87plrnhoem.fsf@posteo.net> (Philip Kaludercic's message of "Mon, 08 Jul 2024 15:52:17 +0000")
Philip Kaludercic <philipk@posteo.net> writes:
>> Okay, then allow :ensure to take `t` meaning, "install the
>> tarball"
>> and `:vc` as a special case to use package-vc.el. e.g.
>>
>> (use-package example :ensure :vc) ;;install via package-vc.
>
> Doesn't this go against your suggestion to have a uniform
> interface?
No. The :ensure keyword is the interface.
The semantics can vary depending on the package manager, though
most cases won't in practice.
For example, I would just teach Elpaca and straight to consider
:ensure :vc to mean the same as :ensure t.
> As we mentioned previously, :vc t can do this as well, without
> the
> need to handle special values.
:vc *is* the special value.
> FWIW I am not a fan of having package authors recommending the
> usage of
> package-vc, unless the user is interested in contributing
> patches. The
> ideal usage is just to re-use the package specifications
> provided by the
> ELPA server, without having to make up something yourself.
There are many recipes which do exactly what you say, but they
need to duplicate that info for less-experienced users. e.g.
(use-package example
;; uncomment one of the following to install with your package
manager of choice
;; :ensure t
;; :vc t
;; :straight t
;; :quelpa t
)
Users also have to find and edit every use-package declaration
which makes of use of such keywords if they decide to use a
different package manager. Under my proposal they would not need
to do as much work.
> Hmm, I get this point, but I don't see a neat and safe way to
> extend :ensure.
The same way any other package manager would extend it.
The semantics I proposed above seem to cover all cases in use for
other source-based package managers. Is there something special
package-vc needs that they do not?
> And we have to keep in mind, that use-package was originally
> made for package.el, and it was retrofitted to support other
> package
> managers later on. When considering this context, I think that
> privileging built-in functionality like package-vc is
> acceptable.
That was a wise decision. Otherwise it would be a leakier
abstraction than it needs to be.
Built-in functionality loses no privilege by making the interface
more consistent and flexible, though.
> Overall I am not that convinced that there is a worthwhile
> advantage
> in trying to unify these keywords.
Fair enough. I've laid out my arguments.
My bike-shedding budget is near nil these days, so I'll retreat.
> I don't understand why package authors feel the need to specify
> separate installation instructions for different packages to
> begin
> with, so I am lacking the motivation behind the problem to begin
> with.
A few reasons that come to mind:
Not all packages are hosted on ELPAs.
Often people want to share a package *before* it goes through an
ELPA's review process in hopes of gaining early testers.
Not all users use package.el.
next prev parent reply other threads:[~2024-07-09 2:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 16:06 bug#69410: 30.0.50; [WISHLIST] Use-package: allow :ensure to accept package spec instead of separate :vc keyword No Wayman
2024-06-30 10:42 ` Philip Kaludercic
2024-07-01 13:37 ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-01 19:57 ` Philip Kaludercic
2024-07-03 19:56 ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87zfr15hqj.fsf@gmail.com>
2024-07-01 14:28 ` No Wayman
2024-07-03 20:34 ` Philip Kaludercic
2024-07-08 12:12 ` No Wayman
2024-07-08 15:52 ` Philip Kaludercic
2024-07-09 2:30 ` No Wayman [this message]
2024-07-09 9:02 ` Philip Kaludercic
2024-07-09 9:56 ` No Wayman
2024-07-09 7:34 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 8:26 ` Philip Kaludercic
2024-07-03 19:51 ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wmlvmh4w.fsf@gmail.com \
--to=iarchivedmywholelife@gmail.com \
--cc=69410@debbugs.gnu.org \
--cc=philipk@posteo.net \
--cc=soliditsallgood@mailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).