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

feat: tangle #617

Closed
wants to merge 3 commits into from
Closed

Conversation

danilshvalov
Copy link
Contributor

@danilshvalov danilshvalov commented Sep 25, 2023

This PR develops ideas #435 (part of the code was taken right from there). In this PR, I implemented inheritance of properties for code blocks and headings.

Examples

All the following examples tangle code block to test.lua:

  1. Document property:

    #+PROPERTY: header-args :tangle test.lua
    
    #+begin_src lua
    local foo = "bar"
    #+end_src
    
  2. Heading property:

    * Heading
    :PROPERTIES:
    :tangle: test.lua
    :END:
    
    #+begin_src lua
    local foo = "bar"
    #+end_src
    

    or

    * Heading
    :PROPERTIES:
    :header-args: :tangle test.lua
    :END:
    
    #+begin_src lua
    local foo = "bar"
    #+end_src
    
  3. Code block property:

    #+begin_src lua :tangle test.lua
    local foo = "bar"
    #+end_src
    

TODO

  • Use queries instead of recursion
  • Remove magic constants
  • Add tests
  • Add documentation

@kristijanhusak
Copy link
Member

Some support was added in #685. We can build up on that. Closing this.
Thanks for the PR anyway!

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

Successfully merging this pull request may close these issues.

2 participants