From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs,gmane.emacs.orgmode Subject: bug#65734: [BUG] kill-whole-line on folded subtrees [9.6.8 (release_9.6.8-3-g21171d @ /home/w/usr/emacs/0/29/0/lisp/org/)] Date: Mon, 08 Jan 2024 12:15:59 +0000 Message-ID: <875y04yq9s.fsf@localhost> References: <87il8pao4l.fsf@whxvd.name> <87tts8vrpb.fsf@localhost> <83cyyw4of7.fsf@gnu.org> <875y4ovct9.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33199"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-orgmode@gnu.org, Eli Zaretskii , 65734@debbugs.gnu.org, Max Nikulin , iota@whxvd.name To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 08 13:14:12 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rMoWB-0008Rs-4D for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Jan 2024 13:14:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMoW6-0006Oe-3P; Mon, 08 Jan 2024 07:14:06 -0500 Original-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 1rMoVw-0006DQ-Kg for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2024 07:13:56 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMoVw-0001aI-9o for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2024 07:13:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMoW2-00062J-8D for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2024 07:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jan 2024 12:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65734 X-GNU-PR-Package: emacs Original-Received: via spool by 65734-submit@debbugs.gnu.org id=B65734.170471598523119 (code B ref 65734); Mon, 08 Jan 2024 12:14:02 +0000 Original-Received: (at 65734) by debbugs.gnu.org; 8 Jan 2024 12:13:05 +0000 Original-Received: from localhost ([127.0.0.1]:35364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMoV7-00060p-Ag for submit@debbugs.gnu.org; Mon, 08 Jan 2024 07:13:05 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:60925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMoV3-00060F-9l for 65734@debbugs.gnu.org; Mon, 08 Jan 2024 07:13:03 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 87856240028 for <65734@debbugs.gnu.org>; Mon, 8 Jan 2024 13:12:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1704715967; bh=KILi8RYFXyxi+QwjQYjDTCUZO/LJPCbOqbujPIR3qXI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=QlkswDRl1sUo/07eZJNCUrg2Mv04pwnLCZGeVsgVarh147BWpSL8O2QwU4AkwqcsT quwQOQaUsY7HNpbECHwioPbJ79WJfSR0wY1oasxBS/SGfAANJ5/4jNLSMGgN+nNRuC YWEAcc90fcB97qE0Asllht9iozyZpPpbfVXknTm+8E7un+Thx2co2EqWGYxFPL2cqA ecSJmSjGFi1Kq6L5/9IJkxfkTL68jCtPxhD63TSpCT+OauiLYmg/baTjX8M9s4IWG7 h2VAcTJXsa2dfZnPnxgWZhNEt+kfkKoRAuFwnBDJ59OMVuEfAOGm7RFJy5myrpC1mc p9enGSTsm0sqg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T7tHL3Qqnz6tx8; Mon, 8 Jan 2024 13:12:46 +0100 (CET) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277551 gmane.emacs.orgmode:158923 Archived-At: Stefan Monnier writes: > But in addition to that, I suspect that Org should probably not modify > visibility directly from the modification hooks. Instead, its > modification hook function should just stash the info somewhere and then > update the visibility later on, such as in a `post-command-hook`, timer, > `pre-redisplay-functions`, younameit. Good idea. At least, for this specific feature in Org mode. > As a rule of thumb, I think modification hooks should be treated a bit > like POSIX signal handlers: just record the event somewhere but don't do > any substantial work in there. Yet, it is sometimes necessary to modify text right inside the modification hooks. Otherwise, it is very hard (and sometimes impossible) to keep track of the original text region when multiple modifications happen there one by one. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id SNXKIRfnm2XABgEAkFu2QA (envelope-from ) for ; Mon, 08 Jan 2024 13:14:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id uLlBGhfnm2UwLAEAqHPOHw (envelope-from ) for ; Mon, 08 Jan 2024 13:14:15 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=QlkswDRl; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704716055; 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=wYJ51jsHlpZ8Ay9R7YzNWENwe7oAdRsEcD3s555u97s=; b=nLmci83sE9wBzB8rPPMJndtxVtxxgptLs5WwaSdN8uuT18WmHyc7PgJZM/CSwqX7+379mf whvFZocBtAFyIiLhMFEmLsn5BY1tLpNAgIv5mRk2NyfVx9w1L4yxYBZKrxA/hGwkzNo8W2 a6zaKXGxKiWmY0WW7doLFI4AWBKXWLZGeqJBmrtie8t2pqrU5hr2dUHBbPvIhoh4LMO4zX +ZXkdC3VElWL4mc96ZvEXZPZyHXd40KR7onEc8DWtdlq/K28JLteRXyOu3gQ58fQxkMGxn JOs6m7cmHqQXHZsiEqmqPq482HrKs9algP0FhhXUE4I4TvgMXV43DNx/KAyxjg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=QlkswDRl; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704716055; a=rsa-sha256; cv=none; b=E1jdgNB0ctic5/sVo/FZeTWaj0loOTzBSVy54jCTMZvFIRRWmU76eNX4kmgNaZhVJFVxLL es4CvKkZJffnC8GPcjOtf7/qDTdE1LXZvL5zLL34kKNS2+R1WZKkOvL9CXlTE1JfaqQfqa s7eMoldUf1oZpmjjUWNuGzDzgVyBhm47KdF5UaXA6+O3VEisDZXq/rD1gcDQc8ASboblNk H+uWamBGXkPvIqocH8wNfw1MQShiit/qBtUtX78ruS0zHOvTye3AJcAGP/SBhPjjDAOgZl vgjX0cpqzdLRbsDq8rMrdkDKfsj20aV986DYVVWdpL0PxzZXx5B6xGFMiJwsaw== 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 340F945D4E for ; Mon, 8 Jan 2024 13:14:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMoVA-0005Sb-9z; Mon, 08 Jan 2024 07:13:08 -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 1rMoV8-0005S8-N9 for emacs-orgmode@gnu.org; Mon, 08 Jan 2024 07:13:06 -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 1rMoUt-0001CQ-Hk for emacs-orgmode@gnu.org; Mon, 08 Jan 2024 07:13:06 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9C91A240101 for ; Mon, 8 Jan 2024 13:12:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1704715967; bh=KILi8RYFXyxi+QwjQYjDTCUZO/LJPCbOqbujPIR3qXI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=QlkswDRl1sUo/07eZJNCUrg2Mv04pwnLCZGeVsgVarh147BWpSL8O2QwU4AkwqcsT quwQOQaUsY7HNpbECHwioPbJ79WJfSR0wY1oasxBS/SGfAANJ5/4jNLSMGgN+nNRuC YWEAcc90fcB97qE0Asllht9iozyZpPpbfVXknTm+8E7un+Thx2co2EqWGYxFPL2cqA ecSJmSjGFi1Kq6L5/9IJkxfkTL68jCtPxhD63TSpCT+OauiLYmg/baTjX8M9s4IWG7 h2VAcTJXsa2dfZnPnxgWZhNEt+kfkKoRAuFwnBDJ59OMVuEfAOGm7RFJy5myrpC1mc p9enGSTsm0sqg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T7tHL3Qqnz6tx8; Mon, 8 Jan 2024 13:12:46 +0100 (CET) From: Ihor Radchenko To: Stefan Monnier Cc: Eli Zaretskii , 65734@debbugs.gnu.org, Max Nikulin , emacs-orgmode@gnu.org, iota@whxvd.name Subject: Re: bug#65734: [BUG] kill-whole-line on folded subtrees [9.6.8 (release_9.6.8-3-g21171d @ /home/w/usr/emacs/0/29/0/lisp/org/)] In-Reply-To: References: <87il8pao4l.fsf@whxvd.name> <87tts8vrpb.fsf@localhost> <83cyyw4of7.fsf@gnu.org> <875y4ovct9.fsf@localhost> Date: Mon, 08 Jan 2024 12:15:59 +0000 Message-ID: <875y04yq9s.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -5.03 X-Spam-Score: -5.03 X-Migadu-Queue-Id: 340F945D4E X-TUID: ul9U+Pt6wDHo Stefan Monnier writes: > But in addition to that, I suspect that Org should probably not modify > visibility directly from the modification hooks. Instead, its > modification hook function should just stash the info somewhere and then > update the visibility later on, such as in a `post-command-hook`, timer, > `pre-redisplay-functions`, younameit. Good idea. At least, for this specific feature in Org mode. > As a rule of thumb, I think modification hooks should be treated a bit > like POSIX signal handlers: just record the event somewhere but don't do > any substantial work in there. Yet, it is sometimes necessary to modify text right inside the modification hooks. Otherwise, it is very hard (and sometimes impossible) to keep track of the original text region when multiple modifications happen there one by one. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at