Subject: bug#30264: 27.0.50; Resizing in `tabulated-list-mode'

From: Eli Zaretskii <[email-masked]>
Date: Sat, 27 Jan 2018 10:20:13 +0200

> From: Matthew Leach <[email-masked]>
> Date: Fri, 26 Jan 2018 22:08:31 +0000
> 
> When in a mode that uses `tabulated-list-mode' as it's parent, the
> resizing of text in such buffers doesn't re-tabulate the contents.
> Recipe:
> 
> emacs -Q
> M-x package-list-packages
> C-x C-=
> 
> AFAICS, the problem is that the header line doesn't scale with C-x C-=.

Faces don't generally scale unless some code makes them scale.  Text
scale changes are implemented via face-remapping-alist, but that alist
doesn't get set for every face on Earth, and neither should it be
(because many faces are not supposed to scale automatically).  C-x C-=
etc. only affect the 'default' face and the faces that inherit from it.

> I've tried looking around the source, but this looks as though the face
> selection for the header line is done in the C source code.

No, the face of the header line is set in faces.el, and it's called
'header-line'.  Note also that tabulated-list-init-header uses the
'fixed-pitch' face for aligning the column headers.

> Any pointers on how to fix this would be appreciated!

FWIW, I don't think this needs to be "fixed": resizing text of
tabulated display makes very little sense to me.  YMMV, of course, but
I personally don't consider this to be a bug.

In any case, to make the header-line scale automatically with the
text, you will have to make its face inherit from 'default'.
Alternatively, you could redefine "C-x C-=" etc. to adjust the scale
of the 'header-line' face, in addition to 'default'.  Neither of which
sounds like a good idea for Emacs in general, which is why I don't
think we should fix this in Emacs.