From: Gregory Heytings via "Emacs development discussions." <emacs-devel@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: acm@muc.de, juri@linkov.net, monnier@iro.umontreal.ca,
emacs-devel@gnu.org
Subject: Re: New multi-command facility displays in the wrong echo area.
Date: Tue, 13 Oct 2020 21:22:46 +0000 [thread overview]
Message-ID: <alpine.NEB.2.22.394.2010132321230453.24393@sdf.lonestar.org> (raw)
In-Reply-To: <alpine.NEB.2.22.394.2010132123190453.16421@sdf.lonestar.org>
Hi Eli,
>
> Here is a slightly improved version of the code, which removes the
> (minibuffer-message-mode-line-string ...) from mode-line-format when
> clearing the minibuffer message.
>
Please ignore the code I sent you two hours ago, and replace it with the
following one:
(defvar minibuffer-message-mode-line-string nil)
(defvar minibuffer-message-mode-line-buffer nil)
(defun clear-minibuffer-message ()
(when (not noninteractive)
(when (timerp minibuffer-message-timer)
(cancel-timer minibuffer-message-timer)
(setq minibuffer-message-timer nil))
(setq minibuffer-message-mode-line-string nil)
(when (bufferp minibuffer-message-mode-line-buffer)
(with-current-buffer minibuffer-message-mode-line-buffer
(let ((mls (and (listp mode-line-format)
(assq 'minibuffer-message-mode-line-string
mode-line-format))))
(if mls (setq mode-line-format (cadr (remq mls mode-line-format))))))
(setq minibuffer-message-mode-line-buffer nil))))
(defface minibuffer-message-face
`((t (:background ,(face-attribute 'default :background)
:foreground ,(face-attribute 'default :foreground)))) "")
(defun set-minibuffer-message (message)
(when (and (not noninteractive)
(window-live-p (active-minibuffer-window))
(eq (window-frame) (window-frame (active-minibuffer-window))))
(progn
(when (numberp minibuffer-message-clear-timeout)
(setq minibuffer-message-timer
(run-with-timer minibuffer-message-clear-timeout nil
#'clear-minibuffer-message)))
(with-current-buffer
(window-buffer
(or (window-in-direction 'above (minibuffer-window))
(minibuffer-selected-window)
(get-largest-window)))
(clear-minibuffer-message)
(when (and mode-line-format
(not (and (listp mode-line-format)
(assq 'minibuffer-message-mode-line-string
mode-line-format))))
(setq minibuffer-message-mode-line-buffer (current-buffer))
(setq mode-line-format
(list "" '(minibuffer-message-mode-line-string
(" " (:propertize minibuffer-message-mode-line-string
face minibuffer-message-face) " "))
mode-line-format)))
(setq minibuffer-message-mode-line-string (substring-no-properties message))
(force-mode-line-update))
t)))
next prev parent reply other threads:[~2020-10-13 21:22 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-09 16:34 New multi-command facility displays in the wrong echo area Alan Mackenzie
2020-10-09 19:47 ` Stefan Monnier
2020-10-09 20:38 ` Alan Mackenzie
2020-10-09 22:12 ` Stefan Monnier
2020-10-09 22:56 ` Drew Adams
2020-10-10 6:52 ` Eli Zaretskii
2020-10-10 10:32 ` Alan Mackenzie
2020-10-10 11:13 ` Eli Zaretskii
2020-10-10 12:36 ` Gregory Heytings via Emacs development discussions.
2020-10-10 12:44 ` Alan Mackenzie
2020-10-10 12:50 ` Eli Zaretskii
2020-10-10 13:00 ` Eli Zaretskii
2020-10-10 20:30 ` Gregory Heytings via Emacs development discussions.
2020-10-11 14:38 ` Eli Zaretskii
2020-10-12 9:12 ` Gregory Heytings via Emacs development discussions.
2020-10-12 12:00 ` Alan Mackenzie
2020-10-12 12:18 ` Gregory Heytings via Emacs development discussions.
2020-10-12 14:37 ` Eli Zaretskii
2020-10-12 15:41 ` Gregory Heytings via Emacs development discussions.
2020-10-12 16:01 ` Eli Zaretskii
2020-10-12 16:31 ` Gregory Heytings via Emacs development discussions.
2020-10-12 17:20 ` Eli Zaretskii
2020-10-12 21:06 ` Gregory Heytings via Emacs development discussions.
2020-10-13 14:03 ` Eli Zaretskii
2020-10-13 19:27 ` Gregory Heytings via Emacs development discussions.
2020-10-13 21:22 ` Gregory Heytings via Emacs development discussions. [this message]
2020-10-12 17:12 ` Drew Adams
2020-10-12 17:34 ` Eli Zaretskii
2020-10-12 19:46 ` Juri Linkov
2020-10-13 2:25 ` Eli Zaretskii
2020-10-14 20:44 ` Gregory Heytings via Emacs development discussions.
[not found] ` <1cd65040-f7ad-4613-b3fb-7cfa62bb0488@default>
2020-10-14 22:15 ` Gregory Heytings via Emacs development discussions.
2020-10-14 22:51 ` Stefan Monnier
2020-10-16 7:19 ` Eli Zaretskii
2020-10-16 7:19 ` Eli Zaretskii
2020-10-10 13:03 ` Gregory Heytings via Emacs development discussions.
2020-10-10 13:47 ` Alan Mackenzie
2020-10-10 20:20 ` Gregory Heytings via Emacs development discussions.
2020-10-09 21:14 ` Gregory Heytings via Emacs development discussions.
2020-10-09 21:48 ` Gregory Heytings via Emacs development discussions.
2020-10-10 10:15 ` Alan Mackenzie
2020-10-10 13:44 ` Stefan Monnier
[not found] <<20201009163445.GB4027@ACM>
[not found] ` <<jwv362nkwss.fsf-monnier+emacs@gnu.org>
[not found] ` <<20201009203810.GC4027@ACM>
[not found] ` <<83imbi609a.fsf@gnu.org>
2020-10-10 16:11 ` Drew Adams
2020-10-10 20:40 ` Gregory Heytings via Emacs development discussions.
2020-10-11 0:59 ` Drew Adams
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=alpine.NEB.2.22.394.2010132321230453.24393@sdf.lonestar.org \
--to=emacs-devel@gnu.org \
--cc=acm@muc.de \
--cc=eliz@gnu.org \
--cc=ghe@sdf.org \
--cc=juri@linkov.net \
--cc=monnier@iro.umontreal.ca \
/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.