From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aaron Kaplan" Subject: noutline bug Date: Mon, 04 Jun 2007 19:34:29 +0200 Message-ID: <1180978469.26286.1193361613@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HvGRs-0007SP-9l for emacs-orgmode@gnu.org; Mon, 04 Jun 2007 13:34:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HvGRr-0007PT-D1 for emacs-orgmode@gnu.org; Mon, 04 Jun 2007 13:34:31 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HvGRr-0007Od-00 for emacs-orgmode@gnu.org; Mon, 04 Jun 2007 13:34:31 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HvGRq-0006c4-Jy for emacs-orgmode@gnu.org; Mon, 04 Jun 2007 13:34:30 -0400 Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id A035122E292 for ; Mon, 4 Jun 2007 13:34:29 -0400 (EDT) Content-Disposition: inline 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 A bug in xemacs/noutline.el was brought to the surface by a couple of recent org-mode changes. Here are some test cases: -------snip----------------- * Heading 1 note * Heading 2 ** subheading -------snip----------------- If org-cycle-separator-lines is 2 then doing org-cycle on Heading 1 fails to fold it, and if subheading is followed by the end of the file then org-cycle on Heading 2 fails to fold it as well. These two problems surfaced because of two different org-mode changes, but I traced both problems back to the same misplaced parenthesis in noutline.el: *** noutline.el 2007/06/04 17:03:41 1.1 --- noutline.el 2007/06/04 17:22:18 *************** *** 724,733 **** (set-extent-endpoints (copy-extent ex) (extent-start-position ex) beg) (set-extent-endpoints ex end (extent-end-position ex))) ! (set-extent-endpoints ex (extent-start-position ex) beg))) (if (> (extent-end-position ex) end) (set-extent-endpoints ex end (extent-end-position ex)) ! (delete-extent ex))) (current-buffer) beg end nil 'end-closed 'outline))) (defun outline-flag-region (from to flag) --- 724,733 ---- (set-extent-endpoints (copy-extent ex) (extent-start-position ex) beg) (set-extent-endpoints ex end (extent-end-position ex))) ! (set-extent-endpoints ex (extent-start-position ex) beg)) (if (> (extent-end-position ex) end) (set-extent-endpoints ex end (extent-end-position ex)) ! (delete-extent ex)))) (current-buffer) beg end nil 'end-closed 'outline))) (defun outline-flag-region (from to flag) You might want to do a bit of reindenting while you're in there, it looks like this file has been edited by people with different tab widths at different times. -Aaron