unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "62275@debbugs.gnu.org" <62275@debbugs.gnu.org>
Subject: bug#62275: 28.2; Changing major mode changes the current text scaling
Date: Sun, 19 Mar 2023 21:50:29 +0000	[thread overview]
Message-ID: <SJ0PR10MB54886D03181C0CDEEC7E1387F3839@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <835yawabc3.fsf@gnu.org>

> Text-scaling works via face-remapping.

Yes, I know.  Again, it's not about _setting_
the scale once and for all.  It's not about a
user preference/option.  It's about interactive
change (such as what `text-scale-mode' does via
`face-remap-add-relative').

> > > Sounds like creeping featurism to me.  If you want the text size
> > > larger, then why not customize the default face, and have that done
> > > once and for all?  Text-scale is by definition a temporary measure.
> >
> > I don't want the text size larger in general or by default - of any
> face, let alone face `default'.
> 
> But that's what text-scaling does: it enlarges
> the default face's font.

You seem to be dancing around this.  Text-scaling
does NOT "customize the default face".

What's more, actually changing the font of face
`default' is the same as changing frame property
`font'.

And doing that changes the text size for ALL
windows in the frame - whatever buffers they
show, not just a single buffer.  And it does NOT,
as does text-scaling, change the text size for
all windows, on all frames, that display a given
buffer.

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.

> > It's about interactive use of `text-scale-adjust`.  Seems to me its
> behavior should be only buffer-specific and not affected by a major-mode
> change.  Is that not a reasonable behavior to want, if not even generally
> _expect_?
> 
> No, not IMO.

OK.  Too bad.

AFAICT, what you said here repeats what I said:

  changing the major mode kills all local variables

and:

  the text-scale ... is a buffer-local behavior,
  and modes have no memory of what that scaling was.

I pointed out those things at the outset.

I was thinking that making those 3 buffer-local
variables permanently buffer-local would provide
that missing memory.  But it seems that making
`face-remapping-alist' permanently local does
just what I want.

I've added that possibility to my little library
`face-remap+.el', as a (global) minor mode.  The
library also provides another optional behavior
for text-scaling (also rejected for Emacs).

Might as well close this request as "won't fix",
I guess.  Thx.





  reply	other threads:[~2023-03-19 21:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19 16:03 bug#62275: 28.2; Changing major mode changes the current text scaling Drew Adams
2023-03-19 16:47 ` Eli Zaretskii
2023-03-19 17:22   ` Drew Adams
2023-03-19 17:40     ` Eli Zaretskii
2023-03-19 21:50       ` Drew Adams [this message]
2023-03-20 11:58         ` Eli Zaretskii
2023-03-20 16:19           ` Drew Adams
2023-03-20 17:00             ` Eli Zaretskii
2023-03-20 17:24               ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB54886D03181C0CDEEC7E1387F3839@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=62275@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).