I can run (display-line-numbers-mode) and get line numbers but it doesn't work if I run (global-display-line-numbers-mode) (nothing happens). I have traced this to this function:

(defun display-line-numbers--turn-on ()
  "Turn on `display-line-numbers-mode'."
  (unless (or (minibufferp)
              ;; taken from linum.el
              (and (daemonp) (null (frame-parameter nil 'client))))

Sure enough I am running my emacs in daemon mode (I have no idea why that would prevent me from wanting line numbers?) and the frame-parameter call is returning nil. I am connecting with a GUI instance of emacsclient. Any idea what this is trying to do and if it is actually necessary?

  • I run emacs in daemon mode and global-line-numbers-mode works as expected. Can you reproduce the problem without your init file? i.e., start with emacs --daemon -Q? If not, there's something in your config causing the problem. – Tyler Dec 28 '18 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.