Bastien <b...@gnu.org> writes: > Assuming this is just difficult, not impossible, what would be the way > to do it?
The major difficulty is to keep an association table between headlines in the pristine original buffer, and headlines in the copy being exported. Note that hooks and Babel code may have deleted or added some, or altered their contents, which means that it is theoretically impossible to get it right. You may want to go for an approximation, i.e., add an ID property only for headlines or inlinetasks with either - a TODO-like keyword, - a SCHEDULED value, - a DEADLINE value, - a timestamp in their contents, - a diary-sexp in their contents. AFAIK, ox-icalendar only considers these for export, so you will often end up marking a super-set of actually exported entries. Unfortunately, this will fail if a user decides to add TODO keywords or timestamps through hooks or Babel (e.g., in order to mark current headline with a "today" mark). I don't think you can limit the numbers of properties drawers created without inserting some limitations. > Would it be possible to emulate export first just for the sake of > adding IDs where it's necessary? I don't think so. > `org-icalendar-store-UID' is `nil' by default because a value of > `t' might be very inconvenient in some circumstances -- quoting the > docstring: > > "This variable is not turned on by default because we want to avoid > creating a property drawer in every entry if people are only playing > with this feature, or if they are only using it locally." I know. Though, I don't find it very inconvenient to create ID properties everywhere once per file. Regards, -- Nicolas Goaziou