From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#62675: 29.0.60; emoji-zoom-increase interacts badly with faces Date: Wed, 05 Apr 2023 11:12:31 +0200 Message-ID: <87ttxuhev4.fsf@gmail.com> References: <87y1n6hj7r.fsf@gmail.com> <83v8iasonk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6581"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62675@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 05 11:13:31 2023 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 1pjzCq-0001VV-TW for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Apr 2023 11:13:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjzCS-0000FS-Oj; Wed, 05 Apr 2023 05:13:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjzCR-0000EN-8L for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 05:13:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pjzCQ-000052-QQ for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 05:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjzCP-0007Dr-Rk for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 05:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Apr 2023 09:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62675 X-GNU-PR-Package: emacs Original-Received: via spool by 62675-submit@debbugs.gnu.org id=B62675.168068596127727 (code B ref 62675); Wed, 05 Apr 2023 09:13:01 +0000 Original-Received: (at 62675) by debbugs.gnu.org; 5 Apr 2023 09:12:41 +0000 Original-Received: from localhost ([127.0.0.1]:50905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjzC4-0007D9-Ka for submit@debbugs.gnu.org; Wed, 05 Apr 2023 05:12:41 -0400 Original-Received: from mail-wm1-f47.google.com ([209.85.128.47]:42915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjzC3-0007Cp-Ia for 62675@debbugs.gnu.org; Wed, 05 Apr 2023 05:12:40 -0400 Original-Received: by mail-wm1-f47.google.com with SMTP id m6-20020a05600c3b0600b003ee6e324b19so21565184wms.1 for <62675@debbugs.gnu.org>; Wed, 05 Apr 2023 02:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680685953; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=wLBcVoyF7zcEJJbp19NtmrjAecRVGL7cVbjM1KzfhVg=; b=MOpz5eQhbKNCyhc9FIe3bwDL/Q7pW2XZx5/QMlNi5KzfcFCyJGCmotKF15nBIMnoOm Pn9zI2we4K7F3zYiVg3UebaAAhqQSuCy9ubJdmWKNMOSnusoTr7IX23QIyknB2FkRdDo SrkNnJEXlhd5FeTibqmAJn+arAe/VLDdEx+kuK9IjD4EtmDz81khnPFx/8HKrBLNwbmi h82c1iis9SdPhYk3RXi8K8mhYaxvsD6fEO9Gmwbgcv2fNIi+Yofuw96GAhEUUMUr3tsU D5sBIcw9RH/B90wFEDMH7p9b9C+I6gMNB3QTuiAUR9R9A6tn62GhHQ9+B/hxYp+lfZMI 8L3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680685953; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wLBcVoyF7zcEJJbp19NtmrjAecRVGL7cVbjM1KzfhVg=; b=PHf92c0KyizEZGbfZPIQazrU5ZoDXWExOwCoIRXJ9SZw6vbVtiZ1iN9+vwSdJVqC7s MeAytB9OzPk96T4PnuqJFB/Fnezooy2WLj0WuCmd9I9hBg9WrLii88LUEpk4X5MltC0G lGdW/4uytz1pSK3RLcZWECtSXdMlgCExy+MsdD7H4mtq2MAZLOmk3KVEB2rnzVOUl8TX zURD8ZXhsTsuqMXE5kEo1/WBKuN9/251T3DFeK546a1p5OG1pNUWCSIlyTsHmuKIah4d rNNMmZou+J3CSmI+GgRN94j/9jSAG5K8xal3LheH9TuN7axCH8DAwtt1DGAouMqX1TpZ cfTA== X-Gm-Message-State: AAQBX9dhnaZV4TQgqdPe/3XTk1rBOrGEa83Pan0tqIWjMXMAuYG/gsfL PU+F6zyIDyUTxZIIeuI3///PN9o7Vcs= X-Google-Smtp-Source: AKy350aNC3O4ao+liD7LOVF1auH54cb3BTACk7BwfgQlPmAxNB6LeN4rTVzR4rjr9Zi5oLH2dCpLyQ== X-Received: by 2002:a7b:cd87:0:b0:3df:de28:f819 with SMTP id y7-20020a7bcd87000000b003dfde28f819mr4290267wmj.15.1680685952965; Wed, 05 Apr 2023 02:12:32 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id 21-20020a05600c025500b003f04646838esm1508787wmj.39.2023.04.05.02.12.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 02:12:32 -0700 (PDT) In-Reply-To: <83v8iasonk.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Apr 2023 11:45:35 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259260 Archived-At: >>>>> On Wed, 05 Apr 2023 11:45:35 +0300, Eli Zaretskii said: >> That=CA=BCs not a valid 'face property, unless I=CA=BCm misreading (= info >> "(elisp) Special Properties"), plus the ':height 1.331' bit is wrong, >> that=CA=BCs (expt 1.1 3), not (expt 1.1 4). Yet it works, the height= has >> been increased. Eli> The first "+" doesn't increase the height, though. Hmm, you=CA=BCre right. Although if I then move to a different place in the buffer, and do 'C-x 8 e +' it does increase the height first time. Is this an interaction with font-lock? Oh, and it doesn=CA=BCt work at eob. And increase followed by decrease doesn=CA=BCt get you back to :height 1.0. And there=CA=BCs no reset. I think I=CA=BCll only fix the first one on emacs-29 :-) >> Is this a bug in our interpretation of 'face properties? Eli> Face properties can be specified in many strange ways, and the fact Eli> that some invalid specifications seem to "work" doesn't mean we ha= ve a Eli> bug, it just means some invalid faces fall through the cracks. OK. I=CA=BCll make the code match the documented behaviour, and not worry about it too much =F0=9F=98=80 >> I can fix the code in `emoji-zoom-increase' to produce something like >>=20 >> ((:height 1.4641000000000004) font-lock-comment-delimiter-face) >>=20 >> instead Eli> Please do, and thanks. We don't need to understand why some bug s= eems Eli> to work, it is enough to fix the bug. This seems to work: diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el index bcd4aac4f29..a9ed6e79cc9 100644 --- a/lisp/international/emoji.el +++ b/lisp/international/emoji.el @@ -708,22 +708,24 @@ emoji-zoom-increase FACTOR is the multiplication factor for the size." (interactive) (set-transient-map emoji-zoom-map t nil "Zoom with %k") - (let* ((factor (or factor 1.1)) - (old (get-text-property (point) 'face)) - (height (or (and (consp old) - (plist-get old :height)) - 1.0)) - (inhibit-read-only t)) - (with-silent-modifications - (if (consp old) - (add-text-properties - (point) (1+ (point)) - (list 'face (plist-put (copy-sequence old) :height (* height fa= ctor)) - 'rear-nonsticky t)) - (add-face-text-property (point) (1+ (point)) - (list :height (* height factor))) - (put-text-property (point) (1+ (point)) - 'rear-nonsticky t))))) + (unless (eobp) + (let* ((factor (or factor 1.1)) + (old (get-text-property (point) 'face)) + (height (or (and (consp old) + (plist-get (car old) :height)) + 1.0)) + (inhibit-read-only t)) + (with-silent-modifications + (if (consp old) + (add-text-properties + (point) (1+ (point)) + (list 'face (cons (plist-put (car old) :height (* height fact= or)) + (cdr old)) + 'rear-nonsticky t)) + (add-face-text-property (point) (1+ (point)) + (list :height (* height factor))) + (put-text-property (point) (1+ (point)) + 'rear-nonsticky t)))))) =20 ;;;###autoload (defun emoji-zoom-decrease () Robert --=20