Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"htmlDefaultSkipSrc" ignores "ditaa" I think #90

Open
bradleysmith opened this issue Oct 17, 2024 · 5 comments
Open

"htmlDefaultSkipSrc" ignores "ditaa" I think #90

bradleysmith opened this issue Oct 17, 2024 · 5 comments

Comments

@bradleysmith
Copy link

Describe the bug
My settings includes the default:

"htmlDefaultSkipSrc": ["plantuml","graphviz","ditaa","gnuplot"], 

but when generating HTML it includes the source:

#+BEGIN_SRC ditaa :file high_low.png
    +--------+      +---------+
    |  High  |<---->|   Low   |
    +--------+      +---------+
#+END_SRC

#+RESULTS:
[[file:high_low.png]]

To Reproduce
Place this in an org file:

#+BEGIN_SRC ditaa :file high_low.png
    +--------+      +---------+
    |  High  |<---->|   Low   |
    +--------+      +---------+
#+END_SRC

Select org export to HTML and open the HTML in a browser

Expected behavior
Only the rendered diagram (that does appear in sublimetext and is generated on disk) show up in the HTML file.

Platform:

  • Windows 11

** Sublime debug console output**
['java', '-jar', 'C:\Users\\bin\ditaa.jar', 'C:\Users\\AppData\Local\Temp\tmpoelc8lkx.ditaa', '-o']
EXPORT STYLE: blocky
EXPORT COMPLETE: C:\Users**
*
\notes.html

@bradleysmith
Copy link
Author

bradleysmith commented Oct 17, 2024

Rendered HTML looks like this
Screenshot 2024-10-17 171747

@ihdavids
Copy link
Owner

Hmmm
Thanks, I will take a look.

@ihdavids
Copy link
Owner

I see the problem...
So a while back I made the plists hierarchical.

defaultPlist = sets.Get("orgBabelDefaultHeaderArgs",":session none :results replace :exports code :cache no :noweb no")
The default is to export as code and this is trumping the skip list...
And the two options are fighting with the setting of the default winning out.
If you explicitly set that option it should stop this from happening but I will work on a better solution here going forward.

The plist has no knowledge on if this is the default or if this is explicitly set at the moment and it needs that knowledge to do this right.

@ihdavids
Copy link
Owner

You can of course set exports locally as well and that will work around this as well.

I also revamped the html exporter when I wrote the revealjs export option and I forgot to port the full option to the newer version... so only the revealSkipSrc option is respected in the new exporter, which I will also ratify.
I am also adding javaPath for ditaa since I find I am often wanting to be explicit on java version.

Thanks for catching this, and using the plugin.

@bradleysmith
Copy link
Author

bradleysmith commented Oct 18, 2024

Thanks for the rapid response and workaround. What a fabulous org implementation for Sublime.

EDIT: I can't figure this out lol. I added this to my persona; settings:

"htmlDefaultSkipSrc": ["ditaa"]

thinking that would solve it but same result. I probably didn't understand your instructions properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants