GNU bug report logs - #60841
30.0.50; kill-ring-save pauses despite region being highlighted

Previous Next

Package: emacs;

Reported by: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>

Date: Sun, 15 Jan 2023 23:39:01 UTC

Severity: normal

Found in version 30.0.50

Done: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 60841 <at> debbugs.gnu.org
Subject: bug#60841: 30.0.50; kill-ring-save pauses despite region being highlighted
Date: Tue, 17 Jan 2023 08:26:53 +0000
[Message part 1 (text/plain, inline)]
>>> 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?
>

Indeed...

>
> (set-face-background 'region (face-background 'default nil t))
> (face-differs-from-default-p 'region nil)
> ; ⇒ :extend
>

... although that's a really contrived example.

I'm not sure it's TRT to add too much complexity there, so I would suggest 
to add an additional optional argument to face-differs-from-default-p, to 
exclude one or more attributes from the comparison (in this case :extend, 
but someone else might be interested in excluding other attributes in the 
future).

This bug report was last modified 2 years and 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.