From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#38457: 27.0.50; dabbrev-expand regression due to message change Date: Sun, 15 Dec 2019 17:35:22 +0200 Message-ID: <83r21561qd.fsf@gnu.org> References: <8736e3vve8.fsf@gmx.net> <8736e2coyv.fsf@mail.linkov.net> <83y2vujd0y.fsf@gnu.org> <87blspm0sm.fsf@mail.linkov.net> <837e3ckbem.fsf@gnu.org> <871rtjn0kt.fsf@mail.linkov.net> <83lfrrigj8.fsf@gnu.org> <87eexiqps5.fsf@mail.linkov.net> <83lfrphp94.fsf@gnu.org> <87wob7g2jk.fsf@mail.linkov.net> <83k177ebs0.fsf@gnu.org> <87muc27prn.fsf@mail.linkov.net> <83tv6acgq5.fsf@gnu.org> <87eexdoygh.fsf@mail.linkov.net> <83tv68c0nb.fsf@gnu.org> <87d0cubfxx.fsf@mail.linkov.net> <83a77y9k35.fsf@gnu.org> <87eex9jf14.fsf@mail.linkov.net> <83d0cs8uw8.fsf@gnu.org> <87a77uh5a5.fsf@mail.linkov.net> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="231821"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38457@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 15 16:36:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1igVwK-000yAL-Ma for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Dec 2019 16:36:12 +0100 Original-Received: from localhost ([::1]:40686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igVwI-0002Ki-Tt for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Dec 2019 10:36:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58068) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igVwB-0002KX-OG for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2019 10:36:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igVwA-0008MF-11 for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2019 10:36:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igVw9-0008LL-SJ for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2019 10:36:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1igVw9-0003yR-Qa for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2019 10:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Dec 2019 15:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38457 X-GNU-PR-Package: emacs Original-Received: via spool by 38457-submit@debbugs.gnu.org id=B38457.157642415015254 (code B ref 38457); Sun, 15 Dec 2019 15:36:01 +0000 Original-Received: (at 38457) by debbugs.gnu.org; 15 Dec 2019 15:35:50 +0000 Original-Received: from localhost ([127.0.0.1]:37040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igVvx-0003xx-RB for submit@debbugs.gnu.org; Sun, 15 Dec 2019 10:35:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igVvv-0003xl-PB for 38457@debbugs.gnu.org; Sun, 15 Dec 2019 10:35:48 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1igVvq-0007BB-IM; Sun, 15 Dec 2019 10:35:42 -0500 Original-Received: from [176.228.60.248] (port=1253 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1igVvp-0005zX-I5; Sun, 15 Dec 2019 10:35:42 -0500 In-reply-to: <87a77uh5a5.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 15 Dec 2019 01:10:58 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173376 Archived-At: > From: Juri Linkov > Cc: 38457@debbugs.gnu.org > Date: Sun, 15 Dec 2019 01:10:58 +0200 > > > That leaves open the issue of the default value of > > minibuffer-message-timeout. I don't think we can change it, because > > it affects minibuffer-message as well. But we could have a new > > option, which would affect only the duplicate function you mention > > below. If the new option by default makes the message stay until the > > next one or until user input, I think this would be an okay solution > > that satisfies everyone, at least for Emacs 27. > > The main problem with 'minibuffer-message' is that it uses 'sit-for'. > If a new function will use the same 'sit-for' to detect when input is > available, then it will bring the same problems. Here's is an example > of the problems it causes: I call 'select-window' from 'post-command-hook' > to select an output window, but 'sit-for' delays selecting the window > for 2 seconds until 'execute-extended-command' finishes displaying > the message "You can run the command `%s' with %s" using 'sit-for'. > The output window becomes selected only after 2 seconds because > a customized function in 'post-command-hook' doesn't run earlier > than returning from 'sit-for' in 'execute-extended-command'. > > 'sit-for' is used in many places, but it's inappropriate for these tasks. > What is a possible replacement for 'sit-for'? For a delay of specified > seconds, one solution is to run a timer. But how to replace another > aspect of 'sit-for', namely an ability to stop when input is available? What I had in mind was to go with your idea, viz.: > Then your proposed implementation should be activated when > minibuffer-message-timeout is set to a non-nil value. > Otherwise, when it's a number, it should use the timer. 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. > There is a need for a hook that would be called when input is available. > Maybe such hook already exists, I don't know, I searched but found only > 'echo-area-clear-hook' that is used in this code in 'command_loop_1': Do we still need such a hook if the idea above is implemented instead? > > Assuming you agree, once this change is made, some of the recent > > changes related to these issues should be reverted. Can I ask you to > > review those related changesets and publish a list of those which need > > to be reverted or augmented? > > Here's is a list of related changesets: > > 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.