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: Tue, 17 Jan 2023 08:53:03 +0100 Message-ID: <87cz7dbns0.fsf@gmail.com> References: <87h6wrs71h.fsf@gmail.com> <83zgai4peg.fsf@gnu.org> <5583fd58387746ce7ddc@heytings.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="23854"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 60841@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 17 08:54:28 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 1pHgnc-00061p-1u for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Jan 2023 08:54:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHgnH-0007LI-N3; Tue, 17 Jan 2023 02:54:09 -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 1pHgnD-0007L3-1d for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 02:54: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 1pHgnC-0006ir-KG for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 02:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pHgnC-00047Q-GD for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 02:54: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: Tue, 17 Jan 2023 07:54: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.167394199615776 (code B ref 60841); Tue, 17 Jan 2023 07:54:02 +0000 Original-Received: (at 60841) by debbugs.gnu.org; 17 Jan 2023 07:53:16 +0000 Original-Received: from localhost ([127.0.0.1]:35580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHgmR-00046O-M0 for submit@debbugs.gnu.org; Tue, 17 Jan 2023 02:53:15 -0500 Original-Received: from mail-wr1-f51.google.com ([209.85.221.51]:46633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHgmN-000468-OW for 60841@debbugs.gnu.org; Tue, 17 Jan 2023 02:53:13 -0500 Original-Received: by mail-wr1-f51.google.com with SMTP id e3so20434418wru.13 for <60841@debbugs.gnu.org>; Mon, 16 Jan 2023 23:53:11 -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=+eKochrdVAbw3ysSKSGr9Gx1aPaP65ofebrZmN9k33Q=; b=SKCVgwAuywcEFFUzULGY/rDw/QMwDD0SjC60SJP8w7ksc+jGIgCpzlcjVZNg5pbUVZ VLcJ78IfA/JNXO/AHc+HhZ0eNazSrd4N3kVg4ZdBIIV9TOoXkxlH6nCalNyFQPDlyz/z 06vugWZkL/YjUpQASp5RmkM7zYzyU2wj4Www+FZ8B7y93g8ihewK0KQTmJ4Jeo+5QsTn Djg9n12Oi255DZtVcVe3MOpRJd43A8XfG8fTwZfT2a79eGSSOAz6aqwakm18Bvl6u82C pm0S0ucEn07xy/6t1b8j+rYPTLwqxR0Ca+QUlmoDikaJG1vX/U3w2QYjuqyjYD/EUY9U 6kLA== 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=+eKochrdVAbw3ysSKSGr9Gx1aPaP65ofebrZmN9k33Q=; b=vw6YS0WhjgQrwPyASGpmUlC9hOb2j7fIEzyyXHuvEVynvyswNA7JY9PwPKGRpvp75F ekfjBkaVfswIKH2rKfCUpHhHHa+mUhfqVeHwACGtjrNKYRy9i3Sle07w0lpI9xXJQ29V FmrwQbsLT9UeEZv76KR+mSvcFyrvESJyo2WWWnVrVECDxI0VOgDBOancJJyff053QERB 75WWG8WoErBt2Nj2zjydOvmneyQMafW5yzCaghHKwvsqixh6rOpfmO+DY5P26OHhWkVm ZZt++dMje9qxll7Nm8xMbG97ATBFsocOknjMImpc8At0dFOk8RynCwt3q/fSO0rA2ZFs 2a4Q== X-Gm-Message-State: AFqh2koQBK4YfUSuzVSTM9yU78pndGDrdzUYp6CuBV1qAhpiqKo0DXJJ NczqlC2mWQDeKpwnROovWwhywo1U0QY= X-Google-Smtp-Source: AMrXdXsuX8R1HkmAF6QCd1l+/a4rJUx5ZkYqhZP82lFG4UuV+/XgZo9LV8URZREf5kcAi1EimOiZVw== X-Received: by 2002:a5d:698e:0:b0:2bd:fa7c:bb9e with SMTP id g14-20020a5d698e000000b002bdfa7cbb9emr1874024wru.6.1673941985329; Mon, 16 Jan 2023 23:53:05 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id l1-20020adfe9c1000000b00289bdda07b7sm27416842wrn.92.2023.01.16.23.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 23:53:04 -0800 (PST) In-Reply-To: <5583fd58387746ce7ddc@heytings.org> (Gregory Heytings's message of "Mon, 16 Jan 2023 22:28:03 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253530 Archived-At: Gregory Heytings writes: >> But it would be better to have there a test which would tell us whether = the >> region face is "visually different" from the default face. Can we do >> something like that? >> > > face-differs-from-default-p? Nice catch; IIUC display-supports-face-attributes-p is what is doing the heavy work. Might need to be made smarter wrt :extend though? (set-face-background 'region (face-background 'default nil t)) (face-differs-from-default-p 'region nil) ; =E2=87=92 :extend AFAICT (from messing around without any kind of scripted recipe, so caveat lector), * :extend nil on 'default does not prevent its background/underline from spanning the whole window width, * but :extend t on 'default does not mean that other faces will be extended, even if they have :extend 'unspecified. (This last point might have gone without saying for the audience; I admit to not knowing enough about face internals to understand which attributes are implicitly "inherited" from 'default) So, * :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. 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 (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. Hope the coffee kicked in and the above made sense.