[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: Sun, 9 Jul 2006 11:19:07 -0700

        I can use the number 4 or not use it, but it remains the
        number 4 - it is not changeable. I can apply  the :bold
        attribute to text or not, but it remains the unchangeable
        :bold attribute; ...

    I don't understand you.  The displayed numerical symbol can be set to
    any number but few want to set that variable to a value that humans do
    not expect.  Similarly, it looks to me that in ...emacs/lisp/faces.el
    `:bold' is set to `Face.AttributeBold' although not with a setq, but
    in a more complex manner.  (Maybe numbers are not set with setq either
    -- I have not looked.)

    A `user (conceptual) model' that presumes a `constant' is wrong.  The
    user's conceptual model should include the notion that `:bold' is set
    to a value that humans generally expect, but it can be something else.
    On my display, I set bold to be a kind of red since the heavy weight
    of a more conventional bold looks bad.  Naturally, almost no one else
    expects `bold' to be displayed as a `normal' weighted character.

    You can change anything in a `universal informational machine' (which
    is how I have heard computers described).  It is a major mistake to
    think of any characteristic from such a universal machine as
    `constant'.  Moreover, the machine does not know what human meanings
    are attached to the bits it transforms.  As computers become more and
    more important in human lives, the danger of mistaking what they can
    do becomes more and more dangerous.

I really didn't intend to get into a discussion of the meaning of levels of
abstraction or the nature of Turing machines and computation. That shouldn't
be necessary to follow my argument. Yes, things are connected in the
universe. Yes, you can drill down to any level you like (maybe) - or up
(maybe). Yes, seemingly nothing is immutable except change itself. Dialectic
of nature; dialectic of ideas. Powers of ten; we are the world. You never
step into the same river twice. We are our environments; our bodies are
replaced every 7 (?) years. Each electron can be thought of as spread
throughout everything. My foot is the same color as the sand; it is the
sand. Dataflow, from garden to me to plumbing to garden.

Yes, a numeral is not a number. And yes, (nearly) any location in a machine
is a variable, and, yes, that includes lots of things one might normally
think of as relatively constant. Even hardware can be programmed, and cosmic
rays are Fortune's envoys.

I was not addressing this level of detail.

At the (usual) Emacs user level, change involves either Lisp (e.g. setq in
.emacs) or Customize. Users think in those terms. Things such as the (in
reality variable) mapping from :bold to displayed boldness are not part of a
user's conceptual model of Emacs behavior. An Emacs user, especially a
newbie, will expect and find that mapping to be constant.

The mapping from face name to appearance, however, is something that Emacs
users normally think of as variable. Why? Because faces are customizable -
users are invited to change the name-appearance mapping. Invited? Yes, in
the same sense that they are invited to change a variable's value or a
function's definition (as Richard pointed out). Does that mean that users
are _encouraged_ to change everything that can easily be changed? Debatable.
Let's say "no". The invitation and possibility are nevertheless there, even
if there is no encouragement.

The point is that some things are easily changed and others are less easily
changed. Things that can be customized are the easiest of all to change,
and, yes, in a sense we invite users to change them, by virtue of making
them customizable. A defvar is less of an invitation to change a variable
than a defcustom, and a defconst is less an invitation than a defvar. There
are degrees of invitation. Some degrees of non-invitation are only
conventional (please don't change a defconst value); others are enforced to
some degree.

Though every machine address invites change by the bit twiddler, there is a
difference in degree, or abstraction level here. And that difference in
degree makes a (perceived) qualitative difference. Unless you resort to what
Richard appropriately termed "anomalous" behavior, some things can
generally, normally, sensibly be considered constants in Emacs, for average,
everyday use. Other things are advertised as open to user modification and
customization. Face attribute :bold is such a "constant"; face
`dired-flagged' is such a variable.

What about face `bold'? Richard would argue that changing its appearance
would be anomalous - presumably because its name suggests a particular
appearance. I'd argue that changing its appearance is probably not what most
people would or should want to do, but it's not anomalous, because a face is
intended to be customized. I'd even argue that it might not be such a good
idea that we _have_ predefined faces that are named for their appearance and
expect users not to modify them. Perhaps a notion and mechanism of "constant
face" would be useful - I don't know. For now, I look at faces `bold' and
`dired-flagged' as the same species of critter. I personally won't be
tempted to redefine the `bold' face (quoique...), but I can imagine that
some application might do that, and I wouldn't be too shocked by that. Call
me "anomalous" or "anomaly lover". I lay the blame at naming a face after a
particular appearance - that's inviting trouble.

Another thing about a variable is that it acts like a slide projector: paint
the slide, and the projected image changes. If you have 8 zillion projected
images, they all change. If you change the appearance of face `bold', then
all text with that face changes appearance. If you like, all "bold" text
(that is, all that has face `bold') can become red and unbold.

Assuming that attribute :bold remains constant (in the user's usual world),
s?he must remove :bold from text that has it applied, then choose and use a
different attribute, to change the appearance of the text. S?he cannot
(easily) redefine the appearance of attribute :bold, so s?he must apply a
different attribute to a particular piece of text to change its appearance.

Now, you might be right that the appearance of :bold itself can be changed
through XResources (on X Window). That hadn't occurred to me, frankly. If
so, that's still (to me) at a different level than changing the value of a
face's properties. The Emacs newbie will be able to think of attribute :bold
as constant, once s?he's inside Emacs. S?he will, on the contrary, learn
that Emacs faces are things that can be customized. That's really all I

Watching the river flow...

reply via email to

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