From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yzptEDmCVmHGbQAAgWs5BA (envelope-from ) for ; Fri, 01 Oct 2021 05:36:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uCx4CzmCVmFSfQAAbx9fmQ (envelope-from ) for ; Fri, 01 Oct 2021 03:36:25 +0000 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 A6A5B39D77 for ; Fri, 1 Oct 2021 05:36:24 +0200 (CEST) Received: from localhost ([::1]:45474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mW9LT-0000tw-Qz for larch@yhetil.org; Thu, 30 Sep 2021 23:36:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mW9Kv-0000tg-VF for emacs-orgmode@gnu.org; Thu, 30 Sep 2021 23:35:50 -0400 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:41758) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mW9Ku-00070D-HT for emacs-orgmode@gnu.org; Thu, 30 Sep 2021 23:35:49 -0400 Received: by mail-qk1-x731.google.com with SMTP id m7so7925428qke.8 for ; Thu, 30 Sep 2021 20:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:from:to:cc:subject:in-reply-to:date:message-id :mime-version; bh=UIlFXRxLtS/thzHWn30gyCWYDowJbNCujH+KFVnLP1c=; b=UGzebRyU+RXNkmsaPVo+60NvGF9IOYf2kl6ZxH7cR4mEU47c62PG2g9Hqm0FY2ugGi cAzGFw1UUI+BiXxr+Usgxd3YTiEtNEePzPi/Si+GpOYtNQTaPs/WP8NMtyVF9AuUhmBn WbB8XGBSkd40XkyvxDIdnQWImxznpyYjCKxowe4Cw1nwlI4oTPENFp8m61hw2YA2Bfng 4fc58zFeFjkczRbXQt64mKZFU+C4W1WPOICrwHV6L8iISgjJGEjz8QvMSnddj5/ynvwU VhyOG71Bb+kYjRsZodFX+aPvFkHODTmSkYpQC5p1EyDROZCsqK88G2mV6vjxUzYLQsBq 5CZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=UIlFXRxLtS/thzHWn30gyCWYDowJbNCujH+KFVnLP1c=; b=UMLdOPnhVtX6axRs5pXsK2y5FiWsoOmBne844rtIPy4NxWN/MaBOepUCqWA1/BRiks dyw6v3n1nzpaJpF3dBhIWvdR0MtkiHuUckUszRsk6EQO+pgUfTDIISWeX3l8ehG5a9lw l+dwfSmgD1LXJ39KwOASlrkgGVRGLMQzfqBhpBI7c40r3xgpfO1M9saQ3BREh1RSqaCu NPP2g3jAM8CIkze0/tAaoaAKtFqRFG8VDr579l8NvIfakjyS+JzI1ZFcCPwoAoiuBPY5 qRi50tx97k4qMDFYiPMbBqA7NsRBTZGe6X0GKPFWJxuAn4mYlw1R7F7dkPpNIwps+Axt TGfA== X-Gm-Message-State: AOAM531FOiUPcfj2TIWrwSwfc4QfqdlO4SdVfA8yMaKesJbbH17nOAFL ROkK6Ypckhrf9g+RfD3V4WCCjzmEamw= X-Google-Smtp-Source: ABdhPJy3h1h5VEajz42n1vurWtlQ+Nb6b6o9Ti4RpQTTZaVZrdmks5Wk1SR50s/bm1H4s5zGR5vAhg== X-Received: by 2002:a37:c05:: with SMTP id 5mr8093184qkm.495.1633059345217; Thu, 30 Sep 2021 20:35:45 -0700 (PDT) Received: from arch ([2601:82:c200:166d:afae:ebe6:a0e2:409e]) by smtp.gmail.com with ESMTPSA id g21sm2573221qtq.53.2021.09.30.20.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 20:35:44 -0700 (PDT) User-agent: mu4e 1.7.0; emacs 28.0.50 From: No Wayman To: mick.dauer@gmail.com Subject: Re: Visibility cycling with inline tasks 2 In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::731; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qk1-x731.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633059384; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=UIlFXRxLtS/thzHWn30gyCWYDowJbNCujH+KFVnLP1c=; b=sEIarBHwPiqUAW+2r0n4i6kd6DD1wQkDRHfIZfBluB8Dme11c6HfWThXM1yHwKUrQDw4Rw CgsdO895HGux4cXenQZeVXBobYduHRkun9lmIGqOBztQ42XCfRPKzG9tGvKdJ6kvJZPMot fqS9QwAtsFmgyqv14OczKdVCKIecw4XPlwCGyFHpeZzItO2w5uHvwCtrA+p7zSHkGRSl+1 E07o8OlcKwluCB2f3ZACStmFnnZR5W4SJoq36cZehLQM4+8f/NbvOxpp+WL65oIdUYFVkI HBVjO1k++ayZzMfn8ocekY0JfN4Uw4t139l8pXNKCxWvB9VDGlBOK8IqxJGoRA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633059384; a=rsa-sha256; cv=none; b=uKI9Umvo8NzNCKBEuBD6rV9F9Zr6E/yKe7oc/Am5gFF03aBP26ZJu4psLA2Gh3MhiTwj4u PdLOgUX0MVv26nrSrC5vTTTk18jKctztfPnTNMSEE4QAqU+0BO8uHnWXBuufRozSmdF0Gi tVbk7AaFNPcf/FdE46/HkGFuyIjs+UGR63JRYPeKCveQbXTf+QZb6wNq8s58BJewEPmnVa kDioXQnoAPqgnb1Vu6jeAgut6A0xgMNaL7Bfd6DTP7FaZoUbzBg216iCpq40YDWfh+Ab+Q qiiTnP4s70rWZcsRV2tNsHgyA0w7FQzqS0Lf+hn5tnmL7zssFb6KXn/mNYwx8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UGzebRyU; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UGzebRyU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: A6A5B39D77 X-Spam-Score: -4.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: JXyxzVqLHUL/ --=-=-= Content-Type: text/plain; format=flowed I can confirm the issue you've outlined on latest 'main'. To me it looks like the problem is in `org-inline-hide-tasks'. I don't use inline tasks, so I'm not sure what the exact expected behavior is, but that function uses a `while' during `org-cycle-hook' to iterate through all of the headings. My intuition is that it's overshooting a boundary and toggling visibility on more than it should. Does the attached patch behave more in line with what you expect? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-inlinetask.el-Limit-children-visibility-toggle-t.patch >From 04ed84c36a4cc04838b5b75e18858996af125f77 Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Thu, 30 Sep 2021 23:31:50 -0400 Subject: [PATCH] org-inlinetask.el: Limit children visibility toggle to subtree * org-inlinetask: (org-inlinetask-toggle-visibility): Limit toggling to subtree. Not sure if this is correct behavior or not. Just a suggestion. --- lisp/org-inlinetask.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el index 3379a2e46..3bdc03ae4 100644 --- a/lisp/org-inlinetask.el +++ b/lisp/org-inlinetask.el @@ -334,11 +334,13 @@ This function is meant to be used in `org-cycle-hook'." (org-inlinetask-goto-end))))) (`children (save-excursion - (while - (or (org-inlinetask-at-task-p) - (and (outline-next-heading) (org-inlinetask-at-task-p))) - (org-inlinetask-toggle-visibility) - (org-inlinetask-goto-end)))))) + (save-restriction + (org-narrow-to-subtree) + (while + (or (org-inlinetask-at-task-p) + (and (outline-next-heading) (org-inlinetask-at-task-p))) + (org-inlinetask-toggle-visibility) + (org-inlinetask-goto-end))))))) (defun org-inlinetask-remove-END-maybe () "Remove an END line when present." -- 2.33.0 --=-=-=--