Open coldnew opened 6 years ago
Hello cloldnew,
When enabling global-pangu-spacing-mode', I cannot open large files. The emacs process will be stuck in
pangu-spacing-check-overlay'.
Is there any way to avoid this?
@AmanYang Can you tell me how large the file you open with ?
I think the problem is due to when open file, pangu-spacing-mode
will search from (point-min)
to (point-max)
, which as known as the buffer size (file size).
To solve this issue, I should limit pangu-spacing-mode
not search full file but just search user's view area instead.
When the size of file is larger than 1M, can see obviously slow. When larger than 10M, completely frozen.
@AmanYang Could you try #28 to see if it works for you?
@yangsheng6810 Yes. It works for me after a tiny change.
I got a compile error after applying your path.
pangu-spacing.el:218:1:Error: Wrong number of arguments: #[(beg end func regexp) "
Found that in pangu-spacing-check-overlay
, the 2nd pangu-spacing-search-overlay
took 2 arguments instead of 4.
see: https://emacs-china.org/t/topic/4043 https://emacs-china.org/t/topic/3816