From: John Covici <covici@ccs.covici.com>
To: Gregory Heytings <gregory@heytings.org>
Cc: Platon Pronko <platon7pronko@gmail.com>,
Eli Zaretskii <eliz@gnu.org>,
help-gnu-emacs@gnu.org
Subject: Re: Is there a way to avoid clobbering minibuffer by messages?
Date: Fri, 31 Mar 2023 07:04:19 -0400 [thread overview]
Message-ID: <m3355lxjv0.wl-covici@ccs.covici.com> (raw)
In-Reply-To: <58158ae498b2bf0b33f8@heytings.org>
Would this work if I am using a virtual console -- in that case there
would be no frame or anything like that?
On Fri, 31 Mar 2023 03:45:09 -0400,
Gregory Heytings wrote:
>
> [1 <text/plain; us-ascii (7bit)>]
>
> >> I think of modeline as something buffer-specific, so I don't
> >> want to put global messages there.
> >
> > In that case you can try the other file I posted, with which
> > messages are displayed in a popup buffer.
> >
>
> Here it is again, with a few corrections. Again messages are
> displayed in a popup buffer only when the minibuffer is active.
> [2 popup-buffer-minibuffer-message.el <text/plain; us-ascii (base64)>]
> (defvar popup-buffer-minibuffer-message-window nil)
> (defvar popup-buffer-minibuffer-message-timer nil)
> (defun popup-buffer-minibuffer-message-clear ()
> (when (not noninteractive)
> (when (timerp minibuffer-message-timer)
> (cancel-timer popup-buffer-minibuffer-message-timer)
> (when (window-live-p popup-buffer-minibuffer-message-window)
> (delete-window popup-buffer-minibuffer-message-window)))))
> (defun popup-buffer-minibuffer-message-set (message)
> (let* ((minibuf-window (active-minibuffer-window))
> (minibuf-frame (and (window-live-p minibuf-window)
> (window-frame minibuf-window))))
> (when (and (not noninteractive)
> (window-live-p minibuf-window)
> (or (eq (window-frame) minibuf-frame)
> (eq (frame-parameter minibuf-frame 'minibuffer) 'only)))
> (progn
> (when (numberp minibuffer-message-clear-timeout)
> (setq popup-buffer-minibuffer-message-timer
> (run-with-timer minibuffer-message-clear-timeout nil
> #'popup-buffer-minibuffer-message-clear)))
> (let ((buffer (get-buffer-create " *Popup Echo Area*")))
> (unless (window-live-p popup-buffer-minibuffer-message-window)
> (setq popup-buffer-minibuffer-message-window
> (display-buffer
> buffer
> '(display-buffer-in-side-window (window-height . 1)))))
> (with-current-buffer buffer
> (setq-local mode-line-format nil cursor-type nil)
> (erase-buffer)
> (insert message))
> (fit-window-to-buffer popup-buffer-minibuffer-message-window
> 10 1))
> t))))
> (setq clear-message-function #'popup-buffer-minibuffer-message-clear)
> (setq set-message-function #'popup-buffer-minibuffer-message-set)
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici wb2una
covici@ccs.covici.com
next prev parent reply other threads:[~2023-03-31 11:04 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 7:57 Is there a way to avoid clobbering minibuffer by messages? Platon Pronko
2023-03-30 8:53 ` Eli Zaretskii
2023-03-30 9:40 ` Platon Pronko
2023-03-30 10:32 ` Eli Zaretskii
2023-03-30 15:05 ` Gregory Heytings
2023-03-30 16:28 ` [External] : " Drew Adams
2023-03-30 16:35 ` Eli Zaretskii
2023-03-30 16:49 ` Drew Adams
2023-03-30 17:27 ` Eli Zaretskii
2023-03-30 17:32 ` Gregory Heytings
2023-03-30 17:51 ` Eli Zaretskii
2023-03-30 18:14 ` John Yates
2023-03-30 18:28 ` Eli Zaretskii
2023-03-30 20:08 ` John Yates
2023-03-31 6:32 ` Yuri Khan
2023-03-30 18:16 ` Gregory Heytings
2023-03-30 18:31 ` Eli Zaretskii
2023-03-30 19:37 ` Sergey Organov
2023-03-30 19:45 ` Gregory Heytings
2023-03-30 20:02 ` Gregory Heytings
2023-03-30 20:06 ` Gregory Heytings
2023-03-30 19:26 ` Jean Louis
2023-03-31 10:40 ` Eric S Fraga
2023-03-30 19:22 ` Jean Louis
2023-03-31 6:24 ` Platon Pronko
2023-03-31 6:58 ` Gregory Heytings
2023-03-31 7:01 ` Gregory Heytings
2023-03-31 7:10 ` Platon Pronko
2023-03-31 7:17 ` Gregory Heytings
2023-03-31 7:45 ` Gregory Heytings
2023-03-31 11:04 ` John Covici [this message]
2023-03-31 11:09 ` Gregory Heytings
2023-03-31 12:46 ` John Covici
2023-03-30 9:52 ` Gregory Heytings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3355lxjv0.wl-covici@ccs.covici.com \
--to=covici@ccs.covici.com \
--cc=eliz@gnu.org \
--cc=gregory@heytings.org \
--cc=help-gnu-emacs@gnu.org \
--cc=platon7pronko@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.