Rasmus <[email protected]> writes:
> That's a nice solution. Implemented in attached patch.
Thanks. Two minor comments follow.
> Should this be added to ORG-NEWS? Is a "feature" or a "bug-fix"?
Bug-fix I'd say. There was an attempt to do it (see MINLEVEL binding),
but it was incorrect.
> + ;; Add :minlevel to all include words that no explicitly have one.
Please update this comment, as it is no longer valid (property instead
of :minlevel). In particular, it would be nice to describe how we
use :org-include-induced-level.
> (goto-char (point-min))
> + (while (re-search-forward include-re nil t)
> + (add-text-properties (line-beginning-position) (line-end-position)
> + `(org-include-induced-level
> + ,(1+ (org-reduced-level (or (org-current-level)
> 0))))))
Properties are usually keywords, not plain symbols. Also, for single
properties, `put-text-property' is slightly more lightweight.
(put-text-property (line-beginning-position) (line-end-position)
:org-include-induced-level
(1+ (org-reduced-level (or (org-current-level) 0))))
> + (get-text-property (point)
> 'org-include-induced-level))))
As a consequence:
(get-text-property (point) :org-include-induced-level)
You can push the patch once this is fixed.
Regards,