* describe all faces at point?
@ 2022-09-23 14:50 Sam Steingold
2022-09-23 15:01 ` Emanuel Berg
2022-09-23 16:05 ` Eli Zaretskii
0 siblings, 2 replies; 3+ messages in thread
From: Sam Steingold @ 2022-09-23 14:50 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
When I do `M-x describe-face`, the default face is, according to the doc,
> "the faces of the character after point"
However, looking at the `*Fancy Diary Entries*` buffer, I see many
different colors, and `M-x describe-face` offers the `diary-button` as
the default for _some_ characters that have _different_ colors (and the
`sample` in the `*Help*` buffer for one of them does _not_ match its
appearance).
Moreover, `(get-char-property (point) 'face)` returns `diary-button` for
both of those characters and `(face-at-point nil t)` returns
`(diary-button)` for them too.
So, how come two characters in the same buffer have different colors but
the same faces?
(see also https://emacs.stackexchange.com/q/73791/795)
--
Sam Steingold (https://aphar.dreamwidth.org/) on darwin Ns 10.3.2113
https://lastingimpactpsychology.com https://steingoldpsychology.com
https://fairforall.org https://www.peaceandtolerance.org/
Who is General Failure and why is he reading my hard disk?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: describe all faces at point?
2022-09-23 14:50 describe all faces at point? Sam Steingold
@ 2022-09-23 15:01 ` Emanuel Berg
2022-09-23 16:05 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Emanuel Berg @ 2022-09-23 15:01 UTC (permalink / raw)
To: help-gnu-emacs
Sam Steingold wrote:
> When I do `M-x describe-face`, the default face is, according to the doc,
> "the faces of the character after point"
Try this,
(defun what-face (pos)
(interactive "d")
(let ((face (or (get-char-property pos 'face)
(get-char-property pos 'read-cf-name) )))
(message (format "%s" (or face "no face!"))) ))
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: describe all faces at point?
2022-09-23 14:50 describe all faces at point? Sam Steingold
2022-09-23 15:01 ` Emanuel Berg
@ 2022-09-23 16:05 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2022-09-23 16:05 UTC (permalink / raw)
To: help-gnu-emacs
> From: Sam Steingold <sds@gnu.org>
> Date: Fri, 23 Sep 2022 10:50:41 -0400
>
> When I do `M-x describe-face`, the default face is, according to the doc,
> > "the faces of the character after point"
>
> However, looking at the `*Fancy Diary Entries*` buffer, I see many
> different colors, and `M-x describe-face` offers the `diary-button` as
> the default for _some_ characters that have _different_ colors (and the
> `sample` in the `*Help*` buffer for one of them does _not_ match its
> appearance).
>
> Moreover, `(get-char-property (point) 'face)` returns `diary-button` for
> both of those characters and `(face-at-point nil t)` returns
> `(diary-button)` for them too.
>
> So, how come two characters in the same buffer have different colors but
> the same faces?
The appearance of a character on display in Emacs gets the face
information from more than a single source, see the node "Displaying
Faces" in the ELisp reference manual for the gory details.
If you tell how does one get the "*Fancy Diary Entries*" buffer with
what you see there, I could perhaps give a more concrete answer to
your question.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-23 16:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-23 14:50 describe all faces at point? Sam Steingold
2022-09-23 15:01 ` Emanuel Berg
2022-09-23 16:05 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.