unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 48409@debbugs.gnu.org, juri@linkov.net
Subject: bug#48409: Text runs away before user can copy it
Date: Sat, 15 May 2021 11:15:35 +0000	[thread overview]
Message-ID: <YJ+tV10QLdqkeEp0@ACM> (raw)
In-Reply-To: <83im3ky1ye.fsf@gnu.org>

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 <acm@muc.de>

> > > 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).





  reply	other threads:[~2021-05-15 11:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14  6:32 bug#48409: Text runs away before user can copy it 積丹尼 Dan Jacobson
2021-05-14  7:07 ` Eli Zaretskii
2021-05-14 17:58   ` Juri Linkov
2021-05-14 18:46     ` Eli Zaretskii
2021-05-15 12:29       ` 積丹尼 Dan Jacobson
2021-05-15 12:34         ` Eli Zaretskii
2021-05-14 19:45     ` Eli Zaretskii
2021-05-14 19:51       ` bug#48409: [External] : " Drew Adams
2021-05-14 20:13       ` Eli Zaretskii
2021-05-14 20:53         ` Alan Mackenzie
2021-05-15  5:56           ` Eli Zaretskii
2021-05-15 11:15             ` Alan Mackenzie [this message]
2021-05-17 20:53       ` Juri Linkov
2021-05-18 13:13         ` Eli Zaretskii
2021-05-18 18:42           ` Alan Mackenzie
2021-05-18 19:05             ` Eli Zaretskii
2021-05-18 20:23               ` Alan Mackenzie
2021-05-19 12:12                 ` Eli Zaretskii
2021-05-19 15:49                   ` Alan Mackenzie
2021-05-19 17:40                 ` martin rudalics
2021-05-20 16:54                   ` martin rudalics
2021-05-21 20:55                     ` Alan Mackenzie
2021-05-22  8:05                       ` martin rudalics
2021-05-22 11:42                         ` Alan Mackenzie
2021-05-22 14:36                           ` martin rudalics
2021-05-22 15:12                             ` Eli Zaretskii
2021-05-22 16:36                               ` martin rudalics
2021-05-30 15:44                           ` Alan Mackenzie
2021-05-31  7:55                             ` martin rudalics
2021-05-31 10:44       ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YJ+tV10QLdqkeEp0@ACM \
    --to=acm@muc.de \
    --cc=48409@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).