[OS X TeX] TeXShop on Tiger: Reply to Bruno

Fernando Pereira fcnpereira at mac.com
Sat May 7 01:43:52 CEST 2005

On May 6, 2005, at 1:45 PM, Chris Goedde wrote:

>> Since I don't use editors which work like this, I have some really  
>> elementary questions. If I'm typing a line and it gets too long,  
>> the cursor reaches back to a word ending and moves the text after  
>> that word to the next line. But what happens if I edit in the  
>> middle of a line? Do words at the end sort of dribble down to  
>> their own lines? What happens if I copy and paste? Do lines get  
>> reformatted? Etc. Etc. Pretty soon, what sounds like a simple  
>> change requires modifications all over the place.
> Emacs, as I recall, does this by making <space> be smart. If the  
> user types <space> beyond a certain column, a new line character is  
> substituted. Again, IIRC correctly, emacs punts on auto-reflowing  
> text that is inserted or typed in the middle of the line. It has a  
> wrap-region command to manually fix these.

Sort of. In Emacs, each key is in effect bound to a command (a  
function in Emacs Lisp or in the core C-implemented functions). The  
command that <space> is bound to in text fill checks line line width  
when the space is being inserted. If the space is beyond the line  
width, the command backs up to the previous space, turns that into a  
newline, and then moves forward to the original insertion point, and  
inserts the space.

> Personally, I wouldn't advise you to worry about this too much;  
> this is what that <return> key is for :-).

I disagree. It is hard to remember to type <return> when composing on  
the keyboard. The reason why this matters is that many of us work  
with colleagues who use Linux or Windows, and we share files using  
cvs or other means. Unfortunately, cvs does everything in terms of  
lines, as do document comparison programs like diff, diff3, and  
FileMerge. Because of that, merging changes between a hard-newline  
and a soft-newline version is pretty much impossible.

> But, if you wanted to make <space> smart as above and implement a  
> wrap-selection command, that would be sufficient for me.

For me that would be perfect.

> Going much beyond that seems like it would lead to lots of  
> headaches with math mode and intelligently parsing the TeX source  
> for wrapping purposes. It doesn't seem to me (easy to say!) that  
> making <space> smart would be too hard.

No point in trying to be too smart in this, it would just break  
things in annoying ways.

-- F

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>

More information about the macostex-archives mailing list