From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 62275@debbugs.gnu.org
Subject: bug#62275: 28.2; Changing major mode changes the current text scaling
Date: Sun, 19 Mar 2023 18:47:22 +0200 [thread overview]
Message-ID: <83bkkoadt1.fsf@gnu.org> (raw)
In-Reply-To: <SJ0PR10MB548886C751FB38990D90A92EF3839@SJ0PR10MB5488.namprd10.prod.outlook.com> (message from Drew Adams on Sun, 19 Mar 2023 16:03:26 +0000)
> From: Drew Adams <drew.adams@oracle.com>
> Date: Sun, 19 Mar 2023 16:03:26 +0000
>
> emacs -Q
>
> Use the mouse (with `C-') or keys to text-scale the buffer, e.g., to
> enlarge the text size.
>
> M-x emacs-lisp-mode
>
> The text in the buffer (*scratch*) is resized back to its original size.
> Should that happen? If so, why - is that the right behavior?
Face remapping is a buffer-local behavior, and changing the major mode
kills all local variables.
> In addition, if you then do `M-x lisp-interaction-mode', the text size
> doesn't change back to the size you had scaled it to previously.
See above: the text-scale is not specific to the mode, it is a
buffer-local behavior, and modes have no memory of what that scaling
was.
> I can guess that this is happening because changing the mode kills all
> local variables. But is this the intended behavior, i.e., what we want?
It isn't clear why we won't want that.
> I tried doing this, but it didn't fix the behavior.
>
> (put 'text-scale-mode-remapping 'permanent-local t)
> (put 'text-scale-mode-lighter 'permanent-local t)
> (put 'text-scale-mode-amount 'permanent-local t)
You need to do this with face-remapping-alist.
> If there's (also) a good use case for the current behavior then maybe we
> could have a user option, to choose whether a major-mode change resets
> the text scale?
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.
next prev parent reply other threads:[~2023-03-19 16:47 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 [this message]
2023-03-19 17:22 ` Drew Adams
2023-03-19 17:40 ` Eli Zaretskii
2023-03-19 21:50 ` Drew Adams
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=83bkkoadt1.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=62275@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/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).