Re: *** BULK *** Re: How to set priority of a heading with the highest one among its children

2023-04-24 Thread Ihor Radchenko
DEBRY.Edouard writes: > Here is something working, probably not yet all cases proof > > (defun local/set-priority1 () > (org-with-wide-buffer >(when (org-goto-first-child) > (let ((ls (remove nil (cl-loop collect (local/set-priority1) while > (org-goto-sibling) >(outline-u

Re: *** BULK *** Re: How to set priority of a heading with the highest one among its children

2023-04-24 Thread DEBRY . Edouard
Here is something working, probably not yet all cases proof (defun local/set-priority1 () (org-with-wide-buffer (when (org-goto-first-child) (let ((ls (remove nil (cl-loop collect (local/set-priority1) while (org-goto-sibling) (outline-up-heading 1) (if ls (org-prior

Re: How to set priority of a heading with the highest one among its children

2023-04-23 Thread Ihor Radchenko
Edouard Debry writes: > But this involves org skills a bit beyond my understanding, I wonder if you > could give > me some piece of advices on how to do that : > - is there a suitable hook for this function ? No hook, but you can advice `org-priority' using :after advice. > - when in a given t

How to set priority of a heading with the highest one among its children

2023-04-20 Thread Edouard Debry
Given this tree : * TODO Main [#2] ** DONE Child1 [#0] ** TODO Child2 [#3] ** TODO Child3 [#4] *** TODO Subchild1 [#1] *** TODO Subchild2 [#2] I would like that the priority of parent headings be automatically set to the highest priority among its note done children. So, in previous example,