From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: Kyle Meyer <kyle@kyleam.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug#42184: org-fontify-whole-*-line in emacs 27
Date: Sun, 09 Aug 2020 16:12:48 +0200 [thread overview]
Message-ID: <87eeofaowv.fsf@gmail.com> (raw)
In-Reply-To: <878seotonm.fsf@kyleam.com> (Kyle Meyer's message of "Sun, 09 Aug 2020 00:43:25 -0400")
Kyle Meyer <kyle@kyleam.com> writes:
>> +(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 (>= 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.
OK; I didn't know 'when' had a "for side-effect only" connotation, I was
using it as a shorthand for (if COND FORM nil).
> ... 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.
Huh. Based on the discussion for bug#37774[1][2][3][4], I had assumed
this kind of kludge would be necessary, but both Emacs 25.3 and 26.3
seem to evaluate and byte-compile the following snippet with no errors:
#+begin_src elisp
(defface foobar '((t (:extend t)))
"Test extend in 26.3"
:group 'org-faces)
(custom-set-faces
'(foobar ((t (:extend nil))) t))
#+end_src
Obviously I'm all for removing this shim if it's not needed. From some
light testing it looks like removing it breaks the customization widget,
though?
I'll post a revised patch as soon as someone can confirm or refute my
observations.
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37774#41
[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37774#53
[3] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37774#71
[4] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37774#80
> 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.
Right, that macro dates from an earlier patch, where I unconditionally
set :extend t on a bunch of faces[5]. I agree that it's overkill for
just org-block.
[5] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42184#17
> If org--extended-face stays, org-face.el should be adjusted to load
> org-compat.el. (`make single' flags this.)
(Ugh, I actually got that right in earlier patches.)
Thanks for the review. As I said, I'll post an updated patch as soon as
someone confirms or refutes my impression that :extend messes with the
Customize widget for Emacs <27.
next prev parent reply other threads:[~2020-08-09 14:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 9:23 Couple of issues with org block meta lines faces Sébastien Miquel
2020-07-10 11:46 ` Kévin Le Gouguec
2020-07-14 10:19 ` Bug#42184: org-fontify-whole-*-line in emacs 27 (was: Couple of issues with org block meta lines faces) Kévin Le Gouguec
2020-08-02 21:23 ` Bug#42184: org-fontify-whole-*-line in emacs 27 Kévin Le Gouguec
2020-08-07 0:44 ` Kyle Meyer
2020-08-07 9:26 ` Kévin Le Gouguec
2020-08-09 4:43 ` Kyle Meyer
2020-08-09 14:12 ` Kévin Le Gouguec [this message]
2020-08-09 19:27 ` Kyle Meyer
2020-08-10 13:27 ` Kévin Le Gouguec
2020-08-11 0:43 ` Kyle Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eeofaowv.fsf@gmail.com \
--to=kevin.legouguec@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=kyle@kyleam.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).