GNU bug report logs -
#6945
active-minibuffer-window returns nil when prompt overwritten by message
Previous Next
Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>
Date: Mon, 30 Aug 2010 11:07:02 UTC
Severity: wishlist
Tags: fixed
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6945 in the body.
You can then email your comments to 6945 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6945
; Package
emacs
.
(Mon, 30 Aug 2010 11:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lennart Borgman <lennart.borgman <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 30 Aug 2010 11:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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?
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6945
; Package
emacs
.
(Mon, 30 Aug 2010 12:44:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 6945 <at> debbugs.gnu.org (full text, mbox):
On Mon, 30 Aug 2010 12:30:37 +0200 Lennart Borgman <lennart.borgman <at> gmail.com> wrote:
> 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".
When I eval the above sexps on GNU Emacs 24.0.50.1 (i686-pc-linux-gnu,
GTK+ Version 2.18.6) of 2010-08-22 on escher, I first briefly see the
message "Prompt: (y or n)", then "idle message", then
"active-minibuffer-window = " with the cursor after "= "; as soon as I
type any other key, I get "Prompt: (y or n)" again.
> Is there any way then to discover whether Emacs is displaying a prompt
> and waiting for input?
Are you trying this on MS-Windows? If so, it seems to be a problem
there.
Steve Berman
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6945
; Package
emacs
.
(Mon, 30 Aug 2010 13:09:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 6945 <at> debbugs.gnu.org (full text, mbox):
On Mon, Aug 30, 2010 at 2:44 PM, Stephen Berman <stephen.berman <at> gmx.net> wrote:
> On Mon, 30 Aug 2010 12:30:37 +0200 Lennart Borgman <lennart.borgman <at> gmail.com> wrote:
>
>> 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".
>
> When I eval the above sexps on GNU Emacs 24.0.50.1 (i686-pc-linux-gnu,
> GTK+ Version 2.18.6) of 2010-08-22 on escher, I first briefly see the
> message "Prompt: (y or n)", then "idle message", then
> "active-minibuffer-window = " with the cursor after "= "; as soon as I
> type any other key, I get "Prompt: (y or n)" again.
>
>> Is there any way then to discover whether Emacs is displaying a prompt
>> and waiting for input?
>
> Are you trying this on MS-Windows? If so, it seems to be a problem
> there.
Thanks Stephen. However it looks to me from what you write above like
active-minibuffer-window does not return a window in this case on
GNU/Linux either.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6945
; Package
emacs
.
(Mon, 30 Aug 2010 13:10:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 6945 <at> debbugs.gnu.org (full text, mbox):
Lennart Borgman <lennart.borgman <at> gmail.com> writes:
> (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".
y-or-n-p does not use the minibuffer, so this is correct.
> Is there any way then to discover whether Emacs is displaying a prompt
This is just a message in the echo area.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6945
; Package
emacs
.
(Mon, 30 Aug 2010 13:46:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 6945 <at> debbugs.gnu.org (full text, mbox):
On Mon, Aug 30, 2010 at 3:11 PM, Andreas Schwab <schwab <at> linux-m68k.org> wrote:
> Lennart Borgman <lennart.borgman <at> gmail.com> writes:
>
>> (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".
>
> y-or-n-p does not use the minibuffer, so this is correct.
>
>> Is there any way then to discover whether Emacs is displaying a prompt
>
> This is just a message in the echo area.
Thanks, I see. I had forgotten that.
Correct, but very inconvenient.
Is there a way to detect this situation then? (Emacs is "paused",
waiting for input while a "prompt" is displayed.)
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6945
; Package
emacs
.
(Mon, 30 Aug 2010 13:47:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 6945 <at> debbugs.gnu.org (full text, mbox):
On Mon, 30 Aug 2010 15:09:23 +0200 Lennart Borgman <lennart.borgman <at> gmail.com> wrote:
> On Mon, Aug 30, 2010 at 2:44 PM, Stephen Berman <stephen.berman <at> gmx.net> wrote:
>> On Mon, 30 Aug 2010 12:30:37 +0200 Lennart Borgman <lennart.borgman <at> gmail.com> wrote:
>>
>>> 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".
>>
>> When I eval the above sexps on GNU Emacs 24.0.50.1 (i686-pc-linux-gnu,
>> GTK+ Version 2.18.6) of 2010-08-22 on escher, I first briefly see the
>> message "Prompt: (y or n)", then "idle message", then
>> "active-minibuffer-window = " with the cursor after "= "; as soon as I
Correction: "active-minibuffer-window = nil" and "= nil", i.e. same as you.
>> type any other key, I get "Prompt: (y or n)" again.
>>
>>> Is there any way then to discover whether Emacs is displaying a prompt
>>> and waiting for input?
>>
>> Are you trying this on MS-Windows? If so, it seems to be a problem
>> there.
>
> Thanks Stephen. However it looks to me from what you write above like
> active-minibuffer-window does not return a window in this case on
> GNU/Linux either.
I guess I misunderstood -- I thought you were reporting you saw no
prompt and could not get it with the above recipe. As for
active-minibuffer-window not returning a window, maybe I still
misunderstand, but I get the message "active-minibuffer-window = nil"
not only with the above progn, but also with this:
"active-minibuffer-window = nil".
>>
>> When I eval the above sexps on GNU Emacs 24.0.50.1 (i686-pc-linux-gnu,
>> GTK+ Version 2.18.6) of 2010-08-22 on escher, I first briefly see the
>> message "Prompt: (y or n)", then "idle message", then
>> "active-minibuffer-window = " with the cursor after "= "; as soon as I
Correction: "active-minibuffer-window = nil" and "= nil"
>> type any other key, I get "Prompt: (y or n)" again.
>>
>>> Is there any way then to discover whether Emacs is displaying a prompt
>>> and waiting for input?
>>
>> Are you trying this on MS-Windows? If so, it seems to be a problem
>> there.
>
> Thanks Stephen. However it looks to me from what you write above like
> active-minibuffer-window does not return a window in this case on
> GNU/Linux either.
I guess I misunderstood -- I thought you were reporting you saw no
prompt and could not get it with the above recipe. As for
active-minibuffer-window not returning a window, maybe I still
misunderstand, but I get the message "active-minibuffer-window = nil"
not only with the above progn, but also with this:
"active-minibuffer-window = nil".
>>
>> When I eval the above sexps on GNU Emacs 24.0.50.1 (i686-pc-linux-gnu,
>> GTK+ Version 2.18.6) of 2010-08-22 on escher, I first briefly see the
>> message "Prompt: (y or n)", then "idle message", then
>> "active-minibuffer-window = " with the cursor after "= "; as soon as I
Correction: "active-minibuffer-window = nil" and "= nil"
>> type any other key, I get "Prompt: (y or n)" again.
>>
>>> Is there any way then to discover whether Emacs is displaying a prompt
>>> and waiting for input?
>>
>> Are you trying this on MS-Windows? If so, it seems to be a problem
>> there.
>
> Thanks Stephen. However it looks to me from what you write above like
> active-minibuffer-window does not return a window in this case on
> GNU/Linux either.
I guess I misunderstood -- I thought you were reporting you saw no
prompt and could not get it with the above recipe. As for
active-minibuffer-window not returning a window, maybe I still
misunderstand, but I get the message "active-minibuffer-window = nil"
not only with the above progn, but also with this:
(progn
(run-with-idle-timer 1 nil 'message "idle message")
(run-with-idle-timer 2 nil 'temp-active-mb)
)
and even just with this:
(run-with-idle-timer 2 nil 'temp-active-mb)
So the prompt seems to make no difference. Or do you see (or expect)
something different?
Steve Berman
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6945
; Package
emacs
.
(Mon, 30 Aug 2010 13:58:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 6945 <at> debbugs.gnu.org (full text, mbox):
On Mon, Aug 30, 2010 at 3:48 PM, Stephen Berman <stephen.berman <at> gmx.net> wrote:
>
> I guess I misunderstood -- I thought you were reporting you saw no
> prompt and could not get it with the above recipe. As for
> active-minibuffer-window not returning a window, maybe I still
> misunderstand, but I get the message "active-minibuffer-window = nil"
That is what I get too.
> not only with the above progn, but also with this:
>
> (progn
> (run-with-idle-timer 1 nil 'message "idle message")
> (run-with-idle-timer 2 nil 'temp-active-mb)
> )
>
> and even just with this:
>
> (run-with-idle-timer 2 nil 'temp-active-mb)
>
> So the prompt seems to make no difference. Or do you see (or expect)
> something different?
I expected active-minibuffer-window to return a window, but as Andreas
has pointed out y-or-n-p is implemented in a different way. It just
call `message' and then read a key from the user.
However I would like to detect such situations too. From the users
point of view they are very similar to other prompts. (If you replace
`y-or-n-p' with `yes-or-no-p' then active-minibuffer-window will
return a window.)
Severity set to 'wishlist' from 'normal'
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> debbugs.gnu.org
.
(Sat, 04 Sep 2010 19:10:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6945
; Package
emacs
.
(Thu, 20 Aug 2020 18:27:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 6945 <at> debbugs.gnu.org (full text, mbox):
Lennart Borgman <lennart.borgman <at> gmail.com> writes:
> 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?
I'm unable to reproduce this bug in Emacs 28. The way prompts work with
asynchronous messages has changed substantially over the last year,
which probably explains it. So I'm closing this bug report -- if
there's still an issue here, please respond to the debbugs address and
we'll reopen the bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 20 Aug 2020 18:27:03 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
6945 <at> debbugs.gnu.org and Lennart Borgman <lennart.borgman <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 20 Aug 2020 18:27:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 18 Sep 2020 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.