help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs freezes when editing a file with one extremely long line even


From: Hongyi Zhao
Subject: Re: Emacs freezes when editing a file with one extremely long line even with so-long-minor-mode enabled.
Date: Sun, 8 May 2022 15:29:18 +0800

On Sun, May 8, 2022 at 1:53 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > Date: Sun, 8 May 2022 13:38:08 +0800
> > Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> >
> > On Sun, May 8, 2022 at 1:32 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > >
> > > Did you try setting line-move-visual to nil, in addition to the other
> > > measures?
> > >
> >
> > Tried the following, but doesn't work:
> >
> > `M-: (setq line-move-visual nil) RET'
> > `M-x so-long-mode RET'
>
> That's not what I suggested.  I suggested this:
>
>   C-x C-f symbols.ts RET
>   M-x so-long-minor-mode RET
>   M-x toggle-truncate-lines RET
>   M-x set-variable RET line-move-visual RET nil RET

I tried the above commands one-by-one, and the Emacs responsiveness is
still sluggish when drag the scrollbar to browser the different part
of the buffer or the lower right corner of the window to zoom in/out,
as indicated in the attached file.

But as suggested by Michael Heerdegen <michael_heerdegen@web.de>, the
following code snippet will give me a very smooth experience, also as
shown in the attached file:

(setq-default so-long-target-modes t)
(setq-default so-long-action 'longlines-mode)
(setq-default longlines-show-hard-newlines t)
(global-so-long-mode +1)


> And please provide more quantitative description of the effect of the
> above settings on Emacs responsiveness.  "Doesn't work" has very low
> informational value.  Do you see any effect on cursor motion? does it
> get faster? a little bit faster? not faster at all? slower? something
> else?
>
> If the above settings don't help to make Emacs even a bit faster,
> please describe what exactly are you doing to get Emacs to freeze: are
> you moving in that file (and if so, with which commands or keys), are
> you editing the file (and if so, with which commands), are you doing
> something else?  Because I cannot understand how it is possible that
> the above settings have no effect whatsoever on the Emacs
> responsiveness, and your responses until now were not detailed enough
> to figure that out.

See the above description.

Regards,
HZ

Attachment: image.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]