[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Another try: zmacs function for absolute line
Date: Wed, 20 Jun 90 10:05:51 MDT
From: "David R Strip [1411]" <drstrip@cs.sandia.gov>
I know that you can do meta-< c-(lineno-1) c-n.
What I want is a function (not a macro even) that really goes to the
absolute line reasonably efficiently.
And yes, emacs has a go-to-line, but zmacs does not.
Thanks
Strip
RSL's reply is the best you can do. In my reply, I wanted to
show you the basic way Zmacs is structured, but mostly I wrote
it on the way out the door, or I would probably have chosen
RSL's technique instead. But mine does essentially the same
thing; as you can see from my code, ZWEI's data structure is
a doubly-linked list of lines. There is no way to get to absolute
line N without actualy tracing through N lines.
It is *NOT* how I would design a text editor today (in Lisp or in
another language), because it does not deal with large text well,
as well as various other inefficiencies.