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

Preserve code block header arguments #15

Open
non-Jedi opened this issue Jul 19, 2019 · 2 comments
Open

Preserve code block header arguments #15

non-Jedi opened this issue Jul 19, 2019 · 2 comments

Comments

@non-Jedi
Copy link

non-Jedi commented Jul 19, 2019

As a feature request, it would be really nice for my workflow if there was some way to preserve code block header arguments in the source file. Basically, for a host of reasons, I'm structuring a report I'm writing as a vanilly source code file that's transformed for exporting using outorg. My current workflow involves manually setting :exports code on the source blocks I want to show up in the final report.

How difficult would it be to come up with some sort of specially formatted comment for expressing header arguments in the source code buffer?

(obviously love this package. Thanks for maintaining it alphapapa.)

@non-Jedi
Copy link
Author

Actually I guess this might be a bug report: I see the function outorg-transform-active-source-block-headers which purports in its docstring to do exactly what I'm requesting here, but it doesn't seem to be working.

@non-Jedi
Copy link
Author

non-Jedi commented Jul 23, 2019

So I've been playing with this some more. outorg-transform-active-source-block-headers isn't called when I close an outshine buffer with outorg-copy-edits-and-exit. If you manually call outorg-transform-active-source-block-headers in the outshine buffer, it works as expected though.

All of this makes sense looking at the source code: outorg-transform-active-source-block-headers is only called by outorg-convert-org-to-outshine. Is there any reason not to use this functionality in outorg-copy-edits-and-exit? Alternatively a hook to run things on that I could just add that function to manually would work...

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

1 participant