Emacs Bug: global-linum-mode Freeze Emacs on Big Image Files

By Xah Lee. Date: . Last updated: .

, as of GNU Emacs 24.3.1, global-linum-mode will freeze emacs for about 10 minutes when opening a jpg file of 10 megabytes size.

GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2013-03-11 on xah-p6813w

steps to reproduce:

  1. (global-linum-mode 1)
  2. open a jpg file of 5 megabytes file size.
  3. emacs freezes.

1 hour wasted on this.


Install linum-off.el. This package will prevent linum-mode on in some modes that doesn't make sense, such as dired, image, etc.

download at https://github.com/mattfidler/linum-off

Thanks to Matthew L Fidler https://github.com/mattfidler.