[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62275: 28.2; Changing major mode changes the current text scaling
From: |
Drew Adams |
Subject: |
bug#62275: 28.2; Changing major mode changes the current text scaling |
Date: |
Mon, 20 Mar 2023 16:19:22 +0000 |
> > > But that's what text-scaling does: it enlarges
> > > the default face's font.
> >
> > You seem to be dancing around this.
>
> Why the sarcasm/insult? I don't have to have this conversation, and I
> certainly won't if you keep this attitude.
There's neither any sarcasm nor any insult there.
You're apparently seeing what you want to see.
Why do that?
> > Text-scaling does NOT "customize the default face".
>
> Of course, it does.
For some meaning of "customize", perhaps. I didn't
see any use of any `custom*' functions. But I may
not have read the code carefully enough.
> > What's more, actually changing the font of face
> > `default' is the same as changing frame property
> > `font'.
>
> Yes, and that's equivalent to what text-scaling does.
>
> > And doing that changes the text size for ALL
> > windows in the frame - whatever buffers they
> > show, not just a single buffer.
>
> Yes, as expected. Text-scaling, by contrast, is a buffer-local
> behavior, and buffer-local behaviors get reset when the major mode
> changes.
I think you're confirming what I said. Text-scaling
doesn't just change face `default' for a given frame.
If it did then that would affect only that frame, and
it would affect all windows showing any buffer in
that frame.
> > These are different things: (1) zooming a buffer
> > (everywhere) and (2) zooming a frame (all its
> > windows, whatever the buffers) and zooming
> > nothing in any other frame.
>
> Not very different, since we now have
> global-text-scale-adjust and friends.
Interesting. I know nothing about such a command.
I don't see it in Emacs 28.2 (the latest release).
Does it zoom all windows (any buffers) in a frame?
Does it zoom only the current frame?
_____
At any rate, feel free to close this bug, as you
don't want to provide an easy option to make text
scaling be unaffected by major-mode changes in a
buffer. By doing that I mean in a friendlier way
for users than them finding out they can do it by
(put 'face-remapping-alist 'permanent-local t).
Reminder: I proposed doing it. All it takes is a
minor mode with a one-sexp body. I've added that
to my face-remap+.el. If you change your mind
then I'll be glad to be able to remove it.
(define-minor-mode text-scale-keep-mode
"Keep the same text-scaling when a buffer changes major mode.
Disabling the mode restores the vanilla Emacs behavior, where changing
the major mode loses a buffer's current text-scaling. This minor mode
is global: it affects all buffers."
:init-value nil :global t
(put 'face-remapping-alist 'permanent-local text-scale-keep-mode))
- bug#62275: 28.2; Changing major mode changes the current text scaling, Drew Adams, 2023/03/19
- bug#62275: 28.2; Changing major mode changes the current text scaling, Eli Zaretskii, 2023/03/19
- bug#62275: 28.2; Changing major mode changes the current text scaling, Drew Adams, 2023/03/19
- bug#62275: 28.2; Changing major mode changes the current text scaling, Eli Zaretskii, 2023/03/19
- bug#62275: 28.2; Changing major mode changes the current text scaling, Drew Adams, 2023/03/19
- bug#62275: 28.2; Changing major mode changes the current text scaling, Eli Zaretskii, 2023/03/20
- bug#62275: 28.2; Changing major mode changes the current text scaling,
Drew Adams <=
- bug#62275: 28.2; Changing major mode changes the current text scaling, Eli Zaretskii, 2023/03/20
- bug#62275: 28.2; Changing major mode changes the current text scaling, Drew Adams, 2023/03/20