minor updates to emacs config
This commit is contained in:
parent
63cdd79c7d
commit
eb5ff1f8d2
1 changed files with 32 additions and 36 deletions
|
|
@ -104,7 +104,7 @@
|
||||||
:default-height 180
|
:default-height 180
|
||||||
:bold-weight extrabold)
|
:bold-weight extrabold)
|
||||||
(t
|
(t
|
||||||
:default-family "AdwaitaMono Nerd Font"
|
:default-family "Iosevka Nerd Font"
|
||||||
:default-weight normal
|
:default-weight normal
|
||||||
:variable-pitch-family "Adwaita Sans")))
|
:variable-pitch-family "Adwaita Sans")))
|
||||||
(fontaine-set-preset 'regular))
|
(fontaine-set-preset 'regular))
|
||||||
|
|
@ -173,7 +173,7 @@
|
||||||
(use-package avy
|
(use-package avy
|
||||||
:bind (("C-o" . avy-goto-char))
|
:bind (("C-o" . avy-goto-char))
|
||||||
:custom
|
:custom
|
||||||
(avy-keys . '(?a ?r ?s ?t ?d ?h ?n ?e ?i ?o)))
|
(avy-keys . (?a ?r ?s ?t ?d ?h ?n ?e ?i ?o)))
|
||||||
#+end_src
|
#+end_src
|
||||||
* Completion
|
* Completion
|
||||||
** Vertico
|
** Vertico
|
||||||
|
|
@ -427,7 +427,31 @@
|
||||||
I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/][here]] in order to have much better LaTeX previews. This is eventually supposed to be merged into emacs proper, which would be nice.
|
I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/][here]] in order to have much better LaTeX previews. This is eventually supposed to be merged into emacs proper, which would be nice.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package org
|
(use-package org
|
||||||
:straight (:type built-in)
|
:defer
|
||||||
|
:straight `(org
|
||||||
|
:fork (:host nil
|
||||||
|
:repo "https://git.tecosaur.net/tec/org-mode.git"
|
||||||
|
:branch "dev"
|
||||||
|
:remote "tecosaur")
|
||||||
|
:files (:defaults "etc")
|
||||||
|
:build t
|
||||||
|
:pre-build
|
||||||
|
(with-temp-file "org-version.el"
|
||||||
|
(require 'lisp-mnt)
|
||||||
|
(let ((version
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert-file-contents "lisp/org.el")
|
||||||
|
(lm-header "version")))
|
||||||
|
(git-version
|
||||||
|
(string-trim
|
||||||
|
(with-temp-buffer
|
||||||
|
(call-process "git" nil t nil "rev-parse" "--short" "HEAD")
|
||||||
|
(buffer-string)))))
|
||||||
|
(insert
|
||||||
|
(format "(defun org-release () \"The release version of Org.\" %S)\n" version)
|
||||||
|
(format "(defun org-git-version () \"The truncate git commit hash of Org mode.\" %S)\n" git-version)
|
||||||
|
"(provide 'org-version)\n")))
|
||||||
|
:pin nil)
|
||||||
:init
|
:init
|
||||||
(setq org-list-allow-alphabetical t)
|
(setq org-list-allow-alphabetical t)
|
||||||
:custom
|
:custom
|
||||||
|
|
@ -436,43 +460,23 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
|
||||||
(org-startup-with-inline-images t)
|
(org-startup-with-inline-images t)
|
||||||
(org-image-actual-width '(300))
|
(org-image-actual-width '(300))
|
||||||
(org-export-with-smart-quotes t)
|
(org-export-with-smart-quotes t)
|
||||||
|
(org-latex-preview-live t)
|
||||||
(org-directory "~/Nextcloud/org")
|
(org-directory "~/Nextcloud/org")
|
||||||
(org-cite-global-bibliography '("~/Nextcloud/library.bib"))
|
(org-cite-global-bibliography '("~/Nextcloud/library.bib"))
|
||||||
(org-agenda-files `(,org-directory))
|
(org-agenda-files `(,org-directory))
|
||||||
(org-default-notes-file (mapcar (lambda (x) (concat org-directory x))
|
(org-default-notes-file (mapcar (lambda (x) (concat org-directory x))
|
||||||
'("/todo.org" "/done.org")))
|
'("/todo.org" "/done.org")))
|
||||||
:after ox-latex
|
|
||||||
:config
|
:config
|
||||||
|
(setq org-format-latex-options (plist-put org-format-latex-options :scale 0.6))
|
||||||
|
(require 'ox-latex)
|
||||||
(add-to-list 'org-latex-classes '("myreport" "\\documentclass[11pt]{report}"
|
(add-to-list 'org-latex-classes '("myreport" "\\documentclass[11pt]{report}"
|
||||||
("\\chapter{%s}" . "\\chapter*{%s}")
|
("\\chapter{%s}" . "\\chapter*{%s}")
|
||||||
("\\section{%s}" . "\\section*{%s}")
|
("\\section{%s}" . "\\section*{%s}")
|
||||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
|
||||||
|
|
||||||
(require 'org-tempo)
|
|
||||||
(add-to-list 'org-src-lang-modes '("latex-macros" . latex))
|
|
||||||
|
|
||||||
(defvar org-babel-default-header-args:latex-macros
|
|
||||||
'((:results . "raw")
|
|
||||||
(:exports . "results")))
|
|
||||||
|
|
||||||
(defun prefix-all-lines (pre body)
|
|
||||||
(with-temp-buffer
|
|
||||||
(insert body)
|
|
||||||
(string-insert-rectangle (point-min) (point-max) pre)
|
|
||||||
(buffer-string)))
|
|
||||||
|
|
||||||
(defun org-babel-execute:latex-macros (body _params)
|
|
||||||
(concat
|
|
||||||
(prefix-all-lines "#+LATEX_HEADER: " body)
|
|
||||||
"\n#+HTML_HEAD_EXTRA: <div style=\"display: none\"> \\(\n"
|
|
||||||
(prefix-all-lines "#+HTML_HEAD_EXTRA: " body)
|
|
||||||
"\n#+HTML_HEAD_EXTRA: \\)</div>\n"))
|
|
||||||
:bind (("C-c c" . org-capture)
|
|
||||||
("C-c l" . org-store-link)
|
|
||||||
("C-c a" . org-agenda))
|
|
||||||
:hook (org-mode . visual-line-mode)
|
:hook (org-mode . visual-line-mode)
|
||||||
(org-mode . flyspell-mode))
|
(org-mode . flyspell-mode)
|
||||||
|
(org-mode . org-latex-preview-auto-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Prettify
|
** Prettify
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
@ -480,14 +484,6 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
|
||||||
:hook ((org-mode . org-modern-mode)
|
:hook ((org-mode . org-modern-mode)
|
||||||
(org-agenda-finalize . org-modern-agenda)))
|
(org-agenda-finalize . org-modern-agenda)))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Citeproc
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package org-ref)
|
|
||||||
|
|
||||||
(require 'oc-csl)
|
|
||||||
(require 'oc-natbib)
|
|
||||||
(require 'oc-biblatex)
|
|
||||||
#+end_src
|
|
||||||
** Org Bloggy stuff
|
** Org Bloggy stuff
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defconst my-blog-org-dir "~/Documents/test/blog/org/")
|
(defconst my-blog-org-dir "~/Documents/test/blog/org/")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue