From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sGRKIzA5UmN2wAAAbAwnHQ (envelope-from ) for ; Fri, 21 Oct 2022 08:16:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +Jd+IzA5UmOpAAAA9RJhRA (envelope-from ) for ; Fri, 21 Oct 2022 08:16:16 +0200 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 12AA12A9A5 for ; Fri, 21 Oct 2022 08:16:16 +0200 (CEST) Received: from localhost ([::1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ollKH-0003fP-6c for larch@yhetil.org; Fri, 21 Oct 2022 02:16:14 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ollBX-0005Nf-0D for larch@yhetil.org; Fri, 21 Oct 2022 02:07:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ollBO-0005Jr-CT for guix-patches@gnu.org; Fri, 21 Oct 2022 02:07:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ollBO-0000MN-4w for guix-patches@gnu.org; Fri, 21 Oct 2022 02:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ollBN-0003VN-PN for guix-patches@gnu.org; Fri, 21 Oct 2022 02:07:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58652] Creating home-emacs-service-type Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 21 Oct 2022 06:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58652 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Zain Jabbar Cc: 58652@debbugs.gnu.org, jbranso@dismail.de Received: via spool by 58652-submit@debbugs.gnu.org id=B58652.166633237513413 (code B ref 58652); Fri, 21 Oct 2022 06:07:01 +0000 Received: (at 58652) by debbugs.gnu.org; 21 Oct 2022 06:06:15 +0000 Received: from localhost ([127.0.0.1]:36692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ollAd-0003UG-6O for submit@debbugs.gnu.org; Fri, 21 Oct 2022 02:06:15 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:33968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ollAa-0003U6-2m for 58652@debbugs.gnu.org; Fri, 21 Oct 2022 02:06:13 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4Mtv950VY3z3wcG; Fri, 21 Oct 2022 08:06:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1666332361; bh=Gom0XkNQMU0mllhFn4VGsd/UiY/giakJNjJsCYpXV58=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=nSS58hxoM0Gf77UQnnCDAA6j+/qB5fI0g5LqHtUETFKybwxp+UbarU+ylpSl9yTVi hrubgdQmYJf+yKsTrVkQWzY8lWp0P7RpEt5mBdCNyUAZLenzlX9mAhzH0rvIc76leL jcHKFH9xUEIO9GHJVb+fP4rmrGr07S3s6Qe0kVCA= Message-ID: <77fbe7e648edfc15c8007616199a867dbae72b71.camel@ist.tugraz.at> From: Liliana Marie Prikler Date: Fri, 21 Oct 2022 08:05:53 +0200 In-Reply-To: References: <495a0fab9b20dd40f9fb1aef2261b60e053bf5cd.camel@ist.tugraz.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666332976; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Gom0XkNQMU0mllhFn4VGsd/UiY/giakJNjJsCYpXV58=; b=a8VF92Uh+aRCGxolTUfVrt5gijbCzuSMMpBG2e/B+4RIGIvng0ouvEFGtqMt1K+7RK2r95 KlLNI74tif2//sGOE266M69OH1Zho31b72qetu3ftmW8Vpp24nagxKOk8t4rs5PnQGMO2l LtNpwqWN4TaxYdO2Gi0kpYYP/xuV+HQtOpos2rSstpJWngHbpPRH0277PGjcbSlkxEPjLS 01jYetvw91q3CSf46HPY/fD0DuomwqUimhBieCS5pbfPPKpPt1bFKlfOiwLGCrhPgdTPEw ZjNRFOKWaIs7frxs07LDihrF4GJXiGSJUNMIcC/co+lTnHWPf5aOof524Xm/pg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666332976; a=rsa-sha256; cv=none; b=ZQzt6s+YHhh4jyRD9QWoyaP1MydDE+qsEt3Ll6IPkWLutb48y6rEuQjqBmqoNy1hRvJV4D 4ii0w/6OvZPMgiaYo0A4k3PaLwW2fGVhIXefWgSMtBZw+W6PeQnwyWOAjZUrAPcV7j8a02 G9Alp7x5ArVfFCccHg2BRmd8mo/Btr6uEx/XvnGNZwre5HMlydiY/mwAx/nmAzSTMW2UOX w7ti3ZkIIqXLuO6HVd40FZDbDCe5VnlLEZcYG2mSNBWVxP5AhGBNz4WSp12bOCF9/MmpZe rCV0RBSzPass8+Bv9959tGFEwIeJAC0hxRvabMQk58ltMDADt3U61RKXv4zEnw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=nSS58hxo; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.16 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=nSS58hxo; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 12AA12A9A5 X-Spam-Score: 4.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: erIlLyDeqNLo Am Donnerstag, dem 20.10.2022 um 11:30 -1000 schrieb Zain Jabbar: > Aloha All, >=20 > Thank you for your input. >=20 > > Note that you reverted the patch direction. >=20 > Please forgive me for that. Is it possible to explain what I did > wrong? I will outline my steps to help you figure out what I did > incorrectly. >=20 > 1. I cloned the repo > 2. Used =3Dguix shell -D guix=3D > 3. Ran =3D./bootstrap=3D > 4. Ran =3D./configure --localstatedir=3D/var=3D > 5. Ran =3Dmake && make check=3D. By the way, my =3Dmake check=3D had a fa= iled > test, I don't know if that was expected. > 6. Made some commits > 7. I used =3Dgit diff HEAD origin/HEAD > my-guix-patch.patch=3D. >=20 > I might have messed around too much in my cloned repo, throwing > something off. Instead of 6+7, write a single commit and use =3Dgit format-patch=3D. You can of course do multi-patch series, but this feature seems not to be one that requires that. Always clean up your commit log after a hacking session ;) > > You should also take an extra-files argument, e.g. to add custom.el > > or other elisp files that init.el might refer to. >=20 > Understood. Attached as a new patch. =3Dhome-emacs-configuration=3D now > has an extra field =3Dextra-files=3D. To use it, input a list of file > objects. The service will splice them into > =3D$XDG_CONFIG_HOME/emacs/{FILE}=3D. Here is an example configuration. > Using =3Dguix home container=3D will allow you to see the file > =3Dgreetings=3D > with contents "hello world" in =3D.config/emacs/=3D. >=20 > #+BEGIN_SRC scheme > (use-modules (gnu home services emacs) > =C2=A0=C2=A0=C2=A0=C2=A0 (gnu home) > =C2=A0=C2=A0=C2=A0=C2=A0 (guix gexp) > =C2=A0=C2=A0=C2=A0=C2=A0 (gnu packages) > =C2=A0=C2=A0=C2=A0=C2=A0 (ice-9 pretty-print) > =C2=A0=C2=A0=C2=A0=C2=A0 (gnu services)) >=20 > (home-environment > =C2=A0(services > =C2=A0 (list > =C2=A0=C2=A0 (service home-emacs-service-type > =C2=A0=C2=A0=C2=A0 (home-emacs-configuration > =C2=A0=C2=A0=C2=A0=C2=A0 (packages > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (specification->package "bash") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (specification->package "emacs-next"= ))) > =C2=A0=C2=A0=C2=A0=C2=A0 (extra-files (list (scheme-file "greetings" '(he= llo world) > #:splice? #:t)))))))) > #+END_SRC Is that #:splice? #t meant to be there? Also, why is bash required here? You should perhaps also distinguish the emacs package and the emacs-* packages like so: (emacs emacs-next) (packages (list emacs-dash emacs-tempel)) As a future extension, it'd be nice if we could use this service to easily specify native compilation for emacs packages, but for this one would have to lay some groundwork in emacs-build-system. > > Also, I'm not certain if "scheme-file" is the right primitive here > > =E2=80=93 Emacs Lisp does differ from Scheme, e.g. in keyword syntax am= ong > > others. >=20 > I agree; using =3Dscheme-file=3D for =3Demacs-lisp=3D feels blasphemous. > There are some odd errors associated with this method too. For > example, =3D#'foo=3D is the shorthand for =3D(function foo)=3D in Emacs L= isp > but gets turned into =3D(syntax foo)=3D when using Guile. Meaning a pure > drag and drop =3Dinit.el >> guile-sexp=3D has some things that need to be > changed. > The fact that Emacs-Lisp and Guile Scheme use S-Expressions was > something I wanted to leverage. It becomes easy to write Elisp in the > parens of the =3Dinit=3D parameter because there is no context switching > (e.g. lispy works, cape-symbols works for Elisp in Scheme). Note that Guile has an elisp reader, albeit a broken one, but no means to switch languages inside files. > I am open to other forms of inputting the text in the files. This is > a bit high maka maka, but I would also like to see how "elegant" the > other methods of inserting Elisp look. That is, can we make it > desirable for people to integrate Elisp into Guile Scheme moreso than > a =3Dlocal-file=3D declaration. Using backquotes and S-Expressions allows > for some variables from Guile to be placed into the Emacs > configuration like the system type, user names, and emails. I think taking a list of file-like objects and concatenating their contents might be worth considering. That's a bit more overhead, but we'd have a cleaner separation between fragments that have the same semantics in Scheme and those that don't. Cheers