From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A4A6B1582EF for ; Fri, 07 Mar 2025 18:35:43 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 8F18B3406A2 for ; Fri, 07 Mar 2025 18:35:43 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 8E9A511027C; Fri, 07 Mar 2025 18:35:42 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 86F4611027C for ; Fri, 07 Mar 2025 18:35:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 356C63406A2 for ; Fri, 07 Mar 2025 18:35:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C6B292893 for ; Fri, 07 Mar 2025 18:35:40 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1741367544.ee79082103da7e8090136b6ef4867bff7ddf5521.ulm@gentoo> Subject: [gentoo-commits] proj/emacs-tools:emacs-common commit in: / X-VCS-Repository: proj/emacs-tools X-VCS-Files: ChangeLog Makefile emacs.initd X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: ee79082103da7e8090136b6ef4867bff7ddf5521 X-VCS-Branch: emacs-common Date: Fri, 07 Mar 2025 18:35:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fff8770b-04a4-4ee0-9d19-885956844d4d X-Archives-Hash: 6c118f4cf0173c263567bc7fd4264103 commit: ee79082103da7e8090136b6ef4867bff7ddf5521 Author: Ulrich Müller gentoo org> AuthorDate: Fri Mar 7 17:12:24 2025 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Fri Mar 7 17:12:24 2025 +0000 URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=ee790821 Add user initd file for OpenRC * emacs.initd: New file. Merged version of the user initd file attached to bug 950671 and emacs.rc from the emacs-daemon package. Thanks to Anna (navi) Figueiredo Gomes. * Makefile (DISTFILES): Add it. Bug: https://bugs.gentoo.org/950671 Signed-off-by: Anna (navi) Figueiredo Gomes vlhl.dev> Signed-off-by: Ulrich Müller gentoo.org> ChangeLog | 5 +++++ Makefile | 7 ++++--- emacs.initd | 29 +++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 565945f..53d2f73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2025-03-07 Ulrich Müller + * emacs.initd: New file. Merged version of the user initd file + attached to bug 950671 and emacs.rc from the emacs-daemon package. + Thanks to Anna (navi) Figueiredo Gomes. + * Makefile (DISTFILES): Add it. + * emacsclient.desktop (MimeType): Add org-protocol, from Emacs 30. Bug 950674. diff --git a/Makefile b/Makefile index 65da9b7..9a4fbac 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright 2007-2023 Gentoo Authors +# Copyright 2007-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 or later PN = emacs-common @@ -14,8 +14,9 @@ ICONFILES = sink.png \ emacs25_16.png emacs25_24.png emacs25_32.png emacs25_48.png \ emacs25_128.png emacs25.svg GSCHEMAFILES = org.gnu.emacs.defaults.gschema.xml -DISTFILES = site-start.el site-gentoo.el subdirs.el.in $(DESKTOPFILES) \ - $(addprefix icons/,COPYRIGHT.icons $(ICONFILES)) $(GSCHEMAFILES) +DISTFILES = site-start.el site-gentoo.el subdirs.el.in emacs.initd \ + $(DESKTOPFILES) $(addprefix icons/,COPYRIGHT.icons $(ICONFILES)) \ + $(GSCHEMAFILES) .PHONY: all dist clean $(DESKTOPFILES) diff --git a/emacs.initd b/emacs.initd new file mode 100644 index 0000000..f71b4c2 --- /dev/null +++ b/emacs.initd @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 2008-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 or later + +: ${EMACS:=/usr/bin/emacs} + +description="Start an Emacs server running in the background" + +supervisor=supervise-daemon +command="${EMACS}" +command_args="${EMACS_OPTS}" +command_args_foreground="--fg-daemon" + +depend() { + after dbus +} + +start_pre() { + # EMACS could be a microemacs variant that ignores the -batch option + # and would therefore hang, waiting for user interaction. + # Redirecting stdin and unsetting TERM and DISPLAY will cause most + # of them to exit with an error. + local has_daemon=$(unset TERM DISPLAY; ${EMACS} -batch -q --no-site-file \ + --eval "(princ (fboundp 'daemonp))"