emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Org now fontifies code blocks


From: Dan Davison
Subject: [Orgmode] Re: Org now fontifies code blocks
Date: Tue, 07 Sep 2010 09:33:44 -0400
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Richard Riley <address@hidden> writes:

> Dan Davison <address@hidden> writes:
>
>> Richard Riley <address@hidden> writes:
>>
>>> Eric S Fraga <address@hidden> writes:
>>>
>>>> On Thu, 02 Sep 2010 08:51:16 -0700, Dan Davison <address@hidden> wrote:
>>>>> 
>>>>> I've just pushed changes which mean that Org now fontifies code in code
>>>>> blocks. Currently, this is turned on by default, so it would be helpful
>>>>> if people could report any problems, and opinions as to whether it
>>>>> should be on or off by default.
>>>>
>>>> [...]
>>>>
>>>> This is brilliant!  Works very well on my notebook (with small code
>>>> blocks as that's all I tend to have).  Many thanks!
>>>
>>> Without wanting to rock the boat I think its safer to have this disabled
>>> by default. I cant tell you how many times I thought I was in the LISP
>>> buffer and ended up making a mess since this enhancement was added.

I agree it's not obvious what the default should be. The main motivation
for me to defaulting to "on" is simply for new users to see code
fragments look pretty.

>>
>> Hi Richard,
>>
>> I'm not quite clear what problems are arising from Org buffer
>> edits. Could you expand?
>

> Nothing particularly harsh but I find myself reaching for elisp hot
> keys

Right, but that sort of user is the one who will prob know how to turn
it off. I'm more struck by Tom's point that it can be slow with
large/many code blocks.

> and expecting indentation etc to work.

This isn't directly relevant to the fontification default question, but
seeing as you mention this, I'll note that indentation in the Org buffer
is going to work fairly well: first turn on org-src-tab-acts-natively,
and second, assuming my pending patches are accepted, indent-region will
work with C-c C-v C-x C-M-\

or to simplify that key sequence, you will be able to bind functions
like this to a key

  (defun dan/org-comment-dwim (&optional arg)
    (interactive "P")
    (or (org-babel-do-key-sequence-in-edit-buffer "\M-;")
        (comment-dwim arg)))

Dan


> It's no big deal and as I said I
> can config it to revert to the old behaviour. Probably best to forget my
> suggestion of leaving the default as no fontification ;)



reply via email to

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