From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#6767: 24.0.50; face-all-attributes returns unspecified for everything Date: Sat, 31 Jul 2010 15:22:03 +0200 Message-ID: <4C54237B.2010502@swipnet.se> References: <4C53EEB4.8010602@swipnet.se> <837hkb3nz4.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1280583491 15633 80.91.229.12 (31 Jul 2010 13:38:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 31 Jul 2010 13:38:11 +0000 (UTC) Cc: 6767@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 31 15:38:09 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OfCGO-0005UE-J4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Jul 2010 15:38:08 +0200 Original-Received: from localhost ([127.0.0.1]:60766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfCGN-0006TW-Ui for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Jul 2010 09:38:07 -0400 Original-Received: from [140.186.70.92] (port=53324 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfCGD-0006Sn-Kj for bug-gnu-emacs@gnu.org; Sat, 31 Jul 2010 09:38:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfCG8-0000ay-RF for bug-gnu-emacs@gnu.org; Sat, 31 Jul 2010 09:37:57 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42498) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfCG8-0000ao-PG for bug-gnu-emacs@gnu.org; Sat, 31 Jul 2010 09:37:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OfC0o-0008MP-L2; Sat, 31 Jul 2010 09:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Jul 2010 13:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6767 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6767-submit@debbugs.gnu.org id=B6767.128058251232130 (code B ref 6767); Sat, 31 Jul 2010 13:22:02 +0000 Original-Received: (at 6767) by debbugs.gnu.org; 31 Jul 2010 13:21:52 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfC0c-0008MB-SW for submit@debbugs.gnu.org; Sat, 31 Jul 2010 09:21:51 -0400 Original-Received: from smtprelay-h32.telenor.se ([213.150.131.5]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfC0a-0008Ly-BY for 6767@debbugs.gnu.org; Sat, 31 Jul 2010 09:21:49 -0400 Original-Received: from ipb3.telenor.se (ipb3.telenor.se [195.54.127.166]) by smtprelay-h32.telenor.se (Postfix) with ESMTP id C258FE8F33 for <6767@debbugs.gnu.org>; Sat, 31 Jul 2010 15:22:05 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwzAJPAU0xV4S0jPGdsb2JhbACDE4RSmEAMAQEBATUtrGmRKIEmgyBzBIQ9 X-IronPort-AV: E=Sophos;i="4.55,294,1278280800"; d="scan'208";a="555385913" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb3.telenor.se with ESMTP; 31 Jul 2010 15:22:05 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 890BD7FA05A; Sat, 31 Jul 2010 15:22:04 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 In-Reply-To: <837hkb3nz4.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 31 Jul 2010 09:22:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39095 Archived-At: Eli Zaretskii skrev 2010-07-31 13.11: >> Date: Sat, 31 Jul 2010 11:36:52 +0200 >> From: Jan Dj=C3=A4rv >> 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 mark= up.=20 I intend to use it for tooltips so Emacs can use the system tooltips inst= ead=20 of its own. In principle it is possible to put properties on the tool ti= p=20 string so I'm trying to handle that. Maybe this is overkill, most toolst= ips=20 in Emacs are straight strings, but I've seen bold and italic. I can ask = for=20 specific attributes instead of using face-all-attributes. An improvement for the documentation would be to refer to face-attribute = and=20 say that if frame is nil or omitted, face-attribute is called with frame=20 argument t. Jan D.