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 · 7 comments
Open

"htmlDefaultSkipSrc" ignores "ditaa" I think #90

bradleysmith opened this issue Oct 17, 2024 · 7 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

@ihdavids
Copy link
Owner

ihdavids commented Nov 1, 2024

Sorry you can use orgBabelDefaultHeaderArgs to get around this:
The default looks like this:
defaultPlist = sets.Get("orgBabelDefaultHeaderArgs",":session none :results replace :exports code :cache no :noweb no")

If you set it in your settings file:
"orgBabelDefaultHeaderArgs": ":session none :results replace :exports none :cache no :noweb no"

Then your source blocks will not be exporting code.

OR you can add a plist above each source block (the ditaa source) with :exports none

Either of those will work.

I have also pushed 1.2.56 tonight which should have a patch (hopefully, I haven't tested it that much as I have been distracted of late)

@ihdavids
Copy link
Owner

ihdavids commented Nov 1, 2024

Version 2.0.0 (which is what I am currently working on)
Will offer 2 ways to operate:

  1. The self contained plugin
  2. Using a connection to a running orgs server (written in golang) It will be kind of like the LSP where the plugin will call out to the orgs server for various operations. I wrote orgs for a vscode version of this plugin. That one has not been released yet. I am hoping once I have backported orgs support to this plugin that I can publish the vscode version as well. Orgs also comes with a command line client and a dorky web portal that can all talk to the server. Capture support exists at the command line and I hope eventually I can mimic the org protocol features of emacs.

Orgs also comes with a pseudo plugin setup and I am hoping I can find others to contribute. It has the ability to support export / import plugins, polling importers and other things. It has integrations for jira, google calendar and other systems that can pull data from those sources into org files and in some cases synchronize back to those systems for a semblance of real GTD like behaviour.

Eventually I hope to have a mu4e like setup and an isync like setup as I really miss org mode / likability / integration with my email.

Anyways. I will shut up, but that work will take a bit, but I hope to really open up the possibility for org mode everywhere. I have never liked having to cobble together a mobile phone way of syncing with my org data, my hope is with the portal / orgs I can really help with accessing my lists everywhere.

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