GNU bug report logs - #41852
27.0.50; text-scale commands don't scale header of tabulated-list-mode

Previous Next

Package: emacs;

Reported by: Thomas Hisch <thomas.hisch <at> ims.co.at>

Date: Sun, 14 Jun 2020 13:38:01 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 27.0.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: rudalics <at> gmx.at, 41852 <at> debbugs.gnu.org, thomas.hisch <at> ims.co.at
Subject: bug#41852: 27.0.50; text-scale commands don't scale header of tabulated-list-mode
Date: Fri, 30 Oct 2020 22:53:01 +0200
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Fri, 30 Oct 2020 20:22:58 +0000
> Cc: rudalics <at> gmx.at, thomas.hisch <at> ims.co.at, 41852 <at> debbugs.gnu.org
> 
> > No, only faces that inherit from 'default' are scaled.  And now so
> > will the faces that inherit from 'header-line'.
> 
> When I use my patch in emacs -Q, say `M-x list-buffer' and then evaluate
> this in that buffer:
> 
> (setq-local header-line-format (concat
>                                 (propertize "foo" 'face 'mode-line) " "
>                                 (propertize "bar" 'face 'bold)))
> 
> Both "foo" and "bar" in the header line is scaled with the rest of the
> buffer.  But I don't think either of those faces inherits from the
> header-line face.

Try using fixed-pitch and variable-pitch instead of mode-line and
bold.  What happens then?  And what does that mean for this
discussion?

> > No, not every face inherits from 'default', only those that inherit
> > explicitly.
> 
> `(elisp) Basic Faces' says that they do:
> 
>   ‘default’
>        The default face, whose attributes are all specified.  All other
>        faces implicitly inherit from it: any unspecified attribute
>        defaults to the attribute on this face (*note Face Attributes::).
> 
> So I'm not sure I understand what you are saying.

You said it yourself: "any _unspecified_ attribute".

> > A random face that is defined with defface isn't affected by
> > text-scale-*.
> 
> What do you mean by "random face" here?  When I do this, the text "bar"
> is scaled along with the rest:
> 
> (progn
>   (defface foo-face '((t :weight bold)) "")
>   (pop-to-buffer (get-buffer-create "*test*"))
>   (insert "foo\n")
>   (insert (propertize "bar\n" 'face 'foo-face))
>   (insert "baz\n")
>   (text-scale-increase 1))
> 
> Or could you give an example of where this does not happen?

I just did: fixed-pitch and variable-pitch.  Another example would be
any defface that specifies :height as an absolute number of 1/10
point.

> >>    (progn
> >>     (fundamental-mode)
> >>     (insert (propertize "foo" 'face '(:height 1.5)))
> >>     (text-scale-increase))
> >>
> >> What am I missing?
> >
> > See above.
> 
> Could you elaborate?  What I see is that this anonymous face is scaled.

Because you specified :height as 1.5 times the default, i.e. relative
to the default face.




This bug report was last modified 4 years and 180 days ago.

Previous Next


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