add octave/matlab to org babel

This commit is contained in:
willemml 2023-01-17 16:00:27 -08:00
parent 1366513f51
commit dae8183bf2
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD

View file

@ -535,6 +535,20 @@ in {
after = [ "org" ];
};
ob-matlab = {
enable = true;
after = [ "org" ];
init = ''
; -*-emacs-lisp-*-
(setq org-babel-octave-shell-command "${pkgs.octave}/bin/octave -q")
(setq org-babel-matlab-shell-command "~/Applications/MATLAB_R2022b.app/bin/matlab -nosplash")
'';
extraPackages = [ pkgs.octave ];
};
ob-python = {
enable = true;
extraPackages = [
@ -567,9 +581,9 @@ in {
meow = {
enable = true;
config = ''
init = ''
; -*-emacs-lisp-*-
(defun meow-setup ()
(defun meow-setup ()
(setq meow-cheatsheet-layout meow-cheatsheet-layout-colemak)
(meow-motion-overwrite-define-key
;; Use e to move up, n to move down.
@ -650,6 +664,8 @@ in {
'("z" . meow-pop-selection)
'("'" . repeat)
'("<escape>" . ignore)))
(meow-setup)
'';
};
@ -676,37 +692,19 @@ in {
extraPackages = [ pkgs.pngpaste ];
};
exec-path-from-shell = {
enable = false;
init = ''
; -*-emacs-lisp-*-
(dolist (var '("LANG" "LC_CTYPE" "LC_MESSAGES" "NIX_SSL_CERT_FILE" "NIX_PROFILES" "JAVA_HOME" "GNUPGHOME"))
(add-to-list 'exec-path-from-shell-variables var))
(when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize))
(when (daemonp)
(exec-path-from-shell-initialize))
(add-to-list 'exec-path "/Users/willem/.nix-profile/bin")
'';
};
ivy-bibtex = {
enable = true;
init = ''
; -*-emacs-lisp-*-
;; ivy-bibtex requires ivy's `ivy--regex-ignore-order` regex builder, which
;; ignores the order of regexp tokens when searching for matching candidates.
(setq ivy-re-builders-alist
;; ivy-bibtex requires ivy's `ivy--regex-ignore-order` regex builder, which
;; ignores the order of regexp tokens when searching for matching candidates.
(setq ivy-re-builders-alist
'((ivy-bibtex . ivy--regex-ignore-order)
(t . ivy--regex-plus)))
(setq ivy-bibtex-bibliography '("~/Documents/org/zotero.bib"))
(setq reftex-default-bibliography '("~/Documents/org/zotero.bib"))
(setq bibtex-completion-pdf-field "file")
(setq ivy-bibtex-bibliography '("~/Documents/org/zotero.bib"))
(setq reftex-default-bibliography '("~/Documents/org/zotero.bib"))
(setq bibtex-completion-pdf-field "file")
'';
};
@ -715,16 +713,16 @@ in {
init = ''
; -*-emacs-lisp-*-
(setq org-ref-insert-cite-function
(setq org-ref-insert-cite-function
(lambda ()
(org-cite-insert nil)))
(setq org-ref-default-bibliography "~/Documents/org/zotero.bib")
(setq org-ref-default-bibliography "~/Documents/org/zotero.bib")
(setq bibtex-completion-bibliography '("~/Documents/org/zotero.bib"))
(setq bibtex-completion-bibliography '("~/Documents/org/zotero.bib"))
(require 'org-ref)
(require 'org-ref-ivy)
(require 'org-ref)
(require 'org-ref-ivy)
'';
bindLocal.org-mode-map = { "C-c ]" = "org-ref-insert-link"; };
@ -737,9 +735,9 @@ in {
init = ''
; -*-emacs-lisp-*-
(setq-default pdf-view-display-size 'fit-width)
(setq-default pdf-view-display-size 'fit-width)
(setq pdf-annot-activate-created-annotations t)
(setq pdf-annot-activate-created-annotations t)
'';
extraPackages = [ pkgs.poppler pkgs.automake ];