[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: org-set-properties for various (all) headings
From: |
Uwe Brauer |
Subject: |
Re: org-set-properties for various (all) headings |
Date: |
Wed, 20 Jul 2022 10:05:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes:
> Uwe Brauer <oub@mat.ucm.es> 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?
🙄
smime.p7s
Description: S/MIME cryptographic signature
- org-set-properties for various (all) headings, Uwe Brauer, 2022/07/19
- Re: org-set-properties for various (all) headings, Kaushal Modi, 2022/07/19
- Re: org-set-properties for various (all) headings, Uwe Brauer, 2022/07/19
- Re: org-set-properties for various (all) headings, Kaushal Modi, 2022/07/19
- Re: org-set-properties for various (all) headings, Uwe Brauer, 2022/07/19
- Re: org-set-properties for various (all) headings, Kaushal Modi, 2022/07/19
- Re: org-set-properties for various (all) headings, Uwe Brauer, 2022/07/20
- Re: org-set-properties for various (all) headings, Ihor Radchenko, 2022/07/20
- Re: org-set-properties for various (all) headings,
Uwe Brauer <=
- Re: org-set-properties for various (all) headings, Kaushal Modi, 2022/07/20