From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Signal `quit' in a `font-lock-fontify-region-function'
Date: Tue, 28 May 2019 14:24:23 -0400 [thread overview]
Message-ID: <jwvimtumojx.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: CAG7BpaqFqw3ey_rnGoGiLA2ESsqtOdhUnuH6H9xvJhKLKHR=xQ@mail.gmail.com
> I think a larger (apparent) problem is to let user know what's going on.
> Naively issued messages would get overridden with "Quit" in the echo
> area, because the natural response (at least mine) in such situation is
> to mash C-g continuosly, not do it accurately and watch if there is any
> change. And those "excessive" C-g would result in "Quit" message.
> This is also part of the reason I haven't continued with implementing
> this just for my mode, but rather feel it would be better as a general
> Emacs feature.
Right, here's how I could imagine a "desirable" behavior:
- everytime some operation may block Emacs, it should "register"
somewhere (probably some let-binding of a global var is all it takes).
- After hitting C-g, a timer is started.
- If this timer is reached before the C-g has had to chance to be
processed, emit a message in the echo area explaining what Emacs is
currently doing (based on the "registered" information above).
- when we reach the Nth C-g in a row within the same "registered"
operation, we abort the operation (e.g. by calling an ad-hoc
function provided while "registering").
-- Stefan
next prev parent reply other threads:[~2019-05-28 18:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 16:24 Signal `quit' in a `font-lock-fontify-region-function' Paul Pogonyshev
2019-05-28 17:50 ` Stefan Monnier
2019-05-28 18:14 ` Paul Pogonyshev
2019-05-28 18:24 ` Stefan Monnier [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-06-29 17:50 Paul Pogonyshev
2019-06-29 21:26 ` Stefan Monnier
2019-06-29 23:49 ` Paul Pogonyshev
2019-06-30 0:18 ` Stefan Monnier
2019-06-30 10:51 ` Paul Pogonyshev
2019-05-16 22:20 Paul Pogonyshev
2019-05-16 23:20 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvimtumojx.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.