From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julian Burgos Subject: Re: Re: org-src-fontify-natively makes things very, very slow Date: Fri, 18 Mar 2011 12:44:49 +0000 Message-ID: References: <87ipvhiou8.fsf@ucl.ac.uk> <804o71triy.fsf@somewhere.org> <87bp18su1a.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=34342 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0Z3n-0001fo-M3 for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 08:45:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0Z2w-0005cQ-Pn for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 08:44:55 -0400 Received: from mail-qy0-f176.google.com ([209.85.216.176]:47767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0Z2w-0005cC-Mg for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 08:44:50 -0400 Received: by qyk30 with SMTP id 30so3452659qyk.0 for ; Fri, 18 Mar 2011 05:44:49 -0700 (PDT) In-Reply-To: <87bp18su1a.fsf@ucl.ac.uk> 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: Eric S Fraga Cc: =?ISO-8859-1?Q?S=E9bastien_Vauban?= , emacs-orgmode@gnu.org Hi Eric, I have a small function to insert the opening and ending of an R code block bound to a key, so I always edit the code between a "#+begin_src R" and "#+end_src R". I still get a considerable slowdown, even with an empty document with a single line of code. Julian On Fri, Mar 18, 2011 at 8:38 AM, Eric S Fraga wrote: > S=E9bastien Vauban writes: > > [...] > >> Maybe this is (partly?) due to the overlay I added: >> >> #+begin_src emacs-lisp >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (overlay-put (make-overlay beg1 block-en= d) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'face 'org-bl= ock-background)) >> #+end_src > > This could indeed be one cause, especially depending on what this does > when there is no block-end line, or at least not anywhere near in the > buffer. =A0I seem to get a slowdown when I have a situation like this: > > #+begin_example > > [... some text ...] > #+begin_src somelanguage > [... text which is part of the source block...] > > > [... lots of other text ...] > [... including other source blocks] > > #+end_example > > where there is no matching #+end_src or, more precisely, the > next #+end_src line is one that does not belong to this current source > block. =A0Your search (in org.el) for the end of the block assumes that i= t > does have the end statement in place already. =A0I'm not sure how to fix > this because it's an ill-defined situation. > > It may be worthwhile making the overlay optional? =A0Although I must admi= t > that I like it! > > My solution, by the way, is to insert the #+end_src line immediately > upon writing a #+begin_src line and then back up a line to start writing > the code. > > -- > : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 > : using Org-mode version 7.5 (release_7.5.77.g74268) > > --=20 Julian Mariano Burgos Hafranns=F3knastofnunin/Marine Research Institute Sk=FAlagata 4, 121 Reykjav=EDk, Iceland S=EDmi/Telephone : +354-5752037 Br=E9fs=EDmi/Telefax:=A0 +354-5752001 Netfang/Email: julian@hafro.is, jmburgos@uw.edu