Defun tangle-file so that we can tangle files from make

master
Jacopo De Simoi 6 years ago
parent abf8550c48
commit 30da41a640
  1. 13
      global.org

@ -885,6 +885,19 @@
(cl-letf (((symbol-function 'delete-file) #'ignore))
(org-babel-tangle '(4) filename)))
#+END_SRC
*** Tangle file
This can be used to tangle one or more files to their output files [[https://gitlab.com/to1ne/literate-dotfiles/blob/master/elisp/tangle.el][
Source on gitlab]]
#+BEGIN_SRC emacs-lisp
(defun tangle-file(&rest files)
"Tangle FILES or all files in the project."
(when (null files)
(setq files command-line-args-left))
(dolist (file files)
(with-current-buffer (find-file-noselect file)
(org-babel-tangle)
(kill-buffer))))
#+END_SRC
** elisp
*** Paredit
#+BEGIN_SRC emacs-lisp

Loading…
Cancel
Save