help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Line numbers


From: Charles Sebold
Subject: Re: Line numbers
Date: 30 Oct 2000 05:55:01 -0600
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

MUSTAFA GOK <mug2@EECS.Lehigh.EDU> writes:

>  How do I put line numbers in my text file?

You can display line numbers (like :set nu in vi, I think) using Kyle
Jones' package setnu.el, at http://www.wonderworks.com - if you want to
put sequential numbers _into_ the text file, rather than just displaying
them, you may want to write a quick Lisp function to do it for you.

You might like the following better; it doesn't put the line numbers in
the lines, but it puts the current number on the mode line, out of the
way but someplace you can always see it:

M-x line-number-mode RET

(Or, in your .emacs file to make it permanent next time you start
Emacs:)

(line-number-mode 1)

> Or How do I get a print out with line numbers at the beginning of the
> every line?

This is entirely separate from the answers above.

Put the following into your .emacs (assuming a recent version of
ps-print, at least the one that comes with Emacs 20, maybe others, and
assuming you're using PostScript printing):

(setq ps-line-number t)

If you're not using PostScript printing, I'm not sure I can help you,
sorry.
-- 
Charles Sebold
Random Answer to an Emacs Very Frequently Asked Question:
 Eshell or ansi-color.el solves problems with garbage GCC or ls output.
--
1st of Heshvan, 5761
--
Marketing - where the rubber meets the sky.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]