emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [BUG] Bad escape with Babel + org-mode


From: Daimrod
Subject: [O] [BUG] Bad escape with Babel + org-mode
Date: Tue, 02 Jun 2015 16:31:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi,

I've encountered a bug when using org-mode in source blocks. I'm using
the latest version of org-mode from git:
Org-mode version 8.3beta (release_8.3beta-1195-g1a7364 [...])

I have no problem with the following snippet:
#+BEGIN_SRC org
,* test 1
,* test 2
,* test 3
,* test 4
,* test 5
,* test 6
,* test 7
,* test 8
,* test 9
,* test 10

#+END_SRC

But I have an error with this one when I hit C-' to go back to my org
file:

error in `org-escape-code-in-region'> while: Invalid search bound (wrong side 
of point)
#+BEGIN_SRC org
,* test 1
,* test 2
,* test 3
,* test 4
,* test 5
,* test 6
,* test 7
,* test 8
,* test 9
,* test 10
,* test 11

#+END_SRC

And with the following snippet:
#+BEGIN_SRC org
,* test 1
,* test 2
,* test 3
,* test 4
,* test 5
,* test 6
,* test 7
,* test 8
,* test 9
,* test 10
,* test 11
,* test 12
#+END_SRC

When I hit C-' to go back to the org file the block isn't properly
escaped, it becomes:

#+BEGIN_SRC org
,* test 1
,* test 2
,* test 3
,* test 4
,* test 5
,* test 6
,* test 7
,* test 8
,* test 9
,* test 10
,* test 11
* test 12
#+END_SRC

I've tried to understand what's the problem and it looks like the
position returned by `re-search-forward' in `org-escape-code-in-region'
is wrong, but I don't know why. By wrong, I mean that the position
returned isn't immediately after the expression found but slightly
after, and the error increases which is why it doesn't fail with 10
items or less.

e.g.
* test 1
 ^ point
* test 2
  ^ point
* test 3
   ^ point
...

Best,

--
Daimrod/Greg

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]