Interlisp / medley

The main repo for the Medley Interlisp project. Wiki, Issues are here. Other repositories include maiko (the VM implementation) and Interlisp.github.io (web site sources)
https://Interlisp.org
MIT License
376 stars 19 forks source link

scrolling linked windows #583

Closed masinter closed 1 year ago

masinter commented 2 years ago

from @rmkaplan

I’m trying to set up COMPARESOURCES so that it shows the 2 versions of a changed item in side-by-side attached Sedit windows (or a single window if an item is exists in only one of the files).

It took awhile to figure out how Sedit does its window/region management, but the window arrangement now works quite nicely. You give a single wide region for each change, it gets divided into horizontal panes.

But I have 2 problems:

  1. When I run this under a mouse click, the wheelscroll doesn’t work. I have to explicitly click in the exec to get the seditsto scroll. If I click first in the Sedit before the exec, then it shows black boxes instead of scrolling—the interrupts are not armed as they should be.

I tried bracketing the call to COMPARESOURCES with (SPAWN.MOUSE) and (TTY.PROCESS T), but that doesn’t seem to make a difference. Any ideas?

  1. When I close one of the 2 paired/attached windows, only one of the Sedit processes is killed. So eventually you get a stack overflow. Both Sedit window (“main” and “attached”) have the same closefn list, with SEDIT::CLOSEFN being the first, followed by CLOSEATTACHEDWINDOWS. The windows get closed, but one of the processes survives.

(A separate glitch: (SAVEVM) gives an error “Can not open sysout file” NIL)

masinter commented 2 years ago

I don't understand how control characters are "enabled" and how wheelscroll works. There shouldn't be any loops enabling and disabling interrupts. Whether a character is an interrupt shouldn't depend on which process is running?

There are globalvars and special variables; RESETFORM sets or modifies global variables and their values and then puts it back when you unwind the stack. The common lisp error system and the Interlisp error system aren't exactly the same; I'm not sure how that was handled.

masinter commented 1 year ago

is there still a problem? Assuming not (if so, reopen)

rmkaplan commented 1 year ago

I think Sedit is still screwed up, in terms of killing processes, but I hacked around that explicitly in EXAMINEDEFS (which is used for the comparison display). So that's an Sedit issue, but the comparisons don't run into it now because II am using TEDIT instead of SEDIT to show the side-by-sides. That's because I don't know how to highlight the diffs in Sedit, whereas I can use COMPARETEXT on the tedit function printouts.

That's why you can't select S-expressions reasonably in the side-by-side windows, which is a little inconvenient.

There was also a problem with having 2 Sedits running on a function of the same name--but I have figured out how to deal with that in another way (copy the definition to a name that incorporate a little bit of the source of the item, and call Sedit on those. But still needs the special process monitoring and still no highlights.

masinter commented 1 year ago

Two SEDITs on the function of the same name should be handled by making the discriminant include the "source" (NIL, T, FILE, or filename). I use EDITDEF a lot and this has often bitten me. New issue?