GNU bug report logs - #71085
text-scale-adjust does not adjust margin width

Previous Next

Package: emacs;

Reported by: Emre Yolcu <mail <at> emreyolcu.com>

Date: Tue, 21 May 2024 00:04:02 UTC

Severity: normal

Tags: notabug

Full log


View this message in rfc822 format

From: Emre Yolcu <mail <at> emreyolcu.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 71085 <at> debbugs.gnu.org
Subject: bug#71085: text-scale-adjust does not adjust margin width
Date: Tue, 21 May 2024 16:10:14 -0400
> I don't see a need for it, sorry.
Got it. Thanks for discussing it anyway. I don't want to keep the thread  
going for too long, but I want to reply to some of your comments and leave  
it at that. (Maybe the discussion will be useful in the future, on the off  
chance that the issue gets revisited.)

>>> I don't understand the expectations: the window and frame geometry are
>>> not changed by text-scale-adjust, so why did you expect the window
>>> margins to change?  The margins are part of the window geometry.
>> I was not thinking of the margins as part of the window geometry but as
>> a special part of the buffer that we set aside and do not interact with.
>
> Well, but the fact is the margins _are_ part of the window geometry.
> And window geometry doesn't change when text size is scaled.  So this
> is a de-facto behavior Emacs had for several releases now, and we must
> preserve it.
FWIW, some wording in the Emacs manual suggests, at least for me, the  
interpretation that margins are to be viewed as part of the buffer. From  
Section 41.16.5: "A buffer can have blank areas called display margins on  
the left and on the right. Ordinary text never appears in these areas,  
..." On the other hand, the function for setting margin widths is called  
"set-window-margins".

>> A much nicer workaround would be possible if there
>> existed a "margin" face: text-scale-mode could simply remap it as it
>> does the default face.
>
> Actually, you want a face that will _not_ be remapped, since you want
> to make sure the text in the margins will not get clipped.  The
> current behavior is that by default the text in the margin is already
> remapped, which is why it can get clipped if it becomes too wide.
By remap here I mean that it will remap the margin face *back* to the  
original height. The current behavior does not explicitly touch (remap)  
the text in the margin, so the height gets determined by the buffer-local  
height of the default face. If enabled, the option would make  
text-scale-mode remap the margin face back to the original height to  
prevent the text from getting clipped.




This bug report was last modified 1 year and 30 days ago.

Previous Next


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