unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20563: Echo Area Disrupts Minibuffer Input
@ 2015-05-12 17:40 Michael Xavier
  2015-05-12 18:09 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Xavier @ 2015-05-12 17:40 UTC (permalink / raw)
  To: 20563

[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]

I've encountered a rather frustrating UI issue as a recent Emacs convert
and would love to help think of a way to fix it. Bug #11172 references this
issue, but there was no comment or resolution.

The issue is that the echo area, which is used heavily from the message
function, shares screen real estate with the minibuffer. This normally
isn't a huge issue but if the user is actually using the minibuffer to
enter text, the prompt and the text they have entered thus far is
overwritten by some unrelated message and can only be wrestled back by
typing more.

The example I encounter frequently is doing a TAGS file search and hitting
TAB to complete. The tags system will fetch a completion and simultaneously
log a message that its reading the TAGS file which will completely
overwrite the completion.

A contrived example:

   emacs -Q
   M-: (run-with-timer 5 nil (lambda () (message "hello"))) RET
   M-x

The prompt will be overwritten by the message "hello".

I don't know what the best solution is. Two ideas I've had are:

1. Suppress messages to the echo area if the minibuffer is waiting on
input. The messages could display after the minibuffer stops waiting
(or not at all and they'll just log to *Messages*).

2. Divide the minibuffer (horizontally?) into the minibuffer proper
and the echo area. Maybe the division could only happen when there's
something in the echo area. Something tells me this approach is much
harder and more controversial.

[-- Attachment #2: Type: text/html, Size: 1995 bytes --]

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

* bug#20563: Echo Area Disrupts Minibuffer Input
  2015-05-12 17:40 bug#20563: Echo Area Disrupts Minibuffer Input Michael Xavier
@ 2015-05-12 18:09 ` Eli Zaretskii
  2015-05-12 18:18   ` Michael Xavier
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2015-05-12 18:09 UTC (permalink / raw)
  To: Michael Xavier; +Cc: 20563

> Date: Tue, 12 May 2015 10:40:34 -0700
> From: Michael Xavier <admin@michaelxavier.net>
> 
> The example I encounter frequently is doing a TAGS file search and hitting TAB
> to complete. The tags system will fetch a completion and simultaneously log a
> message that its reading the TAGS file which will completely overwrite the
> completion.

But when it finishes reading the TAGS file, the completion is
re-displayed, right?  At least that's what I see here (and expect).





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

* bug#20563: Echo Area Disrupts Minibuffer Input
  2015-05-12 18:09 ` Eli Zaretskii
@ 2015-05-12 18:18   ` Michael Xavier
  2015-05-12 18:26     ` Eli Zaretskii
  2016-12-07 20:25     ` Glenn Morris
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Xavier @ 2015-05-12 18:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20563

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

I can't get it to reproduce right now. It may be a race condition, or maybe
its on a timer before it reverts to the minibuffer? I'm not sure.

On Tue, May 12, 2015 at 11:09 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 12 May 2015 10:40:34 -0700
> > From: Michael Xavier <admin@michaelxavier.net>
> >
> > The example I encounter frequently is doing a TAGS file search and
> hitting TAB
> > to complete. The tags system will fetch a completion and simultaneously
> log a
> > message that its reading the TAGS file which will completely overwrite
> the
> > completion.
>
> But when it finishes reading the TAGS file, the completion is
> re-displayed, right?  At least that's what I see here (and expect).
>

[-- Attachment #2: Type: text/html, Size: 1110 bytes --]

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

* bug#20563: Echo Area Disrupts Minibuffer Input
  2015-05-12 18:18   ` Michael Xavier
@ 2015-05-12 18:26     ` Eli Zaretskii
  2016-12-07 20:25     ` Glenn Morris
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2015-05-12 18:26 UTC (permalink / raw)
  To: Michael Xavier; +Cc: 20563

> Date: Tue, 12 May 2015 11:18:44 -0700
> From: Michael Xavier <admin@michaelxavier.net>
> Cc: 20563@debbugs.gnu.org
> 
> I can't get it to reproduce right now. It may be a race condition, or maybe its
> on a timer before it reverts to the minibuffer? I'm not sure.

In general, code that displays intermittent messages should call

  (message nil)

once it's done displaying the message.  This will bring the minibuffer
contents (the completion in your example) back on screen again.  Code
that doesn't call 'message' like that when its message can be
discarded has a bug and should be reported here.





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

* bug#20563: Echo Area Disrupts Minibuffer Input
  2015-05-12 18:18   ` Michael Xavier
  2015-05-12 18:26     ` Eli Zaretskii
@ 2016-12-07 20:25     ` Glenn Morris
  1 sibling, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2016-12-07 20:25 UTC (permalink / raw)
  To: 20563-done

Michael Xavier wrote:

> I can't get it to reproduce right now. It may be a race condition, or maybe
> its on a timer before it reverts to the minibuffer? I'm not sure.

18 months with no further information, so closing.





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

end of thread, other threads:[~2016-12-07 20:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-12 17:40 bug#20563: Echo Area Disrupts Minibuffer Input Michael Xavier
2015-05-12 18:09 ` Eli Zaretskii
2015-05-12 18:18   ` Michael Xavier
2015-05-12 18:26     ` Eli Zaretskii
2016-12-07 20:25     ` Glenn Morris

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