mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-02-02 20:55:13 +00:00
ob-tangle: adding pre-tangle hook for customization of tangle preparation
* lisp/ob-tangle.el (org-babel-pre-tangle-hook): defines new tangle hook (org-babel-tangle): calls new tangle hook
This commit is contained in:
parent
006ebbcd80
commit
48114acd2a
@ -53,6 +53,11 @@ then the name of the language is used."
|
||||
:group 'org-babel
|
||||
:type 'hook)
|
||||
|
||||
(defcustom org-babel-pre-tangle-hook '(save-buffer)
|
||||
"Hook run at the beginning of `org-babel-tangle'."
|
||||
:group 'org-babel
|
||||
:type 'hook)
|
||||
|
||||
(defun org-babel-find-file-noselect-refresh (file)
|
||||
"Find file ensuring that the latest changes on disk are
|
||||
represented in the file."
|
||||
@ -127,7 +132,7 @@ TARGET-FILE can be used to specify a default export file for all
|
||||
source blocks. Optional argument LANG can be used to limit the
|
||||
exported source code blocks by language."
|
||||
(interactive)
|
||||
(save-buffer)
|
||||
(run-hooks 'org-babel-pre-tangle-hook)
|
||||
(save-excursion
|
||||
(let ((block-counter 0)
|
||||
(org-babel-default-header-args
|
||||
|
Loading…
x
Reference in New Issue
Block a user