Re: Let temporary minibuffer messages replace current minibuffer contents?

Eli Zaretskii <[email protected]>
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
> Date: Thu, 16 Apr 2026 12:34:36 +0200
> From: Frank Steiner <[email protected]>
> 
> as I like to restrict the minibuffer to one line max height
> the current mechanism of adding temporary messages at EOB
> is not working well in some cases. E.g. when the "Find file:"
> shows already a longer path and then you press some wrong
> key, the "Command attempted to use minibuffer while in minibuffer"
> is almost invisible as it wraps to the next line (that I forced
> to be hidden).
> 
> xemacs is showing such temporary message instead of the current
> minibuffer, i.e., completely replacing it for the given timeout.
> then restoring the previous content.
> 
> I wonder if it is possible to reach the same for emacs. After
> looking through minibuffer.el I couldn't find a way. Redefining
> minibuffer--message-overlay-pos to return 0 didn't help as the
> prompt will stay at the EOB.
> 
> I could just think of advising minibuffer-message to save
> and clear the minibuffer and restore it after the timeout,
> but I wonder if there an easier way to reach that?

Yes, you can write your own function instead of the default
set-minibuffer-message.  That function is called via the hook called
set-message-functions, which see.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.