From: Glenn Morris <rgm@gnu.org>
To: 13697@debbugs.gnu.org
Subject: bug#13697: A way to tell if Emacs can interact with the user
Date: Tue, 12 Feb 2013 12:02:30 -0500 [thread overview]
Message-ID: <xyliatcvo9.fsf@fencepost.gnu.org> (raw)
Package: emacs
Version: 24.3
Severity: wishlist
It's possible to run Emacs in such in way that it cannot interact with
the user. Either in batch mode or in daemon mode with no open display.
Emacs can hang waiting for user input in such cases (eg bug#6567).
You need to detect such cases before asking the user for input that they
will never be able to give. I came up with (based on server.el):
(or noninteractive
(and (daemonp)
(null (cdr (frame-list)))
(eq (selected-frame) terminal-frame)))
but this is not very obvious. I think there should be a standard
function for this. emacs-interactive-p?
(As an aside, maybe yes-or-no-p etc should abort in such cases rather
than waiting for ever.)
next reply other threads:[~2013-02-12 17:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 17:02 Glenn Morris [this message]
2019-04-03 21:01 ` bug#13697: Reopening Trey Ethan Harris
2019-04-03 22:56 ` bug#13697: A way to tell if Emacs can interact with the user Noam Postavsky
2019-04-03 23:25 ` Trey Ethan Harris
2019-04-04 12:59 ` bug#13697: Reopening Eli Zaretskii
2021-02-13 9:31 ` bug#13697: A way to tell if Emacs can interact with the user Glenn Morris
2021-02-13 11:38 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xyliatcvo9.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=13697@debbugs.gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).