From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Schneider Newsgroups: gmane.emacs.help Subject: use-package, package.el, and system packages cooperation Date: Sun, 26 Jul 2020 20:23:08 +0200 Message-ID: <931B677D-3813-435D-802C-E1207856CBBD@chaotikum.eu> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13371"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 26 22:54:36 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jznfI-0003LZ-0a for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 26 Jul 2020 22:54:36 +0200 Original-Received: from localhost ([::1]:47322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jznfH-00051a-3P for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 26 Jul 2020 16:54:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jzlIr-0002gQ-NK for help-gnu-emacs@gnu.org; Sun, 26 Jul 2020 14:23:18 -0400 Original-Received: from mx0.chaotikum.eu ([2a01:4f8:c2c:ce71::1]:45566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jzlIp-0006Dl-FJ for help-gnu-emacs@gnu.org; Sun, 26 Jul 2020 14:23:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=chaotikum.eu; s=20200128.mx0; h=To:Date:Message-Id:Subject:Mime-Version: Content-Transfer-Encoding:Content-Type:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TcxHXgNICPyWtjN2DdHAvPm54oCcYgq7AzbT60x0S5w=; b=J3q93tsS/7V5q6m4KhntGjSSuc ixYrfefHtD10jSAX8QTQzlO3aroTs4kMYWdu00Ig49oKXbdCdCqcE0niHFdAWRTqZRhqi2NNIWeHf QkDjJ7znjBeJqQDnBMhQjaG5XWNIlMtP6aUnj2Hs7ktE6eTjM4mxQiF+q74GQA21xeZJALr7hUtut GSpTkU4Roe6n8c9M4JcrQ0XDft0jPOgvyObip+rDTkyMim6Sn+YiWby7t+JY+CF13EQrrTKX3k1ob 5vuDmdFQUI/xSlp0yTEUH6tLBrPe7Txk11ihbN4b00R511aAPOP8wthr1b21eyAAgIanXgkRJQJpF +qxKy4g2qKwSRQ3aqgnSYqZURokAzJ/YlAWez4uJXc6UsTMiZmH4tyNxn45y02b8ilMPmZkGXEh+h Original-Received: from 2001-4dd7-63f2-0-b9cd-8806-821-6da5.ipv6dyn.netcologne.de ([2001:4dd7:63f2:0:b9cd:8806:821:6da5]:49772) by mx0.chaotikum.eu with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jzlIj-0002lQ-9r for help-gnu-emacs@gnu.org; Sun, 26 Jul 2020 20:23:09 +0200 X-Mailer: Apple Mail (2.3608.80.23.2.2) Received-SPF: pass client-ip=2a01:4f8:c2c:ce71::1; envelope-from=qsx@chaotikum.eu; helo=mx0.chaotikum.eu X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 26 Jul 2020 16:54:12 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:123592 Archived-At: Dear list, I=E2=80=99m 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 (=E2=89=A5 25) (okay, the 25 is Debian oldstable and soon to be irrelevant for me, we = can reasonably assume =E2=89=A526) - 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=E2=80=99s 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 =E2=80=A6 stuff broke. I don=E2=80=99t = remember the details why. - Emacs to start swiftly - to keep what=E2=80=99s 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=E2=80=99t work with Emacs 25 (or = maybe Debian packaging changed, I don=E2=80=99t know). But even if it = had worked, it only would have been a solution for Debian. I=E2=80=99ve begun digging through the source of use-package and = package.el to make this work, but haven=E2=80=99t succeeded so far. As = it feels like I=E2=80=99m 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/58c8954c5be370c3638c1087aa64b2ddb= 919934b/dot.emacs.d/init.el Thanks for any help, --qsx=