Activate so-long-mode instead of fundamental-mode for log files: it is faster!
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 09 Dec 2021 14:38:16 +0200
changeset 1751 e09dfac4baf9
parent 1750 166bb76ea63f
child 1752 c3345b0bcad0
Activate so-long-mode instead of fundamental-mode for log files: it is faster! https://www.reddit.com/r/emacs/comments/rcgjpt/browsing_long_lines_are_extremely_slow_i_study/
.emacs-my
--- a/.emacs-my	Thu Dec 09 14:36:56 2021 +0200
+++ b/.emacs-my	Thu Dec 09 14:38:16 2021 +0200
@@ -1660,7 +1660,9 @@
 (defun my-auto-revert-tail-mode-hook ()
   (when (string-match "/logs?/\\|\\.\\(?:log\\|out\\|log\\.[0-9]\\)\\'\\|/.xsession-errors\\'"
                       (buffer-file-name (current-buffer)))
-    (fundamental-mode)
+    (if (fboundp #'so-long-mode)
+        (so-long-mode)
+      (fundamental-mode))
     (auto-revert-tail-mode 1)
     (log4-hi-mode 1)
     (setq scroll-margin my-scroll-margin)