From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id uDKiGIiuRGaSMwAAqHPOHw:P1 (envelope-from ) for ; Wed, 15 May 2024 14:46:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id uDKiGIiuRGaSMwAAqHPOHw (envelope-from ) for ; Wed, 15 May 2024 14:46:00 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=KbeCJYn2; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715777160; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YOa+S27va7wESEQaxaBgJyfqSAMCkEF/qhX79tDtWnA=; b=QV9bWOXAuEDSYGlQTVRqPOYmIZXKvYxD8ZkQgDwpurJJLwOUADfkA/rYe2CV0BBgN7+wU7 sPR3fa1Ro7YD0vymV9n+/Ju01wi7a8eswgbdxf3ZLrmN1+iXdYKKtWVUNitwiPLoHjbgFY 98GploOovxvj8CXXJwWNWWz8ItjeBeZFJZdTh5TfU38GBiD/zbQmSpUaACIQhnZ4vrBt0t Pu7C95CVdhzLHK4Wu7f1BmyykQha3Nw3ivFsI+0pFb7PXT2AFX/dhVj8jBmXKjiqPzR+3K JHISvU6083McSTpRK9t1+R0QSLkV3eolCUFsYCjAWYR6OlydgDAIIHUOOFSrow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=KbeCJYn2; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715777160; a=rsa-sha256; cv=none; b=UwxVGjc1EhmtgAiuItT2Xo7C3xAW8jA8miwlAdnmcD7SxtA8vMedA203mPF5YWQ35AsoUw K7PgIng6QSODNpK+2oRxaxUir2YxImL4cdds8VWTs/nDQhGZCUVyzfC8GtOmu7JeYFCl6g +gRAy7NLGPLBai3nOTfc/ogp3LaKhxr+bRaWZYaJQ4jmvcZWIb6gLNuMBUyDMt73vxvU7Q 1BtQwNU1NmjqC5lGz8tAgrzN42XLeA5g6y1e9sNpeRVnRZmdXvyz7U5jhZPqgvuKcs9CA7 47Vnq0ZeyilCcmwPspxWcQ5TTfToGykY5tlB1btBCRTFaatJyZorYp5EsnB/8w== 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 3871F573BF for ; Wed, 15 May 2024 14:46:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7E0p-0003TD-AI; Wed, 15 May 2024 08:45:39 -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 1s7E0o-0003Sy-7S for help-guix@gnu.org; Wed, 15 May 2024 08:45:38 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7E0m-00077I-2U for help-guix@gnu.org; Wed, 15 May 2024 08:45:37 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 643F3240103 for ; Wed, 15 May 2024 14:45:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1715777131; bh=k58jrCxwLG3O1b5uZ971o3a6E3CIbM9DfHYZ87onPTQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=KbeCJYn2xAoV3IbAgs0U/qpvWRA244ishCwId+mqCpTwF6canyAeDniQfYneqsGKm 8c2sRus9EzTCLGFb/3RU1es1wpt3VNW8ufUK63/l+QxdeMoqEwGTd9NMeiMa6zHagA 48Pzd4yWBoiVtiBHd17cFcZSarJtPcybZLsbTS57juim6sO8JnqMhT5EUXl+3HSd/L X3jMC3fyoP4L/qfJxazG3eVHjo6Lpd5xIpRV3RVSWSGZz7h3aYaEYe2tIiSNkbwJ8S TSD3lAM20epSVaanCvBJ5invdub6k2OM3Pldk3zUrqeD1OQd5qD39HDzLq5Lvy0rs1 Aj+Y7a1U4AJXg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VfXy23yJfz6ty8; Wed, 15 May 2024 14:45:30 +0200 (CEST) From: Guillaume Le Vaillant To: Andrew Wong Cc: help-guix@gnu.org Subject: Re: Emacs Daemon Service In-Reply-To: <0BF7ECBF-292F-4EC7-9033-D61762D2300B@gmail.com> (Andrew Wong's message of "Sun, 12 May 2024 17:41:08 -0400") References: <0BF7ECBF-292F-4EC7-9033-D61762D2300B@gmail.com> Date: Wed, 15 May 2024 12:45:29 +0000 Message-ID: <877cfvkzva.fsf@kitej> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=185.67.36.66; envelope-from=glv@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-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: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -11.69 X-Spam-Score: -11.69 X-Migadu-Queue-Id: 3871F573BF X-Migadu-Scanner: mx13.migadu.com X-TUID: snC7Y1vsrc/y --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Andrew Wong skribis: > Greetings! > > Recently I=E2=80=99ve been trying to have an Emacs daemon start in the ba= ckground on > login. On Guix, I=E2=80=99ve found some interesting behavior in that an E= macs started > with no args and then the command =E2=80=9Cserver-start=E2=80=9D will the= n be available to > subsequent emacsclient calls, but an =E2=80=9Cemacs =E2=80=94daemon=E2=80= =9D is inaccessible, even if > I call the command from my WM startup. > > 1. Does anyone understand why Guix=E2=80=99s design results in this behav= ior? > 2. How can I set up a service in my configure-home.scm to start emacs =E2= =80=94daemon > (and have it be available) on login? I found a post from 2019 about it, b= ut it > must be outdated as it doesn=E2=80=99t mention the Guix home feature. > > Thank you for your assistance, > Andrew Hi. In my Guix home configuration, I use the following service to start an Emacs server: =2D-8<---------------cut here---------------start------------->8--- (define (emacs-server-shepherd-service config) (list (shepherd-service (documentation "Emacs server.") (provision '(emacs-server)) (start #~(make-forkexec-constructor (list #$(file-append emacs "/bin/emacs") "--fg-daemon"))) (stop #~(make-kill-destructor))))) (define home-emacs-server-service-type (service-type (name 'home-emacs-server) (extensions (list (service-extension home-shepherd-service-type emacs-server-shepherd-service))) (default-value #f) (description "Run Emacs in server mode."))) (home-environment ... (services (list ... (service home-emacs-server-service-type) ...))) =2D-8<---------------cut here---------------end--------------->8--- Then, using "emacsclient -n -c some-file" works. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCZkSuaQ8cZ2x2QHBvc3Rl by5uZXQACgkQa+ggit8h/j9QFQEAh+9w57FxjI4B7UN80TnDQqW2qFC4P9Jshqv8 hhVeJ9oA/2JMNJjXWd9G6fDlp502u7c9q+bwzvqJNJ+jKdRCdA6l =btFo -----END PGP SIGNATURE----- --=-=-=--