unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Zhang Haijun <ccsmile2008@outlook.com>
To: martin rudalics <rudalics@gmx.at>
Cc: HaiJun Zhang <netjune@outlook.com>,
	"34614@debbugs.gnu.org" <34614@debbugs.gnu.org>,
	Juri Linkov <juri@linkov.net>
Subject: bug#34614: 26.1.92; When reading input in mini-buffer, message to each area overide the input prompt
Date: Thu, 14 Nov 2019 00:44:35 +0000	[thread overview]
Message-ID: <KL1PR0601MB3653639B30C883E881FAE54CA8710@KL1PR0601MB3653.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <abf2cb0c-c494-a742-5e7a-6bf6ade2ddb1@gmx.at>



> 在 2019年11月12日,下午4:10,martin rudalics <rudalics@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.



  reply	other threads:[~2019-11-14  0:44 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 12:17 bug#34614: 26.1.92; When reading input in mini-buffer, message to each area overide the input prompt Zhang Haijun
2019-02-22 13:20 ` Eli Zaretskii
2019-02-22 13:35   ` Zhang Haijun
2019-02-22 15:07 ` martin rudalics
2019-02-22 15:40   ` Zhang Haijun
2019-02-22 21:38     ` martin rudalics
2019-02-23  7:26       ` Eli Zaretskii
2019-02-23  7:54         ` martin rudalics
2019-02-23  8:25           ` Eli Zaretskii
2019-02-23  8:29             ` martin rudalics
2019-02-23  9:31               ` Eli Zaretskii
2019-02-23  9:57                 ` martin rudalics
2019-02-23 10:35                   ` Eli Zaretskii
2019-02-23 14:02                     ` martin rudalics
2019-02-23 16:51                       ` Eli Zaretskii
2019-02-24  8:44                         ` martin rudalics
2019-02-24 16:11                           ` Eli Zaretskii
2019-02-24 18:31                             ` martin rudalics
2019-02-24 19:02                               ` Eli Zaretskii
2019-02-25 10:11                                 ` martin rudalics
     [not found]     ` <5C7043C9.2090809@gmx.at>
2019-02-23  2:01       ` Zhang Haijun
2019-02-23  2:33         ` Zhang Haijun
2019-02-23  7:53           ` martin rudalics
2019-02-23  8:05             ` Zhang Haijun
2019-02-23  8:29               ` martin rudalics
2019-02-23  8:01           ` Eli Zaretskii
2019-02-23  8:29             ` Zhang Haijun
2019-11-06 22:02     ` Juri Linkov
2019-11-07 14:52       ` HaiJun Zhang
2019-11-07 22:12         ` Juri Linkov
2019-11-08  1:46           ` HaiJun Zhang
2019-11-09 23:05             ` Juri Linkov
2019-11-09 23:38               ` HaiJun Zhang
2019-11-10 21:22                 ` Juri Linkov
2019-11-12  0:49                   ` HaiJun Zhang
2019-11-12  8:10                     ` martin rudalics
2019-11-14  0:44                       ` Zhang Haijun [this message]
2019-11-12  1:15                   ` HaiJun Zhang
2019-11-12 20:53                     ` Juri Linkov
2019-11-14  0:46                       ` Zhang Haijun

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=KL1PR0601MB3653639B30C883E881FAE54CA8710@KL1PR0601MB3653.apcprd06.prod.outlook.com \
    --to=ccsmile2008@outlook.com \
    --cc=34614@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=netjune@outlook.com \
    --cc=rudalics@gmx.at \
    /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).