* bug#43813: [BUG] current-message not working with minibuffer-message
@ 2020-10-05 7:34 pinkanon pinkanon
2020-10-05 12:42 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: pinkanon pinkanon @ 2020-10-05 7:34 UTC (permalink / raw)
To: 43813
[-- Attachment #1: Type: text/html, Size: 631 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#43813: [BUG] current-message not working with minibuffer-message
2020-10-05 7:34 bug#43813: [BUG] current-message not working with minibuffer-message pinkanon pinkanon
@ 2020-10-05 12:42 ` Eli Zaretskii
2020-10-05 15:56 ` pinkanon pinkanon
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2020-10-05 12:42 UTC (permalink / raw)
To: pinkanon pinkanon; +Cc: 43813
> From: pinkanon pinkanon <pinkanon.pinkanon@yandex.com>
> Date: Mon, 05 Oct 2020 10:34:49 +0300
>
> Eval this:
>
> (progn (minibuffer-message "hello world") (print (format "current message: %s" (current-message))))
>
> to get "current message: nil" in the *Messages*. If message is used in place of minibuffer message, works
> as expected.
I think your expectations are incorrect, and Emacs works correctly in
this case.
> The reason I think current-message should work with minibuffer-message is due to its docstring: "Return the
> string currently displayed in the echo area, or nil if none."
The echo area and the minibuffer are two different buffers. They both
use the same mini-window to display their text, but they are not the
same.
> PS Is there some other way to get what's currently displayed in the echo area?
You mean, what is shown in the mini-window? Is minibuffer-contents
what you want?
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#43813: [BUG] current-message not working with minibuffer-message
2020-10-05 12:42 ` Eli Zaretskii
@ 2020-10-05 15:56 ` pinkanon pinkanon
2020-10-05 16:05 ` pinkanon pinkanon
2020-10-05 16:08 ` Eli Zaretskii
0 siblings, 2 replies; 17+ messages in thread
From: pinkanon pinkanon @ 2020-10-05 15:56 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 43813@debbugs.gnu.org
[-- Attachment #1: Type: text/html, Size: 2399 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#43813: [BUG] current-message not working with minibuffer-message
2020-10-05 15:56 ` pinkanon pinkanon
@ 2020-10-05 16:05 ` pinkanon pinkanon
2020-10-05 16:08 ` Eli Zaretskii
1 sibling, 0 replies; 17+ messages in thread
From: pinkanon pinkanon @ 2020-10-05 16:05 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 43813@debbugs.gnu.org
[-- Attachment #1: Type: text/html, Size: 2759 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#43813: [BUG] current-message not working with minibuffer-message
2020-10-05 15:56 ` pinkanon pinkanon
2020-10-05 16:05 ` pinkanon pinkanon
@ 2020-10-05 16:08 ` Eli Zaretskii
2020-10-05 16:33 ` pinkanon pinkanon
1 sibling, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2020-10-05 16:08 UTC (permalink / raw)
To: pinkanon pinkanon; +Cc: 43813
> From: pinkanon pinkanon <pinkanon.pinkanon@yandex.com>
> Cc: "43813@debbugs.gnu.org" <43813@debbugs.gnu.org>
> Date: Mon, 05 Oct 2020 18:56:12 +0300
>
> (progn
> (minibuffer-message "hello world")
> (with-selected-window (minibuffer-window)
> (print (format "ms: %s" (buffer-substring-no-properties (point-min) (point-max))))))
When minibuffer-message exits, the message is already deleted.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#43813: [BUG] current-message not working with minibuffer-message
2020-10-05 16:08 ` Eli Zaretskii
@ 2020-10-05 16:33 ` pinkanon pinkanon
2020-10-05 17:01 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: pinkanon pinkanon @ 2020-10-05 16:33 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 43813@debbugs.gnu.org
[-- Attachment #1: Type: text/html, Size: 927 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#43813: [BUG] current-message not working with minibuffer-message
2020-10-05 16:33 ` pinkanon pinkanon
@ 2020-10-05 17:01 ` Eli Zaretskii
2020-10-05 17:43 ` pinkanon pinkanon
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2020-10-05 17:01 UTC (permalink / raw)
To: pinkanon pinkanon; +Cc: 43813
> From: pinkanon pinkanon <pinkanon.pinkanon@yandex.com>
> Cc: "43813@debbugs.gnu.org" <43813@debbugs.gnu.org>
> Date: Mon, 05 Oct 2020 19:33:47 +0300
>
> Even though it's still displayed in the mini window? So, after it's been rendered, it's basically gone then?
No, it isn't displayed then, the mini-window is cleared.
You can see in the doc string of minibuffer-message that it displays
the message for some time, or until some input event arrives. Then
the message is cleared.
Why do you need to get at the text shown by minibuffer-message? For
what purpose? That function specifically exists to show temporary
messages, so the text is ephemeral, it goes away as soon as the user
types something.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#43813: [BUG] current-message not working with minibuffer-message
2020-10-05 17:01 ` Eli Zaretskii
@ 2020-10-05 17:43 ` pinkanon pinkanon
2020-10-05 18:19 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: pinkanon pinkanon @ 2020-10-05 17:43 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 43813@debbugs.gnu.org
[-- Attachment #1: Type: text/html, Size: 1484 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#43813: [BUG] current-message not working with minibuffer-message
2020-10-05 17:43 ` pinkanon pinkanon
@ 2020-10-05 18:19 ` Eli Zaretskii
2020-10-06 7:52 ` pinkanon pinkanon
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2020-10-05 18:19 UTC (permalink / raw)
To: pinkanon pinkanon; +Cc: 43813
> From: pinkanon pinkanon <pinkanon.pinkanon@yandex.com>
> Cc: "43813@debbugs.gnu.org" <43813@debbugs.gnu.org>
> Date: Mon, 05 Oct 2020 20:43:33 +0300
>
> I am doing an eldoc sort of thing and I don't want my hint messages interfering with any other, probably more
> important, messages. I want to do it by seeing if there's anything at all displayed currently in the mini window
> and, if not, show my hint. I guess current-message should meet most of my needs, but I got curious and
> asked anyhow.
If the minibuffer is active (i.e. the user is typing a response for
some prompt), the hints you show via 'message' will not overwrite the
minibuffer stuff, but will be shown after it. So you should have no
problems due to minibuffer editing in your application.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2020-10-07 3:06 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-05 7:34 bug#43813: [BUG] current-message not working with minibuffer-message pinkanon pinkanon
2020-10-05 12:42 ` Eli Zaretskii
2020-10-05 15:56 ` pinkanon pinkanon
2020-10-05 16:05 ` pinkanon pinkanon
2020-10-05 16:08 ` Eli Zaretskii
2020-10-05 16:33 ` pinkanon pinkanon
2020-10-05 17:01 ` Eli Zaretskii
2020-10-05 17:43 ` pinkanon pinkanon
2020-10-05 18:19 ` Eli Zaretskii
2020-10-06 7:52 ` pinkanon pinkanon
2020-10-06 8:19 ` Eli Zaretskii
2020-10-06 8:46 ` pinkanon pinkanon
2020-10-06 9:04 ` Eli Zaretskii
2020-10-06 11:01 ` pinkanon pinkanon
2020-10-06 11:06 ` Eli Zaretskii
2020-10-06 13:39 ` pinkanon pinkanon
2020-10-07 3:06 ` 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).