Annotate org element by identifier
Annotations require ranges and original text to identify the text where the annotation needs to be placed. I'd like to annotate entire org elements which can be identified by an identifier (heading -> property id, src blocks -> names) which removes the need to store ranges and original text. Is this something that could be added?
Thanks a ton for the nice package.
@nobiot I am also willing to implement this myself and send a PR. Is this something you see benefits in being part of this package? Its quite different because i won't be relying on begin, end, original text properties, which I gather from your code you expect to be there. It would for this reason also require to scan the buffer for the matching org elements, which might not be a nice experience for some users. I am happy both with sending a PR or making my own thing, let me know.
Is this something you see benefits in being part of this package?
Yes. Please send a PR and we will discuss how we may be able to incorporate the new logic into the code base here. I cannot guarantee that your PR will be part of the package but either way your work won’t be wasted.
begin, end, original text properties, which I gather from your code you expect to be there.
I treat Org files and others as simple text files and using the beg/end is one of the most generic ways to specify text fragments in text files. Using org elements is an Org-specific variant. I feel it may not be simple to implement, but I will be happy for you to give a shot.