From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martyn Jago Subject: [BUG] Unmatched #+end-src Date: Sat, 12 Mar 2011 16:56:03 +0000 Message-ID: <87ei6cffbw.fsf@btinternet.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=33443 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PyS77-0002SM-Dr for emacs-orgmode@gnu.org; Sat, 12 Mar 2011 11:56:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PyS74-0006YH-C1 for emacs-orgmode@gnu.org; Sat, 12 Mar 2011 11:56:24 -0500 Received: from lo.gmane.org ([80.91.229.12]:38197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PyS74-0006Wq-5r for emacs-orgmode@gnu.org; Sat, 12 Mar 2011 11:56:22 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PyS70-0002HY-MP for emacs-orgmode@gnu.org; Sat, 12 Mar 2011 17:56:18 +0100 Received: from 88-96-171-142.dsl.zen.co.uk ([88.96.171.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Mar 2011 17:56:18 +0100 Received: from martyn.jago by 88-96-171-142.dsl.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Mar 2011 17:56:18 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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