Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles; site uicsl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!inuxc!pur-ee!uiucdcs!uicsl!ashwin From: ashwin@uicsl.UUCP Newsgroups: net.ai Subject: Re: wanted: display-oriented interlisp s - (nf) Message-ID: <15500035@uicsl.UUCP> Date: Tue, 8-May-84 13:32:00 EDT Article-I.D.: uicsl.15500035 Posted: Tue May 8 13:32:00 1984 Date-Received: Wed, 9-May-84 23:43:07 EDT References: <175@boulder.UUCP> Lines: 189 Nf-ID: #R:boulder:-17500:uicsl:15500035:000:7288 Nf-From: uicsl!ashwin May 8 12:32:00 1984 #R:boulder:-17500:uicsl:15500035:000:7288 uicsl!ashwin May 8 12:32:00 1984 <> We use the LED editor which runs in InterLisp-VAX under UNIX. It's no DEDIT but is better than the TTY editor. We have the source which should make it pretty easy to set up on your system. I have no idea about copyright laws etc., but I suppose I could mail it to you if you want it. Here's a write-up on LED (from LED.TTY): ---------------------------------------------------------------------------- LED -- A display oriented extension to Interlisp's editor -- for ordinary terminals. LED is an add on to the standard Interlisp editor, which maintains a context display continuously while editing. Other than the automatically maintained display, the editor is unchanged except for the addition of a few useful macros. HOW TO USE ---------- load the file (see below) possibly set screen control parameters to non-default values edit normally also: see documentation for SCREENOP to get LED to recognise your terminal type. THE DISPLAY ----------- Each line of the context display represents a level of the list structure you are editing, printed with PRINTLEVEL set to 0, 1, 2 or 3. Highlighting is used to indicate the area on each line that is represented on the line below, so you can thread your eye upward through successive layers of code. Normally, the top line of the screen displays the top level of the edit chain, the second line displays the second level and so on. For expressions deeper than LEDLINES levels, the top lines is the message: (nnn more cars above) and the next LEDLINES of the screen correspond to the BOTTOM levels of the edit chain. When the edit chain does become longer than LEDLINES, the display is truncated in steps of LEDLINES/2 lines, so for example if LEDLINES=20 (the default) and your edit chain is 35 levels deep, the lisplay will be (20 more cars above) followed by 15 lines of context display representing the 20'th through 35'th levels of the edit chain. Each line, representing some level of the edit chain, is printed such that it fits entirely on one screen line. Three methods are used to accomplish the shortening of the printed representation: Replacing comments with (*) Setting PRINTLEVEL to a smaller value, which changes expressions into ampersands Truncting the leading and/or trailing expressions around the attention point. If the whole expression can't be printed, replacing comments is tried first. If still to large, truncation is tried if the current printlevel is >= LEDTLEV. Otherwise the whole process is restarted with a smaller PRINTLEVEL. The choice of LEDTLEV effectively chooses between seeing more detail or seeing more forms. The last line of the display, representing the "current" expression, is printed onto ONE OR MORE lines of the display, controlled by the variable LEDPPLINES and the amount of space (less than LEDLINES) available. The line(s) representing the current expression are prettprinted with elision, similar to the other context lines, using a prettyprint algorithm similar to the standard prettyprinter. Default is LEDPPLINES=6, meaning that up to six lines will be used to print the current expression. The setting of LEDPPLINES can be manipulated from within the editor using the (PPLINES n) command. The rest of your screen, the part below the context display, is available just as always to print into or do operations that do not affect the edit chain (and therefor the appearance of the context display). Each time the context display is updated, the rest of the screen is cleared and the cursor positioned under the context display. On terminals that have a "memory lock" feature to restrict the scrolling region, it is used to protect the context display from scrolling off the screen. TERMINAL TYPES -------------- Terminal types are currently supported: HP2640 old HP terminals HP26xx all other known HP terminals Hazeltine 1520 hazeltine 1520 terminals Heathkit sometimes known as Zenith Ann Arbor Ambassador The mapping between system terminal terminal type information and internal types is via the alist SYSTEMTERMTYPES, which is used by DISPLAYTERMP to set the variables CURRENTSCREEN and DISPLAYTERMTYPE. Screen control macros: (in order of importance) ---------------------- DON turn on continuous display updating DOF disable continuous display updating CLR clear the display CC clear the display and redo the context display CT do a context display, incrementally updating the screen. use CC and CT to get isolated displays even when automatic updating is not enabled. (LINES n) display at most n lines of context default is 20 (PPLINES n) set the limit for prettyprinting the "current" expression. (TRUNC n) allow truncation of the forms displayed if PLEV<=n useful range is 0-3, default is 1 PB a one time "bracified" context display. PL a one time context display with as much detail as possible. pb and pl are varian display formats similar the the basic context display. Global variables: ----------------- DISPON if T, continuous updating is on DISPLAYTERMTYPE terminal type you are using. HP HP2640 of HZ this is set automatically by (DISPLAYTERMTYPE) HPENHANCECHAR enhancement character for HP terminals. A-H are possibilities. LEDLINES maximum umber of lines of context to use. Default is 20. LEDTLEV PLEV at which truncation becomes legal LEDPPLINES maximum number of lines used to prettyprint the current expression FILES: ------ on TOPS-20 load LED.COM on VAX/UNIX load LISPUSERS/LED.V these others are pulled in automatically. LED the list editor proper SCREEN screen manipulation utilities. PRINTOPT elision and printing utilities SAMPLE DISPLAY ______________ (LAMBDA (OBJ DOIT LMARGIN CPOS WIDTH TOPLEV SQUEEZE OBJPOS) & & & & & @) -12- NOTFIRST & CRPOS NEWWIDTH in OBJ do & & & & & @ finally & &) (COND [& & &] (T & & &)) ((LISTP I) (SETQ NEWLINESPRINTED &) [COND & &]) >> (COND ((IGREATERP NEWLINESPRINTED 0) -2 2- (add LINESPRINTED NEWLINESPRINTED) -2 3- (SETQ NEWLINE T)) -3- (T (add POS (IMINUS NEWLINESPRINTED)) -3 3- (COND (SQUEEZE &)))) Except that you can't really see the highlighted forms, this is a representative LED context display. In an actual display, the @s would be highlighted &s, and the [bracketed] forms would be highlighted. The top line represents the whole function being edited. Because the CADR is a list of bindings, LED prefers to expand it if possible so you can see the names. The second line is a representation of the last form in the function, which is highlighted on the first line. The -12- indicates that there are 12 other objects (not seen) to the left. The @ before "finally" marks where the edit chain descends to the line below. The third and fourth lines descend through the COND clause, to an imbedded COND cluase which is the "current expression" The current expression is marked by ">>" at the left margin, and an abbreviated representation of it is printed on the 5'th through 9'th lines. The expressions like "-2 3-" at the left of the prettyprinted representation are the edit commands to position at that form. ---------------------------------------------------------------------------- ...uiucdcs!uicsl!ashwin