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, 09 Jul 2020 16:16:33 +0200 Message-ID: <87zh88g4e6.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> 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="1614"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: egh@e6h.org, 42184@debbugs.gnu.org, mail@nicolasgoaziou.fr, bzg@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 09 16:21:04 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 1jtXQ7-0000L2-UP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jul 2020 16:21:04 +0200 Original-Received: from localhost ([::1]:34706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtXQ6-00030s-Qc for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jul 2020 10:21:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtXME-00063S-TB for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 10:17:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtXME-0001pJ-KF for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 10:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jtXME-0002ox-FX for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 10:17:02 -0400 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: Thu, 09 Jul 2020 14:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42184 X-GNU-PR-Package: emacs Original-Received: via spool by 42184-submit@debbugs.gnu.org id=B42184.159430420310815 (code B ref 42184); Thu, 09 Jul 2020 14:17:02 +0000 Original-Received: (at 42184) by debbugs.gnu.org; 9 Jul 2020 14:16:43 +0000 Original-Received: from localhost ([127.0.0.1]:41443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtXLv-0002oN-Dn for submit@debbugs.gnu.org; Thu, 09 Jul 2020 10:16:43 -0400 Original-Received: from mail-wr1-f45.google.com ([209.85.221.45]:46029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtXLt-0002oA-9x for 42184@debbugs.gnu.org; Thu, 09 Jul 2020 10:16:41 -0400 Original-Received: by mail-wr1-f45.google.com with SMTP id s10so2525484wrw.12 for <42184@debbugs.gnu.org>; Thu, 09 Jul 2020 07:16:41 -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=8Za9ppmZO1La9omYJzBJYn37Qq9agqPIYOUrp3YqHds=; b=vKWpar3QGKFHIUpBen7QDdxEf6d4yYbW5KY0C8wc824cDRzbQ15hvilRTgesIN402+ fQV8uYpUsQRObVNDho6RQICiOcm2go5++hq4q+XgXdwrMMhzOza0tkQOE5eFXIeoAZf8 RZv9XathqxL+s+Bq8ICEM59AVZNtOxR+TRHvSLAH5WrR6giQ2gW5US4PbF+s70LkJWPP uj6qy8XlxyqazxVHerz+IdkGtK4NFEAy3JqcVQCnqpkCn7qFBtKEpuATAv4+yuLQlHPa 53zsWnaSsBq5UXjB9ojYvxy2TWqFAGJgEGb6lb9F8dNkPTB3sdEJz9rG/TSsq0GS8pPU 0S6A== 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=8Za9ppmZO1La9omYJzBJYn37Qq9agqPIYOUrp3YqHds=; b=sI5nrJuu1baqcxHXRZKmdirmY6rz+jSJelSC4r+Y4kKFw/RQwH/NhKIAmSKShaOVAh QVQH18lxgJ3Z0VEYO/K+D5Q7kkEk7Gci5XpUdJ9CtxNIxf/k2hlXjMXcs16hEm8JSVKa mc1dSLZ5qiPLHJO7QDvBvRdnxri0WQaYzrnIRx8KIOa3Uele8dfqEQh2wM7/VE5DStCE ImOo5GhhSa9zlA9qc9SxcSN6L5bw+ifSXRNF/82yT64Tc9hi74aV7LPb89iBUnQY5lWF RA2ErPITRqeP8DpSmMIArJn3z10V6vrmvFRGzbWW8RLntoQve4QoEBYVrVNgbBQjwai/ pelg== X-Gm-Message-State: AOAM532qCfT0mgI6xUF11yFvFVIk11GR1K6B3R8JCkYP6ocfu3MOPVwv X+Wa9uCLnR3t0DSMva/rczc= X-Google-Smtp-Source: ABdhPJyxZw40gZUs+a8Pt65Ff+hX/XOocqXjD4DwxkyRHW54hKuLDyNAvZ5MRHf39wpM/+Ct3wn0sg== X-Received: by 2002:adf:e6cb:: with SMTP id y11mr61969317wrm.282.1594304195460; Thu, 09 Jul 2020 07:16:35 -0700 (PDT) Original-Received: from my-little-tumbleweed (200.143.13.109.rev.sfr.net. [109.13.143.200]) by smtp.gmail.com with ESMTPSA id v3sm5864464wrq.57.2020.07.09.07.16.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2020 07:16:34 -0700 (PDT) In-Reply-To: <871rlm1azl.fsf@gmail.com> ("=?UTF-8?Q?K=C3=A9vin?= Le Gouguec"'s message of "Wed, 08 Jul 2020 13:50:54 +0200") 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:182863 Archived-At: --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-org-fontify-whole-line-by-setting-face-extension.patch >From 07d123c548051eb7f6bbac5c7f5a4e4b8411f976 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-compat.el | 4 ++++ lisp/org/org.el | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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.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.27.0 --=-=-= Content-Type: text/plain Should I post this patch to the org-mode mailing list? --=-=-=--