From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Interactive function displaying face attributes Date: Tue, 09 Aug 2022 21:59:11 +0300 Message-ID: <83v8r1s0ow.fsf@gnu.org> References: <8335e5tgfj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2292"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: carlmarcos@tutanota.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 09 21:12:10 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLUe8-0000O8-Vd for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 09 Aug 2022 21:12:09 +0200 Original-Received: from localhost ([::1]:48442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLUe7-0004aE-VF for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 09 Aug 2022 15:12:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLURm-0001dO-NF for help-gnu-emacs@gnu.org; Tue, 09 Aug 2022 14:59:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLURm-0003L5-7x; Tue, 09 Aug 2022 14:59:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=YT/WKwrWO7XrFaBfDgIgb8wTLdBhMCf4d9VJeTfei5w=; b=LzhUQG4ilZc3Kxomu088 b3yR1qiY24CZJMcqoXa1aFJRl3AxQwAVjGoHXXUahibQH4t03kDXKScD/iOwyjL2oHE3/Iciq1qyu foLilI9YXvJFfFUVVHe9zDkldtv3kh+E1FX1hptRafBoQPTFG7I6doEjGWvMOM6rmCTzlNNcyLJmE XWxzZKZ9GOiFIKvFZ+CBMOz0fzfD02pGkCGjI1Av/CCvtRCYp1g4nUY1pwqQtOyvWzpHeCEVXAckX 0rBXqBZvHbs9w1hAdO/vSEBPkBWQW8ngaFQB7fGyrrXuA1hybeIXbYcF0QRmoFWZSj3a3M77nKTzG Az2Q8Jvhs5nrqA==; Original-Received: from [87.69.77.57] (port=2366 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLURl-0004Iv-Mt; Tue, 09 Aug 2022 14:59:22 -0400 In-Reply-To: (carlmarcos@tutanota.com) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138772 Archived-At: > 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 > >> > >> > >> 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.)