From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: Re: Emacs in multiple profiles Date: Thu, 24 Oct 2019 23:05:20 -0400 Message-ID: <871rv1ed8v.fsf@gmail.com> References: <9c395fd0-9458-7894-af8b-9294d212c60b@fastmail.net> <878tajzu03.fsf@gmail.com> <87a7uyd7qy.fsf@gmail.com> <874ll51mq3.fsf@gmail.com> <87zi2t4jgh.fsf@gmail.com> <877ep4z44b.fsf@gmail.com> <87tv88ihzc.fsf@ambrevar.xyz> <878spgo7ex.fsf@gmail.com> <87o8yccwtq.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44113) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNpun-00063j-MI for help-guix@gnu.org; Thu, 24 Oct 2019 23:05:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNpum-00047t-11 for help-guix@gnu.org; Thu, 24 Oct 2019 23:05:25 -0400 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]:38970) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNpul-00047l-RZ for help-guix@gnu.org; Thu, 24 Oct 2019 23:05:23 -0400 Received: by mail-qt1-x834.google.com with SMTP id t8so1164634qtc.6 for ; Thu, 24 Oct 2019 20:05:23 -0700 (PDT) In-Reply-To: <87o8yccwtq.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sat, 19 Oct 2019 22:19:29 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Pierre Neidhardt Cc: Alex Kost , myglc2@gmail.com, help-guix@gnu.org --=-=-= Content-Type: text/plain Hello Pierre, Pierre Neidhardt writes: > Maxim Cournoyer writes: > >> Maybe it is just my ignorance about XDG_DATA_DIRS, but, wouldn't it be >> more natural to use Emacs native mean of finding packages, akin to >> Python's PYTHONPATH? Emacs has the EMACSLOADPATH for this; per the >> Emacs manual: > > Well, I'd say it's my ignorance, not yours! > >> I had a working branch implementing this a long time ago; I could try >> reviving it if you have an interested in it. > > This seems to be the right thing to do, I'd say go ahead, I'd be happy > to review / test / send feedback for your patch! I've thought some more about this, and perhaps such a simple change the patch attached could do? It's late and I haven't tried it yet, sorry. Will try it out later. You'll have to rebuild just Emacs and the Emacs packages you use. Various cleanups could be undertaken in both Guix (no longer need the set-emacsloadpath phase in the emacs-build-system) and Emacs-Guix (no need for custom logic looking into ~/.guix-profile) and perhaps other places should this get merged. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-emacs-Locate-Elisp-libraries-via-EMACSLOADPATH.patch >From 809bdcc447557134fbf4278c3b0d4b7d186d190d Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 3 Jun 2017 12:56:36 -0700 Subject: [PATCH] gnu: emacs: Locate Elisp libraries via EMACSLOADPATH. * gnu/packages/emacs.scm (emacs): Add a search path specification for EMACSLOADPATH. --- gnu/packages/emacs.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 6c6f0e4567..0831dd575a 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -185,6 +185,13 @@ (native-search-paths (list (search-path-specification + (variable "EMACSLOADPATH") + ;; The versioned entries are for Emacs builtin libraries. + (files `(,(string-append "share/emacs/" version "/site-lisp/") + ,(string-append "share/emacs/" version "/lisp/") + "share/emacs/site-lisp/")) + (file-pattern ".*")) ;recursively add any sub directory + (search-path-specification (variable "INFOPATH") (files '("share/info"))))) -- 2.23.0 --=-=-= Content-Type: text/plain Maxim -- This is perhaps obsoleted by the above, but feel free to study Here is a branch of the two commits, based off master: https://gitlab.com/Apteryks/guix/tree/guixify-emacs-packages-discovery. Sadly, this is a world rebuilding change, due to having extended the search-path-specification record so that it supported declaring a trailing separator. --=-=-=--