From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 6767@debbugs.gnu.org
Subject: bug#6767: 24.0.50; face-all-attributes returns unspecified for everything
Date: Sat, 31 Jul 2010 15:22:03 +0200 [thread overview]
Message-ID: <4C54237B.2010502@swipnet.se> (raw)
In-Reply-To: <837hkb3nz4.fsf@gnu.org>
Eli Zaretskii skrev 2010-07-31 13.11:
>> Date: Sat, 31 Jul 2010 11:36:52 +0200
>> From: Jan Djärv<jan.h.d@swipnet.se>
>> Cc:
>>
>> In *scratch*:
>> (face-attribute 'italic :slant)
>> italic ;; Good.
>>
>> (face-italic-p 'italic)
>> (italic oblique) ;; Fine.
>>
>> (assq :slant (face-all-attributes 'italic))
>> (:slant . unspecified) ;; Say what??
>>
>> In fact face-all-attributes gives me unspecified for all attributes in
>> the faces I tried (about 5), including the default face.
>
> This happens because face-new-frame-defaults has `unspecified' for all
> the attributes of `italic' face (and all other faces as well). Try
>
> (face-all-attributes 'italic (selected-frame))
>
> and you will get what you expect.
>
>> Did I misunderstand how face-all-attributes work?
>
> I don't know, but it sounds like the doc string is at least misleading
> in this regard. OTOH, this function is not used anywhere in Emacs, so
> it could be buggy.
>
> What is your use-case, exactly?
Just trying to get all attributes for a possible conversion to pango markup.
I intend to use it for tooltips so Emacs can use the system tooltips instead
of its own. In principle it is possible to put properties on the tool tip
string so I'm trying to handle that. Maybe this is overkill, most toolstips
in Emacs are straight strings, but I've seen bold and italic. I can ask for
specific attributes instead of using face-all-attributes.
An improvement for the documentation would be to refer to face-attribute and
say that if frame is nil or omitted, face-attribute is called with frame
argument t.
Jan D.
next prev parent reply other threads:[~2010-07-31 13:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-31 9:36 bug#6767: 24.0.50; face-all-attributes returns unspecified for everything Jan Djärv
2010-07-31 11:11 ` Eli Zaretskii
2010-07-31 13:22 ` Jan Djärv [this message]
2010-07-31 17:23 ` Jan Djärv
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C54237B.2010502@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=6767@debbugs.gnu.org \
--cc=eliz@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.
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.