From: Gregory Heytings <gregory@heytings.org>
To: "Rudolf Adamkovič" <salutis@me.com>
Cc: 59122@debbugs.gnu.org, Stefan Kangas <stefankangas@gmail.com>
Subject: bug#59122: 29.0.50; global-text-scale-adjust not working
Date: Thu, 10 Nov 2022 08:33:23 +0000 [thread overview]
Message-ID: <b415ac7a101116ff2f2a@heytings.org> (raw)
In-Reply-To: <m2cz9v1wor.fsf@me.com>
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
>
> So, I tried the patch (applied on top of 04ade0508d) and it does not fix
> the problem. After `M-x global-text-scale-adjust RET', the command
> immediately makes the font larger (without me ever pressing `+'), and
> `-' still does nothing.
>
Thanks. Can you try the attached patch instead, and post what you see in
*Messages*?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: debug.patch --]
[-- Type: text/x-diff; name=debug.patch, Size: 2083 bytes --]
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 432385587b..28ab3d2fb1 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -461,6 +461,8 @@ global-text-scale-adjust-limits
(defvar global-text-scale-adjust--default-height nil)
+(defvar global-text-scale-adjust--increment-factor 5)
+
;;;###autoload (define-key ctl-x-map [(control meta ?+)] 'global-text-scale-adjust)
;;;###autoload (define-key ctl-x-map [(control meta ?=)] 'global-text-scale-adjust)
;;;###autoload (define-key ctl-x-map [(control meta ?-)] 'global-text-scale-adjust)
@@ -499,16 +501,26 @@ global-text-scale-adjust
(cur (face-attribute 'default :height))
(inc
(pcase key
- (?- (* (- increment) 5))
+ (?- (* (- increment)
+ global-text-scale-adjust--increment-factor))
(?0 (- global-text-scale-adjust--default-height cur))
- (_ (* increment 5))))
+ (_ (* increment
+ global-text-scale-adjust--increment-factor))))
(new (+ cur inc)))
(when (< (car global-text-scale-adjust-limits)
new
(cdr global-text-scale-adjust-limits))
(let ((frame-inhibit-implied-resize
(not global-text-scale-adjust-resizes-frames)))
- (set-face-attribute 'default nil :height new)))
+ (message "global-text-scale-adjust %d -> %d" cur new)
+ (set-face-attribute 'default nil :height new)
+ (when (= cur (face-attribute 'default :height))
+ (setq global-text-scale-adjust--increment-factor
+ (1+ global-text-scale-adjust--increment-factor))
+ (message "global-text-scale-adjust %d, trying again with %d"
+ (face-attribute 'default :height)
+ global-text-scale-adjust--increment-factor)
+ (global-text-scale-adjust increment))))
(when (characterp key)
(set-transient-map
(let ((map (make-sparse-keymap)))
next prev parent reply other threads:[~2022-11-10 8:33 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 12:28 bug#59122: 29.0.50; global-text-scale-adjust not working Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-08 12:42 ` Eli Zaretskii
2022-11-08 12:47 ` Gregory Heytings
2022-11-08 21:48 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-09 3:33 ` Eli Zaretskii
2022-11-09 10:00 ` Gregory Heytings
2022-11-09 13:28 ` Stefan Kangas
2022-11-09 13:39 ` Gregory Heytings
2022-11-09 14:30 ` Stefan Kangas
2022-11-09 14:36 ` Robert Pluim
2022-11-09 14:43 ` Stefan Kangas
2022-11-09 14:48 ` Robert Pluim
2022-11-09 14:47 ` Gregory Heytings
2022-11-09 14:59 ` Stefan Kangas
2022-11-09 15:20 ` Robert Pluim
2022-11-09 14:36 ` Gregory Heytings
2022-11-09 14:51 ` Eli Zaretskii
2022-11-09 14:59 ` Eli Zaretskii
2022-11-09 15:25 ` Robert Pluim
2022-11-09 16:02 ` Gregory Heytings
2022-11-09 16:55 ` Eli Zaretskii
2022-11-10 0:44 ` Stefan Kangas
2022-11-10 7:56 ` Eli Zaretskii
2022-11-09 16:01 ` Gregory Heytings
2022-11-09 16:53 ` Eli Zaretskii
2022-11-09 16:18 ` Gregory Heytings
2022-11-10 0:26 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-10 8:33 ` Gregory Heytings [this message]
2022-11-10 16:16 ` Stefan Kangas
2022-11-10 17:00 ` Gregory Heytings
2022-11-11 16:05 ` Stefan Kangas
2022-11-13 0:23 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-13 3:05 ` Stefan Kangas
2022-11-13 6:59 ` Eli Zaretskii
2022-11-13 13:06 ` Stefan Kangas
2022-11-13 9:18 ` Gregory Heytings
2022-11-13 13:48 ` Stefan Kangas
2022-11-13 16:33 ` Eli Zaretskii
2022-11-13 19:39 ` Gregory Heytings
2022-11-13 20:09 ` Eli Zaretskii
2022-11-19 15:52 ` Gregory Heytings
2022-11-13 6:57 ` Eli Zaretskii
2022-11-13 9:10 ` Gregory Heytings
2022-11-13 22:37 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-14 0:00 ` Stephen Berman
2022-11-14 3:31 ` Eli Zaretskii
2022-11-09 13:40 ` Eli Zaretskii
2022-11-09 14:35 ` Stefan Kangas
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b415ac7a101116ff2f2a@heytings.org \
--to=gregory@heytings.org \
--cc=59122@debbugs.gnu.org \
--cc=salutis@me.com \
--cc=stefankangas@gmail.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.