help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

use-package, package.el, and system packages cooperation


From: Thomas Schneider
Subject: use-package, package.el, and system packages cooperation
Date: Sun, 26 Jul 2020 20:23:08 +0200

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]