-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy-org.el
89 lines (74 loc) · 2.83 KB
/
my-org.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
;; My org settings - split into own module for readability.
(require 'org2web)
;; #+LaTeX_CLASS: beamer in org files
(unless (boundp 'org-export-latex-classes)
(setq org-export-latex-classes nil))
(add-to-list 'org-export-latex-classes
;; beamer class, for presentations
'("beamer"
"\\documentclass[11pt]{beamer}\n
\\mode<{{{beamermode}}}>\n
\\usetheme{{{{beamertheme}}}}\n
\\usecolortheme{{{{beamercolortheme}}}}\n
\\beamertemplateballitem\n
\\setbeameroption{show notes}
\\usepackage[utf8]{inputenc}\n
\\usepackage[T1]{fontenc}\n
\\usepackage{hyperref}\n
\\usepackage{color}
\\usepackage{listings}
\\lstset{numbers=none,language=[ISO]C++,tabsize=4,
frame=single,
basicstyle=\\small,
showspaces=false,showstringspaces=false,
showtabs=false,
keywordstyle=\\color{blue}\\bfseries,
commentstyle=\\color{red},
}\n
\\usepackage{verbatim}\n
\\institute{{{{beamerinstitute}}}}\n
\\subject{{{{beamersubject}}}}\n"
("\\section{%s}" . "\\section*{%s}")
("\\begin{frame}[fragile]\\frametitle{%s}"
"\\end{frame}"
"\\begin{frame}[fragile]\\frametitle{%s}"
"\\end{frame}")))
;; letter class, for formal letters
(add-to-list 'org-export-latex-classes
'("letter"
"\\documentclass[11pt]{letter}\n
\\usepackage[utf8]{inputenc}\n
\\usepackage[T1]{fontenc}\n
\\usepackage{color}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
(fset 'my-org-point-add
[return tab backspace backspace ?- ? ?\M-8 ? ?\M-9 ? ])
;; http://orgmode.org/manual/Conflicts.html
(add-hook 'org-mode-hook
(lambda ()
(local-set-key (kbd "M-<up>") 'windmove-up)
(local-set-key (kbd "M-<left>") 'windmove-left)
(local-set-key (kbd "M-<right>") 'windmove-right)
(local-set-key (kbd "M-<down>") 'windmove-down)
(local-set-key (kbd "C-<tab>") 'dabbrev-expand)
(local-set-key (kbd "C-.") 'scroll-down-one-line)
(local-set-key (kbd "C-,") 'scroll-up-one-line)
(local-set-key (kbd "C-j") 'my-greedy-joinlines)
(local-set-key (kbd "C-x C-e") 'langtool-correct-buffer)
(define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)
(setcar (nthcdr 4 org-emphasis-regexp-components) 4)
))
(setq org-file-apps
'(("\\.docx?\\'" . default)
("\\.xlsx?\\'" . default)
("\\.x?html?\\'" . default)
("\\.pdf\\'" . default)
("\\.log\\'" . emacs)
(".*::\\(editme\\)\\'" . (find-file file))
(auto-mode . emacs)))
(local-set-key (kbd "C-c C-c") 'org-latex-export-to-pdf)
(provide 'my-org)