From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: disable linum-mode in other buffers, like eshell, compilation
Date: Tue, 13 Jul 2010 02:42:16 -0700 (PDT) [thread overview]
Message-ID: <ef6d7f02-4a42-4733-bc61-1f6fa323274d@k1g2000prl.googlegroups.com> (raw)
In-Reply-To: 789e696b-3bfe-4f42-8627-a747a8f77fe0@d16g2000yqb.googlegroups.com
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/
☄
next parent reply other threads:[~2010-07-13 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <789e696b-3bfe-4f42-8627-a747a8f77fe0@d16g2000yqb.googlegroups.com>
2010-07-13 9:42 ` Xah Lee [this message]
2010-07-14 4:41 ` disable linum-mode in other buffers, like eshell, compilation z.cHris
2010-07-14 4:58 ` Xah Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef6d7f02-4a42-4733-bc61-1f6fa323274d@k1g2000prl.googlegroups.com \
--to=xahlee@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.