emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Define new face for the contents of #+RESULTS drawers


From: Ihor Radchenko
Subject: Re: [PATCH] Define new face for the contents of #+RESULTS drawers
Date: Sat, 16 Sep 2023 09:49:50 +0000

Protesilaos Stavrou <info@protesilaos.com> writes:

> I propose the attached patch.  It gives users/themes the opportunity to
> style the contents of #+RESULTS drawers differently than the face
> applied to ~code~ elements.

Thanks for the patch!

> +(defface org-code-results '((t :inherit org-code))
> +  "Face for the contents of #+RESULTS drawers."
> +  :group 'org-faces
> +  :version "30.1")

I think there is some misunderstanding here.
#+RESULTS is not a drawer. A drawer would be

:results:
...
:end:

As for code evaluation results, it can be anything with #+results
keyword. Like

#+results:
: fixed width
: text

or

#+results:
#+begin_example
...
#+end_example

or

#+results:
Simple paragraph of text.

>         ;; Code
> -       '(org-activate-code (1 'org-code t))
> +       '(org-activate-code (1 'org-code-results t))

`org-activate-code' only affects fixed-width text

: like
: this
:
: one

It has no relation to code results, except that fixed width is often
(but not always) used as the default markup for results of evaluation.

If what you are looking for is different formatting for code markup and
fixed-width markup, `org-fixed-width' would be a better face name.

If you are looking for formatting of results of evaluation, it would
need to be a completely new, non-trivial, font-lock-keyword.

-- 
Ihor Radchenko // yantar92,
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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]