* 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/)]
@ 2017-12-22 8:34 'Ihor Radchenko'
2017-12-22 8:40 ` Ihor Radchenko
2017-12-27 21:33 ` Nicolas Goaziou
0 siblings, 2 replies; 5+ messages in thread
From: 'Ihor Radchenko' @ 2017-12-22 8:34 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
1. Create the following same org file:
* Test
- blah
- a
- b
- c
*************** List folding stops here
:PROPERTIES:
: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.
Regards,
Ihor
Emacs : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, X toolkit)
of 2017-12-06
Package: Org mode version 9.1.4 (9.1.4-13-g84cb63-elpa @ /home/yantar92/.emacs.d/elpa/org-20171218/)
--
Ihor Radchenko,
PhD Student
Singapore University of Technology and Design,
8 Somapah Road Singapore 487372
Email: yantar92@gmail.com, ihor_radchenko@mymail.sutd.edu.sg
Tel: +6584017977
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 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/)]
2017-12-22 8:34 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/)] 'Ihor Radchenko'
@ 2017-12-22 8:40 ` Ihor Radchenko
2017-12-27 21:33 ` Nicolas Goaziou
1 sibling, 0 replies; 5+ messages in thread
From: Ihor Radchenko @ 2017-12-22 8:40 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
I am dumb...
Forgot to load 'org-inlinetask
'Ihor Radchenko' <yantar92@gmail.com> writes:
> 1. Create the following same org file:
> * Test
> - blah
> - a
> - b
> - c
> *************** List folding stops here
> :PROPERTIES:
> :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.
>
> Regards,
> Ihor
>
>
> Emacs : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, X toolkit)
> of 2017-12-06
> Package: Org mode version 9.1.4 (9.1.4-13-g84cb63-elpa @ /home/yantar92/.emacs.d/elpa/org-20171218/)
> --
> Ihor Radchenko,
> PhD Student
> Singapore University of Technology and Design,
> 8 Somapah Road Singapore 487372
> Email: yantar92@gmail.com, ihor_radchenko@mymail.sutd.edu.sg
> Tel: +6584017977
--
Ihor Radchenko,
PhD Student
Singapore University of Technology and Design,
8 Somapah Road Singapore 487372
Email: yantar92@gmail.com, ihor_radchenko@mymail.sutd.edu.sg
Tel: +6584017977
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 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/)]
2017-12-22 8:34 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/)] 'Ihor Radchenko'
2017-12-22 8:40 ` Ihor Radchenko
@ 2017-12-27 21:33 ` Nicolas Goaziou
2017-12-28 17:18 ` Marco Wahl
1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2017-12-27 21:33 UTC (permalink / raw)
To: 'Ihor Radchenko'; +Cc: Marco Wahl, emacs-orgmode
Hello,
'Ihor Radchenko' <yantar92@gmail.com> writes:
> 1. Create the following same org file:
> * Test
> - blah
> - a
> - b
> - c
> *************** List folding stops here
> :PROPERTIES:
> :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.
Confirmed.
This is related to:
commit a426abffa55f3b74d0c5fb09e148c1dd0d2a0e7a
Author: Marco Wahl <marcowahlsoft@gmail.com>
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."
(save-match-data
(beginning-of-line)
(let* ((case-fold-search t)
(inlinetask-re (org-inlinetask-outline-regexp))
(task-end-re (concat inlinetask-re "END[ \t]*$")))
(cond
((looking-at-p task-end-re)
(forward-line))
((looking-at-p inlinetask-re)
(forward-line)
(cond
((looking-at-p task-end-re) (forward-line))
((looking-at-p inlinetask-re))
((org-inlinetask-in-task-p)
(re-search-forward inlinetask-re nil t)
(forward-line))
(t nil)))
(t
(re-search-forward inlinetask-re nil t)
(forward-line)))))
(point))
The bug your patch is fixing probably lies in `org-cycle'.
WDYT?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 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/)]
2017-12-27 21:33 ` Nicolas Goaziou
@ 2017-12-28 17:18 ` Marco Wahl
2017-12-28 21:49 ` Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: Marco Wahl @ 2017-12-28 17:18 UTC (permalink / raw)
To: emacs-orgmode
Hi!
> 'Ihor Radchenko' <yantar92@gmail.com> writes:
>
>> 1. Create the following same org file:
>> * Test
>> - blah
>> - a
>> - b
>> - c
>> *************** List folding stops here
>> :PROPERTIES:
>> :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.
>
> Confirmed.
>
> This is related to:
>
> commit a426abffa55f3b74d0c5fb09e148c1dd0d2a0e7a
> Author: Marco Wahl <marcowahlsoft@gmail.com>
> 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."
> (save-match-data
> (beginning-of-line)
> (let* ((case-fold-search t)
> (inlinetask-re (org-inlinetask-outline-regexp))
> (task-end-re (concat inlinetask-re "END[ \t]*$")))
> (cond
> ((looking-at-p task-end-re)
> (forward-line))
> ((looking-at-p inlinetask-re)
> (forward-line)
> (cond
> ((looking-at-p task-end-re) (forward-line))
> ((looking-at-p inlinetask-re))
> ((org-inlinetask-in-task-p)
> (re-search-forward inlinetask-re nil t)
> (forward-line))
> (t nil)))
> (t
> (re-search-forward inlinetask-re nil t)
> (forward-line)))))
> (point))
>
> The bug your patch is fixing probably lies in `org-cycle'.
>
> WDYT?
Thanks!
I just committed your suggestion of org-inlinetask-goto-end. I also
edited the respective test section. LGTM for now.
Sorry for the disturbance in the Org and best regards
Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-28 21:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-22 8:34 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/)] 'Ihor Radchenko'
2017-12-22 8:40 ` Ihor Radchenko
2017-12-27 21:33 ` Nicolas Goaziou
2017-12-28 17:18 ` Marco Wahl
2017-12-28 21:49 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.