Skip to content

Instantly share code, notes, and snippets.

@werenall
Created December 1, 2022 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save werenall/0352140cd740e8cf63c933e026b669bc to your computer and use it in GitHub Desktop.
Save werenall/0352140cd740e8cf63c933e026b669bc to your computer and use it in GitHub Desktop.
Bash function to tangle Org Mode
function tangle {
path=$(realpath $1)
emacs --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "'$path'")'
}
# consider putting it in .bash_profile along with the line below:
export -f tangle
# USAGE:
# $ tangle README.org
# $ tangle a/b/README.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment