nobiot / org-transclusion

Emacs package to enable transclusion with Org Mode
https://nobiot.github.io/org-transclusion/
GNU General Public License v3.0
917 stars 44 forks source link

fix: (org-transclusion-src-lines.el) require org-transclusion #188

Closed josephmturner closed 1 year ago

josephmturner commented 1 year ago

This ensures that org-transclusion-content-format is defined.

(my FSF copyright assignment paperwork has been accepted)

nobiot commented 1 year ago

Under what condition do we need this require? I’d have thought the entry point was always org-transclusion.el, which requires src-lines.el depending on the extension configuration. That’s the design intent at least. So… I don’t see how you load src-lines.el without org-transclusion.el already loaded.

nobiot commented 1 year ago

Oh is this to silence the compiler warning?

josephmturner commented 1 year ago

Oh is this to silence the compiler warning?

Yes. Sorry, I should have been clearer in the commit message. I noticed the compiler warning when testing the package-vc :make patch with org-transclusion.

I don't see that org-transclusion.el requires org-transclusion-src-lines.el anywhere, but perhaps it would be more appropriate to use declare-function?

nobiot commented 1 year ago

Thank your for noticing and reporting. Yes, I would appreciate it if you could change the PR to use declare-function

I don't see that org-transclusion.el requires org-transclusion-src-lines.el anywhere

It's buried in the call to extensions -- org-transclusoin-src-lines is one of them:

I've followed the way Org-mode does this, but I agree it's not obvious. Maybe I should also mention it in the README... If you have a good idea, please let me know.

josephmturner commented 1 year ago

Thank your for noticing and reporting. Yes, I would appreciate it if you could change the PR to use declare-function

Done!

I don't see that org-transclusion.el requires org-transclusion-src-lines.el anywhere

It's buried in the call to extensions -- org-transclusoin-src-lines is one of them:

* User manual in [this section](https://nobiot.github.io/org-transclusion/#Extensions)

* Source code [here](https://github.com/nobiot/org-transclusion/blob/main/org-transclusion.el#L1761)

I've followed the way Org-mode does this, but I agree it's not obvious. Maybe I should also mention it in the README... If you have a good idea, please let me know.

Thank you for explaining! I missed it before. It makes sense now to me.

nobiot commented 1 year ago

@josephmturner Thank you :)