bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13697: A way to tell if Emacs can interact with the user


From: Glenn Morris
Subject: bug#13697: A way to tell if Emacs can interact with the user
Date: Tue, 12 Feb 2013 12:02:30 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]