* Re: disable linum-mode in other buffers, like eshell, compilation
[not found] <789e696b-3bfe-4f42-8627-a747a8f77fe0@d16g2000yqb.googlegroups.com>
@ 2010-07-13 9:42 ` Xah Lee
2010-07-14 4:41 ` z.cHris
0 siblings, 1 reply; 3+ messages in thread
From: Xah Lee @ 2010-07-13 9:42 UTC (permalink / raw)
To: help-gnu-emacs
On Jul 13, 2:25 am, "z.cHris" <chrisdch...@gmail.com> wrote:
> Hi,
>
> 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.
>
> I use
> (add-hook 'eshell-mode-hook
> '(lambda () (linum-mode nil)))
>
> but can't work, is anyone know how to solve this problem?
if you want to turn it off, you should use 0, not nil. See:
• Emacs: How to Turn a Minor Mode on/off/toggle?
http://xahlee.org/emacs/emacs-tip_mode_on_off_toggle.html
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-
global version...
instead of turning it off for particular modes, possibly more
practical is to turn it on for text related modes.
e.g.
(defun turn-spell-checking-on ()
"Turn speck-mode or flyspell-mode on."
(flyspell-mode 1)
)
(add-hook 'text-mode-hook 'turn-spell-checking-on)
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: disable linum-mode in other buffers, like eshell, compilation
2010-07-13 9:42 ` disable linum-mode in other buffers, like eshell, compilation Xah Lee
@ 2010-07-14 4:41 ` z.cHris
2010-07-14 4:58 ` Xah Lee
0 siblings, 1 reply; 3+ messages in thread
From: z.cHris @ 2010-07-14 4:41 UTC (permalink / raw)
To: help-gnu-emacs
i tried, but it can't work.
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
files.
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: disable linum-mode in other buffers, like eshell, compilation
2010-07-14 4:41 ` z.cHris
@ 2010-07-14 4:58 ` Xah Lee
0 siblings, 0 replies; 3+ messages in thread
From: Xah Lee @ 2010-07-14 4:58 UTC (permalink / raw)
To: help-gnu-emacs
On Jul 13, 9:41 pm, "z.cHris" <chrisdch...@gmail.com> wrote:
> i tried, but it can't work.
>
> 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
> files.
>
> 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.
Xah
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-14 4:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <789e696b-3bfe-4f42-8627-a747a8f77fe0@d16g2000yqb.googlegroups.com>
2010-07-13 9:42 ` disable linum-mode in other buffers, like eshell, compilation Xah Lee
2010-07-14 4:41 ` z.cHris
2010-07-14 4:58 ` Xah Lee
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.