orgmode icon indicating copy to clipboard operation
orgmode copied to clipboard

Support sheband and tangle mode header tag

Open SjB opened this issue 9 months ago • 2 comments

Summary

Add shebang and tangle-mode source block header tags

Related Issues

New features to enable features in org-mode

Related #

https://orgmode.org/manual/Extracting-Source-Code.html

Closes #

Changes

Changes the structure of the tangle_info table.

SjB avatar Mar 19 '25 17:03 SjB

The orgmode docs describe 3 styles of tangle-mode values: ls-style, chmod style, and octal. All three style are now supported, however, I'm still using the vim.loop.fs_chmod function, as I can't seem to support all the requirements with the utils.writefile function

example of the three modes

#+BEGIN_SRC text :tangle result-octal.txt :tangle-mode o700
octal mode
#+END_SRC

#+BEGIN_SRC text :tangle result-ls-style.txt :tangle-mode rw-rw----
ls style
#+END_SRC

#+BEGIN_SRC text :tangle result-chmod-style.txt :tangle-mode ug+wx,u+wr,o+x
chmod style
#+END_SRC

SjB avatar Apr 16 '25 04:04 SjB

The orgmode docs describe 3 styles of tangle-mode values: ls-style, chmod style, and octal. All three style are now supported

Nice! 👍🏻

however, I'm still using the vim.loop.fs_chmod function, as I can't seem to support all the requirements with the utils.writefile function

That's fine, I don't think it will cause any issues.

Could you add few tests that test these new tangle options? I'm not sure if CI will cause some issues testing the permissions, but you can add 1 test that modifies the perrmission and push to see how CI behaves.

It's somewhat sensitive stuff so I want to make sure we cover it with tests as much as possible.

kristijanhusak avatar Apr 28 '25 20:04 kristijanhusak