From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id aBwjF46fx2XxUQEAqHPOHw:P1 (envelope-from ) for ; Sat, 10 Feb 2024 17:08:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aBwjF46fx2XxUQEAqHPOHw (envelope-from ) for ; Sat, 10 Feb 2024 17:08:46 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Rubuxgkm; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707581326; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=NNTB2xojyOD8N9mtdS15oR7hU7o4yoficrtQWL7zX1Y=; b=YD0UnLsIvQw7VREDhv/crx9YO6lAg2cK0KTMvdIU9Xve9ln6YRJnf0CLaORnD2OuTw2rx6 ER5fSLJqSjbnVOcy1xOPTc8DC0nA5WISOLVA6OkOU25Eb+Rs8phrpoPr2TmA4akebUS9+I Qd8A52AMtQ61qogHYL8pRunNDmfAdaNGbZ7Z/jAuhS2kBQFxFsSb+Ght/A2BxK4dkyaF7m 5cY5VGcXhQgLPYbs4c5ixfISQ56Ioz3CldWqV02CdUaoDpr8eNF0g+vZOv1gDJd0carjuF 3qOhqYAUGL+5m6bqzkBfHEQ7uY3hucVsvsucndSgCEJTKe0y+uNDLKWYpuzfEQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Rubuxgkm; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707581326; a=rsa-sha256; cv=none; b=i8/Zxb9w9Rx5WSHLGTi089Hyp6Ze2/XGd2Tm8S3fa9iWjQYIrsCFRInuVLDAtAA6RImXPp B+PMAepTEbbvfGvmQARpC8hg1NY3IZOHHEqB3WAj36pIydYmx1KTFfYbZbVrd5LbteT1rb D149jnt5tLpS7S+bElqTLaHkygpAeWtwEZqS8Cf1+cwd2WbScalZJmoxKCpyRjclro7HCx bIZNlRQHdfzgbMotgXXHnbC5YxROXxHfSK10MGBoAg4C1yGR7qHFhI1EBIhss0hk0JqxiE Niwrg2XcB/lWbiiS9crlDoHhO9R/+hitJAQTulf0WchwJ9yzunTsDxAeVkBrGw== 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 0938A1AD65 for ; Sat, 10 Feb 2024 17:08:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYptM-0005lW-Al; Sat, 10 Feb 2024 11:07:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYptE-0005l5-8p for emacs-orgmode@gnu.org; Sat, 10 Feb 2024 11:07:40 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYptC-000896-Bv for emacs-orgmode@gnu.org; Sat, 10 Feb 2024 11:07:40 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 88196240101 for ; Sat, 10 Feb 2024 17:07:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707581256; bh=NNTB2xojyOD8N9mtdS15oR7hU7o4yoficrtQWL7zX1Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=Rubuxgkm9z1tXWd1XJSbG/vVSpgHAlC9CvN+nPzZGR7DImcJ7bfplL1PzX1WkGEmy MqsopvWgoJvk/dKl6S6Vkv3z29hal1Xu4ddkapIjEISvKeJUBoOxQ+Hz922rgWeu3o uU9k6pBeMhiLWUh1C+0Y7li73LbAoYfuUEgPd9nVFDx+iAWe7NCfvmXmFrw7pEhbUb UWp8x3uihEdU0Ay4lEUz1yjEsrKmQvG1URa4Q5FF3OufFbNZNWTEUifK6KCdgpTSzA JxacrZC2yWWUyXsamYEsG6fauwwoXdIhtKWWX4ntsCyhDZqyc52bsdCZaM3v8gR5bL tOtC+mjDvFQBA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TXFx3516Cz6twg; Sat, 10 Feb 2024 17:07:34 +0100 (CET) From: Ihor Radchenko To: Omar =?utf-8?Q?Antol=C3=ADn?= Camarena Cc: emacs-orgmode@gnu.org Subject: Re: Bug: org-catch-invisible-edits doesn't actually catch most deletions [9.4 (9.4-41-g9bb930-elpaplus @ /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201116/)] In-Reply-To: <87lfesinu3.fsf@matem.unam.mx> References: <87lfesinu3.fsf@matem.unam.mx> Date: Sat, 10 Feb 2024 16:11:10 +0000 Message-ID: <87o7coe1up.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.03 X-Spam-Score: -9.03 X-Migadu-Queue-Id: 0938A1AD65 X-Migadu-Scanner: mx12.migadu.com X-TUID: ZaKNCo5+AtLd Omar Antol=C3=ADn Camarena writes: > Setting org-catch-invisible-edits to 'error does catch org-delete-backwar= d-char (bound to by default), but it doesn't catch backward-kil= l-word (), or kill-word with argument -1 (M-- M-d), or backwar= d-kill-sexp (ESC ). > ... > I'd suggest that naming the variable org-catch-invisible-edits strongly s= uggests it should catch all deletions in the invisible text and that the cu= rrent behavior is misleading. Catching all commands is impossible because we cannot know in advance which command (including user-defined) is going to perform editing and which does not. And throwing an error /while/ a command is performing edits can easily break command logic and cause unpredictable bugs. Not to mention that some commands are OK to edit inside folded text. Org mode now has `org-fold-catch-invisible-edits-commands' where you can manually specify the commands you want Org to abort before they are executed. Handled. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at