From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +NecOO7zdWKHLgEAbAwnHQ (envelope-from ) for ; Sat, 07 May 2022 06:22:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0KDPN+7zdWI9wgAAG6o9tA (envelope-from ) for ; Sat, 07 May 2022 06:22:06 +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 8D235B3F for ; Sat, 7 May 2022 06:22:06 +0200 (CEST) Received: from localhost ([::1]:45060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnBxF-0002cP-IX for larch@yhetil.org; Sat, 07 May 2022 00:22:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnBwp-0002cF-DP for emacs-orgmode@gnu.org; Sat, 07 May 2022 00:21:39 -0400 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]:45648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnBwn-0007hi-Rk for emacs-orgmode@gnu.org; Sat, 07 May 2022 00:21:39 -0400 Received: by mail-oi1-x236.google.com with SMTP id n24so9601583oie.12 for ; Fri, 06 May 2022 21:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=klmXmEQU8KjmUnDa80sNL+sGM5kFc4fvfQKaMIPWyac=; b=njuqZuNNOs5YaP80Nibz+vwNV4kv3njt/kz3GY8E7JXW4V0//Py3vEWruXlLzaOiNC m+zwa6wnFl1Lx9DziVi2r6egXJIAYt3KUdI+O8j6pE1titZMG+MzETCh4KnKg3HWS2eW AFyHz6H3zC8I/JOddMoIRd71rvma+7FffbIGl5cybswxmlejbA7ZaAuSkcbF5WaIBXwC mVBev0RnX4h+K1/zShzOtprjWrul0Q2WgTFRAv35LK3BxFmzd44R+I1+A/KnnansBESs fT+I/M6hprbiT5pbQYS0lA8S/+kXT0NsYOODl31OrcNCtItxhd7L4AehUJKop796EDIA oElA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=klmXmEQU8KjmUnDa80sNL+sGM5kFc4fvfQKaMIPWyac=; b=akoncVdIpBW8g0SAn8j+aAtw5qJ9xMOW2PmqOJuLbtzXW248JIwXB0KZzkEctwITiJ JvLzkY/gG12bJYDsP+4vJ0Tng1EgjLFn82C0EfZ5meiFQlLTH5pA25ZbfjDFpZcxBOob Ku5mWCVVt4qSrecdGAWJXkGcCsYcgnFBR4plbjcSIPW/jI1kyQRsiYuwYfL2k1wTUcq0 WnS9o7FfzXdMKNQUHSEZet8V8Rx5R1kLzsLzsd5ydOYZd/g4yomgMnN0lHPdiLMk6L1t MnseoV55vsco/7D7NEsQNOxPpFs3KV2RfXgsxhiSvXCRix+SP8uqy+329vaxuT8a2kod Pcug== X-Gm-Message-State: AOAM5301jItSE9ZKgm5tga6IjxiFWZMCbluUFYTlwrT4B6ZkKoat/4eH Yt4gEpdd8Do+oXOGMsHoFE8= X-Google-Smtp-Source: ABdhPJzQRAf30GLuIUOD6QJm9/JlaNRVnQcLZzqRI9LWPRuT3S5kWcjcikXzkVDTIVlA0SemFeIHYg== X-Received: by 2002:aca:36c1:0:b0:2ec:cf67:b8ef with SMTP id d184-20020aca36c1000000b002eccf67b8efmr6298511oia.115.1651897295428; Fri, 06 May 2022 21:21:35 -0700 (PDT) Received: from localhost ([104.223.98.2]) by smtp.gmail.com with ESMTPSA id b3-20020a9d7543000000b0060603221234sm2283556otl.4.2022.05.06.21.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 May 2022 21:21:34 -0700 (PDT) From: Ihor Radchenko To: Daniel Fleischer Cc: emacs-orgmode@gnu.org Subject: Re: Recent changes in org-fold regarding emphasize visibility In-Reply-To: References: <87a6bxicj9.fsf@localhost> Date: Sat, 07 May 2022 12:22:18 +0800 Message-ID: <87ilqiynt1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::236; envelope-from=yantar92@gmail.com; helo=mail-oi1-x236.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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=1651897326; 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: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=klmXmEQU8KjmUnDa80sNL+sGM5kFc4fvfQKaMIPWyac=; b=sAaoowkcfWBsbel4O/F4lFhcu8DhCxWIWVnp52xmr/0WUtx+9bc4x7G+vOBBiJINCAVMKU 8j5Zd3A+cYCz/SUVOqo9+beoixZGkVB5PaH9U9TpcdTC1aHOZt2U1qADo+vuHWXV+eX//4 9BTYzS9vLXqie1lYE8cAahG1CBXV8Sij3i1f1g1DdsYP5we9gCzSDFsiWfHFzRCMN5rdVq hCes3wnnjOhmne9uDaOcmapnlU/1WBrq0ffgZlyDyehDxddzkp9X9MLDbkWDdFWeRYYWk7 ITmZ0Zo2HeWCthroHnYMAfzA1x4WCdRssoDAJNSyBSNreaRpA86r+3Nsns4NMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651897326; a=rsa-sha256; cv=none; b=LuT1mXfeL+e5rIU4dCpJ9SzAYBc/CPGIrV9wkWX6lks5qT6OCNFo0Gx3TEcxzJsuBc7uNJ aKxLKV5AFwbomnvFBzvHAg1A9RO2qQY/o9T6BdrCooX6a+KNtLrAHpTaH7cT9Bkn0LbJZA Kpmj+Qs1OixjdGfFp408FQnspSet/3742G+ggavK0NnTZ4Z1XXqDRVPeLXxw3ctKgOGR7M 2fFXfaQHztF0ceh7dJu/BwsrG4TzZ/YZd52j/F5d810q2hcreY57ji40I07il+NZjrJAAh 7RD2rHBklbv1PRoGEYajebmJ3yuS1sBtK0geJnwIYzlq3jwNumawTmKAejpszw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=njuqZuNN; 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: -8.80 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=njuqZuNN; 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: 8D235B3F X-Spam-Score: -8.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: fh19cjc2zzN7 Daniel Fleischer writes: > Ihor Radchenko writes: > >> Fixed on main by d2a459d25 > > I've tried the commit. I think there are still issues. E.g. given a > folded headline > > * Introduction...| > * Section > > Inserting text at that point will do the following thing depending on > `org-fold-catch-invisible-edits': > > - error : it inserts the text without unfolding; most dangerous. > - show : unfold, insert the text without displaying it; dangerous. > - show-and-error: unfold but inserts the text anyways. Thanks for testing! The problem here is that emphasis markers and links are also partially hidden and it is a good idea to check invisible edits there. It's just that they were ignored by org-catch-invisible-edits in the past. But not anymore. I afraid that it is impossible to follow the present docstring for org-catch-invisible-edits without mixing 'error/'show-and-error with 'smart. It's perfectly fine to insert text right after trailing ]] of the links, but, as you showed, not after folded headline contents. Now, we have different kinds of hidden text at hand: - folded headlines/lists - folded drawers - folded blocks - folded links/emphasis The question is what should be the logical behaviour of Org when editing text inside or at the border of these hidden text types? How should we interpret the values of org-catch-invisible-edits (nil error show show-and-error smart)? Best, Ihor