You are not logged in.
Pages: 1
I'm now to emacs and wanted line numbers on the side of each frame to load automaticaly on emacs start.
If I run M+x global-linum-mode from inside emacs - it works like a charm.
So, I tried putting (global-linum-mode) and/or (global-linum-mode 1) to .emacs file but when I start emacs, line numbers don't load. If I then issue M+x global-linum-mode first it says "Global-linum-mode disabled." while it never actually was enabled (or at least didn't show any results)... and then when I issue the same command again, then the line numbers finaly show up.. WUT?
I don't know if I'm doing something wrong or is it a bug or what, but could someone please point me into right direction?
Thank you
...I put on my robe and a wizard hat...
Offline
-- Wrong post --
sorry
Last edited by ZaQ (2010-04-05 20:03:19)
Offline
'(global-linum-mode 1)' should work without problem and does for me on a recent bzr checkout. Could you try with emacs-otf or emacs-bzr from AUR and see if it makes any difference?
Offline
Hi, I am using the latest emacs from [extra] and it works as expected for me with both the GTK and console interfaces. Do you have anything else in your .emacs that might conflict with it somehow? Maybe you could post your .emacs so that we could try and reproduce the problem?
Offline
ok, i tried both bzr and otf versions from AUR, and I still get the same result...
I also tried it with blank .emacs conf file that only had (global-linum-mode 1) in it, and still didn't get line numbers on emacs start...
I also tried this on both of my machines, and both of them seem to ignore global-linum-mode in .emacs file
Last edited by pootzko (2010-04-05 15:31:53)
...I put on my robe and a wizard hat...
Offline
ummm, and now i figured something out...
it does not work when I run just emacs, but when I use emacs to open a file at the same time, then it works...
so, what now?
...I put on my robe and a wizard hat...
Offline
In ~/.emacs I have the following:
;;LINUM
(require 'linum)
(global-set-key (kbd "<f6>") 'linum-mode)
Press f6 to toggle line numbers
Offline
ummm, and now i figured something out...
it does not work when I run just emacs, but when I use emacs to open a file at the same time, then it works...
so, what now?
linum-mode seems to be disabled on the Emacs splash screen even when global-linum-mode is on. Though, if line numbers don't display after using 'C-x C-f somefile', 'C-x C-b *scratch*', etc. from there, then you may be able to try something like (untested):
(add-hook 'find-file-hook '(lambda () (linum-mode 1)))
though it is not ideal.
Offline
fixed it, and now it works as I wanted it to. it opens an 'empty' file and shows line numbers. for anyone who might need the solution, here is what I put into .emacs
; Set default font size
(set-face-attribute 'default nil :height 80)
; Open emacs maximized
(defun toggle-fullscreen ()
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
)
(toggle-fullscreen)
(put 'downcase-region 'disabled nil)
; Initialize line numbers
(global-linum-mode 1)
; Remove startupscreen and open an empty document
(custom-set-variables '(inhibit-startup-screen t))
; Load zenburn color theme
(require 'zenburn)
(zenburn)
...I put on my robe and a wizard hat...
Offline
Pages: 1