emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Face attribute customization is ignored [9.5.5 (9.5.5-gbe2246 @ /home/dav/.emacs.d/straight/build/org/)]
@ 2022-09-22 23:58 David Vicente
  2022-09-24  1:58 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: David Vicente @ 2022-09-22 23:58 UTC (permalink / raw)
  To: emacs-orgmode

Starting with:
	$ emacs -Q


and evaluating

(require 'org)

(set-face-attribute 'org-block nil :extend nil :background "snow2")
(set-face-attribute 'org-block-begin-line nil :extend nil :background 
"snow2")
(set-face-attribute 'org-block-end-line nil :extend nil :background "snow2")

(org-mode)

If we now write something like:


#+BEGIN_SRC
(+ 1 2)
#+END_SRC

The attribute customization of org-block-begin-line and 
org-block-end-line is ignored, i.e, the :extend attribute gets 
overwritten when we start org-mode and ends up with value t.

After inspecting the source code I suspect that it might have something 
to do with org-fontify-whole-block-delimiter-line...

Thanks

Emacs  : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.24.33, cairo version 1.17.6)
  of 2022-04-27
Package: Org mode version 9.5.5 (9.5.5-gbe2246 @ 
/home/dav/.emacs.d/straight/build/org/)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] Face attribute customization is ignored [9.5.5 (9.5.5-gbe2246 @ /home/dav/.emacs.d/straight/build/org/)]
  2022-09-22 23:58 [BUG] Face attribute customization is ignored [9.5.5 (9.5.5-gbe2246 @ /home/dav/.emacs.d/straight/build/org/)] David Vicente
@ 2022-09-24  1:58 ` Ihor Radchenko
  2022-09-24 11:08   ` David Vicente
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2022-09-24  1:58 UTC (permalink / raw)
  To: David Vicente; +Cc: emacs-orgmode

David Vicente <djmvicente@gmail.com> writes:

> The attribute customization of org-block-begin-line and 
> org-block-end-line is ignored, i.e, the :extend attribute gets 
> overwritten when we start org-mode and ends up with value t.
>
> After inspecting the source code I suspect that it might have something 
> to do with org-fontify-whole-block-delimiter-line...

Yes, it does. Just set it to nil, and you will be good to go.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] Face attribute customization is ignored [9.5.5 (9.5.5-gbe2246 @ /home/dav/.emacs.d/straight/build/org/)]
  2022-09-24  1:58 ` Ihor Radchenko
@ 2022-09-24 11:08   ` David Vicente
  2022-09-25  3:29     ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: David Vicente @ 2022-09-24 11:08 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

On 24/09/22 02:58, Ihor Radchenko wrote:
> Yes, it does. Just set it to nil, and you will be good to go.


Won't that have other effects?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] Face attribute customization is ignored [9.5.5 (9.5.5-gbe2246 @ /home/dav/.emacs.d/straight/build/org/)]
  2022-09-24 11:08   ` David Vicente
@ 2022-09-25  3:29     ` Ihor Radchenko
  2022-09-26 11:33       ` David Vicente
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2022-09-25  3:29 UTC (permalink / raw)
  To: David Vicente; +Cc: emacs-orgmode

David Vicente <djmvicente@gmail.com> writes:

> On 24/09/22 02:58, Ihor Radchenko wrote:
>> Yes, it does. Just set it to nil, and you will be good to go.
>
>
> Won't that have other effects?

Hmm. A single side effect will be that the fonts will not be applied to
the newline characters after the begin/end block lines. However, this
difference, AFAIK, only matters when there is :extend face property.

If you want to be really safe, try setting the :extend face property in
org-font-lock-set-keywords-hook or in org-mode-hook.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG] Face attribute customization is ignored [9.5.5 (9.5.5-gbe2246 @ /home/dav/.emacs.d/straight/build/org/)]
  2022-09-25  3:29     ` Ihor Radchenko
@ 2022-09-26 11:33       ` David Vicente
  0 siblings, 0 replies; 5+ messages in thread
From: David Vicente @ 2022-09-26 11:33 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

On 25/09/22 04:29, Ihor Radchenko wrote:
> If you want to be really safe, try setting the :extend face property in
> org-font-lock-set-keywords-hook or in org-mode-hook.

Yep, I was using org-mode-hook to be safe before filling this bug 
report. Thanks!


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-26 11:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 23:58 [BUG] Face attribute customization is ignored [9.5.5 (9.5.5-gbe2246 @ /home/dav/.emacs.d/straight/build/org/)] David Vicente
2022-09-24  1:58 ` Ihor Radchenko
2022-09-24 11:08   ` David Vicente
2022-09-25  3:29     ` Ihor Radchenko
2022-09-26 11:33       ` David Vicente

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).