Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!grace.cs.washington.edu!jeffb From: jeffb@grace.cs.washington.edu (Jeff Bowden) Newsgroups: gnu.emacs Subject: Re: Why does emacs overstrike spaces on spaces? Message-ID: Date: 19 Apr 89 19:24:23 GMT References: <38851@bbn.COM> Sender: news@beaver.cs.washington.edu Distribution: gnu Organization: Ministry of Silly Walks Lines: 49 In-reply-to: jr@bbn.com's message of 19 Apr 89 15:06:20 GMT In article <38851@bbn.COM> jr@bbn.com (John Robinson) writes: >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... > I know about this. It just seemed to me that it was overstriking overly large expanses of spaces. >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. OK, I did just that. Here is what I found. For one line of an RMAIL-summary emacs output the following -- -- ^[[45;1H 79 13-Apr to: jbk xothello -- -- to produce this line -- -- 79 13-Apr to: jbk xothello -- -- where it could have done -- -- ^[[45;4H79 13-Apr^I^I^I to: jbk xothello -- -- That's 16 extra characters for this line. The second version took 41 chars so an increase of about 40%. It could be improved even further if you consider that just before it output this line it was somewhere in the line preceding it. So instead of the escape sequence which takes 7 chars it could have done "^M^J " which takes only 5 bringing us to a savings of 18 chars over what emacs does.