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

Re: Removing Fonts From Files

    Date: Tue, 19 Jan 88 13:33 EST
    From: Jeffrey Mark Siskind <Qobi@ZERMATT.LCS.MIT.EDU>

	Date: Sun, 17 Jan 88 14:33 EST
	From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>

	    Date: Fri, 15 Jan 88 09:59:35 CST
	    From: Daniel A Haug <aihaug@AUSTIN.LOCKHEED.COM>

	    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

	In Zmacs, you can do c-X H c-X c-J <return> to change all characters in
	the buffer to the default style, followed by c-X H m-X Write Region
	<return> pathname <return> to write the file to where you want it.  Of
	course this destroys the character styles in your buffer, so if you want
	to continue editing the "pretty" version, you have to read it in again
	with m-X Revert Buffer.

What you (Qobi) have touched on is a much more interesting aspect of all
of this stuff, namely, the separation of the actual data of the program
from how it is presented.  In a more powerful editor which based its
redisplay on the paradigm of presentations, the user could see the
program data in any viewspec which he deemed readable.  This has been
the subject of many conversations at Symbolics, and some of us have more
than a small interest in implementing such an editor.  To do properly is
a non-trivial task, to be sure, but the benefits of such an editor to
the programmer are enormous, because there are about a zillion
interesting tools that can be built given such an editor substrate.

    I am interested in doing exactly the opposite. I have never got into the habit
    of using character styles in my Lisp code for various reasons. I would like to
    start though. I don't want to have to change styles manually however. I know
    that modes like m-X Electric Character Style Lock Mode will put comments in
    italic and once upon a time (before Genera 7.0) m-X Electric Def Lock Mode put
    the name of a definition into bold. That was all fine and dandy except for one
    problem: There was no way to convert a file that was written without those
    modes into one which used those modes.

    I like using the autoindent feature of Zmacs, one of the best habits to
    get into is using <Line> instead of <Return> while editing Lisp code.
    But there is an escape hatch for reformating a file when it is not
    formatted nicely: c-m-Q or c-X H c-m-\. This can happen for a variety
    of reasons, either I start our with a file that is not formatted properly
    or the indenting gets messed up in the process of editting. It there an
    analogous way of "canonicalizing" the character styles in a Lisp file?
    If not then there should be. A general rule to be followed is whenever
    you provide an automatic formater of any kind that works interactively
    on input, it should be accompanied with a reformater for the same standard.

    P. S. I would also like a a command that "un-shift-lock-ifies" a file.
    I find that Symbolics source code written in m-X Electric Shift Lock mode
    is very unreadable so when I m-. some code I would like to be able to
    downshift the case of code while preserving the case of strings and comments.
    For symetry you should provide the opposite command which "shift-lock-ifies"
    a file too as per the above argument.