unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6767: 24.0.50; face-all-attributes returns unspecified for everything
@ 2010-07-31  9:36 Jan Djärv
  2010-07-31 11:11 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Djärv @ 2010-07-31  9:36 UTC (permalink / raw)
  To: 6767

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug.  If you can, give
a recipe starting from `emacs -Q':

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.

Did I misunderstand how face-all-attributes work?

     Jan D.


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
     `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/Users/jhd/bin/Emacs.app/Contents/Resources/etc/DEBUG.


In GNU Emacs 24.0.50.2 (x86_64-apple-darwin10.4.0, NS apple-appkit-1038.32)
  of 2010-07-20 on zeplin
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--verbose' '--enable-asserts' '--with-ns' 
'--without-x' 'CFLAGS=-g''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: C
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: sv_SE.UTF-8
   value of $XMODIFIERS: nil
   locale-coding-system: utf-8-unix
   default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
   tooltip-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
<down-mouse-1> <mouse-1> ( f a c e - a t t r i b u
t e SPC ' i t a l i c SPC : s l a n t ) C-j ( f a c
e - i t a l i c - p SPC ' i t a l i c ) C-j ( a s s
q SPC : s l a n t SPC ( f a c e - a l l - a t t r i
b u t e s SPC ' i t a l i c ) ) C-j ( f a c e - a l
l - a t t r i b u t e s SPC ' i t a l i c ) C-j <escape>
x r e p o r t - e m <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug
tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process ns multi-tty emacs)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6767: 24.0.50; face-all-attributes returns unspecified for everything
  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
  2010-07-31 17:23   ` Jan Djärv
  0 siblings, 2 replies; 4+ messages in thread
From: Eli Zaretskii @ 2010-07-31 11:11 UTC (permalink / raw)
  To: Jan Djärv; +Cc: 6767

> 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?






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6767: 24.0.50; face-all-attributes returns unspecified for everything
  2010-07-31 11:11 ` Eli Zaretskii
@ 2010-07-31 13:22   ` Jan Djärv
  2010-07-31 17:23   ` Jan Djärv
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Djärv @ 2010-07-31 13:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 6767



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.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6767: 24.0.50; face-all-attributes returns unspecified for everything
  2010-07-31 11:11 ` Eli Zaretskii
  2010-07-31 13:22   ` Jan Djärv
@ 2010-07-31 17:23   ` Jan Djärv
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Djärv @ 2010-07-31 17:23 UTC (permalink / raw)
  Cc: 6767-done

I made the function documentation more like the texinfo documentation.

	Jan D.






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-31 17:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-07-31 17:23   ` Jan Djärv

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).