Re: Bug: org-block face isn't applied to special blocks
As far as src blocks being treated differently, there's already the ~org-src-block-faces~ variable. How about the following : + Make the ~org-block~ face apply to every block + either - add an ~org-src-block~ face - modify ~org-src-block-faces~ to allow a catch-all case It'd be nice for those to apply to unrecognized languages + keep ~org-fontify-quote-and-verse-blocks~ I think the only users that would notice the difference are the few (?) who use special blocks and expect them not to be fontified. All they'd have to do to restore the previous behavior is set the ~org-src-block~ and unset the ~org-block~ faces. It isn't applied - to src blocks, when the language isn't recognized - to special blocks (that is, blocks with arbitrary names) I make heavy use of special blocks and I'd like this face to apply to them. I also make heavy use of special blocks but, for me, these are often more like verse or quote blocks (i.e. the contents of the block are prose) than src blocks so I would not want them to be treated as src blocks are. I think we'll need to have (yet) another option to control this?
Re: Bug: org-block face isn't applied to special blocks
Hi Sébastien, Sébastien Miquel writes: > As far as I can tell, with 8a083514a7 from master, the situation is > now as follows. > > The org-block face is applied > - to src blocks, when the language is recognized > - to example, export blocks > - to verse and quote blocks, if ~org-fontify-quote-and-verse-blocks~ > is ~t~. > > It isn't applied > - to src blocks, when the language isn't recognized > - to special blocks (that is, blocks with arbitrary names) Exact. > I make heavy use of special blocks and I'd like this face to apply to them. > I think it would make more sense than the current behavior, and is > less surprising. (It is also more in line with the previous > docstring). > > (I also think it should apply to unrecognized src blocks) I agree there is room for improvement, but I'm not sure on what we should be aiming for. -- Bastien
Re: Bug: org-block face isn't applied to special blocks
On Thursday, 10 Sep 2020 at 20:17, Sébastien Miquel wrote: > It isn't applied > - to src blocks, when the language isn't recognized > - to special blocks (that is, blocks with arbitrary names) > > I make heavy use of special blocks and I'd like this face to apply to them. I also make heavy use of special blocks but, for me, these are often more like verse or quote blocks (i.e. the contents of the block are prose) than src blocks so I would not want them to be treated as src blocks are. I think we'll need to have (yet) another option to control this? -- : Eric S Fraga via Emacs 28.0.50, Org release_9.3.7-725-g7bc18e
Re: Bug: org-block face isn't applied to special blocks
Hi Bastien, As far as I can tell, with 8a083514a7 from master, the situation is now as follows. The org-block face is applied - to src blocks, when the language is recognized - to example, export blocks - to verse and quote blocks, if ~org-fontify-quote-and-verse-blocks~ is ~t~. It isn't applied - to src blocks, when the language isn't recognized - to special blocks (that is, blocks with arbitrary names) I make heavy use of special blocks and I'd like this face to apply to them. I think it would make more sense than the current behavior, and is less surprising. (It is also more in line with the previous docstring). (I also think it should apply to unrecognized src blocks) Regards, Sebastien Hi Sébastien Sébastien Miquel writes: Hi Bastien, With latest org-mode master, and emacs -q, run (defface org-block '((t (:background "#494949" :extend t))) "") before loading org-mode, then visit an org buffer containing the three following blocks. When I do so, the org-block face only gets applied to the src block, and not to the quote block, nor the special block. Fixed in maint, as 7769518f3. Thanks for the report again,
Re: Bug: org-block face isn't applied to special blocks
Hi Sébastien Sébastien Miquel writes: > Hi Bastien, > > With latest org-mode master, and emacs -q, > run (defface org-block '((t (:background "#494949" :extend t))) "") > before loading org-mode, > then visit an org buffer containing the three following blocks. > > When I do so, the org-block face only gets applied to the src block, and > not to the quote block, nor the special block. Fixed in maint, as 7769518f3. Thanks for the report again, -- Bastien
Re: Bug: org-block face isn't applied to special blocks
Hi Bastien, With latest org-mode master, and emacs -q, run (defface org-block '((t (:background "#494949" :extend t))) "") before loading org-mode, then visit an org buffer containing the three following blocks. When I do so, the org-block face only gets applied to the src block, and not to the quote block, nor the special block. #+BEGIN_theorem #+END_theorem #+BEGIN_SRC sh #+END_SRC #+BEGIN_QUOTE #+END_QUOTE Regards, Hi Sébastien, Sébastien Miquel writes: Afaict, the org-block face isn't applied to special blocks. Its documentation implies it applies to any block. The relevant function is org-fontify-meta-lines-and-blocks-1. It may be a simple matter of changing the logic a bit and adding (add-face-text-property bol-after-beginline beg-of-endline 'org-block t). Is it still the case with latest master? If so, can you provide a minimal example? Thanks,
Re: Bug: org-block face isn't applied to special blocks
Hi Sébastien, Sébastien Miquel writes: > Afaict, the org-block face isn't applied to special blocks. Its > documentation implies it applies to any block. > > The relevant function is org-fontify-meta-lines-and-blocks-1. > > It may be a simple matter of changing the logic a bit and adding > (add-face-text-property bol-after-beginline beg-of-endline 'org-block > t). Is it still the case with latest master? If so, can you provide a minimal example? Thanks, -- Bastien
Bug: org-block face isn't applied to special blocks
Afaict, the org-block face isn't applied to special blocks. Its documentation implies it applies to any block. The relevant function is org-fontify-meta-lines-and-blocks-1. It may be a simple matter of changing the logic a bit and adding (add-face-text-property bol-after-beginline beg-of-endline 'org-block t).