all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: enabling setnu-mode on startup
Date: Tue, 29 Aug 2006 13:25:06 -0600	[thread overview]
Message-ID: <ed24c4$9n7$1@sea.gmane.org> (raw)
In-Reply-To: <1156717959.074454.278570@b28g2000cwb.googlegroups.com>

Tejas Kokje wrote:
> Hello,
> 
> I am using setnu.el script from
> http://www.wonderworks.com/download/setnu.el.
> 
> I have edited my .emacs file and I am able to get line numbers on my
> current buffer with  'M-x setnu-mode' . However, if I open a new
> buffer, those line numbers don't show up there and I have to redo 'M-x
> setnu-mode'.

That's the way almost all minor modes work: they are buffer local.

> What should I put in my .emacs file so that I have to do 'M-x
> setnu-mode' only once for all buffers ? Also is there a way I can
> enable setnu-mode on emacs startup so that I don't have to type in
> every time I fire up emacs ?

This will take care of all buffers that are visiting files (vs.
*scratch*, *Messages*, *info*, *shell*, etc.):

(add-hook 'find-file-hook 'turn-on-setnu-mode)
(add-hook 'find-file-not-found-hooks 'turn-on-setnu-mode)

-- 
Kevin

      reply	other threads:[~2006-08-29 19:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-27 22:32 enabling setnu-mode on startup Tejas Kokje
2006-08-29 19:25 ` Kevin Rodgers [this message]

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='ed24c4$9n7$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /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.