From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8Bu8BexPMV+fKgAA0tVLHw (envelope-from ) for ; Mon, 10 Aug 2020 13:47:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iH2PAexPMV9SJQAAB5/wlQ (envelope-from ) for ; Mon, 10 Aug 2020 13:47:24 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9C1629403EE for ; Mon, 10 Aug 2020 13:47:23 +0000 (UTC) Received: from localhost ([::1]:44128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5894-0006gT-Eq for larch@yhetil.org; Mon, 10 Aug 2020 09:47:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k57pd-0002Hv-5F for emacs-orgmode@gnu.org; Mon, 10 Aug 2020 09:27:17 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:36174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k57pb-00007y-Ew for emacs-orgmode@gnu.org; Mon, 10 Aug 2020 09:27:16 -0400 Received: by mail-wr1-x435.google.com with SMTP id 88so8177300wrh.3 for ; Mon, 10 Aug 2020 06:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=X2Sob9CRW2+xM+oWQhrBRhVWMM4zEnBLvkiI4ZQwSes=; b=PL3Yhex5ToG7lLEftVOwFEXyuYa+jhuy8ph441uj3tzakeglBz52+QgMh7PNA0h4NT GzFp2EFMFW0vteBA1/CaWnxtadPLXVZ2M4BUeMBY+/xlVShdS9QN+/NcyVwGPw49oUwP VQCAMNLyVRNcrLWt3JehIh3jLXkthB64HseI3ByihorIB7c8GvBntU2GbcaiA9kH8neR zpSbcyP83UUC5xnQrOrHlfvnNv5dS78KVKb52zopLYw6EWemNSfuLMZUtOQsHei5GBTL 5i0vVmqduIxa4jJOhAQDr8+BCHbGZeB36qSIQ9Ypqeta4RfZP++N/AZfhb3FTixGP6Tt 7lAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=X2Sob9CRW2+xM+oWQhrBRhVWMM4zEnBLvkiI4ZQwSes=; b=ftrAM8QkNs0kRY0+q14PqsmPdMZiVa+AoeeXgpCWW1wnGWuUJ5+LfIWfvGqMq7LGPE k9LAVKqmc6nUueqHhgZCWQLmqCCpiICWH6uml5FoOQ9AScCySdcWTA2MqV38OpidfNG2 4g0UhsjDcZr4i5ljjCV0xe7H5Q+ICuz4pP1NDKFB0/8Sf/HtORARtfMexT2JCnatyMEC KcWw+VHI67u3/vZWwVpQeoXqHGxZDAyZXHoxOz917KK4amvDzzUBI2/pjtIoHhGR2aks IOYfdMZrRTjzI98kFRcPvLhtMeZBvRh/p1oCLPszoJ6vV9aChgqPHOmsQXMPyk1YRHs3 wvUg== X-Gm-Message-State: AOAM532IXPDTdKuWes7ldgLxkrV0LXuRl2kSpwQq/2RBMzanCvqQJelH emBs8WfhA4vqTUBpA9AVDPz2zUcO X-Google-Smtp-Source: ABdhPJwhZtNMWqFk6w7l+RSqZRj4XQPVv1mtafJ+tWnsI4yiBv+twerkjYoIN/eon5rdpgWHfITbgw== X-Received: by 2002:adf:fb01:: with SMTP id c1mr23764686wrr.119.1597066033363; Mon, 10 Aug 2020 06:27:13 -0700 (PDT) Received: from my-little-tumbleweed (200.143.13.109.rev.sfr.net. [109.13.143.200]) by smtp.gmail.com with ESMTPSA id c10sm19765257wrn.24.2020.08.10.06.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 06:27:11 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Kyle Meyer Subject: Re: Bug#42184: org-fontify-whole-*-line in emacs 27 References: <878seotonm.fsf@kyleam.com> <87eeofaowv.fsf@gmail.com> <875z9rtyac.fsf@kyleam.com> Date: Mon, 10 Aug 2020 15:27:10 +0200 In-Reply-To: <875z9rtyac.fsf@kyleam.com> (Kyle Meyer's message of "Sun, 09 Aug 2020 15:27:39 -0400") Message-ID: <87ft8ur5qp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=kevin.legouguec@gmail.com; helo=mail-wr1-x435.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=PL3Yhex5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: ZtD3Oo+Qey2J --=-=-= Content-Type: text/plain Kyle Meyer writes: > Okay, let's go with > > `((t :inherit shadow ,@(and (>= emacs-major-version 27) '(:extend t)))) > > as the org-block spec then. Done; patch attached. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-Fix-org-fontify-whole-line-by-setting-face-extension.patch Content-Transfer-Encoding: quoted-printable >From 41ab9f8f0c2f02f1951a412265b01a9ac5fa5a96 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?K=3DC3=3DA9vin=3D20Le=3D20Gouguec?=3D Date: Fri, 7 Aug 2020 11:04:53 +0200 Subject: [PATCH] Fix org-fontify-whole-*-line by setting face extension (bug#42184) MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * lisp/org-faces.el (org-block): Set background extension beyond end-of-line. * lisp/org-compat.el (org--set-faces-extend): New function to temporarily (re)set :extend for Emacs=E2=89=A527. * lisp/org.el (org-mode): Call it to set the extend attribute of relevant faces to the correct value. --- lisp/org-compat.el | 8 ++++++++ lisp/org-faces.el | 3 ++- lisp/org.el | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index c757355ba..e405df0b5 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -101,6 +101,14 @@ is nil)." (defun org-time-convert-to-list (time) (seconds-to-time (float-time time)))) =20 +(defun org--set-faces-extend (faces extend-p) + "Set the :extend attribute of FACES to EXTEND-P. + +This is a no-op for Emacs versions lower than 27, since face +extension beyond end of line was not controllable." + (when (fboundp 'set-face-extend) + (mapc (lambda (f) (set-face-extend f extend-p)) faces))) + ;;; Emacs < 26.1 compatibility =20 diff --git a/lisp/org-faces.el b/lisp/org-faces.el index 30eab9bc6..ff2b0e611 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -393,7 +393,8 @@ follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword." "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords." :group 'org-faces) =20 -(defface org-block '((t :inherit shadow)) +(defface org-block `((t :inherit shadow + ,@(and (>=3D emacs-major-version 27) '(:extend t)))) "Face text in #+begin ... #+end blocks. For source-blocks `org-src-block-faces' takes precedence." :group 'org-faces diff --git a/lisp/org.el b/lisp/org.el index 007dd6e2a..34c0235c1 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4940,7 +4940,11 @@ The following commands are available: ;; Try to set `org-hide' face correctly. (let ((foreground (org-find-invisible-foreground))) (when foreground - (set-face-foreground 'org-hide foreground)))) + (set-face-foreground 'org-hide foreground))) + ;; Set face extension as requested. + (org--set-faces-extend '(org-block-begin-line org-block-end-line) + org-fontify-whole-block-delimiter-line) + (org--set-faces-extend org-level-faces org-fontify-whole-heading-line)) =20 ;; Update `customize-package-emacs-version-alist' (add-to-list 'customize-package-emacs-version-alist --=20 2.28.0 --=-=-= Content-Type: text/plain > Thanks. Again, thanks for the review! --=-=-=--