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

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

bug#38457: 27.0.50; dabbrev-expand regression due to message change


From: Eli Zaretskii
Subject: bug#38457: 27.0.50; dabbrev-expand regression due to message change
Date: Mon, 16 Dec 2019 18:09:38 +0200

> From: Juri Linkov <juri@linkov.net>
> Cc: 38457@debbugs.gnu.org
> Date: Mon, 16 Dec 2019 01:59:45 +0200
> 
> > IOW, introduce a new option, which will affect the new function we
> > were talking about, a near-clone of minibuffer-message (and will not
> > affect minibuffer-message itself).  When that new option's value is
> > not a number, the near-clone of minibuffer-message should not call
> > sit-for at all; and when that value is a number, use a timer to remove
> > the message after that many seconds if no input arrives before that.
> >
> > In any case, I thought we agreed not to call minibuffer-message from
> > 'message', but define a new function, similar but not identical to
> > minibuffer-message (what I call a "near-clone").  And
> > minibuffer-message-timeout should not affect that new function, it
> > should be a separate option.
> 
> I agree that a new function needs to be created, and agree
> not to call minibuffer-message from 'message'.

OK.

> >> 8693611136
> >> aa89c84e00
> >> 54c792ece6
> >>
> >> Please revert them if you want.
> >
> > Thanks.  Let's revisit these after the implementation of the
> > minibuffer-message's clone is finalized, so that we could know which
> > ones of these are still needed and which aren't.
> 
> Since a new near-clone of minibuffer-message is needed, and
> we agreed to not call minibuffer-message from 'message',
> I reverted all previous changes.
> 
> Now a new feature could be implemented from scratch.
> 
> I created a new ELPA package attached below that
> implements this feature.  So everyone who like it
> can use it even after release.  Also this package
> could be used for experimentation to find the best way
> to use it, that later could be moved to core in Emacs 28.
> 
> I think now we have no moral right to delay the Emacs 27 pretest
> anymore.

Thanks.

However, I hoped we could have at least part of what you did in Emacs
27, and not lose all of it.  We could install a function like
'minimess-minibuffer-message', and make one of the subroutines of
'message' call it under the right conditions.  Then the message which
'minimess-minibuffer-message' displays could be removed by a timer if
the new timeout defcustom is a number, and if that defcustom is not a
number (which will be the default), the message stays and sit-for is
not called.

Do you see any danger with the above?  If not, can I persuade you do
install such a change?

> (defun minimess-message (orig-fun format-string &rest args)
>   (if (and
>        ;; When `inhibit-message' is non-nil, the intention was to just
>        ;; log the message to the *Messages* buffer using `message'.
>        (null inhibit-message)
>        (window-live-p (active-minibuffer-window))
>        (window-live-p (old-selected-window))
>        (bufferp (window-buffer (old-selected-window)))
>        (minibufferp (window-buffer (old-selected-window))))

Btw, can you explain why every part of this condition is needed?  IOW,
why isn't just the below enough?

   (window-live-p (active-minibuffer-window))

(I do understand the reason for the test of inhibit-message).

Maybe the other conditions need a comment to explain them?

Thanks.





reply via email to

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