Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions config.el
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,24 @@
"Extract tmux session from ORG-SESSION string."
(let* ((session (car (split-string org-session ":"))))
(concat org-babel-tmux-session-prefix
(if (string-equal "" session) (alist-get :session org-babel-default-header-args:tmux) session))))
)
(if (string-equal "" session)
(alist-get :session org-babel-default-header-args:tmux) session))))
;; FIXME: create-session should return until tmux is ready
;; Ideally we could poll like tmate
;; ;; tmate sent a tmate-ready.. we could do something similar
;; ;; (message "OB-TMATE: Waiting for tmate to be ready")
;; ;; (ob-tmate--execute ob-session "wait" "tmate-ready")
;; ))
;; For now, just wait a second after the new session via some advice
(defun sit-around (orig-fun &rest args)
"Sit for a second and let tmux session get created"
(message "ob-tmux-create-session called with args %S" args)
(let ((res (apply orig-fun args)))
(message "ob-tmux-create-session returned %S" res)
(sit-for 1)
res))
(advice-add 'ob-tmux--create-session :around #'sit-around)
)
(after! ob-sql-mode
;; make sql statements a one-liner before being sent to sql engine
(setq org-babel-sql-mode-pre-execute-hook
Expand Down
3 changes: 2 additions & 1 deletion init.el
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
;;biblio ; Writes a PhD for you (citation needed)
debugger ; FIXME stepping through code, to help you add bugs
direnv
;;docker
(docker +lsp) ; +lsp requires docker-langserver from https://emacs-lsp.github.io/lsp-mode/page/lsp-dockerfile/:
; npm install -g dockerfile-language-server-nodejs
editorconfig ; let someone else argue about tabs vs spaces
;; ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
Expand Down
Empty file added snippets/.gitignore
Empty file.