[deleted] · 2022-12-06 12:07
[deleted]
jcreed · 2022-12-06 13:34
A new face attribute `:extend` was introduced around then.
In https://www.gnu.org/software/emacs/manual/html_node/elisp/Face-Attributes.html you can see it explained:
> :extend
>
> Whether or not this face will be extended beyond end of line and will affect the display of the empty space between the end of line and the edge of the window. The value should be t to display the empty space between end of line and edge of the window using this face, or nil to not use this face for the space between the end of the line and the edge of the window.
I think you want to add:
```
(set-face-attribute 'org-block nil :extend t)
```
somewhere to your config.
[deleted] · 2022-12-06 13:35
[deleted]
[deleted] · 2022-12-06 13:39
[deleted]
andyjda · 2022-12-06 14:30
EDIT: I thought you were asking about how to change the color inside your src blocks. As pointed out by another comment, the question might be about how to make the `org-block` face cover the whole block and not just the background of text lines.
Check my answer for the former; the other comment for the latter :)
Here's the output of evaluating `(describe-face 'org-block)`:
```
#("Face: org-block (sample) (customize this face)
Documentation:
Face used for text inside various blocks.
It is always used for source blocks. You can refine what face
should be used depending on the source block language by setting,
‘org-src-block-faces’, which takes precedence.
When ‘org-fontify-quote-and-verse-blocks’ is not nil, text inside
verse and quote blocks are fontified using the ‘org-verse’ and
‘org-quote’ faces, which inherit from ‘org-block’.
Defined in ‘org-faces.el’.
"
```
As you can see from the documentation, you can change this face for specific languages by setting `org-src-block-faces`.
Or, you can simply set its background color to match the default background color of your theme.
Be aware that `org-block-begin-line` and `org-block-end-line` are separate faces (at least they are in Emacs 29; not sure about earlier versions). To make them have the same background as `org-block-face`, you can set their `inherit` property.
Let me know if any of that is not clear
jcreed · 2022-12-06 14:43
I didn't realize org let you customize block faces based on language! That's cool, thanks for that.
golden_bear_2016 · 2022-12-06 16:26
What a hero
jcreed · 2022-12-06 17:09
This worked for you, then? Happy to hear it.
npsimons · 2022-12-06 17:16
This is the kind of content I keep coming back to reddit for - even though I have no strict use for this right now, it's damn handy, and damn cool! Thanks!
andyjda · 2022-12-06 17:39
ahah thank you! I think Emacs's built-in \*Help\* system deserves most of the credit here. It was really a game-changer for me once I got used to using it
luiggi_oasis · 2022-12-06 20:14
Toggles in emacs are beautiful, it's like emacs programmers think it through and anticipate 99% of everyone's needs.
varsderk · 2022-12-06 22:51
And the remaining 1% write packages and extensions for the rest of us to enjoy if it tickles our fancy.
UnidentifiedSkinny · 2022-12-07 04:54
I cannot imagine living in an editor where your only recourse is to submit a feature request to Microsoft