emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Fix for inlinetask visibility cycling causes infinite loop for "degenerate" inlinetasks
@ 2022-08-18  8:58 Anders Johansson
  2022-08-18 10:00 ` [BUG] Fix for inlinetask visibility cycling causes infinite loop for Anders Johansson
  2022-08-19  6:28 ` [BUG] Fix for inlinetask visibility cycling causes infinite loop for "degenerate" inlinetasks Ihor Radchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Anders Johansson @ 2022-08-18  8:58 UTC (permalink / raw)
  To: org-mode-email

[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]

Hi,
I use "degenerate" inlinetasks (without an "*** END" line) quite a lot (for
example for "coding" snippets in my orgqda package
https://git.sr.ht/~andersjohansson/orgqda/).

Degenerate inlinetasks are stated as allowed in the documentation at the
beginning of org-inlinetask.el, but are maybe not so common since
org-inlinetask-insert-task always inserts the END-line.

Since April, an infinite loop is caused when cycling an entry containing
degenerate inlinetasks by commit:
5f184b org-inlinetask.el: Fix visibility cycling for inlinetasks

Sample for reproducing:
-----
* Heading
*************** Degenerate inlinetask
-----

Cycling "Heading" will call org-inlinetask-hide-tasks where the last calls
in the loop of `inlinetask-goto-end` takes us to the line below the
inlinetask, but `backward-char` takes us back to the point at the end of
the inlinetask, so `inlinetask-at-task-p` is still t and the loop continues
infinitely in this fashion.

I don’t have a good suggestion for a solution that would still solve the
problem addressed in that commit.

Best,
Anders Johansson

[-- Attachment #2: Type: text/html, Size: 1438 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-20  6:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18  8:58 [BUG] Fix for inlinetask visibility cycling causes infinite loop for "degenerate" inlinetasks Anders Johansson
2022-08-18 10:00 ` [BUG] Fix for inlinetask visibility cycling causes infinite loop for Anders Johansson
2022-08-19  6:28 ` [BUG] Fix for inlinetask visibility cycling causes infinite loop for "degenerate" inlinetasks Ihor Radchenko
     [not found]   ` <CAKJdtO8Nhy1VVORRo0+piTgMC1Oxj2do80U+tuVdDep79GEX5Q@mail.gmail.com>
2022-08-20  6:54     ` 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).