blob: a8bc665f01016f94d8187c5d425ecd4bdbe34f5a (
plain)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
(require 'org)
(require 'ox)
(require 'org-habit)
(use-package org
:defer nil
:bind
(:map org-mode-map
("C-M-a" . backward-paragraph)
("C-M-e" . forward-paragraph)
("C-c M-c" . count-words-region)
("C-c C-M-c" . count-words)
("C-c l" . org-id-get-create)
("C-c j" . org-goto)
)
:bind
(("C-c c" . org-capture))
:config
(setq org-goto-interface 'outline-path-completion
org-outline-path-complete-in-steps nil
org-goto-max-level '2)
(setq org-id-track-globally nil)
(setq org-special-ctrl-a/e t)
(setq safe-local-variable-values '((org-refile-targets (nil :maxlevel . 3)))))
(setq org-archive-location "~/Notes/denote/20240328T215840--archive__self.org::* Archive")
(setq org-log-done 'time)
(setq org-icalendar-include-todo t
org-icalendar-include-body t
org-icalendar-with-timestamps t
org-icalendar-use-scheduled '(event-if-todo-not-done)
org-icalendar-scheduled-summary-prefix "SCHEDULED: "
org-icalendar-use-deadline '(event-if-todo-not-done)
org-icalendar-deadline-summary-prefix "DEADLINE: ")
(setq org-structure-template-alist
'(("c" . "center")
("x" . "example")
("d" . "definition")
("t" . "theorem")
("q" . "quote")
("v" . "verse")
("s" . "src")
("E" . "src emacs-lisp :results value code :lexical t") ; for code examples in notes
("z" . "src emacs-lisp :tangle FILENAME") ; tangle without making dir, below makes dir
("Z" . "src emacs-lisp :tangle FILENAME :mkdirp yes")))
(setq org-ellipsis " ⤶")
(setq org-startup-indented t
org-startup-folded 'showeverything
org-hide-emphasis-markers t
org-startup-with-inline-images t
org-image-actual-width '(600)
org-list-allow-alphabetical t
org-insert-heading-respect-content t)
(use-package org-bullets
:ensure t
:hook (org-mode . org-bullets-mode)
:config
(setq org-bullets-bullet-list '("◉" "○" "●" "🞛" "◇" "◆")))
(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5))
(defun bard/org-export-on-save ()
"Export current Org buffer to PDF and open it with auto-revert enabled."
(when (derived-mode-p 'org-mode)
(org-latex-export-to-pdf)))
(define-minor-mode bard/org-auto-export-pdf-mode
"Automatically export Org buffer to PDF on save."
:lighter " AutoPDF"
:group 'org
(if bard/org-auto-export-pdf-mode
(add-hook 'after-save-hook #'bard/org-export-on-save)
(remove-hook 'after-save-hook #'bard/org-export-on-save)))
(use-package auctex
:ensure t)
(use-package cdlatex
:ensure t
:hook (LaTeX-mode . turn-on-cdlatex)
:bind (:map cdlatex-mode-map
("<tab>" . cdlatex-tab)))
;; latex editing niceness
(use-package org-fragtog
:ensure t)
(with-eval-after-load 'ox-latex
(add-to-list 'org-latex-classes
'("org-plain-latex"
"\\documentclass{article}
[NO-DEFAULT-PACKAGES]
[PACKAGES]
[EXTRA]"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
(setq org-latex-listings t)
(setq org-latex-listings-options
'(("basicstyle" "\\ttfamily")
("breakatwhitespace" "false")
("breakautoindent" "true")
("breaklines" "true")
("columns" "[c]fullflexible")
("commentstyle" "")
("emptylines" "*")
("extendedchars" "false")
("fancyvrb" "true")
("firstnumber" "auto")
("flexiblecolumns" "false")
("frame" "single")
("frameround" "tttt")
("identifierstyle" "")
("keepspaces" "true")
("keywordstyle" "")
("mathescape" "false")
("numbers" "left")
("numbers" "none")
("numbersep" "5pt")
("numberstyle" "\\tiny")
("resetmargins" "false")
("showlines" "true")
("showspaces" "false")
("showstringspaces" "false")
("showtabs" "true")
("stepnumber" "2")
("stringstyle" "")
("tab" "↹")
("tabsize" "4")
("texcl" "false")
("upquote" "false")))
(setq org-capture-bookmark nil
org-id-link-to-org-use-id t)
(require 'org-protocol)
(setq org-capture-templates
'(("t" "task" entry
(file+olp
"~/Notes/denote/20240328T215727--todo.org"
"Inbox" "General tasks")
"* TODO %?")
;; ("s" "Basic Statistics" entry
;; (file+headline
;; "~/Notes/denote/20240830T215644--statistics-flashcards__anki_stats.org" "Unsorted")
;; "** %U %^g\n:PROPERTIES:\n:ANKI_NOTE_TYPE: Basic\n:ANKI_DECK: Statistics\n:END:\n*** Front\n %?\n*** Back\n\n")
;; ("S" "Cloze Statistics" entry
;; (file+headline
;; "~/Notes/denote/20240830T215644--statistics-flashcards__anki_stats.org" "Unsorted")
;; "** %U %^g\n:PROPERTIES:\n:ANKI_NOTE_TYPE: Cloze\n:ANKI_DECK: Statistics\n:END:\n*** Text\n %?\n*** Hooray\n\n")
("c" "Basic Chemistry" entry
(file+headline
"~/Notes/denote/20251019T175402--chemistry-flashcards__anki_chem.org" "Unsorted")
"** %U %^g\n:PROPERTIES:\n:ANKI_NOTE_TYPE: Basic\n:ANKI_DECK: Chemistry\n:END:\n*** Front\n%?\n*** Back\n\n")
("n" "common place note" entry
(file "~/Notes/denote/20251023T182240--common-place-notes__topic.org")
"* %^{Source}\n#+BEGIN_QUOTE\n%?\n#+END_QUOTE")
("z" "Protocol" entry
(file+olp
"~/Notes/denote/20240328T220037--media-tracker__media_topic.org" "Quotes")
"* Source: [[%:link][%:description]]\n#+BEGIN_QUOTE\n%i\n#+END_QUOTE\n%?")
("Z" "Protocol Link" entry
(file+olp
"~/Notes/denote/20240328T220037--media-tracker__media_topic.org" "Watch/Read List")
"* [[%:link][%:description]] \nCaptured On: %U \n%?")
("w" "Class outline" entry
(file
"~/Notes/denote/uni.org")
(file
"~/Notes/denote/templates/class-template.org"))
("p" "project idea" entry
(file
"~/Notes/denote/20250201T165619--project-ideas__idea_programming.org")
"* %^{Project description}\n%?")))
;; copy/paste images
(use-package org-download
:after org
:defer nil
:ensure t
:custom
(org-download-method 'directory)
(org-download-image-dir "~/Notes/denote/Images")
(org-download-heading-lvl 0)
(org-download-timestamp "org_%Y%m%d-%H%M%S_")
(org-download-screenshot-method "xclip -selection clipboard -t image/png -o > '%s'")
:bind
("C-M-y" . org-download-screenshot)
:config
(require 'org-download))
;; pdf notes
(use-package org-noter
:ensure t)
;; links
(use-package org-cliplink
:ensure t
:bind
("C-c p" . org-cliplink))
(provide 'bard-emacs-org)
|