7

I'm using a fairly standard install:

  • Ubuntu 12.04 LTS (installed less than a week ago)
  • GNU Emacs 24.1

And when I open a PDF file in Emacs, it's terribly slow. There's a 2-3 second delay when simply scrolling with the mouse, 1-2 second delay when using n, p, C-p, C-n, etc.

This is with a 20-page doc. With a 50-page doc like this one, Emacs becomes unusable (constant freezing), so the problem gets worse with document size.

How would I go about fixing this?

Hudon
  • 1,636
  • 18
  • 28

2 Answers2

12

When I ran emacs -Q, the problem went a way. I isolated it to this line in my .emacs.d/init.el file:

(global-linum-mode 1)

If I comment that out and restart Emacs, I can scroll on PDFs and I get no UI delay whatsoever. If I turn it back on with M-x global-linum-mode, the long lag between mouse scroll and UI update comes back.

Hudon
  • 1,636
  • 18
  • 28
  • 3
    This might prove useful: http://stackoverflow.com/questions/6837511/automatically-disable-a-global-minor-mode-for-a-specific-major-mode – phils Apr 24 '13 at 11:04
  • Yes, that was my next question :) I'll try out the suggestions asap. ty – Hudon Apr 24 '13 at 13:02
7

To disable linum-mode when you are in DocView mode, you can use the following setup file: setup-linum.el You can customize by editing line number 5

lassoued
  • 81
  • 1
  • 3