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: Sun, 05 Jul 2020 18:02:04 +0200 Message-ID: <871rlqeyrn.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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1905"; 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 Sun Jul 05 18:03:13 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 1js76m-0000PL-HX for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jul 2020 18:03:12 +0200 Original-Received: from localhost ([::1]:38344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1js76l-0005IJ-E3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jul 2020 12:03:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1js76c-0005GS-0A for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 12:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49636) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1js76b-0000mK-NQ for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 12:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1js76b-0006ey-JG for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 12:03:01 -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: Sun, 05 Jul 2020 16:03:01 +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.159396494125552 (code B ref 42184); Sun, 05 Jul 2020 16:03:01 +0000 Original-Received: (at 42184) by debbugs.gnu.org; 5 Jul 2020 16:02:21 +0000 Original-Received: from localhost ([127.0.0.1]:32949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js75q-0006dx-NA for submit@debbugs.gnu.org; Sun, 05 Jul 2020 12:02:21 -0400 Original-Received: from mail-wr1-f50.google.com ([209.85.221.50]:35671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js75n-0006di-8x for 42184@debbugs.gnu.org; Sun, 05 Jul 2020 12:02:13 -0400 Original-Received: by mail-wr1-f50.google.com with SMTP id z2so15867709wrp.2 for <42184@debbugs.gnu.org>; Sun, 05 Jul 2020 09:02:11 -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:content-transfer-encoding; bh=HesoDHwrB4iQr/+tczbRTM1V8iH+csP4ep9s7Mx6JvU=; b=MbV3lImpkp81ovBqZnGyahCZiUh8Qh53ox9ioFetRCOuuySiSDwpKwqlTatXwYLact Sixko6gshBXrtIH0FLGHswPYYFVGSkT3jkihD1/mVcdlhJli144fTO/I1/ymcHfsxGT6 1gOsZ3+BssIUVW6vR3OfPx511id62bcNU69iYmzkdIE4oNr4BK/TrnxTgwYMOaiqFsv4 l/poWHwLv/isjZXhHTf78CGN67bi5B83ZIFtFhjxhu+bKMqL4fiO4NZ1QFI2hQUId8OZ NBmQ3f45XferlrCTtpOQhOqn7FWWPEDsA+fxrnxV8H/VqOnvTP0iOa6/zlBe+0kV8faV /ILA== 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:content-transfer-encoding; bh=HesoDHwrB4iQr/+tczbRTM1V8iH+csP4ep9s7Mx6JvU=; b=jip5GH/4jqPLxK+7nkPx97hHBvs2Jqgx9wxy+YWSt+62V/e12v3rkfPjZIgfHlSOYj 765nBV+XYK5AmNSldIZMzYwma2algTjNKb6i3XyxablVZUQI8+++g5y9OZJk/nagtfiA 2WDe9uFb63M5pVyrO3EIt2B4WgWWMpz8mIZfaJ/okLY2lVMHV+xQBrgd46exCz8ZCinO Uqu+DII1KfbuXpcLSYFtQII28Goe0oaNw5Q8z6OKj+RQAX61Ffd5Of/594v7pLDY8wUC heoxSNelsRRgvedgMWaf9DpxfppshnmSzkkni0tfhi+5+SEosEji84KjldpREeRO9DEx Faeg== X-Gm-Message-State: AOAM532+VLTq4LiUg1IUshCquQtILwHsbqPrgnRyMwa67tUTL4pUAYet V/VnIF/rnixa53XZXi2YlOA= X-Google-Smtp-Source: ABdhPJyAdp2/hiqvlAyboVUMLl28l9ZXzGR/hM+KigHT7e/8TxfmQEBZus3QnbFtZbJyjJgryYYSOg== X-Received: by 2002:adf:f14c:: with SMTP id y12mr44169666wro.30.1593964925326; Sun, 05 Jul 2020 09:02:05 -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 d28sm22269139wrc.50.2020.07.05.09.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jul 2020 09:02:04 -0700 (PDT) In-Reply-To: <838sfyt3ej.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 05 Jul 2020 17:58:12 +0300") 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:182747 Archived-At: Eli Zaretskii writes: >> The only faces I added were org-level-[3-8], because I don't see why >> different heading levels should not work with >> org-fontify-whole-heading-line. > > The original code only affects certain heading levels, it doesn't > affect all of them. By "the original code", you mean this part in org-set-font-lock-defaults, right? > `(,(if org-fontify-whole-heading-line > "^\\(\\**\\)\\(\\* \\)\\(.*\n?\\)" > "^\\(\\**\\)\\(\\* \\)\\(.*\\)") That seems to apply to all heading levels to me? Group 1 captures all but the last stars, group 2 the last star, and group 3 the heading text? > Which is > another aspect of your proposed patch I'd like to change: it seems to > cause these faces be extended unconditionally, not just under these > optional variables. Or did I miss something? IIUC, org-fontify-whole-heading-line (which predates :extend t) is Org's way of letting users "opt in" to face extension, by applying the org-level-* face to the final newline *iff* this user option is set. Adding :extend t to the face definition thus will not cause the backgrounds to extend unconditionally: as long as the user option is unset, the final newline will not be fontified. >> AFAICT, this is the simplest way to fix org-fontify-whole-heading-line >> and org-fontify-whole-block-delimiter-line for Emacs =E2=89=A527. These= user >> options work under the assumption that simply fontifying the final >> newline is enough to extend attributes past EOL. > > Nevertheless, I would like to see the :extend attribute applied only > under the above options; there's the set-face-extend function for > doing that. OK. That's more or less what I had in mind when I went into my "long-term fix" ideas. Note that Org tries to support older Emacs versions. AFAICT, with my patch, (1) org-fontify-whole-heading-line is fixed for Emacs 27, (2) no further modification is needed for Emacs =E2=89=A426. I can try to cook up a patch based on set-face-extend instead, with all the fboundp fun that entails to prevent byte-compiler warnings with older Emacs versions. I'm not sure where the calls to set-face-extend should be inserted; when setting up the major mode? At this point, I should probably wait for Org maintainers to chime in=E2=80= =A6