From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#48409: Text runs away before user can copy it Date: Fri, 14 May 2021 20:53:38 +0000 Message-ID: References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <83lf8hxedd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11677"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48409@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 14 22:54:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhep0-0002oC-Ur for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 May 2021 22:54:10 +0200 Original-Received: from localhost ([::1]:49334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lheoz-00042e-Eu for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 May 2021 16:54:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lheos-00042L-G2 for bug-gnu-emacs@gnu.org; Fri, 14 May 2021 16:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lheos-0001EX-8q for bug-gnu-emacs@gnu.org; Fri, 14 May 2021 16:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lheos-0003Ew-7A for bug-gnu-emacs@gnu.org; Fri, 14 May 2021 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 May 2021 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48409 X-GNU-PR-Package: emacs Original-Received: via spool by 48409-submit@debbugs.gnu.org id=B48409.162102562712430 (code B ref 48409); Fri, 14 May 2021 20:54:02 +0000 Original-Received: (at 48409) by debbugs.gnu.org; 14 May 2021 20:53:47 +0000 Original-Received: from localhost ([127.0.0.1]:47164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lheoc-0003EP-Rm for submit@debbugs.gnu.org; Fri, 14 May 2021 16:53:47 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:21993 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lheob-0003ED-8s for 48409@debbugs.gnu.org; Fri, 14 May 2021 16:53:45 -0400 Original-Received: (qmail 61083 invoked by uid 3782); 14 May 2021 20:53:39 -0000 Original-Received: from acm.muc.de (p4fe158f3.dip0.t-ipconnect.de [79.225.88.243]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 14 May 2021 22:53:38 +0200 Original-Received: (qmail 3816 invoked by uid 1000); 14 May 2021 20:53:38 -0000 Content-Disposition: inline In-Reply-To: <83lf8hxedd.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206561 Archived-At: Hello, Eli. On Fri, May 14, 2021 at 23:13:50 +0300, Eli Zaretskii wrote: > > Date: Fri, 14 May 2021 22:45:43 +0300 > > From: Eli Zaretskii > > Cc: 48409@debbugs.gnu.org > > > (defvar minibuffer-inactive-mode-map > > > (let ((map (make-keymap))) > > > ... > > > (define-key map [mouse-1] 'view-echo-area-messages) > > > But now clicking mouse-1 reports an error. > > It reports an error because it doesn't invoke view-echo-area-messages. > > Alan, this minibuffer-inactive-mode-map thing doesn't seem to work > > with mouse clocks, please take a look. > Alan, is the below the right fix? The problem is that no one is > setting up the minibuffer in inactive mode until after the first time > the minibuffer is activated. > diff --git a/src/minibuf.c b/src/minibuf.c > index 428998a..9ec93a0 100644 > --- a/src/minibuf.c > +++ b/src/minibuf.c > @@ -2297,6 +2297,8 @@ init_minibuf_once_for_pdumper (void) > minibuf_prompt = Qnil; > minibuf_save_list = Qnil; > last_minibuf_string = Qnil; > + Lisp_Object minibuf = get_minibuffer (0); > + set_minibuffer_mode (minibuf, 0); > } > > void I'm not entirely sure. I actually added a "get_minibuffer (0);" to init_minibuf_once in my commit earlier on today, so perhaps the "set_minibuffer_mode (minibuf, 0);" really belongs in that function. I'm not quite sure in my own mind what should go into init_minibuf_once and what into init_minibuf_once_for_pdumper. I've taken as the criterion what the comment there says: /* We run this function on first initialization and whenever we restore from a dump file. pdumper doesn't try to preserve frames, windows, and so on, so reset everything related here. */ , and thus put the creation of *Minibuf-0* into init_minibuf_once. It would be good to have a relatively simple fix for something in minibuf.c, for once. ;-) -- Alan Mackenzie (Nuremberg, Germany).