emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Ihor Radchenko
Subject: Re: How to set priority of a heading with the highest one among its children
Date: Sun, 23 Apr 2023 18:07:28 +0000

Edouard Debry <edouard.debry@gmail.com> 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 tree, how can I select the top level heading ?

(while (org-up-heading-safe))

Try to play with this using M-: with point at different headings.

> - when at a given heading, how can I change programmatically the priority ?

(org-priority 1), for example.

> For this latter question, I tried (org-entry-put nil "PRIORITY" "2"), but it 
> replied that
>
>  org-priority: Priority must be between ‘0’ and ‘5’

That's because `org-entry-put' converts the argument into number,
assuming a single-character string like "A". This is probably a bug.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]