GNU bug report logs - #44315
display property :align-to doesn't update with text-scale-mode

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Thu, 29 Oct 2020 20:37:02 UTC

Severity: wishlist

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 44315 <at> debbugs.gnu.org
Subject: Re: bug#44315: display property :align-to doesn't update with
 text-scale-mode
Date: Fri, 30 Oct 2020 09:31:14 +0200
tags 44315 notabug
severity 44315 wishlist
thanks

> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Thu, 29 Oct 2020 13:36:30 -0700
> 
> 0. emacs -Q
> 1. Evaluate:
> (progn (insert (make-string 60 ?*) "\n")
>        (insert (propertize " " 'display '(space :align-to 60)))
>        (insert "*\n")
>        (text-scale-increase 1))
> 
> The result is that the first line extends beyond the position of the
> "*" character on the second line.

As it should be.  :align-to interprets the number 60 in terms of the
frame's default font width, see the ELisp manual.  And that doesn't
change with text-scale-increase, whose effect is buffer-local.

> I expect them to line up.

You expected a feature that doesn't exists.  To update the alignment
in these cases, we could:

  1) modify the application which uses :align-to to update the
     property values when the scale changes (e.g., by tracking these
     changes in a pre-redisplay-functions hook); or
  2) invent a new form of value for :align-to that would scale with
     the buffer's text scale, for example '(scale . 123)'

Patches welcome.




This bug report was last modified 3 years and 261 days ago.

Previous Next


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