Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: gnu.emacs Subject: Re: Why does emacs overstrike spaces on spaces? Message-ID: <38851@bbn.COM> Date: 19 Apr 89 15:06:20 GMT References: Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Distribution: gnu Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 40 In-reply-to: jeffb@grace.cs.washington.edu (Jeff Bowden) In article , jeffb@grace (Jeff Bowden) writes: >I often run emacs over a 1200 baud line to a 49x80 vt100 emulator using the >TERMCAP at the end of this article. > >When a portion of the screen is drawn (e.g. when I switch buffers) emacs goes >through a routine of erasing each line (with a vt100 escape sequence) and >painting the characters onto the screen. The problem is that if there are >leading or embedded spaces in a give line, they are _printed_ onto the screen. >This is not fatal - it gives the correct result - but it is a waste of time >since those positions are already blank (this is especially annoying when >things are in columns such as RMAIL-summary). > >Can this be fixed by twiddling the TERMCAP or does it require a fix to emacs >itself? You are suggesting that it send the cursor motion comand, right? Let's see, I need to go to column 5 on line 13. I'll just send this little ol' string: ESC [ 1 3 ; 5 H Those 7 characters sure beat the 4 spaces I would have sent the other way. Be glad emacs is taking the quicker route, especially at 1200 baud. Going to column 9 you say? Emacs should send tab characters,possibly in combination with backspaces... Eventually there will be a column position where the cursor motion is the best way to go, and emacs should send it. In other words, it looks at the lengths of the possible strings to position the cursor, and chooses the shortest string to send. I haven't the time to run the experiment to determine this, but if you are interested do an open-termscript and look at what comes out. Or maybe you meant it to send the non-destructive space (aka cursor-right) command "ESC [ C" 4 times? (Plus two miliseconds of padding each time, according to your termcap). -- /jr jr@bbn.com or bbn!jr C'mon big money!