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#42184: 27.0.91; org-fontify-whole-heading-line does not work in emacs 27 Date: Thu, 06 Aug 2020 11:32:18 +0200 Message-ID: <87tuxgce71.fsf@gmail.com> References: <5effe96e.1c69fb81.3a20a.f99f@mx.google.com> <87mu4f2ofd.fsf@gmail.com> <83wo3jtd0t.fsf@gnu.org> <87h7un2mq9.fsf@gmail.com> <87y2nzvz13.fsf@gmail.com> <83o8ouu200.fsf@gnu.org> <87blkufif5.fsf@gmail.com> <838sfyt3ej.fsf@gnu.org> <871rlqeyrn.fsf@gmail.com> <871rlm1azl.fsf@gmail.com> <87zh88g4e6.fsf@gmail.com> <87zh782z3k.fsf@kyleam.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="25032"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 42184@debbugs.gnu.org Cancel-Lock: sha1:jODdzWg3zWjXoy1cdrY4uCrM0SY= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 06 11:33:09 2020 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 1k3cGr-0006OT-Ca for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Aug 2020 11:33:09 +0200 Original-Received: from localhost ([::1]:55074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3cGq-0004VO-FH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Aug 2020 05:33:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3cGk-0004VF-Gn for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 05:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k3cGk-00074s-80 for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 05:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k3cGk-0002VW-5g for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 05:33:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <5effe96e.1c69fb81.3a20a.f99f@mx.google.com> Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Aug 2020 09:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42184 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.15967063549597 (code B ref -1); Thu, 06 Aug 2020 09:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Aug 2020 09:32:34 +0000 Original-Received: from localhost ([127.0.0.1]:53146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3cGH-0002Ui-IZ for submit@debbugs.gnu.org; Thu, 06 Aug 2020 05:32:34 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:57520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3cGG-0002Ua-53 for submit@debbugs.gnu.org; Thu, 06 Aug 2020 05:32:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3cGF-0004SC-Ut for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 05:32:31 -0400 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:39766 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3cGD-000727-UY for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 05:32:31 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1k3cG9-0005WY-7k for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 11:32:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/06 05:32:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: 20 X-Spam_score: 2.0 X-Spam_bar: ++ X-Spam_report: (2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=no 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:184165 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Kyle Meyer writes: > Kévin Le Gouguec writes: > >> Here is a variant of the previous patch, which correctly resets :extend >> to nil if the user disables the relevant options (after reverting the >> current buffer, or for newly opened ones). >> >> This ends up looking similar to what Org does for org-hide; IMO this >> seems like the most straightforward short-term fix. In the long run, >> these user options would probably deserve :set functions. > > Thanks for working on this fix. I of course can't speak for Bastien or > Nicolas, but this patch looks fine to me. Assuming it's okay with Eli, > I'd suggest applying it to the emacs-27 branch. (Once applied, I'd port > it to the Org repo, as I do with other changes in the Emacs repo that > touch Org files.) Thank you for the review. I hope this can make it into 27.1 since this bug seems to be getting some attention[1][2], but the (tentative?) etc/HISTORY file on the emacs-27 branch makes me wonder if we aren't too close to the release day… > Upstream in the thread you wrote: > >> Relatedly (but not crucial to solving this bug), should org-block and >> org-block-background also have :extend t? It would make sense to me >> since they delimit visual "blocks". > > That would make sense to me as well. OK, here's a patch to do that for org-block: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-org-org-faces.el-org-block-Set-face-extension-b.patch >From e489b09d27a36fdf0366a2fecba31eda475bc14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Thu, 6 Aug 2020 10:59:38 +0200 Subject: [PATCH] * lisp/org/org-faces.el (org-block): Set face extension beyond EOL --- lisp/org/org-faces.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index 30eab9bc6b..eba5a484ac 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el @@ -393,7 +393,7 @@ org-document-info-keyword "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords." :group 'org-faces) -(defface org-block '((t :inherit shadow)) +(defface org-block '((t (:extend t :inherit shadow))) "Face text in #+begin ... #+end blocks. For source-blocks `org-src-block-faces' takes precedence." :group 'org-faces -- 2.28.0 --=-=-= Content-Type: text/plain > (org-block-background hasn't > existed since v8.3, though.) Huh! I guess that calls for a further patch: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-etc-themes-leuven-theme.el-class-Remove-obsolete-fac.patch >From 9b303ca5b717f5ed1ef48cb3a7d40693ec2dc8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Thu, 6 Aug 2020 10:45:39 +0200 Subject: [PATCH] * etc/themes/leuven-theme.el (class): Remove obsolete face --- etc/themes/leuven-theme.el | 1 - 1 file changed, 1 deletion(-) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index 4d8568b7d8..4d8cf0f869 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -515,7 +515,6 @@ leuven `(org-archived ((,class (:foreground "gray70")))) `(org-beamer-tag ((,class (:box (:line-width 1 :color "#FABC18") :foreground "#2C2C2C" :background "#FFF8D0")))) `(org-block ((,class ,code-block))) - `(org-block-background ((,class (:background "#FFFFE0")))) `(org-block-begin-line ((,class (:underline "#A7A6AA" :foreground "#555555" :background "#E2E1D5")))) `(org-block-end-line ((,class (:overline "#A7A6AA" :foreground "#555555" :background "#E2E1D5")))) `(org-checkbox ((,class (:weight bold :box (:line-width 1 :style pressed-button) :foreground "white" :background "#777777")))) -- 2.28.0 --=-=-= Content-Type: text/plain (AFAICT this was the only reference to org-block-background in all Elisp files.) All three patches squashed together: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-org-fontify-whole-line-by-setting-face-extension.patch >From 4328455c2d99ae118fa36401ea89d0e7cbb8c815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Thu, 9 Jul 2020 16:02:49 +0200 Subject: [PATCH] Fix org-fontify-whole-*-line by setting face extension (bug#42184) * lisp/org/org-compat.el (org--set-faces-extend): New function to set face extension, for Emacs versions where this attribute exists. * lisp/org/org.el (org-mode): Call it to set the extend attribute of relevant faces to the correct value. * lisp/org/org-faces.el (org-block): Set face extension beyond EOL. * etc/themes/leuven-theme.el (class): Remove obsolete face. --- etc/themes/leuven-theme.el | 1 - lisp/org/org-compat.el | 4 ++++ lisp/org/org-faces.el | 2 +- lisp/org/org.el | 6 +++++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index 4d8568b7d8..4d8cf0f869 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -515,7 +515,6 @@ leuven `(org-archived ((,class (:foreground "gray70")))) `(org-beamer-tag ((,class (:box (:line-width 1 :color "#FABC18") :foreground "#2C2C2C" :background "#FFF8D0")))) `(org-block ((,class ,code-block))) - `(org-block-background ((,class (:background "#FFFFE0")))) `(org-block-begin-line ((,class (:underline "#A7A6AA" :foreground "#555555" :background "#E2E1D5")))) `(org-block-end-line ((,class (:overline "#A7A6AA" :foreground "#555555" :background "#E2E1D5")))) `(org-checkbox ((,class (:weight bold :box (:line-width 1 :style pressed-button) :foreground "white" :background "#777777")))) diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index c1aaf17ca2..fcc325e475 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -101,6 +101,10 @@ org-table1-hline-regexp (defun org-time-convert-to-list (time) (seconds-to-time (float-time time)))) +(defun org--set-faces-extend (faces extend-p) + (when (fboundp 'set-face-extend) + (mapc (lambda (f) (set-face-extend f extend-p)) faces))) + ;;; Emacs < 26.1 compatibility diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index 30eab9bc6b..eba5a484ac 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el @@ -393,7 +393,7 @@ org-document-info-keyword "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords." :group 'org-faces) -(defface org-block '((t :inherit shadow)) +(defface org-block '((t (:extend t :inherit shadow))) "Face text in #+begin ... #+end blocks. For source-blocks `org-src-block-faces' takes precedence." :group 'org-faces diff --git a/lisp/org/org.el b/lisp/org/org.el index 568f5b9b87..fb31336ea4 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -4944,7 +4944,11 @@ org-mode ;; 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)) ;; Update `customize-package-emacs-version-alist' (add-to-list 'customize-package-emacs-version-alist -- 2.28.0 --=-=-= Content-Type: text/plain [1] https://orgmode.org/list/87365za8yk.fsf@gmail.com/t/#mac68a8ca95f64cb3fe7161bb44454253aad39fd6 [2] https://old.reddit.com/r/emacs/comments/i26n46/why_does_my_orgmode_look_different_to_leuven/ --=-=-=--