From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Re: org-src-fontify-natively makes things very, very slow Date: Fri, 18 Mar 2011 08:38:09 +0000 Message-ID: <87bp18su1a.fsf@ucl.ac.uk> References: <87ipvhiou8.fsf@ucl.ac.uk> <804o71triy.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=38734 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0WFr-0006Hp-Au for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 05:46:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0WFp-0000Sp-QK for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 05:45:58 -0400 Received: from vscani-b2.ucl.ac.uk ([144.82.108.135]:50186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0WFp-0000Sj-L1 for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 05:45:57 -0400 In-Reply-To: <804o71triy.fsf@somewhere.org> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Thu, 17 Mar 2011 21:34:45 +0100") 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: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org S=C3=A9bastien Vauban writes: [...] > Maybe this is (partly?) due to the overlay I added: > > #+begin_src emacs-lisp > (overlay-put (make-overlay beg1 block-end) > 'face 'org-block-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. I 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. Your search (in org.el) for the end of the block assumes that it does have the end statement in place already. I'm not sure how to fix this because it's an ill-defined situation. It may be worthwhile making the overlay optional? Although I must admit 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. --=20 : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.77.g74268)