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 oHuTIxh/L18ZXgAA0tVLHw (envelope-from ) for ; Sun, 09 Aug 2020 04:44:08 +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 KPdwHxh/L19IHgAAB5/wlQ (envelope-from ) for ; Sun, 09 Aug 2020 04:44:08 +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 56DC6940539 for ; Sun, 9 Aug 2020 04:44:07 +0000 (UTC) Received: from localhost ([::1]:36354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4dBk-0006qt-Sn for larch@yhetil.org; Sun, 09 Aug 2020 00:44:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4dBD-0006qb-Ih for emacs-orgmode@gnu.org; Sun, 09 Aug 2020 00:43:31 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:59620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4dBA-0007b8-Ry for emacs-orgmode@gnu.org; Sun, 09 Aug 2020 00:43:30 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 992377742D; Sun, 9 Aug 2020 00:43:26 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:date:message-id:mime-version:content-type :content-transfer-encoding; s=sasl; bh=4CBH1JkWcnAXYYhMiFefCPw2y Dk=; b=UH0SwIFx6kFb0pWfMIMwnTE9jdKBg2ikBlBOY+9E/ZHjpYzwA0JeioBsa Yz7veJ5AiP3dUOP0mlGnmxvHMRJ/pzWT2vQQkr1rbKxR6BoxcKO+Lc39FUIRXypc 72SUsw0P2Ar00Sc07JRDAFKihX6txVFbmW1i0ma8gCN4mCKye0= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 90B0B7742C; Sun, 9 Aug 2020 00:43:26 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:date:message-id:mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=JMnOFkWYEBWEvIociDKs+R9Csgz69TTja/6QHP17dR4=; b=doGSQDMzcD1yCcdezopcjymTkS5N01X40+w2Csdy9IvqiAM7buduqKzfoTjrSVjgiIfo/B8JIQQHKZzvzWhJ7coF6qn9zDFBkP+0qFkgHijQFMo9S/5nJzEbXkbmsWQW9FR5uHHY64dsA5TM6jXVUXIO1JFcKOSltaZpwN7Od7U= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 07BD37742B; Sun, 9 Aug 2020 00:43:26 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec Subject: Re: Bug#42184: org-fontify-whole-*-line in emacs 27 In-Reply-To: <87o8nmq00s.fsf@gmail.com> Date: Sun, 09 Aug 2020 00:43:25 -0400 Message-ID: <878seotonm.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: DCF7BA32-D9FA-11EA-91D6-2F5D23BA3BAF-24757444!pb-smtp2.pobox.com Received-SPF: pass client-ip=64.147.108.71; envelope-from=kyle@kyleam.com; helo=pb-smtp2.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/09 00:43:26 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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=pass header.d=pobox.com header.s=sasl header.b=UH0SwIFx; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=doGSQDMz; dmarc=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: -1.21 X-TUID: Lw6rPC6GRdBp K=C3=A9vin Le Gouguec writes: > I made patches for both maint and master because > > - the patch for maint has a small conflict in org-compat when applied > against master, > > - I'm not sure which branch will eventually be synchronized with > emacs-27 (assuming we'll include this fix in 27.2). Thanks. This patch is appropriate for maint in my view. > diff --git a/lisp/org-compat.el b/lisp/org-compat.el > index c757355ba..c0f4833a3 100644 > --- a/lisp/org-compat.el > +++ b/lisp/org-compat.el > @@ -101,6 +101,21 @@ is nil)." > (defun org-time-convert-to-list (time) > (seconds-to-time (float-time time)))) >=20=20 > +(defmacro org--extended-face (attributes) > + "Make face that extends beyond end of line. > + > +Up to Emacs 26, all faces extended beyond end of line; getting > +the same behaviour starting with Emacs 27 requires :extend t." > + `(nconc ,attributes (when (>=3D emacs-major-version 27) '(:extend t)))) Two minor thoughts, neither really important: * Style nit-pick: s/when/and/, as the return value is of interest. * I'm guessing your main reason for choosing a macro when a function would do here is to get inline expansion at compile time. However ... > ;;; Emacs < 26.1 compatibility >=20=20 > diff --git a/lisp/org-faces.el b/lisp/org-faces.el > index 30eab9bc6..4c5a51624 100644 > --- a/lisp/org-faces.el > +++ b/lisp/org-faces.el > @@ -393,7 +393,7 @@ follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword." > "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords." > :group 'org-faces) > -(defface org-block '((t :inherit shadow)) > +(defface org-block `((t ,(org--extended-face '(:inherit shadow)))) > "Face text in #+begin ... #+end blocks. > For source-blocks `org-src-block-faces' takes precedence." > :group 'org-faces ... the main thing I wonder is whether this kludge is necessary at all. AFAICT unconditionally including :extend in the face spec doesn't seem to bother earlier Emacs versions. Even if there is a reason to avoid :extend on older versions, it's perhaps an overkill to add a compatibility macro for just one spot. Maybe instead just define it directly in the value for org-block: `(t ,@(and (>=3D emacs-major-version 27) '(:extend t)) :inherit shadow) If org--extended-face stays, org-face.el should be adjusted to load org-compat.el. (`make single' flags this.)