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


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: thomas.hisch <at> ims.co.at, 41852 <at> debbugs.gnu.org
Subject: Re: bug#41852: 27.0.50;
 text-scale commands don't scale header of tabulated-list-mode
Date: Mon, 19 Oct 2020 17:19:52 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Sun, 18 Oct 2020 16:34:23 -0700
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 41852 <at> debbugs.gnu.org
> 
> How about the attached patch?

It's probably a good feature, but it has at least one caveat: setting
that variable non-nil will cause not only the header-line face to be
rescaled, it will also cause any face that inherits from header-line
to be rescaled.  Not sure if this is a problem, but it should be
called out in NEWS, at least.

> +** text-scale-mode
> +
> +---
> +*** text-scale-mode can adjust text height of header line face.
> +When the new buffer local variable 'text-scale-mode-header-line' is
> +non-nil, 'text-scale-adjust' (bound to 'C-x C-+' and 'C-x C--' by
> +default) will also change the text height of the header line face.
> +This feature is intended for use by Emacs Lisp package authors.

This should mention modes that arrange their display in tabular form
below the header-line, such as tabulated-list-mode and its
descendants.  Otherwise the last sentence and the goal of the feature
itself are left on a level that's too abstract.

> -(make-variable-buffer-local 'text-scale-mode-remapping)
> +(make-obsolete-variable 'text-scale-mode-remapping "no longer used." "28.1")
> +
> +(defvar text-scale-mode--remappings nil
> +  "List of current remapping cookies for `text-scale-mode'.")

Why this change?

> +(defvar text-scale-mode-header-line nil

I suggest to name this text-scale-remap-header-line-face.

> +  "If non-nil, also change text height of the header line.")

Not just height, the size.  Also, please say "`header-line' face", and
mention that all the faces that inherit from it will be affected as
well.

> +(defun face-remap--remap-face (sym)
> +  (push (face-remap-add-relative sym
> +                       :height
> +                       (expt text-scale-mode-step
> +                             text-scale-mode-amount))
> +        text-scale-mode--remappings))

I wonder whether this is all there is to it.  The display code doesn't
automatically use the remapped face in all cases, we need to code that
"by hand" in each and every case.  So far we've been doing that only
for the default face; I wonder if we'll have to do something similar
for header-line on the C level...  Please be sure to test this in
every possible way, including cursor motion around such rescaled
header-lines etc.

Thanks.




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.