1
0
mirror of synced 2026-04-05 05:51:07 +00:00
Files
Interlisp.medley/library/tedit/TEDIT-RELEASENOTES.TEDIT
rmkaplan abdb128636 Rmk36 tedit fifth round (#1857)
* TMAX updates for compatibility with Tedit changes

* DOC-OBJECTS changes for compatibility with Tedit changes

* MODERNIZE update for Tedit split windows

* Core Tedit files

* IMAGEOBJ: Remove dependency on Tedit internals

* WINDOW: Remove dependency on Tedit internal declaration

Still strange that WFROMDS should have to branch on Tedit

* WINDOWOBJ gets window of TTY process before the window of the stream of the TTY process

So insert into Tedit works

* TEDIT-CHAT: try to use TEXTSTREAM vs TEXTOBJ

* Fix tab-initialization problem in SLIDES.TEDIT

as reported by @nbriggs

* TEDIT-CHAT: use TSTREAM rather than TEXTOBJ

* Updates after lots more testing, particularly scrolling

Some other files dragged along to avoid dependence on Tedit internals

* Remove unwanted SAVE.SYSOUT

* Addresses more end-of-file and empty-file display issues

Try it again

* TEDIT-DEBUG tracking other changes

* Odds and ends

* Adjust EOF selection and caret-scrolling on copy

* More cleanup, plus fixing a few more ancient (Venue) glitches

As usual, the problems have to do with the funky behavior of EOL's in the middle and end of the document.  More abstraction and refactoring to get better control of this (I hope).

* TEDIT-WINDOW: Scroll down of big objects

Trying to fix what happens at the transition when scrolling down brings a big-object's top down in the window.   Approach is to bring down the line above, which may make for a little jump. I hope that solves it.
Scrolling up still needs some adjustment.

* Eliminate junk at top of window after up/down scrolling of big objects

BLTSHADE is OK there for scrolling, but not for redisplay after editing.  In the edit case, the top of the pane above the last valid line is preserved.
Scrolling still has the problem that the window can go blank at the first scroll that brings a tall object into the pane--still working on that.

* Scrolling with tall lines should be more continuous

* Another tweak for scrolling

plus interface extension to TEDIT.MOVE and TEDIT.COPY, a little more on field menus

* More robust strategy for field menu buttons

Surround the field with prefix and suffix pieces with image objects that print the pre and post labels and shift the selection forward or backward into the field.  Doesn't depend on inherited quirky logic in the selection line-scanner.

* Field selection ignores right and middle clicks

* A little more menu/selection tweaking

You can't extend through fields and buttons

* Added CUSTOMBUTTONEVENTFN to menu field buttons

Also, menu buttons in general can't be deleted

* A few more glitches, plus a little selection refactoring for buttons

* Reduce flicker in pargraph menu margin bar

* screen update glitch

* DOC-OBJECTS, TEDIT-SCREEN: Fixes the HCFILES DOC-OBJECTS failure

* TEDIT-BUTTONS:  Field values should always be shown in the specified FIELDFONT

* Abstracting the structure of the history lists

cleanup, but mostly as a precursor to maybe doing a ring buffer of a specified length

* TEDIT-FILE, a little font-reading cleanup

* Include the files from rmk-39 that deal with the text/binary renamefile problem

* TEDIT-PAGE addresses #1905

* Fix BUTTONSTART to STARTPC in Put/Get menu buttons

* Use width of M as width of EOL--easy to select

Also put in function call for potential kerning--needs eventual FONT support

* Rename a few internal functions from TEDIT.-- to \TEDIT.--

* Doesn't make sense for a charlooks to not have a font

* TEDIT-BUTTONS - Fix comment

* Take out Tedit internals from \CARET.FLASH?

Should have included this in fifth round long ago

* TEDIT-FILE:  use DEFAULTFONT for .sh files

Easier to follow the layout

* TEDIT-LOOKS: fix loadup order

* tedit-exports.all  Remove line-has-protection field

Useless

* Make sure that charlooks change as expected

* External format for .sh files is UTF-8

* Better display of history information for debugging

* Button changes: show document font families, better fields

* TEDIT-WINDOW, remove extra truncated line with down-scroll

* TEDIT-SELECTION: suppress line/paragraph selection for built-in menus

Line/para selection would be reasonable for multi-line fields, but most menu lines have protected text that would behave inconsistently.  So just suppress

* Better support for potential kerning

* Fix empty field value

* Simplify ASCII translation code

* Make sure headings have a default tab

* Word boundary at character 1

* Remember that you specified a font class instead of a font

For the charlooks menu, but also so that it is saved on a put

* More items on the Family NWAY-button line

* glitch

* TEDIT-LOOKS: Better algorithm for Ascii translation

* Charmenu remembers previous "Other" fonts, even if not installed

* Fix initial piece index

* Fix fontclass changes (again)
2024-12-23 11:07:54 -08:00

141 lines
20 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Medley Tedit Release Notes
2
4
1
TEDIT RELELEASE NOTES
1
4
By Ron Kaplan
This document was last edited in November 2024.
Tedit Fifth Round
Bug fixes
Performance improvements in line updating when typing and especially printing (the important slow case remains: printing at the end of the stream, e.g. for transcript/dribble applications)
Fixed glitches in transitions between fat XCCS characters on either side of image objects.
Fixed copying (shift-select, COPYINSERT) from Tedit to non-Tedit TTY windows, and from non-Tedit sources (Clipboard, Sedit) to Tedit.
And many other issues...
Overhauls
More work on eliminating X-pointer cycle between the TEXTSTREAM and the TEXTOBJ (STREAMHINT field). Some paths still remain (there is a define flaw in that the stream returned to the user is also used for internall for search and display).
Scrolling/display
Fewer line-update subroutines, for maintainability
Improved caret placement with keyboard input
Improved line and caret placement at bottom of pane and end of document, with or without EOL's
Scrolling when window's left side is off-screen now updates correctly
Fixed glitches in reshaping
Selection
Removed (x)pointer cycle through selection datatype. TEDIT.GETSEL returns a copy that includes a pointer to the text stream, not the TEXTOBJ. (part of deprecating TEXTOBJ as a public data structure).
Tedit menus
Rework of button primitives, simplified and more public interface (see below).
HELP and SHOULDNT replaced by ERROR, unless \TEDIT.THELPFLG.
The number of state-variables in a Tedit process has been reduced, a step towards eventually having all Tedit's run in a single process.
New functionality
Meta keys:
D/| bring up DINFO man page, like Sedit, for a selected word (for Lisp source files or functions, a "word" is an atom according to the file's reader environment)
O|o apply ED to current word (like open in Sedit)
F finds backwards (vs f = finds forward) (wildcard #/* matching is improved)
g finds again forwardÿÿ
ÿG finds again backward
<|, move caret back one character, without deleting. (Delete key deletes backwards.)
>|. move caret forward one character, without deleting. (Del key deletes forward.)
R|r re-applies the last history operation at a new location (e.g. for multiple inserts in different places).
U undoes the last undone history action (meta-u undoes the last event, as before). (History now maintains multiple events, not just the last one).
The DEL key deletes 1 character forward.
Tedit properties (at open or via TEXTPROP):
READONLY property can have value QUIET instead of just T: Still suppresses attempted changes but doesn't put up a warning message.
APPEND added to allow updates only at the end of the stream, also with T/QUIET options.
DON'TUPDATE value T suppresses updating of the display while other changes are being made, NIL restores the updating.
NOTSPLITTABLE value T suppresses the split-region of the Tedit window so that the window cannot be split (or unsplit). NIL restores splitting possibilities.
HISTORY value OFF erases the current history at the next document-changing event and suppresses further recording, so that document changes cannot be undone. ON restores history recording for future undoing. CLEAR discards current history and begins a new epoch of events. HISTORY is turned OFF by default when READONLY the APPEND properties are applied.
FILENAME returns the filename associated with the document. Cannot be set.
PAGEFORMAT returns or sets (by calling TEDIT.PAGEFORMAT) the page format for the document (cf TEDIT.SINGLE.PAGEFORMAT, TEDIT.COMPOUND.PAGEFORMAT).
DIRTY marks the document as dirty (T) or clean (NIL), changes titlebar *.
LENGTH (fetch only) returns the current document length in characters.
PARABREAKCHARS is a list of characters that cause paragraph breaks, usually (EOL CR LF). Setting to NIL means that no paragraph breaks will be inserted (and if there are no other character-looks changes, all characters will go into one extended piece). NIL is the best (and default) setting for Lisp source files, since there is no meaningful difference between paragraphs and lines.
The value of the FONT property can be a fontclass atom (e.g. DEFAULTFONT), no need to wrap it in FONTCREATE.
(TEDIT.SELPROP SEL PROP NEWVALUE) gets and sets the properties of a selection as returned by TEDIT.GETSEL, in order to hide Tedit internals. The following properties are valid:
CH# CHLIM LENGTH (=DCH) POINT KIND POINTCH# SELOBJ TEXTSTREAM SHADE SHADEHEIGHT
The selection returned by TEDIT.GETSEL is a copy of the document's current selection, with a pointer to the textstream as its TEXTSTREAM propery. The modified selection can be passed back in through public selection-taking functions (TEDIT.INSERT, TEDIT.SETSEL...).
String-like access to Text streams:
(TEDIT.NCHARS TSTREAM) [Function]ÿÿ
ÿReturns the number of characters in the stream
(TEDIT.NTHCHARCODE TSTREAM N) [Functionÿÿ
ÿReturns the Nth character-code of TSTREAM, NIL if N is out of bounds. Negative N counts from the end. If the Nth "character" is an image object, that object is returned. TSTREAM may be a selection (from TEDIT.GETSEL), in which case N picks from the characters in that selection.
(TEDIT.NTHCHAR TSTREAM N) [Functionÿÿ
ÿThe Nth character code of TSTREAM is returned as the corresponding character.
(TEDIT.RPLCHARCODE TSTREAM N NEWCHARCODE NEWCHARLOOKSÿÿ
ÿ DONTDISPLAY) [Function]ÿÿ
ÿReplaces the character at position N with NEWCHARCODE (which may be an image object). NEWCHARLOOKS can specify the looks of the new character if they are to be different from the looks of the character being replaced. Does not extend the stream: N must be between 1 and the length of the stream. (BOUT extends).
(TEDIT.CONCAT TSTREAMS SEPARATOR) [Function]ÿÿ
ÿReturns a textstream containing the concatenation of the ordered list of TSTREAMS, separated by SEPARATOR if provided. SEPARATOR can be a character name (e.g. FORM), a character code, or a string. The specification for page numbering is taken from the first TSTREAM and carries through.
(TEVAL FORM WINDOW TITLE DONTDEFER) [Macro]ÿÿ
ÿEvaluates FORM with the TTY stream set to a text stream in WINDOW with title TITLE. History events are not recorded, and the stream is initialized as APPEND QUIET. Screen updating is suppressed until the evaluation of FORM is complete, unless DONTDEFER. At that point the stream is changed to READONLY QUIET. Example: (TGREP --) is implemented as (TEVAL (GREP --). (Note that TTY keyboard interaction won't be visible unless DONTDEFER; TDRIBBLE may be more appropriate). The PARABREAKCHARS property is set to NIL.
(TEDIT.DEFER.UPDATES TSTREAM AFTERPROPS) [Function]ÿÿ
ÿSuppresses display updating of TSTREAM until the exit of an enclosing RESETLST. At that point AFTERPROPS are applied to the stream. This is a simple way of avoiding the perceptible slowness of incremental screen updates when a program is filing up a textstream.
(TDRIBBLE) [Function]ÿÿ
ÿDribbles to a text stream that opens in a scrollable/searchable window when dribbling is ended by a call to DRIBBLE. The stream is APPEND QUIET with PARABREAKCHARS NIL.
(TEXTSTREAM TSTREAM NOERROR) [Function]ÿÿ
ÿIf the new argument NOERROR is T, returnsÿÿï!ÿNIL if TSTREAM cannot be coerced to a text stream, otherwise causes an error as before.
Changed behavior
Textstream BOUT now behaves like the generic BOUT (and character printing) to other output streams: appends at the end, replaces in the middle.
BOUT creates a history event by default, so it is undoable and the history keeps in step with the state of the document. A sequence of BOUT's appended to the end of the document will be collected into a single event and undone all together. BOUTs that replace characters in the earlier in the document will be recorded as separate events. History will be suppressed if the text property HISTORY is set to OFF.
[Soon: History is not cleared after a Put is performed, so that it is possible to back out of edits made before a checkpoint file has been written.]
Line leading has been moved from the line descent to the line ascent. The effect is that highlighting stays close to the bottom of a selection's line rather than close to the top of the line below. The difference is visually apparent if the leading is large, for example, double spaced.
The TO and FROM selection-arguments of TEDIT.MOVE and TEDIT.COPY can be specified as text streams as well as selections. The source and target are then taken as the current selections of those streams. This may make it unnecessary in some cases to use TEDIT.GETSEL to extract a free-floating selection, which should be discouraged.
(More) public support for Tedit menus
There is a new, cleaner, more maintainable, and more public platform for creating and interpreting Tedit menus (like Character Looks, Paragraph Looks, etc.). These functions are in the new file TEDIT-BUTTONS and the code in TEDIT-MENU shows how they are used. Generally the function in TEDIT-BUTTONS have names prefixed with MB (for Menu Button).
(MB.ADD MENUDESC MENUTSTREAM WHERE) [Function]ÿÿ
ÿMENUDESC is a list of descriptors of menu items to be inserted as a sequence in the pre-existing textstream MENUTSTREAM. The first menu-item will be inserted after WHERE if provided, otherwise at the end of the stream.
A menu-item descriptor can be
A string, presumably just a rubric whose characters will be inserted. The atoms EOL and TAB stand for the strings containing those singleton characters. The string's characters will be inserted in the stream's current font. The characters will be protected: not selectable.
A positive integer: that many protected spaces will be inserted.
A list of the form (TEXT (STRING string) (FONT fontspec)). This is treated like a string except that the characters are in fontspec, a font (e.g. (HELVETICA 10 BOLD)), a font descriptor, or a font class.
A list of the form (Buttontype . buttonproperties) that specfies a button image object of the indicated type with the specified properties.
Among the properties are at least one of IDENTIFIER and LABEL. The function MB.GET locates the button by its litatom IDENTIFIER, LABEL is the string that is displayed for the button (except that FIELD buttons have PRELABEL and POSTLABEL properties). If only LABEL is provided, IDENTIFIER is assumed to be (U-CASE LABEL). If only IDENTIFIER is provided, it is also taken to be the label.
Most buttons also have:
STATE The result of clicking on the button.
INITSTATE The initial value of STATE
FONT The font for the button's LABEL display, if not (HELVETICA 8 BOLD).
SELECTFN A function of the object, the menu's window, selection, and the textstream. This is executed in the window's coordinate system, if the button is selected (buttons come up while mouse is in the button).
STATECHANGEFN A function called to take special action whenever the STATE changes. Arguments: button-object, new state, menu-stream.
SETSTATEFN A function called to install a new state. Arguments: the piece containing the button, a new value, and menu-stream. The piece permits searching for the state of other buttons before or after (e.g. The Other font toggle looking for the field containing the new font-family or the font-family object where the new family will be installed. The given value may be something that should be coerced to ON or OFF (e.g. Bold is turned ON if the font of a document's current selection is bold).
GETSTATEFN A function that may map the state as determined by the button type into some other interpretable value or action.
IGNORE T if a button does not represent an independent characteristic of the character, paragraph, or page looks. For example, TABTYPE indicates how to interpret tabs as they are specified in the tab-stop bar of the paragraph menu, but it is not an independent property of the paragraph looks.
The button types and their further relevant properties are:
ACTION [Button type]ÿÿ
ÿExecutes the SELECTFN when selected. The APPLY, SHOW, and NEUTRAL buttons are implemented as ACTION buttons with appropriate SELECTFNs. The button is highlighted (inverted) while the mouse is tracking, then unhighlighted when the mouse buttons come up and the function is executed.
TOGGLE [Button type]ÿÿ
ÿToggles the STATE between ON and OFF. The button is displayed in inverse video when the button is ON. INITSTATE defaults to OFF.
3STATE [Button type]ÿÿ
ÿLike TOGGLE, but switches between ON (label is inverted), OFF (label has a strike-out line), and NEUTRAL (label is not inverted).
NWAY [Button type]ÿÿ
ÿDefines a collection of mutually exclusive toggles. When one internal button is turned on, the current ON button is turned OFF. The button's STATE is the identifier of the current ON button, if any.
FIELD [Button type]
Defines a field between { and } for the user to fill in. A FIELD button has additional properties:
PRELABEL A string to appear, protected, before the field-opening {
POSTLABEL A string to appear after the field-closing }.
LABELFONT Font for the pre and post labels.
FIELDTYPE One of ATOM STRING NUMBER POSITIVENUMBER CARDINAL IMAGEOBJ.
FIELDFONT Font for the field characters.
If a field is empty, its value is determined by the EMPTYVALUE property. If that property is not specified, NIL is returned for empty ATOM fields, the empty string "" is returned for empty STRING fields. and the atom **EMPTY** is returned for other field types.
When the mouse is clicked in either the PRELABEL or POSTLABEL of a field button, the cursor moves and flashes inside the following/preceding bracket, for ordinary Tedit input.
(MB.DELETE IDENTIFIERS MENUSTREAM) [Function]ÿÿ
ÿDeletes the buttons for all IDENTIFIERS in MENUSTREAM.ÿÿ
ÿ
(MB.GET IDENTIFIERS MENUSTREAM RETURNS BEFORE START) [Function]ÿÿ
ÿReturns information about all the IDENTIFIERS in MENUSTREAM, searching before START if BEFORE, otherwise after. START is a menu selection, a menu piece, a menu character number, or NIL (= end of the document if BEFORE, otherwise its beginning).
If IDENTIFIERS is an atom, the value is information about just that button. Otherwise it is a plist keyed by the identifiers in IDENTIFIERS.
RETURNS specifies what kind of information is returned. It can be any of OBJECT STATE STARTCHNO ENDCHNO STARTPC ENDPC, or a list of those specifiers. If a list, the value will contain for each identifer a list of corresponding items. RETURNS defaults to OBJECT, and ALL is a shorthand for (STATE OBJECT STARTPC ENDPC STARTCHNO ENDCHNO).
The value for any of the identifiers will be NIL if such a button cannot be found.
Debugging tools: internal/TEDIT-DEBUG
This file contains an assortment of tools for visualizing different Tedit data structures and testing different capabilities. It is not yet documented and new functions get added as the work proceeds and old ones are revised. The tools are available for poking around after LOAD(TEDIT-DEBUG.LCOM), but then executing (TEDIT-DEBUG) will set up the environment for more serious debugging.
To give a feeling for what is available, the visualization functions typically begin with the letter S (for "show"), followed by a short/cryptic (because they are typed often) indication of what is to be shown. Thus (SL) shows the lines in the currently focused Tedit window or stream, SP shows its pieces, SLF displays a parse of the looks-portion of a formatted file, etc.
If there is only one Tedit on the screen, that becomes the focus. Otherwise, the focus defaults to the Tedit that the mouse is hovering over, and the focus stays that way until one of these functions is executed with the mouse over a different Tedit.
The output goes to the exec window by default, but for some functions the output can be directed to a separate Tedit stream. Thus (SP NIL T) will show all the pieces of the current stream in a new Tedit window that is scrollable, searchable, and copy-selectable.
Functions beginning with I (for "inspect") will bring up the inspector on various datastructures.
(SEQUENCE NIL NIL (0 0 0 0) ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (ALTERNATE NIL NIL (0 0 0 0) ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))))1$4È$È4È$È400È$È40È$È1$4<<È$È4<<È$È4HZÈ$È40BÈ$È4È$È1È$1ŠŠ8$1ŠŠ8$JÈ$È PAGEHEADING RUNNINGHEADMODERN
CLASSIC
MODERN
MODERN 
TIMESROMAN$ HRULE.GETFN
 HRULE.GETFN
 HRULE.GETFN HRULE.GETFN
 HRULE.GETFN  0  
 ½ [  
ð3-_G
È O> £3OVTm*,XvžeLJGn±P %
"1
'
#Q
5">-JÖ+3
«(+[<00><01>P&[
/ÝBÎŒ,%IÕõ}(<

ƒ

Êd C 8 , G )°-8?øŽSS&xüeDATE:iA/!zº