Hi 

--8<---------------cut here---------------start------------->8---
* Unmatched #+end-src bug

#+end_src
--8<---------------cut here---------------end--------------->8---

With the above simple org file, placing the cursor at the end of
#+end_src and hitting return causes emacs to hang.

The bug can be replicated with the following simple test which also
causes emacs to hang...

--8<---------------cut here---------------start------------->8---
(ert-deftest test-headless-end-src ()
  (with-temp-buffer
    (insert "\n\n\n\n\n\n#+end_")
    (should-not (org-in-item-p))))
--8<---------------cut here---------------end--------------->8---

It appears to be related to the following in 'org-in-item-p
(org-list.el)...

--8<---------------cut here---------------start------------->8---
               ((looking-at "^[ \t]*#\\+end_")
                (re-search-backward "^[ \t]*#\\+begin_" nil t))
--8<---------------cut here---------------end--------------->8---

I've tried to pin down the bug but its left me perplexed, so I'm going
to defer to more experienced org lispers! 

Regards

Martyn

---
Org-mode version 7.5 (release_7.5.32.gdf26.dirty)
GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.0)
 of 2011-02-25 


Reply via email to