unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Gregory Heytings <gregory@heytings.org>
Cc: cpitclaudel@gmail.com, 48307@debbugs.gnu.org
Subject: bug#48307: Feature request: provide default keybindings to change the font size in all windows
Date: Tue, 25 May 2021 15:31:39 +0300	[thread overview]
Message-ID: <838s43c7v8.fsf@gnu.org> (raw)
In-Reply-To: <e19e2fa8607772efba79@heytings.org> (message from Gregory Heytings on Tue, 25 May 2021 07:58:42 +0000)

> Date: Tue, 25 May 2021 07:58:42 +0000
> From: Gregory Heytings <gregory@heytings.org>
> Cc: 48307@debbugs.gnu.org
> 
> Updated patch attached.

Thanks.

> The main added feature is that face resizing is now bounded (between
> 10 and 500).

Hmm, the GCS frowns on arbitrary limits, so perhaps we should have a
defcustom to control the limits?

> +@kindex C-M-wheel-up
> +  Similarly, to change the height of the default face globally, type
> +@kbd{C-x C-M-+}, @kbd{C-x C-M-=}, @kbd{C-x C-M--} or @kbd{C-x C-M-0},
> +or scroll the mouse wheel with both the @kbd{Ctrl} and @kbd{Meta}
> +modifiers pressed.  To enable frame resizing when the height of the
> +default face is changed globally, customize the variable
> +@code{global-text-scale-adjust-resizes-frames} (@pxref{Easy
> +Customization}).

The last part should explain why frame resizing is related to font
size changes, it isn't obvious.

Also, I wonder whether we should say "height of the default face's
font", because this is what this actually does.  I'm not sure every
user will understand the notion of the height of a face.

And finally, "height" or "size"?

> +(defun global-text-scale-adjust (increment)
> +  "Globally adjust the height of the default face by INCREMENT.
> +
> +INCREMENT may be passed as a numeric prefix argument.

The last sentence should start with "Interactively, ".  Also, the doc
string should tell what are the units of INCREMENT.

> +The adjustment made depends on the final component of the key binding
> +used to invoke the command, with all modifiers removed:

I wonder if we could rephrase this to be less awkward and more clear.

> +After adjusting, further adjust the default face height as long as the
> +key, with all modifiers removed, is one of the above characters.

And this.

> +Buffer-local face adjustements remain in effect when global face
> +adjustments are made.

I don't think I understand what this means, so it would be good to
clarify that.

> +The variable `global-text-scale-adjust-resizes-frames' controls whether
> +the frames are resized when the default face is adjusted.

Suggest to say "... resized to keep the same number of lines and
characters per line ...".

> +           (inc
> +            (pcase key
> +              (?- (* (- increment) 5))
> +              (?0 (- global-text-scale-adjust--default-height cur))
> +              (_ (* increment 5))))

Do we really need pcase here?

> +(defun mouse-wheel-global-text-scale (event)
> +  "Increase or decrease the global height of the default face according to the EVENT."

This sentence is too long to fit on a single line.  Suggest to make it
shorter:

  "Increase or decrease the height of the default face according to EVENT."






  reply	other threads:[~2021-05-25 12:31 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-09  7:09 bug#48307: Feature request: provide default keybindings to change the font size in all windows Clément Pit-Claudel
2021-05-09  8:23 ` Eli Zaretskii
2021-05-09 15:31   ` Clément Pit-Claudel
2021-05-09 16:08     ` Eli Zaretskii
2021-05-09 16:39       ` bug#48307: [External] : " Drew Adams
2021-05-09 16:58         ` Eli Zaretskii
2021-05-09 22:30           ` Clément Pit-Claudel
2021-05-09 16:30     ` Drew Adams
2021-05-09  8:43 ` martin rudalics
2021-05-09 15:18   ` Clément Pit-Claudel
2021-05-09 16:05     ` bug#48307: [External] : " Drew Adams
2021-05-10  8:24     ` martin rudalics
2021-05-10 14:17       ` bug#48307: [External] : " Drew Adams
2021-05-10 14:17       ` Gregory Heytings
2021-05-10 14:26         ` Eli Zaretskii
2021-05-10 14:34           ` Gregory Heytings
2021-05-10 14:42             ` bug#48307: [External] : " Drew Adams
2021-05-10 15:07               ` Gregory Heytings
2021-05-10 15:26                 ` Drew Adams
2021-05-10 14:53           ` Clément Pit-Claudel
2021-05-10 15:22             ` bug#48307: [External] : " Drew Adams
2021-05-10 15:36               ` Clément Pit-Claudel
2021-05-10 16:16             ` Eli Zaretskii
2021-05-10 16:26               ` Clément Pit-Claudel
2021-05-10 16:45         ` Clément Pit-Claudel
2021-05-10 18:16           ` Gregory Heytings
2021-05-10 18:34             ` Clément Pit-Claudel
2021-05-10 18:46               ` Eli Zaretskii
2021-05-10 19:04                 ` Clément Pit-Claudel
2021-05-10 19:35                   ` Gregory Heytings
2021-05-10 19:41                     ` Clément Pit-Claudel
2021-05-10 19:47                       ` Gregory Heytings
2021-05-25  7:58                         ` Gregory Heytings
2021-05-25 12:31                           ` Eli Zaretskii [this message]
2021-05-25 12:58                             ` Gregory Heytings
2021-05-25 13:12                               ` Eli Zaretskii
2021-05-25 13:16                                 ` Gregory Heytings
2021-05-25 13:42                                   ` Eli Zaretskii
2021-05-25 19:43                                 ` Lars Ingebrigtsen
2022-07-02 13:41                           ` Lars Ingebrigtsen
2021-05-09 15:58 ` bug#48307: [External] : " Drew Adams
2021-05-09 21:38   ` Clément Pit-Claudel
2021-05-09 20:16 ` Gregory Heytings
2021-05-09 21:36   ` Clément Pit-Claudel
2021-05-09 22:03     ` Gregory Heytings
2021-05-09 22:15       ` Clément Pit-Claudel
2021-05-09 22:56         ` Gregory Heytings
2021-05-10 14:19           ` Eli Zaretskii
2021-05-10 14:24             ` Gregory Heytings
2021-05-10 14:33               ` Eli Zaretskii
2021-05-10 16:24                 ` Gregory Heytings
2021-05-10 14:33               ` bug#48307: [External] : " 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=838s43c7v8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=48307@debbugs.gnu.org \
    --cc=cpitclaudel@gmail.com \
    --cc=gregory@heytings.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).