[Top][All Lists]

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

bug#15900: 24.3.50; foreground-color-at-point returns wrong results

From: Michael Heerdegen
Subject: bug#15900: 24.3.50; foreground-color-at-point returns wrong results
Date: Sun, 17 Nov 2013 03:33:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> > That sounds good.  Can we just do that?
> For some value of "we", yes.  If "we" includes me and you, then it
> will have to be you, as my plate is pretty much full these days,
> sorry.  In my defense, I can tell that this should be a nice exercise
> for someone who wants to get accustomed to hacking the display engine,
> as it shouldn't be too hard, and there's abundant example code that
> does similar things.

Sorry Eli, but I can't do it.  I'm a real noob to C.

> > If faces are among them, I still must figure out if one of these
> > faces changes the foreground.
> You can know them in advance, I think.  Your example talks about
> links, which use a known face.  I presume there are only a few faces
> that needs such a special treatment, which would make the list of them
> quite short.
> IOW, why not test against a known list of properties that you want to
> leave alone, instead of digging into their color?

I think the missing information you didn't have is that this is a
general mode, it must work in any Emacs buffer.  w3m was only an example
- info, man, and gnus are others.  So, testing for hardcoded face or
property lists is not really an option.

> > If not, i.e., if a face e.g. just underlines, I do want to color the
> > text nevertheless.
> The face used by links is different not only in its underline, but
> also in its color.  If you want links to remain instantly
> recognizable, you should probably keep their appearance intact
> wholesale, not just the underline, otherwise how would the user
> distinguish between a link and underlined text?

Yes, that's what I actually do ;-)

> > Probably I didn't understand what you meant.
> More probable that I didn't understand what you meant.  Hopefully the
> above tells enough about my misunderstanding to allow you to correct
> me.

I think that you thought that what I do is w3m specific, but it's not.
It should work in any buffer, with any modes.  And it should change the
foreground color for every piece of text that has the default foreground

Thanks, and regards,


reply via email to

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