From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YF/dIWEOz2YyDwAA62LTzQ:P1 (envelope-from ) for ; Wed, 28 Aug 2024 11:47:45 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id YF/dIWEOz2YyDwAA62LTzQ (envelope-from ) for ; Wed, 28 Aug 2024 13:47:45 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ODljT4WZ; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724845665; 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=BnaC8chysE6UHWukucI8odNJpGkUO3GLjRGbSe9rbDA=; b=QNV/Rf3bWJorcTaHUpOoqc428V0U+uivHOaHGKaEuVcjoKrKq3/CYmKxo6pIZ07vuXfZk5 /GYRa8bitZqFpmwKoHFwxCd+pEmmW/F6f5TZK2Zbo38F2DBHpZ2a0TVRX6F2byBC8fM2gt VqSE4v0C65sZtX+ebgIsNOxyTZHL79m3e+r+xCFOJDL5OnxYzS1ftW3z4upiWJckDSfcyj /+/BnU+cCKPuw3KRLzi+2Txx+8tBBZ6XcvYyNcztUwYMfBBSHZW3xRqF7UafH7CMAEY1WG uO/w7y3OaFe4barJuSZV7bqO3BfXPzZexXvdpdi+Wz69cIhyZ31X/mh3pL/3NQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ODljT4WZ; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724845665; a=rsa-sha256; cv=none; b=mCMnGr2cgTapHQRmVqzZ+GNcjGaObF/J9b9PEEFLXJEacalXa/SofqqJXzhrpj1gbZ23FN OppqqdoQYPJUSyMBNBWdDHsG4zOr7tdfZikKEn+agc94H2B52KQI89BG76nerPZi8jDy4k kuYqiHhNJ6J2w1GelJrAKC1boiEF247HOhXKPGnHgeOrBri1NwBOw+KAnLYcJ6Jw3RCJeK P+VhwUI7r55pF4soG6GmQmKUuc6krFzuOnI2vtOtvxZ1RNrvVUma26CdG24bC26VZmhGwR mIpVY0cuJWptZV26qG+2J6RbhEBPc/0MEsxWhX3o66OOi4NGs3Vdsz5yv14+Ww== 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 5C1796F27F for ; Wed, 28 Aug 2024 13:47:45 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjH8R-0005Ln-6E; Wed, 28 Aug 2024 07:46:47 -0400 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 1sjH8P-0005Lc-Tw for emacs-orgmode@gnu.org; Wed, 28 Aug 2024 07:46:46 -0400 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sjH8J-00055n-67 for emacs-orgmode@gnu.org; Wed, 28 Aug 2024 07:46:45 -0400 Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-3db51b8ec15so254180b6e.1 for ; Wed, 28 Aug 2024 04:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724845598; x=1725450398; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=BnaC8chysE6UHWukucI8odNJpGkUO3GLjRGbSe9rbDA=; b=ODljT4WZehe0LmnnOxX6k5+WfJR4h4Vsk1Lvhrj2NxStOlra7fugpsNSGMZ4jm4CrP MQQ/pMQa42t2Mm6WNQqJzGF8xnTXgXk8JqMx44n43gSa167AJkMb7PpOQbEMrszX7Xiw 7QkfBv02YUctEZ6Th8KCr3ClQttWnGTYcN919hwS/U7CJA/K7VaaU6ABVMCiN2WfC4Br KRp87Jvd7t/v3rqiqDqX5gkT4Sxnpf4kGMhf0lxkcy7CA13sshV9VrS3eeL8CIVhnYbc /SX8IqMqvxQ/oveh57Du+yAgBRYWGGtoaA4nR3Wn9DyaHum5U50KiS/3QpxJW3cRezhF UsUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724845598; x=1725450398; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BnaC8chysE6UHWukucI8odNJpGkUO3GLjRGbSe9rbDA=; b=wE5gxAkzAs6J2iT47GlNbXfRZMZMvlVA5Ljs8kSx9cm3SdEvKrKEu/arkMPwMVLHir 8zEULbnyV/cvYd5cNC3z5I+u5ne5QXPqrrxVRco+hjIfv2msNW6HaDWZO7APrnyEzsMA FSlm+pr8DoGRzP4rsvYvtvXTyr8HE3DoOPpOGky/4L5oD2b8QfoXCxFSTMLg3lmpu3Y+ q42n9ExkUxF3P8qMnpgBVJfxI8xR81hmygwZbC37ex39TecXZ1rJdm7dSLOOsRvog6KH AJxlraydR8t1D1tomvbSJzesz+haTW5NS7MzPw6RYhADSwNG8yCdcPVVVceXiT2TDX8a CC+Q== X-Gm-Message-State: AOJu0YyVJXHvQg+OP5KGRawGI1Nzjar4S9REov5MCTm9UgPvfIAl5U+B jRv1x7Xx07tWth9fDgJht9/+qaET2N+3GVHxASi31pudiLROlu9vUR1zmCKThWoCZGifIXjlftR 8VCvD+doNZLRIbv+Tzsz7J4Ix/Vs51A== X-Google-Smtp-Source: AGHT+IHXVn4W5RhC03S6A8nq0rhJvtgpiEfDDAmpdoSjL3GTNyCNEonYPhYuSaiIX7BlMQJpzOhNv0SJVW9MMLs5lo4= X-Received: by 2002:a05:6808:2110:b0:3d5:6277:77b with SMTP id 5614622812f47-3deffa0b28emr700658b6e.12.1724845597640; Wed, 28 Aug 2024 04:46:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dan Drake Date: Wed, 28 Aug 2024 06:46:26 -0500 Message-ID: Subject: Re: org-cut-subtree should respect org-ctrl-k-protect-subtree To: =?UTF-8?Q?Rudolf_Adamkovi=C4=8D?= Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::22d; envelope-from=dan.drake@gmail.com; helo=mail-oi1-x22d.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, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 5C1796F27F X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -9.79 X-Spam-Score: -9.79 X-TUID: I/t0UWR3/9nm I agree, a function that examines the "protect subtree" variable and performs the logic is best. I can work on that. What do you think we should have for the new name for org-ctrl-k-protect-subtree? Just "org-protect-subtree"? How do we handle renaming the variable? We'd want some way of deprecating the old one and so on. On Tue, Aug 27, 2024 at 9:15=E2=80=AFAM Rudolf Adamkovi=C4=8D wrote: > > Dan Drake writes: > > > I took at look at the source code, and it seems like a trivial change > > to make these two things act consistently: [...] > > Dan, > > Thank you for reporting the bug and even prototyping a solution. > > I think the logic should be > > extracted into a function, > > and tested on all paths: > > - `org-kill-note-or-show-branches' (`C-c C-k'), > - `org-cut-subtree' (`k' on first *) and > - `org-kill-line' (`C-k'). > > However, we should then also rename > > `org-ctrl-k-protect-subtree' > > to something more general, like > > `org-protect-subtrees', > > as it applies beyond "ctrl-k". > > Rudy > -- > "The whole science is nothing more than a refinement of everyday > thinking." --- Albert Einstein, 1879-1955 > > Rudolf Adamkovi=C4=8D [he/him] > http://adamkovic.org --=20 Ceci n'est pas une .signature.