(setq global-linum-mode t) in my .emacs and I enable line number mode with
M-x line-number-mode but still there are no line numbers on the margin. What am I doing wrong? I am on OS X and Emacs v. 24.3.
Looking at the documentation for the variable
global-linum-mode has the answer to your problem:
Setting this variable directly does not take effect; either customize it (see the info node
Easy Customization') or call the functionglobal-linum-mode'.
(setq global-linum-mode t) will not cause
linum-mode to be turned on for all buffers. You would evaluate
(global-linum-mode) to do that.
You are correct in your comment above that to turn on
linum-mode only for certain modes you would evaluate
(add-hook 'clojure-mode-hook linum-mode) (using
clojure-mode for example).