Subject: Re: bug#44818: 27.0.91; wedged

From: Eli Zaretskii <[email-masked]>
Date: Mon, 23 Nov 2020 17:51:55 +0200

> From: Devon Sean McCullough <[email-masked]>
> Date: Mon, 23 Nov 2020 00:07:10 -0500
> 
> Having fat-fingered it in dired, I inadvertently opened a large file
> with no newlines.  That Emacs instance has been burning 100% CPU all
> day.  I can interrupt and single step it in llbd from another Emacs.
> Is there any way to unwedge Emacs?  E.g., would forcing read_char to
> return Qnil, Qt or something cause corruption?  Would invoking, say,
> Fbury_buffer_internal (Fcurrent_buffer ()) regain control or blow it
> up?  I'll leave it overnight in case it reads the ^G^G^Xk^M I typed.

Try this:

  C-g M-<

This will probably take some time to come through, but once it does,
you will see the very beginning of the file, and should be able to
kill the buffer with "C-x k RET".

> P.S. Obviously, long stretches of non-newlines wedge Emacs for ages,
> because redisplay assumes there are no long lines.  Perhaps the docs
> mention some workaround I missed?  Redisplay has been buggy for over
> a year now, glitchy blank windows, etc., but that's not today's bug.

When you visit such a long file in Emacs 27.1, you should see a
suggestion to visit it literally; take it.

A more general solution is to turn on so-long mode.

You seem to be running a pretest of Emacs 27.1, so maybe these don't
work in your version.