From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: Org now fontifies code blocks Date: Thu, 09 Sep 2010 18:35:38 -0400 Message-ID: <87tylylf45.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> <871v95ofg2.fsf@stats.ox.ac.uk> <59CB03F7-D330-47CF-98FC-5242CFE07A20@tsdye.com> <4c87bb85.07a5640a.16d3.09f2@mx.google.com> <87fwxk874w.fsf@stats.ox.ac.uk> <4c88dadb.014a640a.4502.4474@mx.google.com> <72D49F8C-CEE4-4EFE-9208-5589B10DE8BD@tsdye.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=50751 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Otpia-0005mz-IQ for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 18:35:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtpiZ-0005Sn-2n for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 18:35:44 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:38414) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtpiY-0005Sf-RQ for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 18:35:43 -0400 In-Reply-To: <72D49F8C-CEE4-4EFE-9208-5589B10DE8BD@tsdye.com> (Thomas S. Dye's message of "Thu, 9 Sep 2010 11:40:43 -1000") 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: "Thomas S. Dye" Cc: emacs-orgmode Mailinglist "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 `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