[Top][All Lists]

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

RE: Idea: Be able to use text properties as face attributes

From: Drew Adams
Subject: RE: Idea: Be able to use text properties as face attributes
Date: Sun, 26 Mar 2017 16:26:55 -0700 (PDT)

> > That might be another possible enhancement.  But I think
> > that is already possible using an anonymous face (see
> > (elisp) `Special Properties'):
> >  (put-text-property 30 42 'face '(:family "Palatino"))
> > Is there something else you were thinking of here?
> Not much: it's just an idea I had while reading your post.  it seems
> somewhat arbitrary to add a level of indirection for certain properties (if
> I want to make some text bold, I need to append to its 'face property —
> whereas if I want to make it invisible, I can just apply 'invisible to it.
> Maybe the two concepts would gain from being unified ?

OK.  As I said, that is really a separate enhancement.  I have
no problem with it.  But for now we already have a way to set
properties, including such face-attribute properties, at
individual text locations.  What we do not have is a way to
set properties at all locations of a given face.

> > Maybe you could elaborate, e.g., with a (fictitious) example?
> > Maybe show what else you think is needed for that, beyond
> > what I suggested.
> I think your proposal would make what I described possible :)

I don't see how.  It seems like another code change would be
needed to support it.  Not that both could not be done at the
same time, but I don't see that what I suggested, by itself,
would also realize what you suggest. 

> I was describing a possible generalization of it ((1) suppressing
> the distinction between text properties and face properties, and
> (2) generalizing faces to be collections of arbitrary text properties —
> your proposal is essentially (2), and I think it enables the conceptual
> cleanup (1)).

Like my suggestion, the conceptual change would require both a
code change (to support it) and a doc change (to express it).

If both enhancements were made at the same time then yes, the
doc change for my suggestion would be different.  Again, a
priori I have nothing against (someone) making both changes.

Thanks for thinking about this.

reply via email to

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