From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ihor Radchenko Subject: 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/)] Date: Tue, 06 Nov 2018 11:05:54 +0800 Message-ID: <87va5a9a7h.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> References: <871s809c85.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <87a7mn8crw.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJric-00012O-IK for emacs-orgmode@gnu.org; Mon, 05 Nov 2018 22:07:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJriX-0005h0-JL for emacs-orgmode@gnu.org; Mon, 05 Nov 2018 22:07:54 -0500 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:45910) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJriX-0005gg-Do for emacs-orgmode@gnu.org; Mon, 05 Nov 2018 22:07:49 -0500 Received: by mail-pg1-x52b.google.com with SMTP id y4so4708674pgc.12 for ; Mon, 05 Nov 2018 19:07:49 -0800 (PST) In-Reply-To: <87a7mn8crw.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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: =2D `org-agenda' with subtree restriction: the results are different if you call it below or above an inline task. =2D `org-attach', `org-attach-dir', `org-attach-tag', with point below/above an inline task behave differently =2D 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 writes: > Hllo, > > yantar92@gmail.com writes: > >> Consider calling =3Dorg-back-to-heading=3D 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 =3Doutline-regexp=3D variable is = set >> to =3D"\\*+ "=3D, which includes inline tasks. > > This is the desired effect. Use the macro `org-with-limited-levels' to > ignore headlines. > > Regards, > > --=20 > Nicolas Goaziou --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEERZAHPFbUe3JemmzmZHB2Kn2hHYsFAlvhBRIACgkQZHB2Kn2h HYsgYQf/aGw5UsgDVsCuTgbM9Gr9HDVMjhu3Osmyc//r81nJOJbTYysNYxJ48PB/ BhFXgKfYx7yO9muaj61V82C/SXM0AAN6uLYWwR3/wpxKmtHXiAk69zZCAr7keUe2 4RJNYN03l4xkABBA9kXHMTMiRc8bVNEoeY61V6bKs4pGFnAh61v8X6nhi4nylaPj HCDnO4XRZG3VlUs2lKMSnNMN3bV642cTbLOOuKPMhMqgkxDBj7M+8Y6yu6/Y9A3C ZfQxa25RhQIs/DqsQtLookMuf0s3+Xi1r2Gqc/1mYm8BHqU1YTcwcYMM8UqGaNyl lxMefyEkb1UyFY4hkp2aHkBeuOio2g== =ib7Z -----END PGP SIGNATURE----- --=-=-=--