[comp.soft-sys.andrew] Line Numbers in ez

brianc@ZETA.SAINTJOE.EDU ("Brian CapouchV1ULFj6:8:8") (10/19/89)

Do any of you folks know if there's anything built into ez to allow movement to
a particular ordinal line number?

My C compiler tells me that there's an "error in line n," and I currently count
with my little cursor pointer all the way down to the offending line.  Of
course there are other ways of finding that line out of ez; it would just be
nice if I could find it while I'm in the editor.

Thanks
Brian Capouch
Saint Joseph's College
brianc@saintjoe.edu

ghoti+@ANDREW.CMU.EDU (Adam Stoller) (10/19/89)

> Excerpts from internet.info-andrew: 18-Oct-89 Line Numbers in ez
> CapouchV1ULFj6:8:8@zeta. (460)

> Do any of you folks know if there's anything built into ez to allow
movement to a particular ordinal line number?
I believe they are bound by default:
Esc-n   - textview-goto-paragraph  (name is somewhat misleading, but it
does the correct thing, i.e. understanding wrapped lines do not count
more than once) - it will prompt in the message-line for a line number.

Esc-N  - textview-what-paragraph - will indiciate in the message-line
what line number the cursor is on.


> My C compiler tells me that there's an "error in line n," and I
> currently count with my little cursor pointer all the way down to the
> offending line.  Of course there are other ways of finding that line out
of ez; it would just be nice if I could find it while I'm in the editor.

You can compile IN ez - there are two commands (I believe bound by
default):

^X^E - compile-build - will run either a system default (make?) a user's
preference default - or (see below) the last run compile command.

^U^X^E  - (i'm not sure of a binding name) - will prompt you for the
compile command you want to run.

If you only have a single EZ window up for that EZ process - it will
create another buffer called "Error-Log" and the output of the compile
command will go there.  You can get to this buffer using ^X^O
(frame-old-buffer).

Better yet - get two windows up from the same EZ process (^X2 -
frame-new-window) and you will see the compilation going on in the
second window.

The commands for parsing the warnings/errors in compilations are:
^X^N - compile-next-error
^X^P - compile-previous-error

--fish

nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) (10/19/89)

As far as I can tell, the commands I use to do this are built-in and should
work for everyone.  They are ESC-n followed by a line number, to go to a 
particular line, and ESC-N to find out what line number you are currently on.
Cheers.  -- Nathaniel

nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) (10/19/89)

I think Adam is wrong about the compilation stuff working by default --
if it doesn't work for you, try putting these lines in your .ezinit file:

addkey compile-build ^X^E textview
addkey compile-next-error ^X^N textview
addkey compile-previous-error ^X^P textview
addkey compile-kill-build ^X^K textview

mss+@ANDREW.CMU.EDU (Mark Sherman) (10/19/89)

Under normal key-bindings, <esc>n will prompt you to go to a specified
line and <esc>N will show you which line you are on. (The prompt "What
paragraph" refers to the fact that text is line wrapped. New lines
define a new paragraph, so for source code, paragraph == line.)
		-Mark