From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wAcfGdO1bmDdJwAAgWs5BA (envelope-from ) for ; Thu, 08 Apr 2021 09:50:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gMj0EtO1bmAXVwAAB5/wlQ (envelope-from ) for ; Thu, 08 Apr 2021 07:50:43 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CB72625314 for ; Thu, 8 Apr 2021 09:50:42 +0200 (CEST) Received: from localhost ([::1]:32834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUPR3-00023j-Te for larch@yhetil.org; Thu, 08 Apr 2021 03:50:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUPQK-00022k-88 for guix-devel@gnu.org; Thu, 08 Apr 2021 03:49:56 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:28199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUPQF-0000Xz-O3 for guix-devel@gnu.org; Thu, 08 Apr 2021 03:49:55 -0400 Received: from nijino.local (194-96-13-79.adsl.highway.telekom.at [194.96.13.79]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4FGD1j0GQtz3wNt; Thu, 8 Apr 2021 09:49:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1617868185; bh=wsLgw2V54wodl+sjiOJPY1jiPP4gPqUx/NkKljZiliQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Q7oDAhCVDwdJb6UlhN+Dz7Oy3tM1ysl5chUpIW6EORLxkFg+HMGJfKm6CClzGTfeh nHjPrbFtsnosiKJVLiR3ueNFNmz9+WKyjeAx0hwzImZm90ENHP/C6U430tx1XrTTcH rWyUBdMaRqNuITdr+v22ZFfEE1BESC6FvzJVC4hA= Message-ID: Subject: Re: A new wip-emacs branch From: Leo Prikler To: Carlo Zancanaro Date: Thu, 08 Apr 2021 09:49:43 +0200 In-Reply-To: <87y2dt4g87.fsf@zancanaro.id.au> References: <92b90b2aa6ed7d61beba38ff123b8bf1c0695234.camel@student.tugraz.at> <506adf4a0893b51bdc5cdbc02bbd4c34952279b2.camel@student.tugraz.at> <87y2dt4g87.fsf@zancanaro.id.au> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 Received-SPF: pass client-ip=129.27.2.202; envelope-from=leo.prikler@student.tugraz.at; helo=mailrelay.tugraz.at X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617868243; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=wsLgw2V54wodl+sjiOJPY1jiPP4gPqUx/NkKljZiliQ=; b=ZFaxQTt+NrvUvyWFx+yOds8U0lwfIy6mPCUL+r2VLcOT5y8mxbZV05Q3oURkz2YEmvyR4B 9/vxJ4o0WoyaBkSLxt9piRHLS+FLI7hiWcuzBy64W09uMTT5ReAOXNlIGBxPHvZStwpIjA rfhzO4abOcrrSOy8jH0bBMpyw/RTe9TCWJPgiL4wRehN2SssqTeU+ZjAdyO2T+Tg5Z/juo iTWwXrF8Q2kfhmF4hItYP0NW0cushgHhIiuL+dQh/c6qoVEv2KhtNBpAeEJeTw4XT9an0K zBfFmKY25Ck7y3Qf3GE6wZCC2ktS7uYhVobXtMiXOMlc5ILWNFOVLWLK2V+UMw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617868243; a=rsa-sha256; cv=none; b=URA7gykUzLzroTin7v/HWvbxskH75thZmCLv9dE5BZOse+B3NbfVcelgAcrAJsBZP2PYxL eUF5UH3s0iktGd7o2IxMQhWJvFZdDDWcMy7N37ZXF14myRPP41zjwNrR6KnKE3JoQHb4uk M5RtVT08mJY/ntiEn74VEzjWF28und1vYV2MQJdL4LP+sBDEbud2OQzIDwg4CLoiKKQeqG ttzrp0ErUGVurhs9MY+W5CJuzp4l59BlvvIOO8Nzc7YuMnyG500J1XOSazRHQDJRDGYt62 /sjDqMTu/grPUU1pGNfO6Ew2Owv5VI3JpEFf5LqMSHzWJmUInbjj9FXErffa/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=tugraz.at header.s=mailrelay header.b=Q7oDAhCV; dmarc=pass (policy=none) header.from=student.tugraz.at; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=tugraz.at header.s=mailrelay header.b=Q7oDAhCV; dmarc=pass (policy=none) header.from=student.tugraz.at; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: CB72625314 X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: auhGmLPDxT4Z Hi Carlo, Am Donnerstag, den 08.04.2021, 13:17 +1000 schrieb Carlo Zancanaro: > Hi Leo! > > Thanks so much for working to improve Emacs packaging in Guix! I > have a question and a comment about your approach on the wip-emacs > branch. > > On Tue, Apr 06 2021, Leo Prikler wrote: > > Emacs now gets its core lisp path from the wrapper rather than > > the search path and there's a new profile hook adding all > > top-level subdirectories to a subdirs.el, that gets loaded at > > startup. > > This sounds great in terms of Emacs starting in an already > established profile, but one key use case for me is to be able to > install new packages without restarting Emacs. Usually I can do > this in eshell by running > > $ guix install emacs-magit # shell command > ... > $ guix-emacs-autoload-packages # emacs command > ... > > I just tried this in a fresh profile with a Guix built from > wip-emacs, but it didn't seem to work. It's possible that I've > done something wrong (I'm doing it with time-machine, which adds > its own complexities), but are you expecting this to work? It > looks like guix-emacs wasn't loaded, and it wasn't on the load > path, but I haven't had a chance to investigate further than that. guix-emacs should still be loaded by site-start.el, which also initially loads your autoloads. What changes for "Guix in Emacs modifying Emacs", is that you'll probably have to reload the subdirs.el file before autoloading the packages. The following snippet in (normal-top-level) seems to be responsible for setting up the load-path during init: ;; Look in each dir in load-path for a subdirs.el file. If we ;; find one, load it, which will add the appropriate subdirs of ;; that dir into load-path. This needs to be done before setting ;; the locale environment, because the latter might need to load ;; some support files. ;; Look for a leim-list.el file too. Loading it will register ;; available input methods. (let ((tail load-path) (lispdir (expand-file-name "../lisp" data-directory)) dir) (while tail (setq dir (car tail)) (let ((default-directory dir)) (load (expand-file-name "subdirs.el") t t t)) ;; Do not scan standard directories that won't contain a leim- list.el. ;; https://lists.gnu.org/r/emacs-devel/2009-10/msg00502.html ;; (Except the preloaded one in lisp/leim.) (or (string-prefix-p lispdir dir) (let ((default-directory dir)) (load (expand-file-name "leim-list.el") t t t))) ;; We don't use a dolist loop and we put this "setq-cdr" command at ;; the end, because the subdirs.el files may add elements to the end ;; of load-path and we want to take it into account. (setq tail (cdr tail)))) Perhaps we should extract it as a whole/some bits of it into a guix- emacs procedure, that is normally not called? > > Extending PATH in the same wrapper as EMACSLOADPATH seems to be > > a fairly cheap option, however. > > I'm not supportive of this, because extending PATH would also > change the binaries that are available through Emacs' shells, > which I use a lot. This would mean that either (a) the Emacs > packages can shadow what I've explicitly installed in my profile, > potentially leading to me running unexpected versions of programs, > or (b) installing something else in my profile might break > something in Emacs because the version has changed. This isn't > likely to be a major problem for coreutils and gzip, assuming > they're stable enough, but it is a problem in general. In my view > either patching the Emacs libraries (to avoid the conflict) or > propagating inputs (to expose the potential conflict while > building the profile) are better options. I don't think I agree with you here. For one, I'd suffix PATH like EMACSLOADPATH, so (a) will not happen. Recall, that in (b) you're describing the status quo. Yes, you will be able to bork Emacs by installing a malicious version of coreutils into your PATH, but that'd also happen if you did so currently. The only difference, is that you currently also bork it, if you don't have any coreutils at all, which is typically only the case in pure environments or containers. As for Emacs libraries written in Elisp, I'm kinda split. I'm not even sure if they should have a fallback when your environment is borked tbh. Consider Geiser for example. To correctly set up Geiser+Guile, you would not only Guile to be installed, but also GUILE_LOAD_PATH to be set to a meaningful value. This can be done with Guix environments by adding Guile, but doing so without Guile and its search paths from elisp is somewhat difficult. I also enjoy being able to hack with Geiser in Guile 3, even though the package builds against Guile 2.2, without needing to install a different one. Obviously, there are exceptions to this, that we can argue on a case by case basis, but to summarize, I don't think hardcoding paths throughout Emacs is a good idea. Regards, Leo