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

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

bug#17272: bug#19064: bug#17272: bug#19064: 25.0.50; `message' overwrite


From: Juri Linkov
Subject: bug#17272: bug#19064: bug#17272: bug#19064: 25.0.50; `message' overwrites `y-or-n-p' prompt, so user misses it
Date: Sat, 16 Nov 2019 22:53:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> That's easy to do.  But the statement wasn't just
>> about the minibuffer when echo area was meant, or
>> vice versa.  The claim was that _user input_ (not
>> a prompt) became permanently hidden.
>
> I don't know if that was also a mistake or really meant like that.

This is not a mistake.  Permanently hidden user input
is a serious problem and security threat.

Today I started compilation, then in a Dired buffer
requested files deletion that displayed the prompt:

  Delete D [54 files] (y or n)

But before I had a chance to answer the prompt, compilation finished
and obscured the prompt with this message permanently:

  Compilation finished

So I forgot about what was in the prompt :-(

Since Drew doesn't want to improve safety to cover all such cases,
we need to address these issues one by one, so here is the next patch:

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 5a3386f227..101e294557 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2265,7 +2265,8 @@ compilation-handle-exit
                  (msg (format "%s %s" mode-name
                               (replace-regexp-in-string "\n?$" ""
                                                         (car status)))))
-             (message "%s" msg)
+             (with-current-buffer (window-buffer (old-selected-window))
+               (minibuffer-message "%s" msg))
              (propertize out-string
                          'help-echo msg
                          'face (if (> exit-status 0)





reply via email to

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