Move lang/org => org/*
Since lang/org has grown (and is expected to grow much, much more), it has been given its own module category. Concerns #129, #138
This commit is contained in:
parent
576a91b66c
commit
d2d4166b42
31 changed files with 774 additions and 721 deletions
12
modules/org/org-babel/autoload.el
Normal file
12
modules/org/org-babel/autoload.el
Normal file
|
@ -0,0 +1,12 @@
|
|||
;;; org/org-babel/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-babel/edit (arg)
|
||||
"Edit the source block at point in a popup.
|
||||
|
||||
If ARG is non-nil (universal argument), use the current window."
|
||||
(interactive "P")
|
||||
(if arg
|
||||
(call-interactively #'org-edit-special)
|
||||
(with-popup-rules! (("^\\*Org Src" :regexp t :select t :noesc t :same t))
|
||||
(call-interactively #'org-edit-special))))
|
52
modules/org/org-babel/config.el
Normal file
52
modules/org/org-babel/config.el
Normal file
|
@ -0,0 +1,52 @@
|
|||
;;; org/org-babel/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(add-hook 'org-load-hook #'+org-babel|init t)
|
||||
|
||||
(defun +org-babel|init ()
|
||||
(setq org-src-fontify-natively t ; make code pretty
|
||||
org-src-preserve-indentation t ; use native major-mode indentation
|
||||
org-src-tab-acts-natively t
|
||||
org-src-window-setup 'current-window
|
||||
org-confirm-babel-evaluate nil) ; you don't need my permission
|
||||
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
(mapcar (lambda (sym) (cons sym t))
|
||||
'(calc
|
||||
css
|
||||
emacs-lisp
|
||||
haskell
|
||||
js
|
||||
latex
|
||||
ledger
|
||||
lilypond
|
||||
lisp
|
||||
matlab
|
||||
plantuml
|
||||
python
|
||||
restclient ; ob-restclient
|
||||
ruby
|
||||
rust ; ob-rust
|
||||
sh
|
||||
sqlite
|
||||
sql-mode ; ob-sql-mode
|
||||
translate ; ob-translate
|
||||
)))
|
||||
|
||||
;; In a recent update, `org-babel-get-header' was removed from org-mode, which
|
||||
;; is something a fair number of babel plugins use. So until those plugins
|
||||
;; update, this polyfill will do:
|
||||
(defun org-babel-get-header (params key &optional others)
|
||||
(cl-loop with fn = (if others #'not #'identity)
|
||||
for p in params
|
||||
if (funcall fn (eq (car p) key))
|
||||
collect p))
|
||||
|
||||
;; I prefer C-c C-c for confirming over the default C-c '
|
||||
(map! :map org-src-mode-map "C-c C-c" #'org-edit-src-exit)
|
||||
|
||||
(defun +org|src-mode-remove-header ()
|
||||
"Remove header-line with keybinding help; I know the keybinds."
|
||||
(when header-line-format
|
||||
(setq header-line-format nil)))
|
||||
(add-hook 'org-src-mode-hook #'+org|src-mode-remove-header))
|
10
modules/org/org-babel/packages.el
Normal file
10
modules/org/org-babel/packages.el
Normal file
|
@ -0,0 +1,10 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; org/org-babel/packages.el
|
||||
|
||||
(package! ob-go)
|
||||
(package! ob-mongo)
|
||||
(package! ob-redis)
|
||||
(package! ob-restclient)
|
||||
(package! ob-rust :recipe (:fetcher github :repo "zweifisch/ob-rust"))
|
||||
(package! ob-sql-mode)
|
||||
(package! ob-translate)
|
Loading…
Add table
Add a link
Reference in a new issue