[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Removing Fonts From Files

    I am admittedly ignorant on a lot of these type of things, but surely there
    must be a way to remove font control characters from my ZMACS files.  We
    do code development on the symbolics, while this code must also run on the
    Sun (under Lucid).  I am preferential to using character styles, but find
    myself editing them right back out after transferring the files to the sun.
    What I would like to do is maintain my "pretty" version on the symbolics,
    and dump the "non-pretty" version to the sun when necessary, by simply
    executing m-X "Write File <filename> With Character Styles Removed", or
    something.  You get the idea.
    Does this capability exist already?

It would seem to me that what you want can be done by simply marking the whole
buffer as a region [c-X h] and then setting the character style for
the whole buffer [c-X c-J] to NIL.NIL.NIL and then saving it out to a new file
with [c-X c-W]. There are only three potential inconvenience with this:
1) your buffer is now without character styles and must be reverted to the
original file.
2) your buffer now points to the newly saved file name when you probably want
it to point to the original file name.
3) It is a lot of characters to type --- you probably want this automated.
Well all of the above, plus the fixes to the above problems can be done
by creating either a keyboard macro [c-X c-( ... c-X c-)] or writing a
new ZWEI command (which is probably beyond you at this point). I would do
it for you except that I am real busy right now. Someone else care to
do such a hack?