From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <838s43c7v8.fsf@gnu.org> References: <603bbc01-b1a2-b367-f54e-59a57475cbfe@gmail.com> <333cb576-85c8-6da6-2312-293fa5c44865@gmail.com> <5009beed-08d3-592b-86a6-136b994cbc5b@gmx.at> <0ca4bc1d-a396-6948-83e9-6f82f3e77c0c@gmail.com> <83im3q5swn.fsf@gnu.org> <4363ab35-b2d0-4d10-dd51-6447b58d705e@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="659"; mail-complaints-to="usenet@ciao.gmane.io" Cc: cpitclaudel@gmail.com, 48307@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 25 14:32:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llWEF-000AUy-EA for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 14:32:11 +0200 Original-Received: from localhost ([::1]:58842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llWEE-0002PZ-Gz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 08:32:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llWE6-0002PK-Vs for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 08:32:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llWE6-000271-Gb for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 08:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1llWE6-0004ys-Du for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 08:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 May 2021 12:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48307 X-GNU-PR-Package: emacs Original-Received: via spool by 48307-submit@debbugs.gnu.org id=B48307.162194590919120 (code B ref 48307); Tue, 25 May 2021 12:32:02 +0000 Original-Received: (at 48307) by debbugs.gnu.org; 25 May 2021 12:31:49 +0000 Original-Received: from localhost ([127.0.0.1]:44908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llWDt-0004yK-BT for submit@debbugs.gnu.org; Tue, 25 May 2021 08:31:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llWDs-0004y7-BQ for 48307@debbugs.gnu.org; Tue, 25 May 2021 08:31:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43336) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llWDn-0001uM-4k; Tue, 25 May 2021 08:31:43 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4686 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llWDm-0001Vl-Nl; Tue, 25 May 2021 08:31:43 -0400 In-Reply-To: (message from Gregory Heytings on Tue, 25 May 2021 07:58:42 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207197 Archived-At: > Date: Tue, 25 May 2021 07:58:42 +0000 > From: Gregory Heytings > 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."