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#47026: 28.0.50; Allow Gnus summary faces to extend to end of line Date: Tue, 09 Mar 2021 19:51:10 +0100 Message-ID: <87czw8p3dt.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12139"; mail-complaints-to="usenet@ciao.gmane.io" To: 47026@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 09 20:52:13 2021 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 1lJiOr-00033V-4e for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Mar 2021 20:52:13 +0100 Original-Received: from localhost ([::1]:43364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJiOq-0004Au-5h for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Mar 2021 14:52:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJhSc-0006BR-RM for bug-gnu-emacs@gnu.org; Tue, 09 Mar 2021 13:52:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36389) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJhSc-0002hO-Ji for bug-gnu-emacs@gnu.org; Tue, 09 Mar 2021 13:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJhSc-0000I4-Hy for bug-gnu-emacs@gnu.org; Tue, 09 Mar 2021 13:52: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, 09 Mar 2021 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47026 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16153158791065 (code B ref -1); Tue, 09 Mar 2021 18:52:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Mar 2021 18:51:19 +0000 Original-Received: from localhost ([127.0.0.1]:47935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJhRv-0000H7-2w for submit@debbugs.gnu.org; Tue, 09 Mar 2021 13:51:19 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:56130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJhRs-0000Gy-7t for submit@debbugs.gnu.org; Tue, 09 Mar 2021 13:51:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJhRr-0005T3-Tq for bug-gnu-emacs@gnu.org; Tue, 09 Mar 2021 13:51:15 -0500 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:55789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJhRp-0002MM-UO for bug-gnu-emacs@gnu.org; Tue, 09 Mar 2021 13:51:15 -0500 Original-Received: by mail-wm1-x332.google.com with SMTP id w7so3268387wmb.5 for ; Tue, 09 Mar 2021 10:51:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=BprzHafAlS8pDoJyCYrU66z2YT2U5s4TPNdPagns1Hw=; b=aN5Pr3Bhts47w2REQuSq6NYIzwIlbfeS0EfbLgggONNAvhX3hOD43FJcZisphluUxW +UerbDk6vhG6prHV2AF2CVpEa1A0JQl+09Y6tuvieCgKCe90qRCg81ocXrm+CytWS4oJ YtmN/pVNjkuT4bos37QLDh9B7nG9yD05u2GmR0ZKQywHcNrpw+VU5BI4eBFgnpH1r+GG tu82otOmzHBqOAOZHbLkRlk0zTkyXQhOsNfJVsCLcnna8FI39LrLENaEabn6Rr5z44zd 121VNF73vY4Dn3Tph4PS5R0YT8HN44tWROLxeGGcI9KupXGL6/tda7ysFhBj2v1I6DeO Qg0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=BprzHafAlS8pDoJyCYrU66z2YT2U5s4TPNdPagns1Hw=; b=OokI8aW5mUhZbdoEXhQ6D7GWlXj+YCa0zhc2SENz2JW+cimfV6QwM0cXxMnJpnbQH8 WtHqdMd2CBanRssKLF1P6kLW0LE94uGDPI8w/KyxgC/ii/EFBVQKrB0pTpfayllBHsox yuEVSNfaebG1A0BIpCkRxXmg+yil+s58YKypdPe4CGA8FdRO9P01Fd66dDZkTqQKqa6G 3tduahQMNZ01rKy6xOeH72jjay1MyBjJwgZom4QoH5U8QXPRcsnI3wKmVjqlSGSWiTNq LFcIDw0Bk3GOy4QCV5rSVWBbS6RPCjvl8cl3TNCsNGB/QJYkKNfeDzyV+P+Jt05mL3o5 Ggow== X-Gm-Message-State: AOAM530UC/yibH9/ueomoflY1ytbYlCiCv4sGcT/3p7nQbx0UO+pwm6L ldwO6frj67UJ1lSHnCaTugEuJUZU/sUhyQ== X-Google-Smtp-Source: ABdhPJxe5o8k7Cb1ShoQVjyP9WPlM4mPHY4pL3DUTkXr1JfTyA2R7XQ4QqRCOhEfFWJggFZyao7nbw== X-Received: by 2002:a05:600c:1553:: with SMTP id f19mr5599464wmg.33.1615315871713; Tue, 09 Mar 2021 10:51:11 -0800 (PST) Original-Received: from my-little-tumbleweed ([2a01:e0a:20e:d340:922b:34ff:fe95:9aed]) by smtp.gmail.com with ESMTPSA id s20sm5528986wmj.36.2021.03.09.10.51.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 10:51:11 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=kevin.legouguec@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:201934 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Some themes add a background to the faces Gnus uses to highlight summary lines (e.g. gnus-summary-selected, gnus-summary-cancelled); I'd like to be able to extend that background beyond EOL. Right now Gnus only applies these faces right up to the char *before* EOL; if it were to apply them one char further, users could then set (or unset) the :extend property on these faces. I'm attaching a patch only for demonstration purposes; I do not know whether it should be applied as-is. It does Work For Me=C2=AE, but: (1) Maybe we want to be as flexible as Org, i.e. let users control this behaviour with a user option instead of messing with faces. (Cf. org-fontify-whole-heading-line in org-set-font-lock-defaults) (2) I haven't looked at the whole beg/end vs. from/to vs. mouse-face affair in gnus-highlight-selected-summary, so my patch may fail to DTRT in some circumstances=E2=80=A6 ? Thank you for your time. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index ee74f01393..bf58cf419a 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -12741,7 +12741,7 @@ gnus-highlight-selected-summary ;; so we highlight the entire line instead. (when (= (+ to 2) from) (setq from beg) - (setq to end)) + (setq to (1+ end))) (if gnus-newsgroup-selected-overlay ;; Move old overlay. (move-overlay @@ -12796,7 +12796,7 @@ gnus-summary-highlight-line (let ((face (funcall (gnus-summary-highlight-line-0)))) (unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face)) (gnus-put-text-property-excluding-characters-with-faces - beg (point-at-eol) 'face + beg (1+ (point-at-eol)) 'face (setq face (if (boundp face) (symbol-value face) face))) (when gnus-summary-highlight-line-function (funcall gnus-summary-highlight-line-function article face)))))) --=-=-= Content-Type: text/plain In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.25, cairo version 1.16.0) of 2021-03-06 built on my-little-tumbleweed Repository revision: 6c498786fed219ee8f98092f7921b5a5b1aaca29 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 System Description: openSUSE Tumbleweed Configured using: 'configure --with-xwidgets --with-cairo' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB Important settings: value of $LC_CTYPE: en_US.UTF-8 value of $LC_TIME: en_GB.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix --=-=-=--