From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wKKWLlsA/mKnrwAAbAwnHQ (envelope-from ) for ; Thu, 18 Aug 2022 11:03:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GNWtLVsA/mJjXAAAG6o9tA (envelope-from ) for ; Thu, 18 Aug 2022 11:03:23 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 43B92234ED for ; Thu, 18 Aug 2022 11:03:23 +0200 (CEST) Received: from localhost ([::1]:59324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oObQv-0000Uq-Fy for larch@yhetil.org; Thu, 18 Aug 2022 05:03:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oObMw-0000QQ-Df for emacs-orgmode@gnu.org; Thu, 18 Aug 2022 04:59:14 -0400 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]:37561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oObMu-0001yo-MD for emacs-orgmode@gnu.org; Thu, 18 Aug 2022 04:59:14 -0400 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-10ec41637b3so1085518fac.4 for ; Thu, 18 Aug 2022 01:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc; bh=xAxokbAdeV3QaMmHdvG9tre/a4BGqfQAofh4A/We9nk=; b=i1s5bw7kOjmguZdC9gCqA9WdcukMX5QIDT6sMocKUJBdzb0Oh1QPDpASFrclpYiH4N 8JPa2Lo7WLjyn12rvEi9a925CU64l7vMhrWdd58k9y/Zx7/m3dwk57bmwA1icuJy45UW pP9hkkz83SLWww2nFkaeDqrBheXKUU57qC3nY5Fk028lPamV06J9uxEqR17tAbqZC17t o9YenbVP5QDVtzwX9eVNNcJ4SB/USeeqhCLab0R1XSP1GzIjX/Jiuky3x1gdmJHggvp/ nHtdDOlk9pQefwsCM2LWv9v/4yScw5rA9Za4vMlCuimP/eZPZA3azJNIyR2WHDr4z124 7UNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=xAxokbAdeV3QaMmHdvG9tre/a4BGqfQAofh4A/We9nk=; b=0FRzWLSdR4cFXirmQgYTCZ1wAxzB+MPsmyXA0lUYW4WIuFC2Ln29OO1igJvbtosM4w wF/3fiMEPU9x3wHn0sbssiZy/Q/OykXSqeYM2EMZkjs7JMl5mXSrCdXis40y6SDRXKBk ymlRXMjkXl7N2AgtRZqygvbgg16ZIEle7MhxZLqZwp/mVKyKXq1wn05E1cs2ms/URNBy nyFbzuJz2qLH8+Q9fG6HibDU8+EeV+ScHXOyI2cNx7Ym7Szcyxkzfi9MicWQ/xXEhou1 wt0k3on3eF4vRs8061YWQM5OICYR1rKkdW9+LbdLK1LdFqvvei7KbdyD+j/Cx9A9U/KZ PxmQ== X-Gm-Message-State: ACgBeo0GhuF2RVmWqhf+N/2CSHK+T53Sxv1r6Bz3wHp5LO7XmkaeVmkT /VbVQYoBQSbuUnggEVcqMwrO66pHJJjMACAgSMgyTRN0AY73pA== X-Google-Smtp-Source: AA6agR6tzEO9/4OiHfWKwOtKWbbI+nXIgjitAuUvb6zfslvTSGQ2EEZgFlvE4kX0EEHi2bid5zgEx9coJI/at7V7QM8= X-Received: by 2002:a05:6870:e997:b0:10c:6f42:b05e with SMTP id r23-20020a056870e99700b0010c6f42b05emr861319oao.89.1660813150934; Thu, 18 Aug 2022 01:59:10 -0700 (PDT) MIME-Version: 1.0 From: Anders Johansson Date: Thu, 18 Aug 2022 10:58:59 +0200 Message-ID: Subject: [BUG] Fix for inlinetask visibility cycling causes infinite loop for "degenerate" inlinetasks To: org-mode-email Content-Type: multipart/alternative; boundary="000000000000e65ad405e6803192" Received-SPF: pass client-ip=2001:4860:4864:20::33; envelope-from=mejlaandersj@gmail.com; helo=mail-oa1-x33.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660813403; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=xAxokbAdeV3QaMmHdvG9tre/a4BGqfQAofh4A/We9nk=; b=BKMPsJOet74qgj6rGrd1xeBsJ+qoY/fYVPbuYzdq/XBl4omqxqS+yXVPZV3JiLVUgbRKSM 9NnlbXYS8aVdNm+xUXOLMigLy2DYqlJwfgz/zGsRgTgKcNaqPZaiP17gnL7KzYTdb6zaW8 F4atX7RXChdkuVYiD5YXjx48rusLY/+6v5IMdgU0l7nACIwWL1iLouyRqNanG/MramL0oL I4EtumI+TBKef/4cxD0ogHbsk1e0FjOoOZW33n63PHI//DSRJsMT6C6bmOLyg6fpJcb+Yv kr1pDpL3oAEJUJl9+iP4k8ij1OtxKL3dkfiExortfscOqHGYIe1S37q+Ob022w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660813403; a=rsa-sha256; cv=none; b=Lz77dTACfTJRMZjL1xnBkvSznwyicfNcjkq3bA5HCsySLxJeNblPd/F3gNt8Mq4YH+ZVGC 8PZPGNnaUuQE+f8krWwaXc9njk6SuS2d7ADwHaJ3oNl+kno4nmAwP4p6rpfCbpIePUGwGy bX4j8tl1TeNoDZaLpm8TC5x1aaGexD2+jJsWS0mOuk/LtTovWwFas1lfQVXesv+mn/CLOO frG0iEhaZyLmPxiBFieZvzZ9jMfeA9en4luQycz5gU7JDpkMd3+vPy7umJwuT/Jz7s0VKW 2NDCp9E052HNS0LvuaEBXaRGEkXQ/gzsKK1tpT3pCr1F+qfuOQ1qCcp1FNiTwA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=i1s5bw7k; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.86 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=i1s5bw7k; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 43B92234ED X-Spam-Score: -5.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: FN+MFrzt7JtA --000000000000e65ad405e6803192 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=99t have a good suggestion for a solution that would still solv= e the problem addressed in that commit. Best, Anders Johansson --000000000000e65ad405e6803192 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
I use "degenerate" inline= tasks (without an "*** END" line) quite a lot (for example for &q= uot;coding" snippets in my orgqda package https://git.sr.ht/~andersjohansson/orgqda/).=

Degenerate inlinetasks are stated as allowed in t= he documentation at the beginning of org-inlinetask.el, but are maybe not s= o common since org-inlinetask-insert-task always inserts the END-line.
<= /div>

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

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

Cycling "Heading" will call org-inlinetask-hide-tasks where th= e last calls in the loop of `inlinetask-goto-end` takes us to the line belo= w 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 conti= nues infinitely in this fashion.

I don=E2=80=99t h= ave a good suggestion for a solution that would still solve the problem add= ressed in that commit.

Best,
Anders Joha= nsson
--000000000000e65ad405e6803192--