emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: org-src-fontify-natively makes things very, very slow
Date: Sat, 19 Mar 2011 10:20:00 +0100	[thread overview]
Message-ID: <80fwqjqxfj.fsf@somewhere.org> (raw)
In-Reply-To: <87bp18su1a.fsf@ucl.ac.uk>

Hi Eric,

Eric S Fraga wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> 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

  parent reply	other threads:[~2011-03-19  9:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 13:59 Julian Burgos
2011-03-17 18:28 ` Eric S Fraga
2011-03-17 20:34   ` Sébastien Vauban
2011-03-18  0:11     ` Julian Burgos
2011-03-18  8:38     ` Eric S Fraga
2011-03-18 12:44       ` Julian Burgos
2011-03-19  9:20       ` Sébastien Vauban [this message]
2011-03-19 12:28         ` suvayu ali
2011-03-19 20:37           ` Eric S Fraga
2011-03-19 20:34         ` Eric S Fraga
2011-03-20  4:23           ` Le Wang
2011-03-20 19:41             ` Eric S Fraga
2011-03-21  2:37               ` Le Wang
2011-03-21 13:57                 ` Eric Schulte
2011-03-21 17:06                   ` Eric S Fraga
2011-03-21 22:23                     ` Sébastien Vauban
2011-03-22  9:18                       ` Ulf Stegemann
2011-03-29 14:49                       ` Matt Lundin
2011-03-29 16:49                         ` Eric S Fraga
2011-03-30  7:34                         ` Sébastien Vauban
2011-04-28 20:59                     ` Carsten Dominik
2011-04-28 23:32                       ` Eric S Fraga
2011-04-30 19:45                         ` Eric S Fraga
2011-05-01 13:37                           ` Carsten Dominik
2011-03-29 14:12           ` Matt Lundin
2011-03-29 16:44             ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80fwqjqxfj.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    --subject='Re: org-src-fontify-natively makes things very, very slow' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).