* enabling setnu-mode on startup
@ 2006-08-27 22:32 Tejas Kokje
2006-08-29 19:25 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: Tejas Kokje @ 2006-08-27 22:32 UTC (permalink / raw)
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'.
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 ?
Thanks
Tejas Kokje
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: enabling setnu-mode on startup
2006-08-27 22:32 enabling setnu-mode on startup Tejas Kokje
@ 2006-08-29 19:25 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2006-08-29 19:25 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-29 19:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-27 22:32 enabling setnu-mode on startup Tejas Kokje
2006-08-29 19:25 ` Kevin Rodgers
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.