Skip to content

Make install check aware of alternative package managers#1007

Draft
matsl wants to merge 1 commit into
masterfrom
package_manager_aware_install_check
Draft

Make install check aware of alternative package managers#1007
matsl wants to merge 1 commit into
masterfrom
package_manager_aware_install_check

Conversation

@matsl

@matsl matsl commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

What

Make install check aware of alternative package managers and avoid doing
packet-install for those. Adding a defcustom so users can choose to get an
automated install if using the standard package.el.

Why

There are multiple package managers so we can't assume users use
package.el. If it is not used then using it to install a package would likely
be an error an could damage a users setup or at least not be what the user
expects.

Supporting different package managers for an automatic install is beyond
where we want to go.

Note

The idea is to use hypb:ensure-dependency in all places where we today to packet-install-p. That would be

$ grep package-installed-p *.el
hsys-consult.el:  (unless (package-installed-p 'consult)
hsys-consult.el:  (unless (package-installed-p 'org-roam)
hui-treemacs.el:    (and (package-installed-p 'treemacs)
hypb.el:  (unless (package-installed-p 'interaction-log)
hypb.el:           (package-installed-p package))
hyrolo.el:    (unless (package-installed-p 'markdown-mode)
hyrolo.el:  (unless (package-installed-p 'markdown-mode)

Before implementing that could you, @rswgnu, take a look at what you think of
using this idea? If that makes sense I can complete this Draft.

@matsl matsl requested a review from rswgnu July 11, 2026 14:03

@rswgnu rswgnu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are on the right track. I would finish it off and add quelpa.

Comment thread hypb.el
(defun hypb:users-package-manager ()
"Return the package manager in use.
Current supported package managers are `straight', `elpaca', and `package'."
(cond ((and (featurep 'straight) (fboundp 'straight-use-package)) 'straight)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add quelpa too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read up on quelpa and it seems it is based on top of package.el. Users can mix installing using quelpa and package.el directly. So it is not clear a user would prefer to install the packages we dynamically depend on using quelpa. So we can let package.el handle a potential install for quelpa users. It will not cause any big problem for them if I understand things correctly.

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

Successfully merging this pull request may close these issues.

2 participants