From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSToZ-0004pJ-AN for guix-patches@gnu.org; Fri, 22 Dec 2017 15:21:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSToU-0004ug-Ai for guix-patches@gnu.org; Fri, 22 Dec 2017 15:21:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:39676) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eSToU-0004uW-6Y for guix-patches@gnu.org; Fri, 22 Dec 2017 15:21:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eSToT-0007Z2-Ub for guix-patches@gnu.org; Fri, 22 Dec 2017 15:21:01 -0500 Subject: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat. Resent-Message-ID: From: Alex Kost References: <87lgke3vlz.fsf@gmail.com> <20171014102915.11778-1-go.wigust@gmail.com> <87y3o6uheo.fsf@gnu.org> <87d13yiw6w.fsf@gnu.org> <87609cluzf.fsf@gmail.com> <87zi6os3u3.fsf@gnu.org> <87fu8famhm.fsf@gmail.com> <877etofi3n.fsf@gmail.com> <87vah8hyxs.fsf@gnu.org> <87lghzyoyn.fsf@gmail.com> <878tdy1lmq.fsf@gmail.com> <87o9muxeo1.fsf@gmail.com> <87y3lxuk2x.fsf@gmail.com> <874lokvg84.fsf@gmail.com> Date: Fri, 22 Dec 2017 23:20:40 +0300 In-Reply-To: <874lokvg84.fsf@gmail.com> (Oleg Pykhalov's message of "Thu, 21 Dec 2017 07:48:27 +0300") Message-ID: <87vagyldk7.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Oleg Pykhalov Cc: 28832@debbugs.gnu.org Oleg Pykhalov (2017-12-21 07:48 +0300) wrote: > Hello Alex, > > Alex Kost writes: > >> Oleg Pykhalov (2017-12-20 06:26 +0300) wrote: [...] >>> Maybe we just need to fix "geiser"? >> >> Sorry, I don't understand what you mean. What is wrong with geiser and >> why/how should it be fixed? > > Elisp files of Geiser are in different place than others Emacs > packages. There is no 'guix.d/geiser-0.9/'. Oh, now I see what you mean. > (for-each (match-lambda =E2=80=A6) =E2=80=A6) in 'setup-environment' will= failed. > > Either we need to handle this case specific for Geiser or just > change where it need to store Elisp files in 'geiser' package recipe. It is not a specific Geiser case: installing *.el files in "share/emacs/site-lisp/" is a common practice. Actually, it is the default place where automake wants to install elisp files (using AM_PATH_LISPDIR macro), so whenever a package uses gnu-build-system, most likely it will install elisp files to the site-lisp directory. For example, the following packages do this: bbdb, gettext, emms, magit, emacs-wget, emacs-w3m, emacs-mmm-mode,... >> Also do other non-"emacs-" packages (magit, emms) have the same problem? > > Hm, > > /gnu/store/k9zrrzpdw0mld0lqyackba3kwbw41ipr-emacs-emms-4.3/share/emac= s/site-lisp/ > /gnu/store/zihybmvkccjb310fsxc2sad5j0w5vdi1-magit-2.11.0/share/emacs/= stie-lisp/ > > it seems that it will be easier to handle a case without > 'guix.d/PACKAGE-VERSION/'. I also think so, for example, 'emacs-inputs-el-directories' procedure simply adds "/share/emacs/site-lisp" along with the "guix.d/..." directory. [...] >>>> I think we shouldn't rely on the assumption that all emacs inputs have >>>> "emacs-" prefix >>> >>> Then, how to determine that a package is Emacs package? >> >> I don't know :-) 'emacs-inputs' is probably the best way. > > No :-), it only relies on "emacs-" prefix in store. > emacs-inputs -> emacs-package? -> (string-prefix? "emacs-" name) Yeah, I understand this. I meant this is the best way we have at our disposal. I also don't know how to determine emacs packages without "emacs-" prefix (well, maybe by looking for *.el files inside the package store dir, not sure if it's suitable though). >>> emacs inputs contain "emacs-minimal" and "source". >>> So we actually need to remove "emacs-minimal" instead "emacs". >> >> or maybe both? since some packages uses 'emacs' instead of >> 'emacs-minimal' (emacs-auctex, emacs-exwm, etc.). > > Not both, because 'emacs-inputs' removes all inputs without "emacs-" > prefix, so 'emacs' too. Oh right, sorry. So to clarify the current situation, we have 2 problems: 1. 'emacs-package?' defines emacs package simply by checking "emacs-" prefix, so it doesn't find such packages as magit or geiser. This problem does not relate directly to your patch; rather it is the problem of the current 'emacs-build-system': if some emacs package depends on 'magit' or 'geiser' (currently there are no such packages), emacs-build-system will not compile *.el files (because it will not find 'magit'/'geiser' needed for compilation). 2. Your patch handles only "/share/emacs/site-lisp/guix.d//" but not "/share/emacs/site-lisp/". --=20 Alex