[Top][All Lists]

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

Re: [O] Bug: List does not fold correctly with inline tasks in the middl

From: Nicolas Goaziou
Subject: Re: [O] Bug: List does not fold correctly with inline tasks in the middle [9.1.4 (9.1.4-13-g84cb63-elpa @ /home/yantar92/.emacs.d/elpa/org-20171218/)]
Date: Wed, 27 Dec 2017 22:33:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)


'Ihor Radchenko' <address@hidden> writes:

> 1. Create the following same org file:
> * Test
>   - blah
>     - a
>     - b
>     - c
> *************** List folding stops here
>      :ID:       27eb85b6-114f-437f-9424-b28d400f6aa9
>      :END:
> *************** END
>     - everything here and below folds on tab at =**...END=
>     - f
> 2. Try to fold at =-blah=. Everything started from inline task is not
> folded, while should.
> 3. Try to fold at =*... END=. Everything below *is* folded, while should
> not.


This is related to:

commit a426abffa55f3b74d0c5fb09e148c1dd0d2a0e7a
Author: Marco Wahl <address@hidden>
Date:   Fri Dec 4 19:25:36 2015 +0100

    org-inlinetask: Fix folding inlinetask children
    * org-inlinetask.el(org-inlinetask-goto-end): Position point just at the
      end.  Do not forward-line.
    Fixes org-cycle for state CHILDREN when the children are inlinetasks
    which have immediate neigbors.

Marco, I think there is something wrong in the patch above.
`org-inlinetask-goto-end' should move point to the beginning of the next
line, not to the end of the last one. IOW, it should something like this:

    (defun org-inlinetask-goto-end ()
      "Go to the end of the inline task at point.
    Return point."
        (let* ((case-fold-search t)
               (inlinetask-re (org-inlinetask-outline-regexp))
               (task-end-re (concat inlinetask-re "END[ \t]*$")))
           ((looking-at-p task-end-re)
           ((looking-at-p inlinetask-re)
             ((looking-at-p task-end-re) (forward-line))
             ((looking-at-p inlinetask-re))
              (re-search-forward inlinetask-re nil t)
             (t nil)))
            (re-search-forward inlinetask-re nil t)

The bug your patch is fixing probably lies in `org-cycle'.



Nicolas Goaziou

reply via email to

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