Add after! org-babel for org-babel-log-ingest

This commit is contained in:
Thomas Dehaeze 2020-01-28 21:24:31 +01:00
parent 19f813c4c4
commit c3aaa2fce7

View File

@ -1386,11 +1386,28 @@ when inside a source block. Otherwise, keep the normal behavior for ctrl-ent.
Remap =C-c C-c=: Remap =C-c C-c=:
https://emacs.stackexchange.com/questions/22430/rebind-org-babel-execute-src-block-maybe-to-c-c-c-c/22530#22530 https://emacs.stackexchange.com/questions/22430/rebind-org-babel-execute-src-block-maybe-to-c-c-c-c/22530#22530
#+begin_src emacs-lisp
(defun tdh/ctrl-shit-ret ()
(interactive)
(defun in-src-block-p ()
"Returns t when the point is inside a source code block"
(string= "src" (org-in-block-p '("src"))))
(if (in-src-block-p)
(tdh/org-babel-execute-goto-next)
(+org/insert-item-above)))
(map! :map evil-org-mode-map
:n "<C-S-return>" #'tdh/ctrl-shit-ret)
#+end_src
** Library of Babel ** Library of Babel
Add all named source blocks to =org-babel-library-of-babel=. Add all named source blocks to =org-babel-library-of-babel=.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(after! org-babel
(org-babel-lob-ingest "~/Cloud/thesis/org-mode/org-babel-tutorial/org-babel-library.org") (org-babel-lob-ingest "~/Cloud/thesis/org-mode/org-babel-tutorial/org-babel-library.org")
)
#+end_src #+end_src
** Org-Babel Matlab ** Org-Babel Matlab