-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.el
619 lines (535 loc) · 24.7 KB
/
config.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
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
(setq doom-theme 'doom-nord)
;; (setq doom-theme 'solarized-dark)
;; (setq doom-theme 'doom-one)
(when (file-exists-p (concat doom-user-dir "images"))
(setq +doom-dashboard-banner-padding '(0 . 2)
fancy-splash-image (concat doom-user-dir "images/medium-emacs-logo.png")))
(defun minimal-banner-fn ()
(let* ((banner '("██████╗"
"██╔═══██╗"
"██║██╗██║"
"██║██║██║"
"╚█║████╔╝"
"╚╝╚═══╝ "))
(longest-line (apply #'max (mapcar #'length banner))))
(put-text-property
(point)
(dolist (line banner (point))
(insert (+doom-dashboard--center
+doom-dashboard--width
(concat line (make-string (max 0 (- longest-line (length line))) 32)))
"\n"))
'face 'doom-dashboard-banner)))
(setq +doom-dashboard-ascii-banner-fn #'minimal-banner-fn)
(setq doom-font (font-spec :family "JetBrainsMono NF" :size 14 :weight 'semi-light)
doom-variable-pitch-font (font-spec :family "Palatino Linotype" :size 16)
doom-variable-pitch-font (font-spec :family "Source Sans Pro" :size 14)
)
(setq doom-symbol-font (font-spec :family "JetBrainsMono Nerd Font" :size 11))
(setq display-line-numbers-type t)
(setq evil-split-window-below t
evil-vsplit-window-right t)
;; (setq xterm-mouse-mode 1)
;; (when (eq system-type 'windows-nt)
(setq evil-want-fine-undo t)
;; )
(setq counsel-find-file-ignore-regexp
(concat
;; File names beginning with # or .
"\\(?:\\`[#.]\\)"
;; File names ending with # or ~
"\\|\\(?:\\`.+?[#~]\\'\\)"))
(setq enable-local-variables t)
(after! company
(setq company-idle-delay nil)
)
(when (eq system-type 'gnu/linux)
(global-set-key "\C-s" 'save-buffer)
(global-set-key [?\C-\/] 'evilnc-comment-or-uncomment-lines)
;; (global-set-key "\C-z" 'undo)
)
(when (eq system-type 'gnu/linux)
(setq browse-url-mailto-function 'browse-url-generic)
(setq browse-url-generic-program "open")
)
(use-package! openwith
:after-call pre-command-hook
:config
(openwith-mode t)
(setq openwith-associations
(list
(list (openwith-make-extension-regexp
'("doc" "docx" "xls" "xlsx" "ppt" "odt" "ods" "odg" "odp"))
"libreoffice"
'(file))
(list (openwith-make-extension-regexp
'("pdf" "ps" "ps.gz" "dvi"))
"evince"
'(file))
))
)
(setq org-file-apps
'((auto-mode . emacs)
(directory . emacs)
("\\.mm\\'" . default)
("\\.x?html?\\'" . default)
("\\.docx?\\'" . "libreoffice %s")
("\\.xlsx?\\'" . "libreoffice %s")
("\\.pdf\\'" . default)
)
)
(after! pyvenv
(setq pyvenv-mode-line-indicator
'(pyvenv-virtual-env-name ("[venv:" pyvenv-virtual-env-name "] ")))
(pyvenv-mode +1))
(setq projectile-track-known-projects-automatically nil)
;; (map! :after python
;; :mode LaTeX-mode-map
;; "C-c C-s" #'LaTeX-section)
(map! :after python
"C-c C-s" nil)
(setq flycheck-global-modes '(not LaTeX-mode latex-mode))
(after! tex
(remove-hook 'TeX-update-style-hook #'rainbow-delimiters-mode))
(setq latex-templates-directory "~/Dropbox/git/latex-templates/templates/")
(setq latex-templates-list '(("Article" . "article-template.tex")
("Tufte-style handout" . "tufte-handout-template.tex")
("Plain" . "plain-template.tex")
("Conference presentation slides" . "conference-presentation-template.tex")
("Lecture slides" . "lecture-template.tex")
("Specify your own template file" . "")))
(defun new-latex ()
"Make a new LaTeX file based on a template.
Asks for the template, then for a filename to copy it to."
(interactive)
(let* ((template (completing-read "Choose template: " latex-templates-list))
(template-filename (cdr (assoc template latex-templates-list))))
(if (string= template-filename"")
(progn
(copy-file (read-file-name "Find file: ") (setq new-latex-filename (read-file-name "Enter name for new file: ")) 1)
(find-file new-latex-filename)
)
(progn
(copy-file (concat latex-templates-directory template-filename) (setq new-latex-filename (read-file-name "Enter name for new file: ")) 1)
(find-file new-latex-filename)
)
)))
(setq bibtex-completion-bibliography '("~/Dropbox/tex-files/linguistics.bib"))
(map! :leader
:desc "Helm BibTeX"
"o h" #'helm-bibtex)
(setq bibtex-completion-cite-commands '("citet" "citep" "citealt" "citealp" "citets" "citealts"))
(setq bibtex-completion-cite-default-command "citet")
(setq bibtex-completion-library-path '("~/Dropbox/academic/papers"))
(setq bibtex-completion-pdf-field "pdf")
(map! :after helm
:map helm-map
"TAB" #'helm-select-action
[tab] #'helm-select-action
"C-z" #'helm-execute-persistent-action)
(setq deft-directory "~/Dropbox/org/my-wiki")
(setq deft-default-extension "org")
(setq deft-recursive t)
(setq org-directory "~/Dropbox/org/")
(setq org-archive-location "~/Dropbox/org/archive.org::* From %s")
(setq org-agenda-files (list "~/Dropbox/org/work.org" "~/Dropbox/org/master.org" "~/Dropbox/org/flagged.org" "~/Dropbox/org/personal.org" "~/Dropbox/academic/jobs/oslo-unlu-postdoc/project" "~/Dropbox/org/my-wiki" "~/Dropbox/org/my-wiki/daily"))
;; (require 'org-inlinetask)
(setq org-support-shift-select t)
(setq browse-url-can-use-xdg-open t)
(setq org-link-file-path-type 'absolute)
(after! org
(setq org-todo-keywords '((sequence "TODO(t)" "INPROG(i)" "READING(r)" "BLOCKED(b)" "PROJ(p)" "SOMEDAY(s)" "|" "DONE(d)" "CANCELLED(c)"))))
(after! org
(setq org-todo-keyword-faces '(("READING" . "#EBCB8B")
("BLOCKED" . "#D08770")
("PROJ" . "#9099AB")
("SOMEDAY" . "#5699AF"))))
(setq org-priority-highest 65
org-priority-lowest 68
org-priority-default 67)
(after! org
(setq org-priority-faces '((65 . error)
(66 . warning)
(67 . success)
(68 . success)))
)
(setq org-agenda-dim-blocked-tasks nil)
(setq org-log-done 'time)
(setq org-src-fontify-natively t)
(setq org-src-tab-acts-natively t)
(after! org
(setq org-startup-folded t)
)
(custom-set-faces!
`(org-level-1 :inherit outline-1 :height 1.5)
`(org-level-2 :inherit outline-2 :height 1.3)
`(org-level-3 :inherit outline-3 :height 1.15)
`(org-level-4 :inherit outline-4 :height 1.1)
`(org-document-title :inherit outline-1 :weight bold :height 2.0 :foreground ,(doom-color 'dark-blue))
)
(setq org-hide-emphasis-markers t)
;; (add-hook 'org-mode-hook 'variable-pitch-mode)
;; (setq org-ellipsis "⤵")
;; (setq org-ellipsis "▼")
;; (setq org-ellipsis "↴")
(setq org-export-with-smart-quotes t)
(setq org-html-postamble nil)
(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}"))))
(use-package! ox-extra
:config
(ox-extras-activate '(ignore-headlines)))
;; (add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))
(setq org-superstar-special-todo-items t)
(after! org-superstar
(setq org-superstar-todo-bullet-alist
'(("TODO" . ?○)
("SOMEDAY" . ?○)
("READING" . ?○)
("INPROG" . ?◐)
("DONE" . ?●)
("CANCELLED" . ?⦻)
))
)
(setq org-superstar-headline-bullets-list '("⁖"))
;; (setq org-superstar-headline-bullets-list '("◉"))
(after! org
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
(add-to-list 'org-structure-template-alist '("p" . "src python"))
(add-to-list 'org-structure-template-alist '("u" . "src unlu-rules"))
)
(setq org-agenda-sort-notime-is-late nil)
(defun print-deadline () "Return an org-mode entry's deadline if it has one" ;;
(let
((deadline (org-get-deadline-time (point))))
(if deadline
(concat "(" (format-time-string "%d %b '%y" deadline) ")")
(concat (make-string 5 ?\s) "-"))
)
)
(defun print-scheduled () "Return an org-mode entry's scheduled time if it has one" ;;
(let
((scheduled-time (org-get-scheduled-time (point))))
(if scheduled-time
(concat "(" (format-time-string "%d %b '%y" scheduled-time) ")")
(concat (make-string 5 ?\s) "-"))
)
)
(defun org-get-padded-deadline (size)
"Return string of length SIZE whether it contains a deadline
timestamp or whichever message is chosen for items without
deadline"
(let* ((dl-str (print-deadline))
(padding (- size (length dl-str))))
(if (< padding 0) (substring dl-str 0 size)
(concat dl-str (make-string padding ?\s ))))
)
(defun org-get-padded-days-to-deadline (size)
"Return string of length SIZE either containing the days to the
deadline if there is one, or nothing if not."
(let* ((deadline (org-get-deadline-time (point)))
(days-num (org-time-stamp-to-now (format-time-string "%Y-%m-%d" deadline)))
(days-str (if deadline
(concat (number-to-string days-num) "d")
""
))
(padding (- size (length days-str)))
)
(if (< padding 0) (substring days-str 0 size)
(if (< days-num 0)
(concat days-str (make-string padding ?\s))
(concat " " days-str (make-string (- padding 1) ?\s))
))
)
)
(defun get-title (file)
(let (title)
(when file
(with-current-buffer
(get-file-buffer file)
(pcase (org-collect-keywords '("TITLE"))
(`(("TITLE" . ,val))
(setq title (car val)))))
title)))
(defun org-get-padded-todo-parent (size)
"Return string of length SIZE containing either padded or truncated parent name."
(if (or (equal (file-name-nondirectory buffer-file-name) "personal.org") (equal (file-name-nondirectory buffer-file-name) "work.org"))
(let* ((parent (car (last(org-get-outline-path))))
(padding (- size (length parent))))
(if (<= padding 0) (concat "[" (substring parent 0 (- size 1)) "] " ) (concat "[" parent "]" (make-string padding ?\s ))))
(let* ((parent (get-title buffer-file-name))
(padding (- size (length parent))))
(if (< padding 0) (concat "[" (substring parent 0 (- size 1)) "] ") (concat "[" parent "]" (make-string padding ?\s ))))
))
;; (defun org-get-padded-todo-parent (size)
;; "Return string of length SIZE containing either padded or truncated parent name."
;; (if (or (equal (file-name-nondirectory buffer-file-name) "personal.org") (equal (file-name-nondirectory buffer-file-name) "work.org"))
;; (let* ((parent (car (last(org-get-outline-path))))
;; (padding (- size (length parent))))
;; (if (< padding 0) (concat "[" (substring parent 0 (- size 1)) "] " ) (concat "[" parent "]" (make-string padding ?\s ))))
;; (let* ((parent (concat (get-title buffer-file-name) "/" (car (last(org-get-outline-path)))))
;; (padding (- size (length parent))))
;; (if (< padding 0) (concat "[" (substring parent 0 (- size 1)) "] ") (concat "[" parent "]" (make-string padding ?\s ))))
;; ))
;; (defun org-get-padded-todo-parent (size)
;; "Return string of length SIZE containing either padded or truncated parent name."
;; (cond ((equal (file-name-nondirectory buffer-file-name) "private.org")
;; (let* ((parent (concat "Personal/" (car (last(org-get-outline-path)))))
;; (padding (- size (length parent))))
;; (if (< padding 0) (concat "[" (substring parent 0 (- size 1)) "] " ) (concat "[" parent "]" (make-string padding ?\s )))))
;; ((equal (file-name-nondirectory buffer-file-name) "work.org")
;; (let* ((parent (concat "Work/" (car (last(org-get-outline-path)))))
;; (padding (- size (length parent))))
;; (if (< padding 0) (concat "[" (substring parent 0 (- size 1)) "] " ) (concat "[" parent "]" (make-string padding ?\s )))))
;; (t (let* ((parent (concat (get-title buffer-file-name) "/" (car (last(org-get-outline-path)))))
;; (padding (- size (length parent))))
;; (if (< padding 0) (concat "[" (substring parent 0 (- size 1)) "] ") (concat "[" parent "]" (make-string padding ?\s )))))
;; )
;; )
(defun org-deadline-cmp (a b)
"Compares the deadlines of two org agenda items, a and b,
and returns -1 if a is before b, or +1 if a is after b"
(let* (
(default (if org-agenda-sort-notime-is-late -1 most-positive-fixnum))
(a-pos (get-text-property 0 'org-marker a))
(b-pos (get-text-property 0 'org-marker b))
(a-string (org-entry-get a-pos "DEADLINE"))
(b-string (org-entry-get b-pos "DEADLINE"))
(a-num (if a-string (org-2ft a-string) default))
(b-num (if b-string (org-2ft b-string) default))
)
(cond ((< a-num b-num) -1)
((< b-num a-num) +1))
))
(defun org-agenda-todo-custom-prefix ()
"Custom prefix for my TODO list view in the agenda"
(concat (org-get-padded-days-to-deadline 6) (org-get-padded-deadline 14) (org-get-padded-todo-parent 18))
)
(defun org-agenda-delete-empty-blocks ()
"Remove empty agenda blocks.
A block is identified as empty if there are fewer than 2
non-empty lines in the block (excluding the line with
`org-agenda-block-separator' characters)."
(when org-agenda-compact-blocks
(user-error "Cannot delete empty compact blocks"))
(setq buffer-read-only nil)
(save-excursion
(goto-char (point-min))
(let* ((blank-line-re "^\\s-*$")
(content-line-count (if (looking-at-p blank-line-re) 0 1))
(start-pos (point))
(block-re (format "%c\\{10,\\}" org-agenda-block-separator)))
(while (and (not (eobp)) (forward-line))
(cond
((looking-at-p block-re)
(when (< content-line-count 2)
(delete-region start-pos (1+ (line-beginning-position))))
(setq start-pos (point))
(forward-line)
(setq content-line-count (if (looking-at-p blank-line-re) 0 1)))
((not (looking-at-p blank-line-re))
(setq content-line-count (1+ content-line-count)))))
(when (< content-line-count 2)
(delete-region start-pos (point-max)))
(goto-char (point-min))
;; The above strategy can leave a separator line at the beginning
;; of the buffer.
(when (looking-at-p block-re)
(delete-region (point) (1+ (line-end-position))))))
(setq buffer-read-only t))
(add-hook 'org-agenda-finalize-hook #'org-agenda-delete-empty-blocks)
(setq org-agenda-cmp-user-defined 'org-deadline-cmp)
(setq org-agenda-custom-commands
'(("c" "My agenda view"
(
(todo "TODO|INPROG" (
(org-agenda-overriding-header "Uncategorised TODOs")
(org-agenda-files '("~/Dropbox/org/my-wiki/daily"))
(org-agenda-prefix-format '((todo . "%(org-agenda-todo-custom-prefix)")))
;;(org-agenda-cmp-user-defined 'org-deadline-cmp-3)
(org-agenda-sorting-strategy '((todo user-defined-up)))
)
)
(todo "BLOCKED" (
(org-agenda-overriding-header "Blocked uncategorised TODOs")
(org-agenda-files '("~/Dropbox/org/my-wiki/daily"))
(org-agenda-prefix-format '((todo . "%(org-agenda-todo-custom-prefix)")))
(org-agenda-sorting-strategy '((todo user-defined-up)))
)
)
(todo "TODO|INPROG" (
(org-agenda-overriding-header "Personal TODOs")
(org-agenda-files '("~/Dropbox/org/personal.org"))
(org-agenda-prefix-format '((todo . "%(org-agenda-todo-custom-prefix)")))
;;(org-agenda-cmp-user-defined 'org-deadline-cmp-3)
(org-agenda-sorting-strategy '((todo user-defined-up)))
)
)
(todo "BLOCKED" (
(org-agenda-overriding-header "Blocked personal TODOs")
(org-agenda-files '("~/Dropbox/org/personal.org"))
(org-agenda-prefix-format '((todo . "%(org-agenda-todo-custom-prefix)")))
(org-agenda-sorting-strategy '((todo user-defined-up)))
)
)
(tags "TODO=\"TODO\"|TODO=\"INPROG\"|PRIORITY=\"A\"+TODO=\"READING\"" (
(org-agenda-overriding-header "Professional TODOs")
;; Using a regexp to match things I don't want in my professional TODOs: in this case, the dir my-wiki, along with the subdir daily, and my personal.org file.
;; I don't just specify work.org explicitly, as I want to allow other project files to be included.
(org-agenda-files (cl-remove-if (lambda (x) (string-match "\\(?:my-wiki\\(?:/daily\\)?\\|personal\\.org\\)" x)) org-agenda-files))
(org-agenda-prefix-format '((tags . "%(org-agenda-todo-custom-prefix)")))
;;(org-agenda-cmp-user-defined 'org-deadline-cmp-3)
(org-agenda-sorting-strategy '((tags user-defined-up)))
)
)
(todo "BLOCKED" (
(org-agenda-overriding-header "Blocked professional TODOs")
;; Using a regexp to match things I don't want in my professional TODOs: in this case, the dir my-wiki, along with the subdir daily, and my personal.org file.
;; I don't just specify work.org explicitly, as I want to allow other project files to be included.
(org-agenda-files (cl-remove-if (lambda (x) (string-match "\\(?:my-wiki\\(?:/daily\\)?\\|personal\\.org\\)" x)) org-agenda-files))
(org-agenda-prefix-format '((todo . "%(org-agenda-todo-custom-prefix)")))
(org-agenda-sorting-strategy '((todo user-defined-up)))
)
)
;; (todo "TODO|INPROG" (
;; (org-agenda-overriding-header "Wiki TODOs")
;; (org-agenda-files '("~/Dropbox/org/my-wiki"))
;; (org-agenda-prefix-format '((todo . "%(org-agenda-todo-custom-prefix)")))
;; ;;(org-agenda-cmp-user-defined 'org-deadline-cmp-3)
;; (org-agenda-sorting-strategy '((todo user-defined-up)))
;; )
;; )
(todo "BLOCKED" (
(org-agenda-overriding-header "Blocked wiki TODOs")
(org-agenda-files '("~/Dropbox/org/my-wiki"))
(org-agenda-prefix-format '((todo . "%(org-agenda-todo-custom-prefix)")))
(org-agenda-sorting-strategy '((todo user-defined-up)))
)
)
(todo "PROJ" (
(org-agenda-overriding-header "Ongoing projects")
(org-agenda-prefix-format '((todo . "%(org-agenda-todo-custom-prefix)")))
(org-agenda-sorting-strategy '((todo user-defined-up)))
)
)
(tags "PRIORITY=\"A\"+TODO=\"READING\"|PRIORITY=\"B\"+TODO=\"READING\"" (
(org-agenda-overriding-header "Priority reading list")
(org-agenda-prefix-format '((tags . "%(org-agenda-todo-custom-prefix)")))
(org-agenda-sorting-strategy '((tags user-defined-up priority-down)))
)
)
(todo "SOMEDAY" (
(org-agenda-overriding-header "Things to get round to some day ...")
(org-agenda-prefix-format '((todo . "%(org-agenda-todo-custom-prefix)")))
(org-agenda-sorting-strategy '((todo user-defined-up)))
)
)
;; (agenda "")
)
)
("r" "Reading lists"
(
(todo "READING" (
(org-agenda-prefix-format '((todo . "%(org-agenda-todo-custom-prefix)")))
(org-agenda-sorting-strategy '((todo user-defined-up priority-down)))
)
)
)
)
("w" "This week"
((tags-todo "this_week" (
(org-agenda-overriding-header "To do this week")
(org-agenda-prefix-format "%(org-agenda-todo-custom-prefix)")
(org-agenda-sorting-strategy '((user-defined-up priority-down)))
)
)
)
)
;; ("R" "Test view"
;; ((alltodo "" (
;; (org-agenda-prefix-format '((todo . "%(org-agenda-custom-prefix)")))
;; (org-agenda-cmp-user-defined 'deadline-sort)
;; (org-agenda-sorting-strategy '((todo user-defined-up)))
;; )
;; )
;; )
;; )
)
)
(defun org-ask-location ()
(let* ((org-refile-targets '((nil :maxlevel . 9)))
(hd (car (cdr (cdr (org-refile-get-location "Headline" nil t)))))
)
(goto-char (point-min))
(re-search-forward hd nil nil)
)
(end-of-line))
(after! org
(setq org-capture-templates
'(
("p" "Personal TODO item" entry (file+headline "personal.org" "To-do list")
"* TODO %?")
;;
("w" "Work TODO item" entry (file+headline "work.org" "To-do list")
"* TODO %?")
;;
("r" "READING item" entry (file+headline "work.org" "Reading list")
"* READING [#A] %?")
))
)
(setq org-roam-directory "~/Dropbox/org/my-wiki")
(define-generic-mode
'unlu-rules-mode ;; name of the mode to create
'("# " "##") ;; comments start with '#'
'("relation" "coarsePos"
"lemma") ;; some keywords
'(
("![\\{)a-z ]" . font-lock-variable-name-face)
("\\^" . font-lock-variable-name-face)
("=" . font-lock-builtin-face)
("->" . font-lock-builtin-face)
(";" . font-lock-builtin-face)
("-o" . font-lock-builtin-face)
("+" . font-lock-builtin-face)
(":" . font-lock-builtin-face)
("~" . font-lock-negation-char-face)
;; ("\\\\[a-zA-Z]" . font-lock-constant-face)
("#[1-9]" . font-lock-type-face)
) ;; extra highlights
'("\\.dat$") ;; files for which to activate this mode
'(rainbow-delimiters-mode) ;; other functions to call
"A mode for the UNLU project rule file" ;; doc string for this mode
)
(define-generic-mode
'grs-mode ;; name of the mode to create
'("%") ;; comments start with '%'
'("package" "rule" "pattern" "strat"
"commands" "with" "without" "del_feat"
"add_edge" "del_edge"
"Pick" "Alt" "Onf" "Seq" "Iter" "If" "Try") ;; some keywords
'(
("![\\{)a-z ]" . font-lock-variable-name-face)
("\\^" . font-lock-variable-name-face)
("=" . font-lock-builtin-face)
("->" . font-lock-builtin-face)
(";" . font-lock-builtin-face)
("+" . font-lock-builtin-face)
("|" . font-lock-builtin-face)
("!" . font-lock-negation-char-face)
;; ("\\\\[a-zA-Z]" . font-lock-constant-face)
("#[1-9]" . font-lock-type-face)
) ;; extra highlights
'("\\.grs$") ;; files for which to activate this mode
'(rainbow-delimiters-mode) ;; other functions to call
"A mode for the UNLU project rule file" ;; doc string for this mode
)