GNU bug report logs -
#34614
26.1.92; When reading input in mini-buffer, message to each area overide the input prompt
Previous Next
Reported by: Zhang Haijun <ccsmile2008 <at> outlook.com>
Date: Fri, 22 Feb 2019 12:19:01 UTC
Severity: normal
Tags: fixed
Found in version 26.1.92
Fixed in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #123 received at 34614 <at> debbugs.gnu.org (full text, mbox):
> 在 2019年11月12日,下午4:10,martin rudalics <rudalics <at> gmx.at> 写道:
>
> > Thanks. I think it will be better if emacs can record the last
> > buffer(Including minibuffer) selected manually by the user
>
> That will be next to impossible.
>
> > and provide
> > a function like selected-buffer to return this buffer.
> > And minibuffer-message can use this.
> >
> > old-selected-window does exactly the same - it records the last window,
> > and getting its buffer is easy with just window-buffer.
> >
> > Doesn’t set-buffer and with-current-buffer change the current buffer in the window?
>
> No. Only set_window_buffer does that.
>
> > They are not selected manually by user.
>
> How would you know?
>
> martin
>
Then is it possible to provide a function which returns whether the current context is in the foreground thread or in a background thread(a timer callback or a background thread)?
If the former, it can use the minibuffer freely.
If the latter, it can't. If it outputs messages, the minibuffer should be protected. If it reads user input, it should be queued and blocked.
I think it is not safe to call y-or-n-p in a timer callback, because user may be editing a file and typing 'y'. So the above checking should be done in low level function like y-or-n-p.
This bug report was last modified 5 years and 250 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.