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: Sat, 15 May 2021 11:15:35 +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> <83im3ky1ye.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="4145"; 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 Sat May 15 13:16:27 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 1lhsHT-0000qT-1p for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 13:16:27 +0200 Original-Received: from localhost ([::1]:60648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhsHS-0006Wk-2v for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 07:16:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhsH4-0006Uk-3I for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 07:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36171) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhsH3-0001N2-Q3 for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 07:16:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lhsH3-0003RV-Ke for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 07:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 May 2021 11:16:01 +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.162107734713192 (code B ref 48409); Sat, 15 May 2021 11:16:01 +0000 Original-Received: (at 48409) by debbugs.gnu.org; 15 May 2021 11:15:47 +0000 Original-Received: from localhost ([127.0.0.1]:47714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhsGo-0003Qh-NU for submit@debbugs.gnu.org; Sat, 15 May 2021 07:15:46 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:43191 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lhsGk-0003QL-Mg for 48409@debbugs.gnu.org; Sat, 15 May 2021 07:15:45 -0400 Original-Received: (qmail 68733 invoked by uid 3782); 15 May 2021 11:15:36 -0000 Original-Received: from acm.muc.de (p4fe15ace.dip0.t-ipconnect.de [79.225.90.206]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 15 May 2021 13:15:35 +0200 Original-Received: (qmail 17270 invoked by uid 1000); 15 May 2021 11:15:35 -0000 Content-Disposition: inline In-Reply-To: <83im3ky1ye.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:206588 Archived-At: Hello, Eli. On Sat, May 15, 2021 at 08:56:41 +0300, Eli Zaretskii wrote: > > Date: Fri, 14 May 2021 20:53:38 +0000 > > Cc: juri@linkov.net, 48409@debbugs.gnu.org > > From: Alan Mackenzie > > > 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. > init_minibuf_once isn't called after dumping, so that would not help. > We need to make sure the minibuffer is put in inactive mode when we > start Emacs. > > 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. > See above: this won't survive the dumping because the minibuffer's > mode isn't dumped. And I see no reason to dump it; after all, it > only makes sense to dump things whose preparation is time-consuming. Thanks for clarifying that. I'd misunderstood the comments, and got those two functions' purposes mixed up. So, your patch is then entirely correct, and what I'd put in yesterday afternoon is not correct. I'll get that fixed and committed now. > > It would be good to have a relatively simple fix for something in > > minibuf.c, for once. ;-) > And I thought I was fine providing a very simple fix. Oh well... Sorry, bad wording on my part. The fix was simple, and I was rejoicing in that simplicity. -- Alan Mackenzie (Nuremberg, Germany).