From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#60841: 30.0.50; kill-ring-save pauses despite region being highlighted Date: Wed, 18 Jan 2023 23:16:34 +0100 Message-ID: <87y1pzo5dp.fsf@gmail.com> References: <87h6wrs71h.fsf@gmail.com> <83zgai4peg.fsf@gnu.org> <5583fd58387746ce7ddc@heytings.org> <87cz7dbns0.fsf@gmail.com> <4c2c6cf44ad37e405b06@heytings.org> <878ri0g6ob.fsf@gmail.com> <83pmbc0yxo.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="38412"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: gregory@heytings.org, 60841@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 18 23:17:21 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 1pIGkC-0009nm-TQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Jan 2023 23:17:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIGjx-0008TT-5C; Wed, 18 Jan 2023 17:17:05 -0500 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 1pIGjv-0008T0-FZ for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2023 17:17:03 -0500 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 1pIGju-00077e-Uw for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2023 17:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIGju-0004uk-MM for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2023 17:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jan 2023 22:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60841 X-GNU-PR-Package: emacs Original-Received: via spool by 60841-submit@debbugs.gnu.org id=B60841.167408020418842 (code B ref 60841); Wed, 18 Jan 2023 22:17:02 +0000 Original-Received: (at 60841) by debbugs.gnu.org; 18 Jan 2023 22:16:44 +0000 Original-Received: from localhost ([127.0.0.1]:41990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIGjc-0004tq-FA for submit@debbugs.gnu.org; Wed, 18 Jan 2023 17:16:44 -0500 Original-Received: from mail-wr1-f41.google.com ([209.85.221.41]:44934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIGja-0004tb-8p for 60841@debbugs.gnu.org; Wed, 18 Jan 2023 17:16:42 -0500 Original-Received: by mail-wr1-f41.google.com with SMTP id bk16so55042wrb.11 for <60841@debbugs.gnu.org>; Wed, 18 Jan 2023 14:16:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8h/Taf11WmFbI+qTbnUm6QxbpYM84GhU6ALioqvE6c8=; b=eLWeHMlTnVCeEWFAt9qEAASOSUCW732WF3G3OC3ykjgpVJAlaY1wym0oajRk2ZBTMF iPgjyEnXzwlT+Sh7q+ZittSTIxaf8V1e0E97kjHee9nLLOg/7yYisKA4CwuulC3gxFh+ 4+u3VRPANw/Zbq37EgVFvPr2a6Lrrsaz3ixvbnoopTvQZ04/cpm9ywbA8IyJoV8Qs/wz xpHQOWIVEz872tdCXo1y/QllbrPoCbVt0KQ2H32ysjvoZdp7kw2R8Q5hneExcy0ZcKH6 WcDCg1v+DSviPYDtvazY0MfyVXwY5pBtOGR5hx9h5METmI84o9swZdm0is+wx+ePP7Bm ytkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent: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=8h/Taf11WmFbI+qTbnUm6QxbpYM84GhU6ALioqvE6c8=; b=BI09Sa3a/LUINIf6pQzc6d4lFJpgoRdcirahJvNy9nhOvnBWZQV7BiLhMJIhgo3LEg 7d0qDKjF/mgIkkZJddBBJqXu//6QqjnVBnmHW4O0tNIRzI92h8wyMWNYFInZ6CEikJlH iI7S7bivW2sWNPfc9usEphQRQKSYEvhSNiGuNRe5pmoW5V3+xw5tx0kFAe+C1MWrdrU4 qz1SSji2iOHEJgwVy7+uBX2VuOVilE9S5p5BqDqAghJJN7/Oh891Z831hpqRJBYY8NgQ r5l+Euyr7KhfxaCcl2Lcxs8i+n+HVUTjxxiGdG5uo5awNWU27tS8VEz47DRQxUu2idpL rbEA== X-Gm-Message-State: AFqh2kru+1g7AjdXiP87oHkKsviN5aVWb6+o5UkDCZFNARvrBpIYT++8 9C/HFanW04eCdcuN/X2oK0qbfNbijgM= X-Google-Smtp-Source: AMrXdXs2eGdaJD2OwN1wDDOsz6Hb743xTKfUJgXjp3FGjEjrL58+c/AMWfvPQjCDV0Djha77o8YoMw== X-Received: by 2002:a05:6000:1049:b0:2bb:ee8a:4282 with SMTP id c9-20020a056000104900b002bbee8a4282mr7363182wrx.34.1674080195952; Wed, 18 Jan 2023 14:16:35 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id s1-20020a5d4ec1000000b002882600e8a0sm32431087wrv.12.2023.01.18.14.16.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 14:16:35 -0800 (PST) In-Reply-To: <83pmbc0yxo.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Jan 2023 15:12:03 +0200") 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:253667 Archived-At: Eli Zaretskii writes: > Sorry, but I don't think I understand what you are proposing. In the message you reply to, not much (and it was quite ingrate of me to inflict that wall of text on this list, without the shadow of a conclusion; apologies, will do better next time). The message before that had a proposal, FWIW: > So, >=20 > * :extend nil for both: they display differently (region will not be > extended, default will be), > * :extend t for both: they display the same, > * default has nil, region has t: they display the same, > * default has t, region has nil: they display differently. >=20 > Ergo, assuming (a) I didn't mess something up (b) this is the expected > behaviour, it seems that when considering :extend, > (face-differs-from-default-p FACE FRAME) should check >=20 > (1) whether FACE's :extend is nil (regardless of default's :extend), > and > (2) whether FACE's :underline or :background are "supported", as > reported by display-supports-face-attributes-p. ( Gregory then suggested that this example, from that same message=E2=80=A6 (set-face-background 'region (face-background 'default nil t)) =E2=80=A6 is contrived, and shouldn't justify special-casing :extend in face-differs-from-default-p (well, shouldn't justify "adding too much complexity"). To which I replied that the current code in indicate-copied-region was in answer to an actual user doing=E2=80=A6 (set-face-attribute 'region nil :background 'unspecified) =E2=80=A6 which runs afoul of the same problem as my contrived example: 'r= egion remains "visually different" from 'default according to face-differs-from-default-p because of :extent, but for the purposes of indicate-copied-region, it _shouldn't_ be. ) Now Gregory also suggested just adding an optional list of ignored attributes to face-differs-from-default-p's parameters, so that indicate-copied-region can set it to '(:extend) (IIUC; Gregory, let me know if I've misunderstood). And TBH I don't have a problem with this suggestion: it punts to the caller, who can do TRT; it keeps face-differs-from-default-p relatively simple, we can go with that. My only objection is that I can't imagine a caller ever wanting to _not_ pass '(:extend), but I admit that my own "proposition" sounds convoluted. (Hm, and against my better judgement I went ahead and compared gui_supports_face_attributes_p vs tty_supports_face_attributes_p, and I see that they handle :extend differently and *mashes C-c C-c with forehead before fingers can type another wall of text*)