Update org variables to use-package, add org snippet
This commit is contained in:
+21
-21
@@ -651,26 +651,28 @@ File auto-saves, backups, tramps.
|
|||||||
** Org
|
** Org
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; Org
|
(use-package org
|
||||||
(with-eval-after-load 'org
|
:custom
|
||||||
(add-to-list 'org-structure-template-alist
|
(org-directory (concat (getenv "HOME") "/documents/org"))
|
||||||
'("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
|
(org-ellipsis " ↴")
|
||||||
'("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC")
|
(org-latex-toc-command "\\newpage \\tableofcontents \\newpage")
|
||||||
))
|
(org-return-follows-link t)
|
||||||
|
(org-src-fontify-natively t)
|
||||||
|
(org-src-window-setup 'current-window)
|
||||||
|
)
|
||||||
|
|
||||||
(setq org-ellipsis " ↴")
|
|
||||||
(setq org-src-fontify-natively t)
|
|
||||||
(setq org-src-window-setup 'current-window)
|
|
||||||
(setq org-latex-toc-command "\\newpage \\tableofcontents \\newpage")
|
|
||||||
;; Enable syntax highlighting when exporting to .pdf
|
;; Enable syntax highlighting when exporting to .pdf
|
||||||
;; Include latex-exporter
|
;; Load latex exporter
|
||||||
(with-eval-after-load 'ox-latex
|
(use-package ox-latex
|
||||||
;; Add minted to the list of packages to insert in every LaTeX header
|
:ensure nil ; ox-latex.el is part of org
|
||||||
|
:after org
|
||||||
|
:custom
|
||||||
|
;; Define how minted is added to source code blocks
|
||||||
|
(org-latex-listings 'minted)
|
||||||
|
(org-latex-minted-options '(("frame" "lines") ("linenos=true")))
|
||||||
|
:config
|
||||||
|
;; Add minted package to every LaTeX header
|
||||||
(add-to-list 'org-latex-packages-alist '("" "minted"))
|
(add-to-list 'org-latex-packages-alist '("" "minted"))
|
||||||
;; Define how minted is added to source code
|
|
||||||
(setq org-latex-listings 'minted)
|
|
||||||
(setq org-latex-minted-options
|
|
||||||
'(("frame" "lines") ("linenos=true")))
|
|
||||||
;; Append -shell-escape to every element in org-latex-pdf-process
|
;; Append -shell-escape to every element in org-latex-pdf-process
|
||||||
(setq org-latex-pdf-process
|
(setq org-latex-pdf-process
|
||||||
(mapcar
|
(mapcar
|
||||||
@@ -678,10 +680,8 @@ File auto-saves, backups, tramps.
|
|||||||
(if (not (string-match-p "-shell-escape" s))
|
(if (not (string-match-p "-shell-escape" s))
|
||||||
(replace-regexp-in-string "%latex " "%latex -shell-escape " s)
|
(replace-regexp-in-string "%latex " "%latex -shell-escape " s)
|
||||||
s))
|
s))
|
||||||
org-latex-pdf-process)))
|
org-latex-pdf-process))
|
||||||
|
)
|
||||||
(setq org-directory (concat (getenv "HOME") "/documents/org"))
|
|
||||||
(setq org-return-follows-link t)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Tabs
|
** Tabs
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: elisp
|
# name: elisp
|
||||||
# key: el
|
# key: <el
|
||||||
# --
|
# --
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
$0
|
$0
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: source
|
||||||
|
# key: <s
|
||||||
|
# --
|
||||||
|
#+BEGIN_SRC ${1:language}
|
||||||
|
$0
|
||||||
|
#+END_SRC
|
||||||
Reference in New Issue
Block a user