emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] noutline bug


From: Aaron Kaplan
Subject: [Orgmode] noutline bug
Date: Mon, 04 Jun 2007 19:34:29 +0200

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




reply via email to

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