[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Re: org-src-fontify-natively makes things very, very slow
From: |
Sébastien Vauban |
Subject: |
[O] Re: org-src-fontify-natively makes things very, very slow |
Date: |
Sat, 19 Mar 2011 10:20:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt) |
Hi Eric,
Eric S Fraga wrote:
> Sébastien Vauban <address@hidden> 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...]
> <point here>
>
> [... 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.
You say "your search..." but I only added the overlay-put command... and I
must admit this whole block is difficult to follow (so many cases).
> It may be worthwhile making the overlay optional? Although I must admit that
> I like it!
I simply can't live without it, either.
> 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.
"My" solution is even simpler: just use a yasnippet template, that prompts you
for the language and puts the begin/end upfront:
--8<---------------cut here---------------start------------->8---
#name : #+begin_src...#+end_src
# --
#+srcname: ${1:name}
#+begin_src ${2:language} $3
$0
#+end_src
--8<---------------cut here---------------end--------------->8---
Best regards,
Seb
--
Sébastien Vauban
- [O] org-src-fontify-natively makes things very, very slow, Julian Burgos, 2011/03/17
- Re: [O] org-src-fontify-natively makes things very, very slow, Eric S Fraga, 2011/03/17
- [O] Re: org-src-fontify-natively makes things very, very slow, Sébastien Vauban, 2011/03/17
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, Julian Burgos, 2011/03/17
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, Eric S Fraga, 2011/03/18
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, Julian Burgos, 2011/03/18
- [O] Re: org-src-fontify-natively makes things very, very slow,
Sébastien Vauban <=
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, suvayu ali, 2011/03/19
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, Eric S Fraga, 2011/03/19
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, Eric S Fraga, 2011/03/19
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, Le Wang, 2011/03/20
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, Eric S Fraga, 2011/03/20
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, Le Wang, 2011/03/20
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, Eric Schulte, 2011/03/21
- Re: [O] Re: org-src-fontify-natively makes things very, very slow, Eric S Fraga, 2011/03/21
- [O] Re: org-src-fontify-natively makes things very, very slow, Sébastien Vauban, 2011/03/21
- [O] Re: org-src-fontify-natively makes things very, very slow, Ulf Stegemann, 2011/03/22