>>> "IR" == Ihor Radchenko writes: > Uwe Brauer writes: >> Two comments though >> >> 1. It works, if the source block is at the beginning of the file 😉 >> >> 2. I confess I don't understand anymore the use of `(let ((el (org-element-at-point)))': >> >> a. In your first version you used the defined «el», but know you >> don't, hm just saying. > That's because the first version used the actual headline title as a > value of the property. That values had to be acquired somehow. > org-element API was used. I expressed myself rather badly 1. First code (defun test/set-property-at-heading () "Function to be called at the beginning of an Org heading." (interactive) (let ((el (org-element-at-point))) (org-set-property "foo" (org-element-property :title el)))) ^el is used (org-map-entries #'test/set-property-at-heading) 2. Second code (defun test/set-property-at-heading () "Function to be called at the beginning of an Org heading." (interactive) (let ((el (org-element-at-point))) ^el is defined but not used. (org-set-property "New" "[ ]"))) (org-map-entries #'test/set-property-at-heading) >> In any case thanks again for this very valuable advice. I suggest to >> include it somehow in the documentation, since I believe that other >> users have encountered similar situations. > A.11 Using the Mapping API > A.10 Using the Property API Is this a reference to the manual? 🙄