Noboru Ota <m...@nobiot.com> writes:

> Ihor Radchenko <yanta...@gmail.com> writes:
>
>> Try to open the attached file and run M-x org-transclusion-add-all
>
> Thank you. I see. Not even org-transclusion-add-all but a single add
> function takes a bit of time.

> 1. I see it as an issue rather of recursive transclusions (transclusions
> inside a transclusion) than of overlay. Do you agree?

Do you mean that the #+tranclusion keyword is located inside the
transcluded headline? I agree (though I did not really think about it
when creating the file).

> 2. If it is a recursion, I would like to somehow avoid it altogether by
> "skipping it" before going into a loop.  I thought I had done part of
> it; apparently, it's not enough.  Do you have some suggestions how other
> programs might deal with this type of issues?  I feel that many pieces
> of software have done so...

I am not very sure if I understand you correctly. AFAIU, the main
problem here is that #+translude lines may expand into Org elements that
change the element structure (e.g. when #+transclude is a low-level
headline, it breaks current headline section). You may probably need to
handle "headline inside headline" or "element inside non-greater
element" transclusions specially.

> 3. If it is an overlay issue, do you have suggestions what sort of
> methods are available within Emacs?  

My example is certainly not an overlay issue. I did some performance
debugging. Most of CPU time was spend on org-element-parse-buffer.

For overlay issues, the alternative is text properties.

> 4. This file does not seem realistic for me as a user who use Emacs for
> writing -- but I see this sort of testing can be useful for avoiding
> potential issues.  How important do you think it is to tackle this type
> of "hypothetical" issues as a package developer?  It's a question of
> priority for me.  I do not feel that I have sufficient knowledge and
> skill set to tackle it right now; if the priority is not so high, I think
> I would leave it (for now, but this "for now" would be for a long time).
> If priority is high, I would need to ask for some help with even framing
> the problem so that we can somehow tackle it.

It is not very important. I did not think about recursive issue when
created the file. Mostly wanted to create a random large file.

You may find
https://www.gnu.org/prep/maintain/maintain.html#Replying-to-Mail
helpful.

Best,
Ihor

Reply via email to