Sébastien Vauban <wxhgmqzgw...@spammotel.com> writes: > Hi Eric, > > Eric S Fraga wrote:
[...] >> 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). Yes but the overlay needs to know where to end; I am using search in a more general sense here in that you are defining the start and end of a region to overlay using regular expressions, are you not? [...] >> 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: yes, I used to use yasnippet a lot but I don't any longer. I am actually in confusion as to which completion mechanism to use in Emacs these days and am going a little crazy... :( I'm currently playing with auto-complete. Thanks, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.83.g1bd87.dirty)