emacs-devel
[Top][All Lists]
Advanced

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

Re: New multi-command facility displays in the wrong echo area.


From: Gregory Heytings
Subject: Re: New multi-command facility displays in the wrong echo area.
Date: Mon, 12 Oct 2020 21:06:12 +0000
User-agent: Alpine 2.22 (NEB 394 2020-01-19)


We can discuss other solutions, of course. However, significant changes will have to wait for Emacs 28.

Ouch.  So this last-minute change will last for several years?

Unless we can come up with a change that is either simple or safe. Or if we decide that the current situation is so unacceptable that we are willing to take higher risks of releasing a less stable Emacs 27.2.


I cannot make such a judgment. But I think options should at least be explored. Would doing something like what eldoc-minibuffer-message does possibly be a good solution? It seems to me that this is safer than the current situation, as it does not fiddle with the minibuffer contents. If so, what do you (and others) think of the following:

(defvar minibuffer-message-mode-line-string nil)
(setq minibuffer-message-clear-timeout 3)
(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)))
(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 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 message)
        (force-mode-line-update))
      t)))


I cannot help you with your doubts more than I already did. If you still have those doubts, I'd appreciate if you keep them to yourself, because having them written here is an insult I don't think I deserve.


Where do you see an insult in what I wrote? I'm simply asking for a piece of code instead of abstract arguments. Anyway, as you said to Drew, life is too short, so I will simply continue to use my code for myself, and I hope that others will find it useful too. And if the situation has not improved in a few months, I'll ring the bell again.



reply via email to

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