Re: org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-10-20 Thread Ihor Radchenko
Dan Drake writes: > I like that idea. It's consistent, uses "prior art", so to speak, and most > of all , archiving involves cutting the subtree, so it's a very similar > change to the buffer / structure. I looked into doing this using a very simple variant of the command: (defun org-cut-subtre

Re: org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-09-22 Thread Ihor Radchenko
Rudolf Adamkovič writes: >> May you list the editing commands that you think can benefit from an >> extra confirmation dialog? > > Me? I regularly archive subtrees by mistake. :) You can re-bind C-c C-x C-a to `org-archive-subtree-default-with-confirmation' then. >> ... which are `org-ctrl-k-p

Re: org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-09-17 Thread Dan Drake
I like that idea. It's consistent, uses "prior art", so to speak, and most of all , archiving involves cutting the subtree, so it's a very similar change to the buffer / structure. On Sun, Sep 15, 2024, 07:44 Ihor Radchenko wrote: > Dan Drake writes: > > > "AFAIU, what you are struggling with i

Re: org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-09-15 Thread Ihor Radchenko
Dan Drake writes: > "AFAIU, what you are struggling with is that you sometimes press "k" by > accident, without aiming to cut the subtree. Is my understanding correct?" > > Yes, that's correct. Sometimes I'd use the speed key accidentally and > cut the subtree. Then, what about introducing somet

Re: org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-09-03 Thread Rudolf Adamkovič
Ihor Radchenko writes: > > - `org-kill-note-or-show-branches' (`C-c C-k'), > > This one does not modify anything in the buffer. What do you want to > protect here? Oops! That was a brain fart. > As you saw, the purpose of this option is very specific now. I am not > sure if it is a good thin

Re: org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-09-01 Thread Dan Drake
"AFAIU, what you are struggling with is that you sometimes press "k" by accident, without aiming to cut the subtree. Is my understanding correct?" Yes, that's correct. Sometimes I'd use the speed key accidentally and cut the subtree. On Sun, Sep 1, 2024 at 11:19 AM Ihor Radchenko wrote: > > Dan

Re: org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-09-01 Thread Ihor Radchenko
Dan Drake writes: > I customized org-ctrl-k-protect subtree so that when point is on a > headline for an entry with some folded content, ctrl-k asks for > confirmation first. > > However, I also have the "k" speed key set up; to me, doing ctrl-K and > the "k" speed key are the same, but only ctrl

Re: org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-08-29 Thread Rudolf Adamkovič
Dan Drake writes: > What do you think we should have for the new name for > org-ctrl-k-protect-subtree? Just "org-protect-subtree"? I like that name, but perhaps we should zoom out a bit and look at the entire family of the non-idiomatic `org-ctrl-*' variables. Most importantly, though, we shou

Re: org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-08-28 Thread Dan Drake
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 deprecat

Re: org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-08-27 Thread Rudolf Adamkovič
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 path

org-cut-subtree should respect org-ctrl-k-protect-subtree

2024-08-27 Thread Dan Drake
I customized org-ctrl-k-protect subtree so that when point is on a headline for an entry with some folded content, ctrl-k asks for confirmation first. However, I also have the "k" speed key set up; to me, doing ctrl-K and the "k" speed key are the same, but only ctrl-K respects the "protect subtre