From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:60243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggo5E-0002ZG-7x for guix-patches@gnu.org; Tue, 08 Jan 2019 04:54:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggo5C-00026c-ES for guix-patches@gnu.org; Tue, 08 Jan 2019 04:54:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49977) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ggo5C-00026L-B4 for guix-patches@gnu.org; Tue, 08 Jan 2019 04:54:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ggo5C-0002sQ-1k for guix-patches@gnu.org; Tue, 08 Jan 2019 04:54:02 -0500 Subject: [bug#33598] Optimizations for emacs-clang-format and emacs-clang-rename Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <871s6l9h54.fsf@gnu.org> <87r2ekea1u.fsf@ambrevar.xyz> <04daca2a-705d-6255-85bd-48132879f5a8@yahoo.de> <87lg4se6wf.fsf@ambrevar.xyz> <8d15b1a4-5f0b-28aa-a3d9-78520431b8ef@yahoo.de> <87imzwe2d3.fsf@ambrevar.xyz> <2df7cbf3-81d5-7d50-35d7-f3b369d1ac0e@yahoo.de> <87ftuth0d7.fsf@ambrevar.xyz> <14de0933-fddc-94d0-d75a-cdf4b49fce1a@yahoo.de> <87wonhipbw.fsf@ambrevar.xyz> <792d34a0-b048-b84f-b7b8-d9d996da2a28@yahoo.de> <878szwinp0.fsf@ambrevar.xyz> <877efgin3x.fsf@ambrevar.xyz> <875zv0imr7.fsf@ambrevar.xyz> <87k1jgce5s.fsf@gnu.org> <878szw6rot.fsf@ambrevar.xyz> <874laj35n6.fsf@gnu.org> <87wonf5yd7.fsf@ambrevar.xyz> Date: Tue, 08 Jan 2019 10:53:50 +0100 In-Reply-To: <87wonf5yd7.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Tue, 08 Jan 2019 09:48:04 +0100") Message-ID: <87k1jfzd8x.fsf@gnu.org> 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: Pierre Neidhardt Cc: Tim Gesthuizen , 33598@debbugs.gnu.org Pierre Neidhardt skribis: > The benefit of separate Emacs packages is if the Emacs library can be used > without installing the parent package to the user profile. > > For instance, emacs-clang-rename can be installed and it will work while = the > user does not have to install clang. (Clang remains an input, obviously.) > > For this reason, "package-elisp-from-package" gives maximal flexibility i= n my > opinion. Yes, I agree that it makes a lot of sense for =E2=80=98emacs-clang-rename= =E2=80=99 for instance. I=E2=80=99m just unsure whether the approach generalize to other packages. > Currently, there are a few more packages. We can look up "emacs-build-sy= stem" > outside emacs.scm to find them (e.g. agda2). > > Off the top of my head, there is also asymptote. I=E2=80=99m not convinced sure =E2=80=98emacs-agda2-mode=E2=80=99 and =E2= =80=98asymptote=E2=80=99 need to be changed; it doesn=E2=80=99t look like a clear win, dunno. For example, =E2=80=98package-elisp-from-package=E2=80=99 preserves the nam= e, synopsis, and description, so you end up having to do: (define foo (package (inherit (package-elisp-from-package x)) (name "emacs-foo") (license =E2=80=A6) (synopsis =E2=80=A6) (description =E2=80=A6))) =E2=80=A6 which I think it a marginal improvement compared to =E2=80=98emacs-agda2-mode=E2=80=99. Also, the =E2=80=9Cfind *.el=E2=80=9D = approach may not work out of the box for all cases, so the procedure may need to be tweaked further, etc. > Now to the ideal place for package-elisp-from-package: it seems that no e= xisting > file would be a fit. So what about guix/utils/emacs.scm? Having a separ= ate > file would make sure we run into other meta-circular dependency issues. Circular, not meta-circular. ;-) So yeah, (guix utils emacs) is one option; another one would be to trim the list of modules emacs.scm depends on, such that we don=E2=80=99t have t= his issue in the first place (that requires care, though.) However, my suggestion would be to use =E2=80=98package-elisp-from-package= =E2=80=99 as Tim intended in the original patch, keeping the procedure private to llvm.scm, and generalize if and when we see other use cases. How does that sound? Ludo=E2=80=99.