From b223a3cc75a45e817a78df08959dbf2c8111e411 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Tue, 17 Oct 2023 13:01:25 +0300 Subject: [PATCH] org-num: Allow property inheritance for UNNUMBERED property * lisp/org-num.el (org-num--skip-value): Honour property inheritance. * etc/ORG-NEWS (=UNNUMBERED= property inheritance is now honored by ~org-num-mode~): Document the change. Link: https://orgmode.org/list/249cd3af-c173-5ff2-df27-c32af3886329@gmail.com --- etc/ORG-NEWS | 10 ++++++++++ lisp/org-num.el | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index e37bba2bd..6c7db4e52 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -479,6 +479,16 @@ Currently implemented options are: iCalendar programs support this usage. ** New features +*** =UNNUMBERED= property inheritance is now honored by ~org-num-mode~ + +When ~org-num-skip-unnumbered~ is non-nil, ~org-num-mode~ now honors +~org-use-property-inheritance~ for =UNNUMBERED= property. Previously, +only local =UNNUMBERED= property was taken into account. + +Users can add ="UNNUMBERED"= to ~org-use-property-inheritance~ and set +~org-numb-skip-unnumbered~ to ~t~ to make ~org-num-mode~ skip +numbering of all the sub-headings with non-nil =UNNUMBERED= property. + *** New final hooks for Modifier-Cursor keys Final hooks are added to the following commands: diff --git a/lisp/org-num.el b/lisp/org-num.el index 0f8dca28d..17e405b2d 100644 --- a/lisp/org-num.el +++ b/lisp/org-num.el @@ -267,7 +267,7 @@ otherwise." tags) t) (and org-num-skip-unnumbered - (org-entry-get (point) "UNNUMBERED") + (org-entry-get (point) "UNNUMBERED" 'selective) t)))) (defun org-num--current-numbering (level skip)