Subject: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on

From: Eli Zaretskii <[email-masked]>
Date: Sat, 03 Jun 2017 21:38:43 +0300

> Date: Sat, 03 Jun 2017 21:02:58 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> > I can reproduce this, the problem seems to be that window-start and
> > window-end give the same answers as point-min and point-max respectively
> > when in daemon mode.  This causes linum-update-window to make overlays
> > for every line in the buffer.
> 
> So you are saying this just takes a lot of time, but will eventually
> end?  If so, what is the bug here?

Or maybe we should do the below?

diff --git a/lisp/linum.el b/lisp/linum.el
index 8baa263..06165f2 100644
--- a/lisp/linum.el
+++ b/lisp/linum.el
@@ -112,7 +112,8 @@ linum-mode
 (define-globalized-minor-mode global-linum-mode linum-mode linum-on)
 
 (defun linum-on ()
-  (unless (minibufferp)
+  (unless (or (minibufferp)
+              (and (daemonp) (null (frame-parameter nil 'client))))
     (linum-mode 1)))
 
 (defun linum-delete-overlays ()