[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: Fontification of blocks
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] Re: Fontification of blocks |
Date: |
Thu, 03 Feb 2011 08:02:19 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Sébastien Vauban <address@hidden> writes:
> Hi Eric(s), Dan & all,
>
> Sébastien Vauban wrote:
>> "Eric Schulte" wrote:
>>> I think that adding a new block delimiter face which inherits from the
>>> org-meta face as you've suggested is the way to go.
>>>
>>> I would recommend however that rather than removing/changing the
>>> org-meta-line, quote and verse delimiting faces to cover the entire line
>>> you simply add the org-block-begin/end-line face overtop of these existing
>>> faces. That way the default behavior is not changed by the patch, and users
>>> have more control over the final display.
>>>
>>> In fact rather than having the org-block-begin/end-line faces inherit
>>> from org-meta-line why not have them begin as empty faces. Do you think
>>> this sounds like a good way to go? If so would you mind submitting a
>>> patch which
>>> - doesn't remove existing faces but rather adds these new faces overtop
>>> of them
>>> - includes of definition of the org-block-begin/end-line faces to empty
>>> faces (otherwise the elisp compiler will warn of references to
>>> undefined variables)
>>>
>>> Also, could you share an example code snippet which initializes the
>>> org-block-begin/end-line faces initialized (either here and/or on worg)?
>>
>> Here a proposition that goes in that direction -- not yet a real patch, but
>> something for you to have a look at. Should be easy to test, at least,
>> that's what I tried to achieve.
>
> Eric (Fraga), David (O'Toole) and Carsten, you should love the following...
> when in native fontification...
>
> #+TITLE: Test file for future patch (for block fontification)
> #+DATE: 2011-02-02
> #+LANGUAGE: en_US
>
> * Abstract
>
> This is the new code that I will supply as a patch. To test it, just
> evaluate the next source block, and please report any problem.
>
> What it does:
>
> - Add 2 faces for the lines delimiting the beginning and the end of
> the source block
>
> - Fixes a tiny bug (affecting the begin delimiter line of source
> blocks) when in "native" fontification (from Dan Davison)
>
> - NEW!! >>> Add a light yellow background in native mode!!! <<< NEW!!
>
Hi Seb,
Thanks for sharing this code. I couldn't help myself but to turn it
into a patch as that has become my favorite way of reviewing new code.
The resulting patch it attached.
seb-faces-for-org-blocks.patch
Description: Text Data
I noticed a couple of issues in the applied patch (possibly due to a
transcription error on my part). Namely
- I believe your default faces only work for white backgrounds
- I didn't notice a change in background for the code blocks
- it seems that the #+end_src line is fontified but the #+begin_src line
is not
An image of my Emacs after applying the patch is available at:
http://i.imgur.com/2eu3z.png
Thanks for sharing, I hope this feedback is helpful.
Best -- Eric
- [Orgmode] Re: Fontification of blocks, (continued)
- [Orgmode] Re: Fontification of blocks, Dan Davison, 2011/02/02
- [Orgmode] Re: Fontification of blocks, Sébastien Vauban, 2011/02/02
- [Orgmode] Re: Fontification of blocks, Dan Davison, 2011/02/07
- [Orgmode] Re: Fontification of blocks, Sébastien Vauban, 2011/02/07
- [Orgmode] Re: Fontification of blocks, Dan Davison, 2011/02/08
- [Orgmode] Re: Fontification of blocks, Sébastien Vauban, 2011/02/08
- [Orgmode] Re: Fontification of blocks, Dan Davison, 2011/02/09
Re: [Orgmode] Re: Fontification of blocks, Eric S Fraga, 2011/02/02
[Orgmode] Re: Fontification of blocks, Sébastien Vauban, 2011/02/02
- Re: [Orgmode] Re: Fontification of blocks, Eric S Fraga, 2011/02/02
- Re: [Orgmode] Re: Fontification of blocks,
Eric Schulte <=
- [Orgmode] Re: Fontification of blocks, Sébastien Vauban, 2011/02/03
- Re: [Orgmode] Re: Fontification of blocks, Eric S Fraga, 2011/02/03
- [Orgmode] Re: Fontification of blocks, Sébastien Vauban, 2011/02/03
- [Orgmode] Re: Fontification of blocks, Sébastien Vauban, 2011/02/04
- Re: [Orgmode] Re: Fontification of blocks, Eric S Fraga, 2011/02/04
- Re: [Orgmode] Re: Fontification of blocks, Eric Schulte, 2011/02/04
- [Orgmode] Re: Fontification of blocks, Sébastien Vauban, 2011/02/06