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 2398F1582EF for ; Wed, 05 Mar 2025 13:08:15 +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 0A0A8340CBB for ; Wed, 05 Mar 2025 13:08:15 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 065B81102D0; Wed, 05 Mar 2025 13:08:14 +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 F06261102D0 for ; Wed, 05 Mar 2025 13:08:13 +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 9C131340CBB for ; Wed, 05 Mar 2025 13:08:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3500A2853 for ; Wed, 05 Mar 2025 13:08:12 +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: <1741179271.1d61333bbe3952cf324b75b44888542401e36851.ulm@gentoo> Subject: [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: / X-VCS-Repository: proj/emacs-tools X-VCS-Files: 10emacs-daemon-gentoo.el ChangeLog Makefile README emacs-stop.sh emacs.conf emacs.rc X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 1d61333bbe3952cf324b75b44888542401e36851 X-VCS-Branch: emacs-daemon Date: Wed, 05 Mar 2025 13:08:12 +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: 70ec6d27-89d4-416a-9311-4ff2ce769645 X-Archives-Hash: cf6c2bf3df038b98ed57a31618b9018b commit: 1d61333bbe3952cf324b75b44888542401e36851 Author: Ulrich Müller gentoo org> AuthorDate: Wed Mar 5 12:54:31 2025 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Wed Mar 5 12:54:31 2025 +0000 URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=1d61333b Remove obsolete code * emacs.rc (checkconfig): Remove obsolete test for baselayout-1. * emacs-stop.sh: Remove example script. * 10emacs-daemon-gentoo.el: Sharp-quote function name. Remove redundant check for daemonp being bound. * Makefile (DISTFILES): Drop emacs-stop.sh. Signed-off-by: Ulrich Müller gentoo.org> 10emacs-daemon-gentoo.el | 5 ++--- ChangeLog | 8 ++++++++ Makefile | 4 ++-- README | 5 ----- emacs-stop.sh | 25 ------------------------- emacs.conf | 2 +- emacs.rc | 7 +------ 7 files changed, 14 insertions(+), 42 deletions(-) diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el index 9ea5ba0..840166d 100644 --- a/10emacs-daemon-gentoo.el +++ b/10emacs-daemon-gentoo.el @@ -1,10 +1,9 @@ ;;; emacs-daemon site-lisp configuration -;; Copyright 2008-2016 Gentoo Authors +;; Copyright 2008-2025 Gentoo Authors ;; Distributed under the terms of the GNU General Public License v2 or later (and - (fboundp 'daemonp) (daemonp) (null after-init-time) (let* ((file (concat "/var/run/emacs/" (user-login-name) "/emacs.pid")) @@ -32,4 +31,4 @@ (add-hook 'kill-emacs-hook `(lambda () (ignore-errors (delete-file ,file)))))) ;; Restart the server if signal SIGUSR1 is received. - (define-key special-event-map [sigusr1] 'server-start))) + (define-key special-event-map [sigusr1] #'server-start))) diff --git a/ChangeLog b/ChangeLog index f16cbd9..4b18d6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2025-03-05 Ulrich Müller + + * emacs.rc (checkconfig): Remove obsolete test for baselayout-1. + * emacs-stop.sh: Remove example script. + * 10emacs-daemon-gentoo.el: Sharp-quote function name. + Remove redundant check for daemonp being bound. + * Makefile (DISTFILES): Drop emacs-stop.sh. + 2016-06-08 Ulrich Müller * README: Update URL and e-mail address of project. diff --git a/Makefile b/Makefile index beec1ee..f180383 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright 2008-2016 Gentoo Authors +# Copyright 2008-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 or later PN = emacs-daemon @@ -7,7 +7,7 @@ PV = $(shell sed '/^[ \t]*\* .*[Vv]ersion/!d;s/[^0-9.]*\([0-9.]*\).*/\1/;q' \ P = $(PN)-$(PV) DISTFILES = README ChangeLog emacs.rc emacs.conf emacs-wrapper.sh \ - emacs-stop.sh 10emacs-daemon-gentoo.el + 10emacs-daemon-gentoo.el .PHONY: all dist clean diff --git a/README b/README index a111878..4891b0c 100644 --- a/README +++ b/README @@ -42,8 +42,3 @@ Authors Ulrich Müller Christian Faulhammer (documentation) - - -Local Variables: -coding: utf-8 -End: diff --git a/emacs-stop.sh b/emacs-stop.sh deleted file mode 100644 index a9ee9bb..0000000 --- a/emacs-stop.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# Copyright 2008-2016 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 or later - -# Lisp expression to be evaluated when stopping Emacs. -# Any additional commands should preferably be added to kill-emacs-hook. -EMACS_LISP_EXPR="(kill-emacs)" - -su "${USER}" \ - -c "${EMACSCLIENT} ${EMACSCLIENT_OPTS} --eval \"${EMACS_LISP_EXPR}\"" \ - /dev/null & -pid=$! - -# Wait for emacsclient -for (( t=${EMACS_TIMEOUT:-30}; t > 0; t-- )); do - sleep 1 - kill -0 ${pid} 2>/dev/null || exit 0 -done - -echo "${0##*/}: timeout waiting for emacsclient" >&2 -kill ${pid} 2>/dev/null - -# exit 0: openrc-run shall continue and (forcibly) kill the emacs process -# exit 1: openrc-run shall exit with an error -exit 0 diff --git a/emacs.conf b/emacs.conf index b6303d8..0733e20 100644 --- a/emacs.conf +++ b/emacs.conf @@ -13,7 +13,7 @@ #EMACS_START="/usr/libexec/emacs/emacs-wrapper.sh" # Optionally, you may execute a custom script before stopping the -# daemon. See /usr/libexec/emacs/emacs-stop.sh for an example. #246462 +# daemon. #246462 #EMACS_STOP="" # Timeout (in seconds) to wait for the daemon to detach diff --git a/emacs.rc b/emacs.rc index e70d20b..cedf3c4 100644 --- a/emacs.rc +++ b/emacs.rc @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 2008-2016 Gentoo Authors +# Copyright 2008-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 or later : ${EMACS:=/usr/bin/emacs} @@ -20,11 +20,6 @@ depend() { } checkconfig() { - if [ "${RC_VERSION:-0}" = "0" ]; then - eerror "This script cannot be used for baselayout-1." - return 1 - fi - if [ "${USER}" = "${RC_SVCNAME}" ]; then eerror "You have to create an init script for each user:" eerror "ln -s emacs /etc/init.d/emacs."