Print

Print


I'm sure there must be others in this list with legacy Emacs-style text
they want to copy into TextEdit or some other Mac OS X editable text space
for re-editing.  The problem is those pesky "\n"s.

You can use Christian Grunenberg's fine WordServices to kill the line
endings completely, but you probably want to preserve \n\n, which marks
the paragraphs.

Currently I'm using Mike Ferris' TextExtra piping facility to do this,
using a pretty crude command line that crosses its fingers and hopes there
are no carats already in the text.

tr '\n' ^ | sed -e 's/\^\^/$$/g ; s/\^/ /g' | tr '$' '\n'

This is ugly (but fast, and it works, and you can attach it to a key combo)
.  Are there any UNIX command line gurus out there who can offer something
a little more elegant.

Or am I not seeing the wood for the trees.  Is there some Apple native way
of doing this that I'm missing?  TextEdit's Format/Wrap to Page and Wrap
to Window sound as if they're the business, but actually they accomplish
something quite different (the purpose of which somewhat escapes me, I'm
afraid).

--
el bid