wmb@sun.uucp (Mitch Bradley) (09/25/85)
In response to my earlier message about using a termcap entry for Suns which omits the insert line capability, a couple of people suggested that the right thing to do is to add the multiple insert/delete lines/characters capabilities, instead of removing the insert capabilities altogether. I tried this, and I still prefer the termcap without the inserts, assuming that emacs is running on the machine which owns the bitmap. To me, the visual effect of scrolling the upper window is ugly with the insert/delete, because the lower half of the screen jumps up briefly in the midst of the process. Here's why I don't think the multiple insert/delete is such a big win over just repainting: Assume that you have two Emacs windows, and you wish to scroll the top window by (for example) 4 lines. If you have multiple insert/delete, here's the sequence of operations: (when I say "screen" here, I really mean the Sun window that emacs is running in) delete 4 lines from the top of the screen insert 4 lines just before the top mode stripe paint new lines into the space just inserted. Here's what has to happen: delete 4 lines: this requires touching the entire bitmap; first you copy the bottom of the screen up four lines, then clear the bottom four lines on the screen insert 4 lines: copy the bottom half of the screen down four lines, then clear the 4 lines just before the mode line paint 4 lines: obvious. This is roughly 6 times the amount of memory traffic to the frame buffer as results from a simple repaint of the top half of the screen. However, it does require less software overhead, because passing a character through the terminal emulator is not real cheap, due to the necessity to check for escape sequences and stuff like that. I recommend that you try it for yourself and see which you prefer; different people may have different preferences. Be sure to try scrollong the top window of two. Here are two alternative termcap entries: With multiple insert/delete (with thanks to John P. Nelson) Mu|sun|Sun Microsystems Workstation console:\ :li#34:co#80:cl=^L:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:rs=\E[s:am:bs:km:ms:pt:\ :kd=\E[B:kl=\E[D:ku=\E[A:kr=\E[C:kh=\E[H:\ :al=\E[L:dl=\E[M:im=:ei=:ic=\E[@:dc=\E[P:\ :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP: Without any insert/delete: Mu|sun|Sun Microsystems Workstation console:\ :li#34:co#80:cl=^L:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ :am:bs:km:mi:ms:pt:\ :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:\ :kd=\E[B:kl=\E[D:ku=\E[A:kr=\E[C:kh=\E[H:\ :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\ :dl=\E[M:dc=\E[P:\ :rs=\E[s: Of course, the ultimate "right thing" is to have some way of specifying a scrolling region. Perhaps this is possible; I don't know. Cheers, Mitch
jpn@teddy.UUCP (09/26/85)
I agree that a termcap that does not include ANY insert/delete capabilities may work marginally faster on a window that is native to the SUN I am working on. I really don't see that significant of a difference in speed, though. My situation is that I usually have windows on my screen that are remote logins to other machines (SUNS and vaxes). For this situation, the termcap that contains the insert/delete is somewhat FASTER because of the overhead of the ethernet traffic involved with rewriting the screen. This is especially true if using a window larger than the 34x80 default window size. John P. Nelson (decvax!genrad!teddy!jpn seismo!harvard!talcott!panda!teddy!jpn)
chris@umcp-cs.UUCP (Chris Torek) (09/27/85)
Most Emacs termcap drivers do not use scrolling regions, probably because the `cs' termcap entry was not precisely defined until recently. One *very* nice solution to the `Sun redisplay problem' is to have a special Sun driver that knows whether it is connected to a bitmap, and if so, uses BitBlt code to write characters directly. This also lets one use the mouse and detect window size changes when running under Suntools. I sent my Sun driver for my version of Gosling Emacs #264 to UniPress; it has all of these features and seems to work quite well for us. Hopefully UniPress will soon be distributing that version. Maryland hacks: ask for them by name. :-) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland