From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
Date: Fri, 07 Mar 2025 16:58:56 +0000 (UTC) [thread overview]
Message-ID: <1741366663.4c751e364e093f4632240fc30de89d2e34f616da.ulm@gentoo> (raw)
commit: 4c751e364e093f4632240fc30de89d2e34f616da
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 7 16:57:43 2025 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Mar 7 16:57:43 2025 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=4c751e36
Make running Emacs more robust
* emacs.rc (checkconfig): Make running Emacs more robust.
Taken from elisp-common.eclass.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
ChangeLog | 5 +++++
emacs.rc | 8 ++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 82c0f88..bb62705 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-03-07 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs.rc (checkconfig): Make running Emacs more robust.
+ Taken from elisp-common.eclass.
+
2025-03-05 Ulrich Müller <ulm@gentoo.org>
* Version 0.23 released.
diff --git a/emacs.rc b/emacs.rc
index 449e45b..35a76f9 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -30,8 +30,12 @@ checkconfig() {
return 1
fi
- local has_daemon=$(${EMACS} -batch -q --no-site-file \
- --eval "(princ (fboundp 'daemonp))")
+ # 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))" </dev/null)
if [ "${has_daemon}" != t ]; then
eerror "${EMACS} does not support running as a daemon"
return 1
next reply other threads:[~2025-03-07 16:58 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 16:58 Ulrich Müller [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-14 22:27 [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: / 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-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=1741366663.4c751e364e093f4632240fc30de89d2e34f616da.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