unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13697: A way to tell if Emacs can interact with the user
@ 2013-02-12 17:02 Glenn Morris
  2019-04-03 21:01 ` bug#13697: Reopening Trey Ethan Harris
  2021-02-13  9:31 ` bug#13697: A way to tell if Emacs can interact with the user Glenn Morris
  0 siblings, 2 replies; 7+ messages in thread
From: Glenn Morris @ 2013-02-12 17:02 UTC (permalink / raw)
  To: 13697

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.)





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-13 11:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-12 17:02 bug#13697: A way to tell if Emacs can interact with the user Glenn Morris
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

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).