[Orgmode] Re: Org now fontifies code blocks
On Oct 28, 2010, at 1:10 AM, Dan Davison wrote: "Thomas S. Dye" writes: On Sep 9, 2010, at 12:35 PM, Dan Davison wrote: "Thomas S. Dye" writes: Hi Dan, Glad to know that Darlan's slowdown is fixed. No change here that I can tell. Now that I've had org-src-fontify- natively set to t for a while, I can see that the slowdown is proportional to the number and size of code blocks in the Org-mode file. It is most noticeable in a file with about 30 printed pages of a manuscript held in several dozen LaTeX code blocks, quite a bit less so in a file where the several dozen code blocks are short R routines. 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). I have tested a file with 22000 lines containing two subtrees of 59 latex blocks each of length 190 lines. Opening the file takes perhaps 4 seconds as opposed to 1. And unfolding one of the 11,000 line subtrees for the first time sometimes takes 1-2 seconds. However, once the file is open and being used, folding and unfolding of blocks is snappy. Editing and fontification is immediate in the 190 line blocks. When editing in a 2088 line block, there is an almost 1 second delay for a fontified character to appear, which is no good at all -- but I think users of blocks of that size should be happy using C-c '. I do not get any fontification messages in the minibuffer. This is on a slow machine (an Intel atom netbook), with emacs23 and emacs24 running under linux. So even in my 22000 line file containing 190 line blocks, the delays are short and only occur when first opening and unfolding the file. However, users of very large src blocks should definitely use C-c ' for editing. FWIW, I see the org-src-fontification message while unfolding, [...] Could you post that message please (go to *Messages* buffer after unfolding and it should be there). I haven't put any messages in, but I think I know the message you mean and I think it is an Emacs message. [...] Yes, here is a portion of the message buffer: Searching for `makaainana.org' Automatic display of crossref information was turned on Fontifying org-src-fontification:latex-mode... (regexps.) Automatic display of crossref information was turned on [...] I believe the message comes from line 744 of org-src.el No, the message comes from core Emacs fontification code. I'm unsure why you are seeing these messages and I am not. Do you still see the behaviour/problems you reported above? Dan HI Dan, No, the slowness that I had with this on OS X is gone now. I think the key is this, as Jules Bean noted: #+begin_src emacs-lisp :tangle yes (setq font-lock-verbose nil) #+end_src This was set to 0 previously. Thanks for this improvement. It is great to see semantic markup in code blocks in the Org-mode buffer. Tom All the best, Tom even when the unfolded result doesn't show a code block. Later when a sub- tree is unfolded, the org-src-fontification message appears again, which makes me wonder if there is unnecessary work going on. All the best, Tom On Sep 9, 2010, at 3:02 AM, Darlan Cavalcante Moreira wrote: Thank you Dan, It is perfect now. No perceivable slowdown At Wed, 08 Sep 2010 13:41:51 -0400, Dan Davison wrote: Darlan Cavalcante Moreira writes: 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. Thank you Darlan, I have just pushed a change that should make that better -- does that improve things? I did think there was something else going on (that was why I asked Tom for confirmation), but I didn't have time to investigate properly. The problem seems to be that, on a folded headline containing many blocks, `org-edit-src-find-region-and-lang' is actually quite slow to come up with the answer "No, there's nothing for me to edit here." (try issuing M-x org-edit-src-code on a folded headline containing many blocks; I haven't understood this properly yet.) Dan 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" 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" writes: Aloha Dan, This is really nice. Thanks for shepherding it along. In some of my use cases there is a substantial delay whe
[Orgmode] Re: Org now fontifies code blocks
Jambunathan K writes: > Jules Bean writes: > >>> >>> 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. Thanks Jules. I think I must have read the same advice, and now that you mention it, I have that set to nil in my .emacs.org. I do see Tom's messages when I set it to t. Hopefully setting to nil results in a speed-up in OSX? >> 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. > Hi Jambunathan, > I wonder whether fontification messages are relics of the age long past > when they served as modern equivalents of progress bars. I think you may be right. > ,[ C-h v font-lock-verbose RET ] > | font-lock-verbose is a variable defined in `font-lock.el'. > | Its value is 0 > | > | Documentation: > | If non-nil, means show status messages for buffer fontification. > | If a number, only buffers greater than this size have fontification > messages. > | > | You can customize this variable. > | > | [back] > ` > > Perhaps Emacs maintainers would be willing to change the default setting > of this variable. That sounds like a sensible suggestion. Dan > >> >> 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 > > ___ > 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
[Orgmode] Re: Org now fontifies code blocks
Jules Bean writes: >> >> 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. I wonder whether fontification messages are relics of the age long past when they served as modern equivalents of progress bars. ,[ C-h v font-lock-verbose RET ] | font-lock-verbose is a variable defined in `font-lock.el'. | Its value is 0 | | Documentation: | If non-nil, means show status messages for buffer fontification. | If a number, only buffers greater than this size have fontification messages. | | You can customize this variable. | | [back] ` Perhaps Emacs maintainers would be willing to change the default setting of this variable. > > 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 ___ 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
> > 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
[Orgmode] Re: Org now fontifies code blocks
"Thomas S. Dye" writes: > On Sep 9, 2010, at 12:35 PM, Dan Davison wrote: > >> "Thomas S. Dye" writes: >> >>> Hi Dan, >>> >>> Glad to know that Darlan's slowdown is fixed. >>> >>> No change here that I can tell. Now that I've had org-src-fontify- >>> natively set to t for a while, I can see that the slowdown is >>> proportional to the number and size of code blocks in the Org-mode >>> file. It is most noticeable in a file with about 30 printed pages of >>> a manuscript held in several dozen LaTeX code blocks, quite a bit >>> less >>> so in a file where the several dozen code blocks are short R >>> routines. 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). I have tested a file with 22000 lines containing two subtrees of 59 latex blocks each of length 190 lines. Opening the file takes perhaps 4 seconds as opposed to 1. And unfolding one of the 11,000 line subtrees for the first time sometimes takes 1-2 seconds. However, once the file is open and being used, folding and unfolding of blocks is snappy. Editing and fontification is immediate in the 190 line blocks. When editing in a 2088 line block, there is an almost 1 second delay for a fontified character to appear, which is no good at all -- but I think users of blocks of that size should be happy using C-c '. I do not get any fontification messages in the minibuffer. This is on a slow machine (an Intel atom netbook), with emacs23 and emacs24 running under linux. So even in my 22000 line file containing 190 line blocks, the delays are short and only occur when first opening and unfolding the file. However, users of very large src blocks should definitely use C-c ' for editing. >>> FWIW, I see the org-src-fontification message while unfolding, [...] > Could you post that message please (go to *Messages* buffer after >> unfolding and it should be there). I haven't put any messages in, >> but I >> think I know the message you mean and I think it is an Emacs message. [...] > Yes, here is a portion of the message buffer: > > Searching for `makaainana.org' > Automatic display of crossref information was turned on > Fontifying > org-src-fontification:latex-mode... (regexps.) > Automatic display of crossref information was turned on [...] > I believe the message comes from line 744 of org-src.el No, the message comes from core Emacs fontification code. I'm unsure why you are seeing these messages and I am not. Do you still see the behaviour/problems you reported above? Dan > > All the best, > Tom >>> even >>> when the unfolded result doesn't show a code block. Later when a >>> sub- >>> tree is unfolded, the org-src-fontification message appears again, >>> which makes me wonder if there is unnecessary work going on. >>> >>> All the best, >>> Tom >>> >>> On Sep 9, 2010, at 3:02 AM, Darlan Cavalcante Moreira wrote: >>> Thank you Dan, It is perfect now. No perceivable slowdown At Wed, 08 Sep 2010 13:41:51 -0400, Dan Davison wrote: > > Darlan Cavalcante Moreira writes: > >> 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. > > Thank you Darlan, > > I have just pushed a change that should make that better -- does > that > improve things? > > I did think there was something else going on (that was why I asked > Tom > for confirmation), but I didn't have time to investigate > properly. The > problem seems to be that, on a folded headline containing many > blocks, > `org-edit-src-find-region-and-lang' is actually quite slow to > come up > with the answer "No, there's nothing for me to edit here." (try > issuing > M-x org-edit-src-code on a folded headline containing many > blocks; I > haven't understood this properly yet.) > > Dan > > > >> >> 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" 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" writes: > Aloha Dan, > >
[Orgmode] Re: Org now fontifies code blocks
On Sep 9, 2010, at 12:35 PM, Dan Davison wrote: "Thomas S. Dye" writes: Hi Dan, Glad to know that Darlan's slowdown is fixed. No change here that I can tell. Now that I've had org-src-fontify- natively set to t for a while, I can see that the slowdown is proportional to the number and size of code blocks in the Org-mode file. It is most noticeable in a file with about 30 printed pages of a manuscript held in several dozen LaTeX code blocks, quite a bit less so in a file where the several dozen code blocks are short R routines. FWIW, I see the org-src-fontification message while unfolding, Hi Tom, Could you post that message please (go to *Messages* buffer after unfolding and it should be there). I haven't put any messages in, but I think I know the message you mean and I think it is an Emacs message. Dan Hi Dan, Yes, here is a portion of the message buffer: Searching for `makaainana.org' Automatic display of crossref information was turned on Fontifying org-src-fontification:latex-mode... (regexps.) Automatic display of crossref information was turned on Fontifying org-src-fontification:latex-mode... (regexps.) Automatic display of crossref information was turned on Fontifying org-src-fontification:latex-mode... (regexps.) Automatic display of crossref information was turned on Fontifying org-src-fontification:latex-mode... (regexps.) Automatic display of crossref information was turned on Fontifying org-src-fontification:latex-mode... (regexps.) Quit I believe the message comes from line 744 of org-src.el All the best, Tom even when the unfolded result doesn't show a code block. Later when a sub- tree is unfolded, the org-src-fontification message appears again, which makes me wonder if there is unnecessary work going on. All the best, Tom On Sep 9, 2010, at 3:02 AM, Darlan Cavalcante Moreira wrote: Thank you Dan, It is perfect now. No perceivable slowdown At Wed, 08 Sep 2010 13:41:51 -0400, Dan Davison wrote: Darlan Cavalcante Moreira writes: 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. Thank you Darlan, I have just pushed a change that should make that better -- does that improve things? I did think there was something else going on (that was why I asked Tom for confirmation), but I didn't have time to investigate properly. The problem seems to be that, on a folded headline containing many blocks, `org-edit-src-find-region-and-lang' is actually quite slow to come up with the answer "No, there's nothing for me to edit here." (try issuing M-x org-edit-src-code on a folded headline containing many blocks; I haven't understood this properly yet.) Dan 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" 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" 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 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://l
[Orgmode] Re: Org now fontifies code blocks
"Thomas S. Dye" writes: > Hi Dan, > > Glad to know that Darlan's slowdown is fixed. > > No change here that I can tell. Now that I've had org-src-fontify- > natively set to t for a while, I can see that the slowdown is > proportional to the number and size of code blocks in the Org-mode > file. It is most noticeable in a file with about 30 printed pages of > a manuscript held in several dozen LaTeX code blocks, quite a bit less > so in a file where the several dozen code blocks are short R routines. > > FWIW, I see the org-src-fontification message while unfolding, Hi Tom, Could you post that message please (go to *Messages* buffer after unfolding and it should be there). I haven't put any messages in, but I think I know the message you mean and I think it is an Emacs message. Dan > even > when the unfolded result doesn't show a code block. Later when a sub- > tree is unfolded, the org-src-fontification message appears again, > which makes me wonder if there is unnecessary work going on. > > All the best, > Tom > > On Sep 9, 2010, at 3:02 AM, Darlan Cavalcante Moreira wrote: > >> >> Thank you Dan, >> >> It is perfect now. No perceivable slowdown >> >> At Wed, 08 Sep 2010 13:41:51 -0400, >> Dan Davison wrote: >>> >>> Darlan Cavalcante Moreira writes: >>> 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. >>> >>> Thank you Darlan, >>> >>> I have just pushed a change that should make that better -- does that >>> improve things? >>> >>> I did think there was something else going on (that was why I asked >>> Tom >>> for confirmation), but I didn't have time to investigate >>> properly. The >>> problem seems to be that, on a folded headline containing many >>> blocks, >>> `org-edit-src-find-region-and-lang' is actually quite slow to come up >>> with the answer "No, there's nothing for me to edit here." (try >>> issuing >>> M-x org-edit-src-code on a folded headline containing many blocks; I >>> haven't understood this properly yet.) >>> >>> Dan >>> >>> >>> 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" 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" 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 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 `
[Orgmode] Re: Org now fontifies code blocks
Hi Dan, Glad to know that Darlan's slowdown is fixed. No change here that I can tell. Now that I've had org-src-fontify- natively set to t for a while, I can see that the slowdown is proportional to the number and size of code blocks in the Org-mode file. It is most noticeable in a file with about 30 printed pages of a manuscript held in several dozen LaTeX code blocks, quite a bit less so in a file where the several dozen code blocks are short R routines. FWIW, I see the org-src-fontification message while unfolding, even when the unfolded result doesn't show a code block. Later when a sub- tree is unfolded, the org-src-fontification message appears again, which makes me wonder if there is unnecessary work going on. All the best, Tom On Sep 9, 2010, at 3:02 AM, Darlan Cavalcante Moreira wrote: Thank you Dan, It is perfect now. No perceivable slowdown At Wed, 08 Sep 2010 13:41:51 -0400, Dan Davison wrote: Darlan Cavalcante Moreira writes: 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. Thank you Darlan, I have just pushed a change that should make that better -- does that improve things? I did think there was something else going on (that was why I asked Tom for confirmation), but I didn't have time to investigate properly. The problem seems to be that, on a folded headline containing many blocks, `org-edit-src-find-region-and-lang' is actually quite slow to come up with the answer "No, there's nothing for me to edit here." (try issuing M-x org-edit-src-code on a folded headline containing many blocks; I haven't understood this properly yet.) Dan 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" 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" 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 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 ___ 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
[Orgmode] Re: Org now fontifies code blocks
Thank you Dan, It is perfect now. No perceivable slowdown At Wed, 08 Sep 2010 13:41:51 -0400, Dan Davison wrote: > > Darlan Cavalcante Moreira writes: > > > 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. > > Thank you Darlan, > > I have just pushed a change that should make that better -- does that > improve things? > > I did think there was something else going on (that was why I asked Tom > for confirmation), but I didn't have time to investigate properly. The > problem seems to be that, on a folded headline containing many blocks, > `org-edit-src-find-region-and-lang' is actually quite slow to come up > with the answer "No, there's nothing for me to edit here." (try issuing > M-x org-edit-src-code on a folded headline containing many blocks; I > haven't understood this properly yet.) > > Dan > > > > > > > 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" 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" 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 > >> >>> >> 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 ___ 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
[Orgmode] Re: Org now fontifies code blocks
Erik Iverson writes: > Sébastien Vauban wrote: >> Hi Bastien and Dan, >> >> Bastien wrote: >>> Dan Davison 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. Yes, you're right! >>> "Org Src" is >>> better but still a bit too general IMHO. >>> >>> "Org Src Block"? I do sometimes find myself wondering whether "src" is a little cryptic for user-level documentation: an alternative would be "code" as in "code blocks". But src is hard-wired into "begin_src", and it is familiar to many programmers, and it is already traditional in Org-mode, so perhaps it is fine. >> 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. I would like there to be some uniformity in this, across documentation, docstrings and function and variable names. I have been guilty of using "code blocks" in docstrings and commit logs. So if "src block" is /the/ Org-mode way of referring to these things, then let's stick to it! For the purposes of customize, we don't have to abbreviate, so we could also have "Org Source Code Blocks" but as Bastien sugests, "Org Src Blocks" would be a natural Org-mode term. Dan > > ___ > 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 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
[Orgmode] Re: Org now fontifies code blocks
Hi Bastien and Dan, Bastien wrote: > Dan Davison 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. To be honest, I don't really care, as I never use customize. It's true that I've always found it difficult to find where the variables I was searching for were located... Best regards, Seb -- Sébastien Vauban ___ 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
[Orgmode] Re: Org now fontifies code blocks
Darlan Cavalcante Moreira writes: > 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. Thank you Darlan, I have just pushed a change that should make that better -- does that improve things? I did think there was something else going on (that was why I asked Tom for confirmation), but I didn't have time to investigate properly. The problem seems to be that, on a folded headline containing many blocks, `org-edit-src-find-region-and-lang' is actually quite slow to come up with the answer "No, there's nothing for me to edit here." (try issuing M-x org-edit-src-code on a folded headline containing many blocks; I haven't understood this properly yet.) Dan > > 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" 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" 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 >> >>> > 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 ___ 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" 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" 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 > >>> 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
[Orgmode] Re: Org now fontifies code blocks
Dan Davison 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"? -- 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
[Orgmode] Re: Org now fontifies code blocks
Carsten Dominik writes: > On Tue, Sep 7, 2010 at 3:43 PM, Dan Davison wrote: >> "David O'Toole" 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 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. OK, this is now off by default. And it's added to customize under the "Org Appearance" and "Babel" groups. (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 *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 haven't addressed this. Dan > > - 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 Footnotes: [1] E.g. Org Src Lang Modes is within Org Edit Structure which is within Org Structure, which is deeply obscure! ___ 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
[Orgmode] Re: Org now fontifies code blocks
Sebastian Rose writes: > Bastien writes: > >> Carsten Dominik 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 One concern is that it can be hard to make things like that work well across different emacs background colors and color-themes, application transparency, etc. > >> 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 ___ 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
[Orgmode] Re: Org now fontifies code blocks
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" 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 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
Re: [Orgmode] Re: Org now fontifies code blocks
Tom Short 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
[Orgmode] Re: Org now fontifies code blocks
Hi Carsten, Bastien and the rest, Bastien wrote: > Carsten Dominik 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. Thanks Carsten! ;-) > +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. Personally, I don't like another font, as I use Consolas for *everything* under Emacs. Best, of course, is to allow one to choose following his preferences. In my case, I go for background color... Best regards, Seb -- Sébastien Vauban ___ 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 writes: > Carsten Dominik 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
On Tue, Sep 7, 2010 at 4:33 PM, Bastien wrote: > Carsten Dominik 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
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 wrote: > "David O'Toole" 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 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
Carsten Dominik 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
[Orgmode] Re: Org now fontifies code blocks
Dan Davison writes: > 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. I didn't test turning it on and off long enough to have a strong opinion on this issue. In both cases, let's document this variable very clearly in the manual and have a FAQ entry on Worg. Thanks, -- 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
On Tue, Sep 7, 2010 at 3:43 PM, Dan Davison wrote: > "David O'Toole" 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 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
[Orgmode] Re: Org now fontifies code blocks
Dan Davison writes: > "Thomas S. Dye" 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. > On a more general level, I'm guessing this means emacs does not defer fortification until a buffer displays? Is that a result of fonts etc being generalised properties of buffer text? ___ 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
[Orgmode] Re: Org now fontifies code blocks
"David O'Toole" 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 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
[Orgmode] Re: Org now fontifies code blocks
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 ;) ___ 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
[Orgmode] Re: Org now fontifies code blocks
"Thomas S. Dye" 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 >> > > 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
[Orgmode] Re: Org now fontifies code blocks
Hi all, Richard Riley wrote: > 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. Would it be feasible to get a colored background (light green, for example) for the code blocks inside Org buffers? Of course, I mean: made to work with language fontification... If yes, we would reach two goals with one stone: 1. Avoid Richard's problem 2. Clearly identify codes inlined in text, by making them standing out. Thanks for your reactions on this... Best regards, Seb -- Sébastien Vauban ___ 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
[Orgmode] Re: Org now fontifies code blocks
"David O'Toole" writes: > I agree Bastien :) Possibly a customize interface for it would be nice too if the code is touched! > > On Mon, Sep 6, 2010 at 2:30 PM, Bastien 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 BTW, can the mail list auto .sig append also prefix it with a "-- /n" so its auto snipped on reply by many newsreaders? >> > > ___ > 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
I agree Bastien :) On Mon, Sep 6, 2010 at 2:30 PM, Bastien 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
[Orgmode] Re: Org now fontifies code blocks
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. > > 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 and expecting indentation etc to work. 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 ;) -- ☘ http://www.shamrockirishbar.com, http://www.richardriley.net "Learning French is trivial: the word for horse is 'cheval' and everything follows thusly." ___ 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
[Orgmode] Re: Org now fontifies code blocks
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. Hi Richard, I'm not quite clear what problems are arising from Org buffer edits. Could you expand? Thanks, Dan > 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 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 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
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 wrote: > 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 > 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
[Orgmode] Re: Org now fontifies code blocks
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 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
[Orgmode] Re: Org now fontifies code blocks
Hi Dan (and David), 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 Three remarks: 1. That simply *is* great! Thanks a lot, David, for your initial code... 2. It "breaks" my first (and only, up to now) patch to the fontification of source block delimiters. [See http://osdir.com/ml/emacs-orgmode-gnu/2010-08/msg00550.html] Since Carsten applied it (2 weeks ago), the lines BEGIN_SRC and END_SRC were correctly highlighted from beginning of line to the end of it (right fringe, not last character "à la Ctrl-E"): --8<---cut here---start->8--- #+BEGIN_SRC sh cd ~ wget http://www.mygooglest.com/fni/.emacs #+END_SRC --8<---cut here---end--->8--- To see what I mean, you need a font with background, for example: --8<---cut here---start->8--- (org-block ((t (:foreground "blue1" :background "#EAFFEA" (org-code ((t (:foreground "blue1" :background "#EAFFEA" (org-meta-line ((t (:foreground "#008ED1" :background "#FFEAEA" (org-table ((t (:foreground "blue1" :background "#EAEAFF" --8<---cut here---end--->8--- Today, with a pull 5 mins ago, the END_SRC line is "fully" highlighted, while the BEGIN_SRC line is only highlighted up to the last character on the line. 3. As well, what I've lost with this new (great) feature, is that, in the above shell code, `cd' is highlighted following the sh-mode, but all the code (here, 2 lines) are with no background -- while it was a nice full block for the 2 weeks I'm talking of. Would there be a way to add a _background color_ to the code blocks (can be unique and defined once, for all modes) that would be present, if no mode overrides that background color? > as to whether it should be on or off by default. On by default. For sure... even with my 2 last remarks. Thanks a lot! Best regards, Seb -- Sébastien Vauban ___ 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