Re: [Orgmode] Re: Org now fontifies code blocks
Hi Tom, I've used fontification in Org code blocks constantly for a couple of months now, and I do not agree that there are any editing or unfolding delays which should deter typical Org users from using fontified src blocks. In typical usage I do not experience any delays whatsoever (my blocks tend to be fewer than 100 lines in length). Is Tom perhaps using OSX? I found absurd fontification delays on OSX for various things (*clock task select* was the worst, IIRC) until somebody advised me to (setq font-lock-verbose nil), and that fixed it completely. I don't think it's the actual fontification that's slow, I think it's the (message) that is telling you what it's doing. Jules ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
Maybe my problem is not related to slow folding/unfolding behavior that you are getting, but if I set the org-src-tab-acts-natively variable to t the folding/unfolding of headlines becomes very slow for me. In fact, I was thinking that I had the problem described here, but I just isolated the cause and in my case it was the org-src-tab-acts-natively variable that I had set to t in my .emacs file. -- Darlan At Tue, 7 Sep 2010 06:05:54 -1000, Thomas S. Dye t...@tsdye.com wrote: Hi Dan, Yes, I can confirm that (setq org-src-fontify-natively nil) makes unfolding snappy again. All the best, Tom On Sep 7, 2010, at 3:23 AM, Dan Davison wrote: Thomas S. Dye t...@tsdye.com writes: Aloha Dan, This is really nice. Thanks for shepherding it along. In some of my use cases there is a substantial delay when opening a large file and then unfolding sections with many source code blocks. Hi Tom, I think this is a good point and probably as you say a reason for turning it off by default. Org should be (and was!) lightweight by default. I haven't had time to profile things properly. Before we turn it off, could you please confirm that all your slowness problems go away when you do (setq org-src-fontify-natively nil)? Thanks, Dan I don't mind this and intend to keep the feature on, but I do think it should be off by default because the user potentially pays an appreciable time penalty for the pleasure of semantic source code markup. Thanks again for this nice feature. All the best, Tom On Sep 3, 2010, at 7:30 AM, Eric S Fraga wrote: On Thu, 02 Sep 2010 08:51:16 -0700, Dan Davison davi...@stats.ox.ac.uk 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! -- Eric S Fraga GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
Sébastien Vauban wrote: Hi Bastien and Dan, Bastien wrote: Dan Davison davi...@stats.ox.ac.uk writes: (We badly need a customize group for these org-src but non-babel variables[1]. That suggests to me subsuming the Babel group (Should be Org Babel for consistency?) within a new group, perhaps Org Code or Org Src or Org Source Code ? Views? I find Org Code and Org Source Code rather ambiguous. Org Src is better but still a bit too general IMHO. Org Src Block? The terminology of such code blocks in Noweb was scraps. We often see snippets as well, but (not being English-native), that can be more for pure text (not specifically code). Then, it could be Org Scraps or similar variants. Or chunk, which I subjectively find the most phonetically pleasing. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
On Tue, Sep 7, 2010 at 3:43 PM, Dan Davison davi...@stats.ox.ac.uk wrote: David O'Toole dto1...@gmail.com writes: I agree Bastien :) I agree too, but note that what we are agreeing to is a conditional statement... On Mon, Sep 6, 2010 at 2:30 PM, Bastien bastien.gue...@wikimedia.fr wrote: If setting org-src-fontify-natively to `t' by default triggers a debate on whether we need to set org-warn-when-editing-src-block-in-org-buffer I don't think it is clear that there is such a debate. But I do think we are gravitating towards turning it off, if it is causing noticeable slowness on startup. So unless there are more voices in favour of keeping it turned on for new users then I'll turn it off later today. Just to add to this: After trying it more, I see another reason why it would be good to have it turned off by default. Fontification gives meaning to pieces of text, and that meaning is different in different major modes. So this is watering down the meaning of org-mode syntax font locking. So it is good for experts, but confusing for newbies. So my vote goes to off. I *do* like the idea mentioned earlier to use a different background when fontification is turned on. Just a slight grey instead of white, for example. That would help distinguish things in export mode. - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
Carsten Dominik carsten.domi...@gmail.com writes: I *do* like the idea mentioned earlier to use a different background when fontification is turned on. Just a slight grey instead of white, for example. That would help distinguish things in export mode. +1 Or maybe a different font? People might want to use an Inconsolata-link font for normal text, and a Terminal-like font for code excerpts. -- Bastien ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
I think it'd help for new users to keep it on by default, but since it can be changed, I'm fine either way. How hard would it be to use a property, so it could be changed on a per-file basis? If it's difficult, that time may be better spent profiling and speeding it up. - Tom On Tue, Sep 7, 2010 at 9:43 AM, Dan Davison davi...@stats.ox.ac.uk wrote: David O'Toole dto1...@gmail.com writes: I agree Bastien :) I agree too, but note that what we are agreeing to is a conditional statement... On Mon, Sep 6, 2010 at 2:30 PM, Bastien bastien.gue...@wikimedia.fr wrote: If setting org-src-fontify-natively to `t' by default triggers a debate on whether we need to set org-warn-when-editing-src-block-in-org-buffer I don't think it is clear that there is such a debate. But I do think we are gravitating towards turning it off, if it is causing noticeable slowness on startup. So unless there are more voices in favour of keeping it turned on for new users then I'll turn it off later today. Dan on or off by default, I'd rather set org-src-fontify-natively off by default... My 2 cts, -- Bastien ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
On Tue, Sep 7, 2010 at 4:33 PM, Bastien bastien.gue...@wikimedia.fr wrote: Carsten Dominik carsten.domi...@gmail.com writes: I *do* like the idea mentioned earlier to use a different background when fontification is turned on. Just a slight grey instead of white, for example. That would help distinguish things in export mode. I mean EXPERT mode :) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
Bastien bastien.gue...@wikimedia.fr writes: Carsten Dominik carsten.domi...@gmail.com writes: I *do* like the idea mentioned earlier to use a different background when fontification is turned on. Just a slight grey instead of white, for example. That would help distinguish things in export mode. +1 +2 Or maybe a different font? Since some month I have blue color for such blocks. I simply use `org-block' face for this. C-c ' is so easy to hit. People might want to use an Inconsolata-link font for normal text, and a Terminal-like font for code excerpts. I'll google Inconsolata-link font now... ;) Sebastian ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
Tom Short tshort.rli...@gmail.com writes: I think it'd help for new users to keep it on by default, but since it can be changed, I'm fine either way. How hard would it be to use a property, so it could be changed on a per-file basis? If it's difficult, that time may be better spent profiling and speeding it up. - Tom I think its exactly the opposite : its more dangerous having it on for new users. The reason is the confusion as to what mode you're in (I'm not a new user and I keep tripping up on that as my src blocks are pretty big) and the potential slow up which others have noticed. Maybe the first time you open an org file in a window and it detects src blocks it can even prompt and accept the customised setting there and then and store it. Its a major enough feature to warrant that perhaps? get-buffer-window can be used to determine if its being edited. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
maybe there could be an on-by-default variable called org-warn-when-editing-src-block-in-org-buffer, or make the text readonly, etc. making this on-by-default would seem to create another discussion about things being on-by-default :) however, if fontification is on by default, then this should also be on by default, since fontification causes the mistaken in-org-buffer edits that Richard points out, which seems reasonable to want to prevent systematically. I've done this myself a few times. On Mon, Sep 6, 2010 at 12:59 PM, Richard Riley rile...@gmail.com wrote: Eric S Fraga ucec...@ucl.ac.uk writes: On Thu, 02 Sep 2010 08:51:16 -0700, Dan Davison davi...@stats.ox.ac.uk 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 realise I can configure it myself but possibly the more conservative stick with old default is better? It IS a nice feature when in more capable hands than mine ;) What next? nxhtml integration and live editing inside the src blocks? ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
On 09/06/2010 11:59 AM, Richard Riley wrote: Eric S Fragaucec...@ucl.ac.uk writes: On Thu, 02 Sep 2010 08:51:16 -0700, Dan Davisondavi...@stats.ox.ac.uk 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 realise I can configure it myself but possibly the more conservative stick with old default is better? It IS a nice feature when in more capable hands than mine ;) What next? nxhtml integration and live editing inside the src blocks? I think several people have that setup already. Last I heard a few days ago, there was an issue with editing R that was being resolved. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
If setting org-src-fontify-natively to `t' by default triggers a debate on whether we need to set org-warn-when-editing-src-block-in-org-buffer on or off by default, I'd rather set org-src-fontify-natively off by default... My 2 cts, -- Bastien ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org now fontifies code blocks
I agree Bastien :) On Mon, Sep 6, 2010 at 2:30 PM, Bastien bastien.gue...@wikimedia.fr wrote: If setting org-src-fontify-natively to `t' by default triggers a debate on whether we need to set org-warn-when-editing-src-block-in-org-buffer on or off by default, I'd rather set org-src-fontify-natively off by default... My 2 cts, -- Bastien ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode