[OS X Emacs] How to switch on Line Numbers?

Nathaniel Cunningham nathaniel.cunningham at gmail.com
Thu Jul 31 11:43:44 EDT 2008


You can use the minor-mode "linum"

Download and place somewhere in your load-path (e.g. ~/Library/Application
Support/Aquamacs Emacs/):
http://stud4.tuwien.ac.at/~e0225855/linum/linum.el

add to your Preferences.el:
(require 'linum)

To activate in a particular buffer, do
M-x linum-mode

To activate by default for a given major mode, include in your
Preferences.el (example for emacs-lisp-mode):
(add-hook 'emacs-lisp-mode-hook 'linum-on)

linum is not without glitches, but it provides pretty satisfactory results.

--Nathaniel

On Thu, Jul 31, 2008 at 10:17 AM, Adam Witney <awitney at sgul.ac.uk> wrote:

>
> On 31 Jul 2008, at 15:21, José Miguel Figueroa-O'Farrill wrote:
>
>  I have just downloaded Aquamacs Emacs, but am struggling as to how to get
>>> it to display line numbers on my files. I have it switched on in
>>> Options->Show/Hide->Line numbers, but they still do not show up... am i
>>> missing something somewhere?
>>>
>>
>> M-x line-number-mode works in yesterday's nightly build of Aquamacs Emacs
>> 1.5RC1.  This should display in the modeline something like "Lnnn"  where
>> "nnn" is some integer telling you the ordinal of the line on which the
>> cursor is positioned.
>> I'm attaching a screenshot with an "L326".
>>
>
> thanks for your response, although i was thinking about having line numbers
> listed down the side of the file window.. is this possible?
>
> thanks again
>
> adam_____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> http://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20080731/d7c24d8a/attachment.html>


More information about the MacOSX-Emacs mailing list