Subject: bug#6945: active-minibuffer-window returns nil when prompt overwritten by message

From: Lennart Borgman <[email-masked]>
Date: Mon, 30 Aug 2010 12:30:37 +0200

Eval the following

(defun temp-active-mb ()
  (message "active-minibuffer-window = %s" (active-minibuffer-window)))

(progn
  (run-with-idle-timer 1 nil 'message "idle message")
  (run-with-idle-timer 2 nil 'temp-active-mb)
  (y-or-n-p "Prompt: ")
  )

This gives me the message "active-minibuffer-window = nil".

Is there any way then to discover whether Emacs is displaying a prompt
and waiting for input?