From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
Date: Sat, 28 Jun 2025 18:41:44 +0000 (UTC) [thread overview]
Message-ID: <1751134686.4f18041b98df9ba1f5f5394e47845f9598e5ccc2.ulm@gentoo> (raw)
commit: 4f18041b98df9ba1f5f5394e47845f9598e5ccc2
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 28 18:18:06 2025 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Jun 28 18:18:06 2025 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=4f18041b
Posixify the init script
* emacs.rc (start_pre): POSIX shell does not support "local".
(start): Ditto. Drop the intermediate variable because s-s-d
itself can expand the tilde.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
ChangeLog | 6 ++++++
emacs.rc | 10 +++-------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2af5f69..d4c4455 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-06-28 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs.rc (start_pre): POSIX shell does not support "local".
+ (start): Ditto. Drop the intermediate variable because s-s-d
+ itself can expand the tilde.
+
2025-03-14 Ulrich Müller <ulm@gentoo.org>
* Version 0.25 released.
diff --git a/emacs.rc b/emacs.rc
index 3f8611f..16c8524 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -34,9 +34,8 @@ start_pre() {
# 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))" </dev/null)
- if [ "${has_daemon}" != t ]; then
+ if [ "$(unset TERM DISPLAY; ${EMACS} -batch -q --no-site-file \
+ --eval "(princ (fboundp 'daemonp))" </dev/null)" != t ]; then
eerror "${EMACS} does not support running as a daemon"
return 1
fi
@@ -46,9 +45,6 @@ start_pre() {
}
start() {
- local home
- eval home="~${USER}"
-
SHELL=${EMACS_SHELL:-$(awk -F: "\$1 == \"${USER}\" { print \$7 }" \
/etc/passwd)}
export SHELL EMACS
@@ -59,7 +55,7 @@ start() {
ebegin "Starting Emacs daemon for user ${USER}"
start-stop-daemon --start --background --make-pidfile \
- --user "${USER}" --pidfile "${PIDFILE}" --chdir "${home}" \
+ --user "${USER}" --pidfile "${PIDFILE}" --chdir "~${USER}" \
--exec "${EMACS_START}" -- ${EMACS_OPTS}
eend $?
}
next reply other threads:[~2025-06-28 18:41 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-28 18:41 Ulrich Müller [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-07-02 16:23 [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: / Ulrich Müller
2025-07-02 16:23 Ulrich Müller
2025-07-02 16:23 Ulrich Müller
2025-03-14 22:27 Ulrich Müller
2025-03-14 22:27 Ulrich Müller
2025-03-10 12:03 Ulrich Müller
2025-03-09 20:48 Ulrich Müller
2025-03-07 16:58 Ulrich Müller
2025-03-05 15:56 Ulrich Müller
2025-03-05 13:36 Ulrich Müller
2025-03-05 13:08 Ulrich Müller
2025-03-05 13:08 Ulrich Müller
2018-12-09 22:36 Ulrich Müller
2018-09-16 14:49 Ulrich Müller
2016-06-08 6:43 Ulrich Müller
2016-05-06 13:20 Ulrich Müller
2016-05-06 13:20 Ulrich Müller
2016-05-06 13:20 Ulrich Müller
2014-02-02 11:29 Ulrich Müller
2014-02-02 11:29 Ulrich Müller
2013-08-06 19:09 Ulrich Mueller
2013-08-06 19:09 Ulrich Mueller
2013-03-23 22:08 Ulrich Mueller
2013-03-23 22:08 Ulrich Mueller
2013-03-23 22:08 Ulrich Mueller
2013-03-23 22:08 Ulrich Mueller
2012-07-21 9:01 Ulrich Mueller
2012-07-21 9:01 Ulrich Mueller
2012-05-06 18:47 Ulrich Mueller
2012-05-06 18:14 Ulrich Mueller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1751134686.4f18041b98df9ba1f5f5394e47845f9598e5ccc2.ulm@gentoo \
--to=ulm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox