* Bug: org-back-to-heading with inline tasks above point [9.1.14 (9.1.14-3-geb9955a-elpaplus @ /home/yantar92/.emacs.d/elpa/org-plus-contrib-20180924/)]
@ 2018-11-05 8:10 yantar92
2018-11-05 20:55 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: yantar92 @ 2018-11-05 8:10 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
Consider calling =org-back-to-heading= for the following org entry:
#+begin_src org
* Sample entry
Some text.
*************** TODO Inline task
*************** END
Some more text.
->(point)<-
Yet another piece of text.
#+end_src
The expected behaviour is that the point moves to the first line of the
entry.
However, the point moves to the end of the inline task.
Indeed, the wrong behaviour is because =outline-regexp= variable is set
to ="\\*+ "=, which includes inline tasks.
Best,
Ihor
Emacs : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit)
of 2018-10-29
Package: Org mode version 9.1.14 (9.1.14-3-geb9955a-elpaplus @ /home/yantar92/.emacs.d/elpa/org-plus-contrib-20180924/)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug: org-back-to-heading with inline tasks above point [9.1.14 (9.1.14-3-geb9955a-elpaplus @ /home/yantar92/.emacs.d/elpa/org-plus-contrib-20180924/)]
2018-11-05 8:10 Bug: org-back-to-heading with inline tasks above point [9.1.14 (9.1.14-3-geb9955a-elpaplus @ /home/yantar92/.emacs.d/elpa/org-plus-contrib-20180924/)] yantar92
@ 2018-11-05 20:55 ` Nicolas Goaziou
2018-11-06 3:05 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2018-11-05 20:55 UTC (permalink / raw)
To: yantar92; +Cc: emacs-orgmode
Hllo,
yantar92@gmail.com writes:
> Consider calling =org-back-to-heading= for the following org entry:
>
> #+begin_src org
> * Sample entry
>
> Some text.
>
> *************** TODO Inline task
> *************** END
>
> Some more text.
>
> ->(point)<-
>
> Yet another piece of text.
> #+end_src
>
> The expected behaviour is that the point moves to the first line of the
> entry.
> However, the point moves to the end of the inline task.
>
> Indeed, the wrong behaviour is because =outline-regexp= variable is set
> to ="\\*+ "=, which includes inline tasks.
This is the desired effect. Use the macro `org-with-limited-levels' to
ignore headlines.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug: org-back-to-heading with inline tasks above point [9.1.14 (9.1.14-3-geb9955a-elpaplus @ /home/yantar92/.emacs.d/elpa/org-plus-contrib-20180924/)]
2018-11-05 20:55 ` Nicolas Goaziou
@ 2018-11-06 3:05 ` Ihor Radchenko
0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2018-11-06 3:05 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1887 bytes --]
Thanks!
Did not know about `org-with-limited-levels'.
After reading the function docstring again, I see that it behaved
correctly.
However, it seems that `org-back-to-heading' is not really used
according to the docstring in the org source code:
- `org-agenda' with subtree restriction: the results are different if
you call it below or above an inline task.
- `org-attach', `org-attach-dir', `org-attach-tag', with point
below/above an inline task behave differently
- the following functions from org.el behave depending on the point
position (below or above an inline task):
`org-entry-beginning-position', `org-entry-end-position',
`org-get-heading', `org-get-entry',
`org-insert-heading-after-current', `org-promote', `org-demote',
`org-move-subtree-down', etc.
Some of the functions above give very unexpected results if the point
is below an inline task.
Would it make sense to add org specific macros to Hacking section of org
manual?
It is sometimes difficult to guess that some of these macros even exist.
Best,
Ihor
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hllo,
>
> yantar92@gmail.com writes:
>
>> Consider calling =org-back-to-heading= for the following org entry:
>>
>> #+begin_src org
>> * Sample entry
>>
>> Some text.
>>
>> *************** TODO Inline task
>> *************** END
>>
>> Some more text.
>>
>> ->(point)<-
>>
>> Yet another piece of text.
>> #+end_src
>>
>> The expected behaviour is that the point moves to the first line of the
>> entry.
>> However, the point moves to the end of the inline task.
>>
>> Indeed, the wrong behaviour is because =outline-regexp= variable is set
>> to ="\\*+ "=, which includes inline tasks.
>
> This is the desired effect. Use the macro `org-with-limited-levels' to
> ignore headlines.
>
> Regards,
>
> --
> Nicolas Goaziou
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-06 3:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-05 8:10 Bug: org-back-to-heading with inline tasks above point [9.1.14 (9.1.14-3-geb9955a-elpaplus @ /home/yantar92/.emacs.d/elpa/org-plus-contrib-20180924/)] yantar92
2018-11-05 20:55 ` Nicolas Goaziou
2018-11-06 3:05 ` Ihor Radchenko
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).