[Top][All Lists]

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

RE: facemenu-unlisted-faces

From: Drew Adams
Subject: RE: facemenu-unlisted-faces
Date: Thu, 6 Jul 2006 08:52:57 -0700

         - A face is a variable, whose value can change. Its name, if it
           describes the appearance, might lie (a face named `blue' might
           be red).

    The "Blue" menu item could be set up to specify red, too.

?? (:foreground "Blue") is pretty much a constant. Yes, of course, someone
could sneak in and sabotage the menu. What's the point?

    The crucial point is that that would be an anomalous reprogramming of
    Emacs.  Likewise, if a face "blue" specifies red, that is also an
    anomalous reprogramming of Emacs.

Faces are variables. They are *meant* (designed) to be variables. Text
properties are constants (which you can apply to text variably, of course).
They are *meant* to be constants. Reprogramming of constants, but not
variables, is anomalous behavior.

    For simplicity, we can ignore those anomalous possibilities when
    designing features like this one.  We can assume that the command
    whose name indicates blue really does as its name implies.


The real point is that introducing the added (conceptual) complexity of
"face" is not necessary in this part of the UI. A user need not understand
what a face is to make text bold or red or fixed pitch.

        It is a happenstance in the sense that the name happens to
        reflect the appearance - until someone changes that
        association. If the face name were Foo or Blue, or if the
        font family of that face were changed to helvetica,
        then it would not be such a happy happenstance.

    Emacs gives you enough rope to mess up a lot of things.  We don't
    need to bulletproof these features against such messes.  We just
    say "So don't do that, then."

Agreed. I was simply explaining my use of "happenstance". A face is, by
design, a variable. Of course we want to discourage people from changing
predefined faces that we regard as constant and upon which the normal
functioning of the UI depends.

I was speaking to the fact that face `fixed-pitch' is a loose (i.e.
happenstance) association between a name that describes an appearance and
the current value of a face (which is a variable). A text (or font or
whatever) property of fixed pitchness or boldness is something constant -
you can apply it variably to any text you like, but the attribute/property
itself will always mean/be the same thing.

        Much more importantly, it is a happenstance for the user.
        The user is interested in the appearance, not in the fact
        that it is a face.

    I agree, but that point seems to cut equally well in all directions.


        You stated, "For 'fixed pitch', I think that can only be
        considered as a face."

    You presented a choice of face or face attribute, and I said it
    can't be considered a face attribute.

I don't recall exactly what I said, and I don't want to take the time to
look it up. My point was that the model to use for the user is that of
applying some constant property that affects appearance to selected text.
Fixed pitchness can be conceived of (by the user & presented as such in the
UI) as such a constant attribute/property/characteristic that can be applied
to text - even if that is not in fact the way the implementation behaves.

        There is no such "font property".  Some fonts are fixed pitch, and
        some are not.

        Some fonts are bold and some are not, also.

    Yes, but there is a face attribute for boldness.
    There isn't a face attribute for fixed-pitch-ness.

Yes. I wasn't speaking of Emacs face attributes per se, but of the user
thinking in terms of applying a property/style/attribute to some text. How
we do that under the covers is unimportant (unless it invalidates the user's
conceptual model).

My point was that it is possible to have a UI that lets the user think only
in terms of applying boldness and fixed-pitchness to text, without - at that
point - introducing the notion of "face". That's all.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]