The default version of Emacs on Athena has line numbering automatically. If you are using an earlier version, you may have to turn it on.
The line number is displayed in the "mode line" at the bottom of the screen. If you look down at the bottom of the screen, you should see a section that has "--L#--" where the "#" is the line number your text cursor is currently on.
- If line numbering currently isn't on in your emacs window, just type:
- If you wish to turn on line numbering always, you can put the line:
in your .emacs file.
- If you wish to have it always be off, put in:
Similarly, there is a column-number-mode that works the same way.
There are several other related commands you can also use to determine the line number and perform line number functions.
- If you want to find out the number of the line where the cursor is, type this:
- If you want to move the cursor to a particular line, type this:
followed by the line number.
- If you want to know how many lines are in a region of text, use: