GNU bug report logs - #2659
23.0.91; set-face-attribute :height float on a Mac

Previous Next

Package: emacs;

Reported by: Alex Schröder <kensanata <at> gmail.com>

Date: Fri, 13 Mar 2009 15:20:03 UTC

Severity: minor

Fixed in version 23.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2659 in the body.
You can then email your comments to 2659 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2659; Package emacs. (Fri, 13 Mar 2009 15:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex Schröder <kensanata <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 13 Mar 2009 15:20:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Alex Schröder <kensanata <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.91; set-face-attribute :height float on a Mac
Date: Fri, 13 Mar 2009 16:11:40 +0100
The following results in an error:

(set-face-attribute 'default nil :height 1.1)

Debugger entered--Lisp error: (error "Invalid default face height" 1.1)
  internal-set-lisp-face-attribute(default :height 1.1 0)
  set-face-attribute(default nil :height 1.1)

I think it should not because the doc string says:

`:height'

VALUE must be either an integer specifying the height of the font to use
in 1/10 pt, a floating point number specifying the amount by which to
scale any underlying face, or a function, which is called with the old
height (from the underlying face), and should return the new height.

Either that, or the doc string must be improved. :)

I'm using Apple's Mac OS 10.3.9.


In GNU Emacs 23.0.91.1 (powerpc-apple-darwin7.9.0, NS apple-appkit-743.43)
 of 2009-03-13 on Alpinobombus.local
Windowing system distributor `Apple', version 10.3.743
configured using `configure  '--with-ns''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  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: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2659; Package emacs. (Fri, 13 Mar 2009 16:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 13 Mar 2009 16:15:02 GMT) Full text and rfc822 format available.

Message #10 received at 2659 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Alex Schröder <kensanata <at> gmail.com>
Cc: 2659 <at> debbugs.gnu.org
Subject: Re: bug#2659: 23.0.91; set-face-attribute :height float on a Mac
Date: Fri, 13 Mar 2009 12:08:23 -0400
> Debugger entered--Lisp error: (error "Invalid default face height" 1.1)

This says that you can't specify "1.1 times the underlying face" because
the default face as no underlying face.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2659; Package emacs. (Fri, 13 Mar 2009 16:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex Schröder <kensanata <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 13 Mar 2009 16:30:05 GMT) Full text and rfc822 format available.

Message #15 received at 2659 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Alex Schröder <kensanata <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 2659 <at> debbugs.gnu.org
Subject: Re: bug#2659: 23.0.91; set-face-attribute :height float on a Mac
Date: Fri, 13 Mar 2009 17:22:30 +0100
Ah. I misunderstood the doc string, then. Can we improve the docstring
and find another way to say "underlying face"? The word underlying
doesn't appear in the Elisp manual index. When I read your answer I
thought that underlying faces are the faces are the faces I inherit
from. But when I look at (elisp) Face Attributes I see the following:

`:inherit'
     The name of a face from which to inherit attributes, or a list of
     face names.  Attributes from inherited faces are merged into the
     face like an underlying face would be, with higher priority than
     underlying faces.  If a list of faces is used, attributes from
     faces earlier in the list override those from later faces.

Apparently there is a difference between inheritance and underlying
that I don't understand.



On Fri, Mar 13, 2009 at 17:08, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>> Debugger entered--Lisp error: (error "Invalid default face height" 1.1)
>
> This says that you can't specify "1.1 times the underlying face" because
> the default face as no underlying face.
>
>
>        Stefan
>




Severity set to `minor' from `normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Fri, 13 Mar 2009 17:30:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2659; Package emacs. (Mon, 16 Mar 2009 01:40:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Miles Bader <miles <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 16 Mar 2009 01:40:05 GMT) Full text and rfc822 format available.

Message #22 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Miles Bader <miles <at> gnu.org>
To: gnu-emacs-bug <at> moderators.individual.net
Subject: Re: bug#2659: 23.0.91; set-face-attribute :height float on a Mac
Date: Mon, 16 Mar 2009 10:31:54 +0900
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:
>> Debugger entered--Lisp error: (error "Invalid default face height" 1.1)
>
> This says that you can't specify "1.1 times the underlying face" because
> the default face as no underlying face.

Note that because the default face height is always absolute and fixed,
it should be easy enough to do what you want by retrieving the current
height and multiplying it yourself.

e.g.
(set-face-attribute 'default nil
                    :height (truncate
                             (* (face-attribute 'default :height) 1.1)))

-Miles

-- 
Virtues, n. pl. Certain abstentions.





Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Thu, 03 Feb 2011 06:48:01 GMT) Full text and rfc822 format available.

Notification sent to Alex Schröder <kensanata <at> gmail.com>:
bug acknowledged by developer. (Thu, 03 Feb 2011 06:48:02 GMT) Full text and rfc822 format available.

Message #27 received at 2659-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 2659-done <at> debbugs.gnu.org
Subject: Re: bug#2659: 23.0.91; set-face-attribute :height float on a Mac
Date: Thu, 03 Feb 2011 01:55:59 -0500
Version: 23.3

Tried to improve the doc-string of set-face-attribute, and the error message.
The lispref already seems pretty clear on this.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 03 Mar 2011 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 114 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.