From: Thomas Schneider <qsx@chaotikum.eu>
To: help-gnu-emacs@gnu.org
Subject: use-package, package.el, and system packages cooperation
Date: Sun, 26 Jul 2020 20:23:08 +0200 [thread overview]
Message-ID: <931B677D-3813-435D-802C-E1207856CBBD@chaotikum.eu> (raw)
Dear list,
I’m struggling to combine use-package, package.el, and Emacs packages installed by the system package manager (e.g., apt).
I have:
- the same init.el on all machines
- various Emacs versions (≥ 25)
(okay, the 25 is Debian oldstable and soon to be irrelevant for me, we can reasonably assume ≥26)
- various operating systems (including but not limited to: Gentoo, macOS, Debian, Fedora)
- root access on most, but not all hosts
I want:
- to install packages via the system package manager as much as possible
This is especially important for packages such as pdf-tools, which require development headers of several libraries, but are readily installed via system packages
- not to install packages again as user, when they are already installed system-wide
- especially as dependencies
For example, Gentoo provides AUCTeX, but not auctex-latexmk. When I install the latter via package.el, it installs AUCTeX again, even though it’s already installed system-wide
- to continue using use-package, or something else that helps me structure my init.el
- not to download half of MELPA the first time I start Emacs on a new host
Yes, this contradicts the (setq use-package-always-ensure t) in my init.el, because otherwise … stuff broke. I don’t remember the details why.
- Emacs to start swiftly
- to keep what’s left of my sanity ;)
I once found a tool that registers packages installed via dpkg/apt with package.el, but it was old and didn’t work with Emacs 25 (or maybe Debian packaging changed, I don’t know). But even if it had worked, it only would have been a solution for Debian.
I’ve begun digging through the source of use-package and package.el to make this work, but haven’t succeeded so far. As it feels like I’m reinventing the wheel, I hope someone can point out a better solution.
For reference, this is my init.el in its current state: https://github.com/qsuscs/.dotfiles/blob/58c8954c5be370c3638c1087aa64b2ddb919934b/dot.emacs.d/init.el
Thanks for any help,
--qsx
next reply other threads:[~2020-07-26 18:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-26 18:23 Thomas Schneider [this message]
2020-07-26 22:50 ` use-package, package.el, and system packages cooperation Dmitry Alexandrov
2020-07-27 8:18 ` tomas
2020-08-02 10:54 ` akater
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=931B677D-3813-435D-802C-E1207856CBBD@chaotikum.eu \
--to=qsx@chaotikum.eu \
--cc=help-gnu-emacs@gnu.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.