From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: Org now fontifies code blocks Date: Tue, 07 Sep 2010 09:33:44 -0400 Message-ID: <87wrqxn0ef.fsf@stats.ox.ac.uk> References: <8739uvw0hg.fsf@stats.ox.ac.uk> <87vd7j1nck.fsf@stats.ox.ac.uk> <87lj7kqh3f.fsf_-_@stats.ox.ac.uk> <874oe6pwew.wl%ucecesf@ucl.ac.uk> <87lj7ezq78.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=38164 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OsyJ6-00052E-7L for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 09:33:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OsyJ2-0000G4-64 for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 09:33:52 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:60521) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OsyJ1-0000Ft-Ru for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 09:33:48 -0400 In-Reply-To: (Richard Riley's message of "Mon, 06 Sep 2010 20:49:13 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Richard Riley Cc: emacs-orgmode@gnu.org Richard Riley writes: > Dan Davison writes: > >> Richard Riley writes: >> >>> Eric S Fraga writes: >>> >>>> On Thu, 02 Sep 2010 08:51:16 -0700, Dan Davison 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 ;)