I use linum-mode almost all the time, so i use (global-linum-mode t),
but i don't want to use it in eshell mode, compilation mode, etc. in
which the line number is useless.
And also, when i use linum-mode in eshell or compilation mode, if a
long line is printed, the cursor is paused in first lines, never
scroll screen to the end of that line.
'(lambda () (linum-mode nil)))
but can't work, is anyone know how to solve this problem?
Thanks for your time.
if you want to turn it off, you should use 0, not nil. See:
• Emacs: How to Turn a Minor Mode on/off/toggle?
try that see if it address the problem. If that doesn't work, i
suspect it might be a bug, of the inter-relations of the global vs non-
instead of turning it off for particular modes, possibly more
practical is to turn it on for text related modes.
(defun turn-spell-checking-on ()
"Turn speck-mode or flyspell-mode on."
(add-hook 'text-mode-hook 'turn-spell-checking-on)
i also have tried to use (linum-mode 1) in certain mode like c,
without using the (global-linum-mode t), but i never see linum in c
i think maybe there are some thing wrong in (global-linum-mode t),
because i firstly set it, and later in other mode, disable linum-mode
would be failed.
you are right.
i just tried open a new buffer type something to get some lines and
set it to c-mode and turn on linum-mode, and no line num shows.
However, using global-linum-mode shows the lin nums.
must be a bug. Reporting the bug would probably be helpful.