init
This commit is contained in:
commit
a870d79674
8 changed files with 604 additions and 0 deletions
17
lua/orgmode-babel/run_by_name.el
Normal file
17
lua/orgmode-babel/run_by_name.el
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
(defun run-specific-org-babel-block (block-name)
|
||||
"Run a specific org-mode code block, specified by name."
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(let ((case-fold-search t))
|
||||
(when (search-forward (concat "#+NAME: " block-name) nil t)
|
||||
(org-babel-execute-src-block)))))
|
||||
|
||||
(setq org-confirm-babel-evaluate nil)
|
||||
(find-file (nth 0 command-line-args-left))
|
||||
|
||||
(dolist (block-name (nthcdr 1 command-line-args-left))
|
||||
(run-specific-org-babel-block block-name))
|
||||
|
||||
(save-buffer)
|
||||
(save-buffers-kill-emacs)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue