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 AM Rudolf Adamkovič <rud...@adamkovic.org> wrote: > > Dan Drake <dan.dr...@gmail.com> 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č <rud...@adamkovic.org> [he/him] > http://adamkovic.org -- Ceci n'est pas une .signature.