unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: carlmarcos@tutanota.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: Interactive function displaying face attributes
Date: Tue, 09 Aug 2022 21:59:11 +0300	[thread overview]
Message-ID: <83v8r1s0ow.fsf@gnu.org> (raw)
In-Reply-To: <N92x6Ea--3-2@tutanota.com> (carlmarcos@tutanota.com)

> Date: Tue, 9 Aug 2022 20:53:32 +0200 (CEST)
> From: carlmarcos@tutanota.com
> Cc: help-gnu-emacs@gnu.org
> 
> Aug 9, 2022, 18:33 by eliz@gnu.org:
> 
> >> Date: Tue, 9 Aug 2022 20:24:21 +0200 (CEST)
> >> From: carlmarcos--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> >>
> >>
> >> I am writing this function to display face attributes.  The function works interactively accepting a string from the user obtained from `completing-read'.
> >>
> >
> > What is that string?  If it's a face, then we already have
> > describe-face.
> >
> The string is an element in the list passed in completing-read.

And what are the members of that list?  Are they faces?

IOW, do you want a function that displays attributes of a face?  If
so, describe-face is your friend.

> >> For `char-after-point' I want to display the face attribute of the
> >> character after point.
> >>
> >
> > Did you try "M-x describe-text-properties"?
> >
> No, have done `describe-face'

Well, how about trying describe-text-properties?

> >> Having seen that there can be more than one face at point, what can I do?
> >>
> > No, the face at a given buffer position can have only one value.
> >
> If `hl-line-mode' is enabled, would that result in multiple faces at point?

No, there's just one.  But there might be other sources of face
information besides the buffer text itself.  See the node "Displaying
Faces" in the ELisp manual.  (Btw, describe-text-properties will show
the other sources of face information as well.)




  reply	other threads:[~2022-08-09 18:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 18:24 Interactive function displaying face attributes carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-09 18:33 ` Eli Zaretskii
2022-08-09 18:53   ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-09 18:59     ` Eli Zaretskii [this message]
     [not found]     ` <83v8r1s0ow.fsf@gnu.org-N930CPX----2>
2022-08-09 19:21       ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-09 19:32         ` Eli Zaretskii
2022-08-09 20:25           ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-10 12:35             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83v8r1s0ow.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=carlmarcos@tutanota.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).