ihdavids / orgextended

Sublime Text OrgMode Extension
MIT License
209 stars 15 forks source link

"htmlDefaultSkipSrc" ignores "ditaa" I think #90

Open bradleysmith opened 1 day ago

bradleysmith commented 1 day ago

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:

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 commented 1 day ago

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

ihdavids commented 1 day ago

Hmmm Thanks, I will take a look.

ihdavids commented 1 day ago

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 commented 1 day ago

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 commented 21 hours ago

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