[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why doesn't emacs yield more?
From: |
ndame |
Subject: |
Re: Why doesn't emacs yield more? |
Date: |
Thu, 29 Aug 2019 17:39:20 +0200 (CEST) |
>
> Assuming it was redisplay that took most of the time: you cannot
> interrupt it, not by default. What would be the purpose of that?
> Emacs cannot allow the display to be left in a state that is
> inconsistent with the contents of the buffer, so it will immediately
> reenter another redisplay cycle.
If I e.g. do a C-y and consquently emacs starts a long operation then
if I interrupt then emacs could simply restore the buffer/display state
from before the C-y state. I didn't see my C-y operation finish
because of the redisplay, so I wouldn't mind if a C-g would cancel that
too.
I don't know if a snapshot can be made of the current buffer/display
state, but if emacs can do that then it could simply restore the
previous snapshot instantly, so there would be no issue of inconsistent
buffer/display after interrupting.
> What you can do is type M-< to go to the beginning of the buffer. If
> the problematic portion of the buffer will then be off-screen, you
> should be able to stop waiting.
Interesting. I'll try it next time.
> >
> > Would it be a big performance hit? I don't know if the check
> > could be inlined somehow. Was something like this discussed
> > before?
>
> We already do all that when running Lisp code.
Thanks. I didn't know that.