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 kNXTNJE/oGX+TAAAkFu2QA (envelope-from ) for ; Thu, 11 Jan 2024 20:20:49 +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 8HF2MZE/oGWIRgAAqHPOHw (envelope-from ) for ; Thu, 11 Jan 2024 20:20:49 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=IKpq7hix; dmarc=pass (policy=none) header.from=gnu.org; 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=1705000849; a=rsa-sha256; cv=none; b=cQztAEAswdgAXHgzQzErVn8OZsdwJRi9BZcJhSI9qUa7xpz/8oOMM33PbYDJ3t97wLBkXU DWGaVnOJJ/mS1NIQQ3slA8TNQWqYRX+3REhke7PF4dVkZO//rus9AEgjXT4kp5L9M4WuaL JepoQsVto9w+b7X7YLQo87PU2DqXa3Kn0l2bCsYFxXTf3vFL7gNAD9VnngT+Ho8lTOhPkl QstNoZ+AgyN5M8+mAfLu8klfYzgylEbLCUvlPQ+oP/QdsfzW5Hll6OXBxoSMSrncOUa1yH VMGPUvPWR5UYDmLbv6Sas9g1ayV7Lj2vk3BpBH7jal8FqcohMJJbdxGxJg3IOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=IKpq7hix; dmarc=pass (policy=none) header.from=gnu.org; 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=1705000849; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ykOq30SasERhAx5mA/1xzF9FWoNe62/hA3aadlJCy2g=; b=Z+nOsFrgfgwyLxYbTWYapO8l6DNIDjCl+FHdnCNiNojP3R8PVkUTYo4pU5k16SQSLs8QnD dwPJDsjfLnKq5r6OVIodAu9h15pQGHb9AYjTIVcMRBEfjKtHprDwZjaVwbInaFm60Ee8/S HrT738OlzS0Pnv0rA5qee/pgXrMYcTRTV+qGlovigu+y/dTVndQVmSf5L9sQx1+QmiQ38U kxbNbI0YgyN4KGHtD8DRoZZtUzoRHq216nNaLC1y09OpsLIHLWqSCTZmIdIv90Bu4oi3W6 ang7gAlFFiHbY9xmbae3olM8xIM2V/m99Zi9QbgnMNjxMTtjhUkXaRvuX8wIaA== 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 8426553355 for ; Thu, 11 Jan 2024 20:20:49 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rO0at-0004au-WF; Thu, 11 Jan 2024 14:20:00 -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 1rO0ar-0004am-Sl for emacs-orgmode@gnu.org; Thu, 11 Jan 2024 14:19:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rO0ap-0001Wx-3g; Thu, 11 Jan 2024 14:19:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ykOq30SasERhAx5mA/1xzF9FWoNe62/hA3aadlJCy2g=; b=IKpq7hix/3+u Ht09gO5zwasjkza2XQgdZzL68H2J81zu7YgXJSDJrYNj3KBzdleLOgErJKKu5mUtMBiunNShZ3Rww n0se3kW9cMIgHHHG4fYPIWjvxcEbzOjP5xZ87FAHiPD4bO+F8sIGzN83PBL1Nb1hQC4mVcQh/p+Uv dA/+y49BPoQiyEslFlRatzJaqmlo2iExRgurD4NRbZqTK0JgypZUTm6BkDnK08eI8XwtXgxqEUJE/ x/aZg+mpegrV9M68MO4bxD9aWISe8dplbQovRae/WCYyySOg/9utc8S4ocwzUdvM2t35zZBB33PJQ elP56tBl6YwpfxVtWs2+9g==; Date: Thu, 11 Jan 2024 21:19:40 +0200 Message-Id: <8334v3lltf.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko Cc: monnier@iro.umontreal.ca, emacs-orgmode@gnu.org, 65734@debbugs.gnu.org, manikulin@gmail.com, iota@whxvd.name In-Reply-To: <87bk9rivzo.fsf@localhost> (message from Ihor Radchenko on Thu, 11 Jan 2024 18:08:11 +0000) 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/)] References: <87il8pao4l.fsf@whxvd.name> <87tts8vrpb.fsf@localhost> <83cyyw4of7.fsf@gnu.org> <875y4ovct9.fsf@localhost> <875y04yq9s.fsf@localhost> <875y02y0da.fsf@localhost> <87frz6w2zt.fsf@localhost> <83cyu9nyea.fsf@gnu.org> <87sf35pcds.fsf@localhost> <83y1cxmgws.fsf@gnu.org> <87ttnjj2dp.fsf@localhost> <83bk9rlusw.fsf@gnu.org> <87h6jjj17y.fsf@localhost> <838r4vlt0n.fsf@gnu.org> <87bk9rivzo.fsf@localhost> 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-Spam-Score: -10.51 X-Spam-Score: -10.51 X-Migadu-Queue-Id: 8426553355 X-Migadu-Scanner: mx13.migadu.com X-TUID: JLsXm+N5bNjc > From: Ihor Radchenko > Cc: monnier@iro.umontreal.ca, emacs-orgmode@gnu.org, 65734@debbugs.gnu.org, > manikulin@gmail.com, iota@whxvd.name > Date: Thu, 11 Jan 2024 18:08:11 +0000 > > Then, Org mode can instead have > > (setq-local kill-line-query-function #'org-kill-line-query) > (defun org-kill-line-query (beg end) > (org-with-point-at beg > (when (and (org-at-heading-p) > (progn > (end-of-line) > (and (< (point) end) > (org-fold-folded-p)))) > "Kill hidden subtree along with headline? "))) I don't know what org-with-point-at and org-fold-folded-p do, but my point is that you should consider the case when kill-line kills invisible text that has nothing to do with Org's headings and trees, so I suggest to either make the detection code smarter (so it could distinguish between the two), or make the prompt text vaguer (to not claim that the text must be a subtree). And if that is still not clear or you disagree, let's leave it at that.