2023-07-17 00:09:08 +02:00
|
|
|
#+title: Setup Fschl Org Configuration
|
2024-04-18 14:31:30 +02:00
|
|
|
#+PROPERTY: header-args:emacs-lisp :tangle ./modules/fschl-org.el :mkdirp yes :tangle-mode "ugo=r"
|
2023-07-17 00:09:08 +02:00
|
|
|
|
|
|
|
* Basic configuration
|
|
|
|
** Additional Packages
|
|
|
|
#+begin_src emacs-lisp
|
2023-07-17 22:08:19 +02:00
|
|
|
;;; fschl-org.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
2023-10-31 22:29:24 +01:00
|
|
|
|
2023-07-17 22:08:19 +02:00
|
|
|
;; This file is generated from the .org-file with the same name. If you want to edit the
|
|
|
|
;; configuration, DO NOT edit this .el-file, edit .org, instead.
|
|
|
|
|
2023-10-31 22:29:24 +01:00
|
|
|
;; see variable `org-roam-database-connector`
|
|
|
|
;(add-to-list 'package-selected-packages 'emacsql-sqlite-builtin)
|
|
|
|
;(add-to-list 'package-selected-packages 'emacsql-sqlite)
|
|
|
|
;(add-to-list 'package-selected-packages 'org-roam)
|
|
|
|
;(add-to-list 'package-selected-packages 'org-roam-ui)
|
|
|
|
(add-to-list 'package-selected-packages 'denote)
|
2024-04-17 08:41:12 +02:00
|
|
|
(add-to-list 'package-selected-packages 'org-modern)
|
2023-07-17 22:08:19 +02:00
|
|
|
(add-to-list 'package-selected-packages 'ox-latex)
|
|
|
|
(add-to-list 'package-selected-packages 'ox-koma-letter)
|
|
|
|
(package-install-selected-packages :noconfirm)
|
2023-07-17 00:09:08 +02:00
|
|
|
#+end_src
|
|
|
|
|
2024-04-17 08:41:12 +02:00
|
|
|
* Beautify Org
|
|
|
|
|
|
|
|
https://github.com/minad/org-modern
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(with-eval-after-load 'org (global-org-modern-mode))
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
* Setup Org-mode Key Map
|
2023-07-17 00:09:08 +02:00
|
|
|
#+begin_src emacs-lisp
|
2023-10-31 22:29:24 +01:00
|
|
|
(setq org-default-notes-file "~/Documents/Org/inbox.org")
|
|
|
|
(keymap-global-set "C-c o c" #'org-capture)
|
|
|
|
(keymap-global-set "C-c o l" #'org-store-link)
|
|
|
|
(keymap-global-set "C-c o a" #'org-agenda)
|
|
|
|
|
|
|
|
(keymap-global-set "<f7>" #'org-cycle-agenda-files)
|
2024-04-18 14:31:30 +02:00
|
|
|
;(keymap-global-set "<f8>" #'find-file org-default-notes-file)
|
2023-07-17 00:09:08 +02:00
|
|
|
#+end_src
|
|
|
|
|
2024-04-17 08:41:12 +02:00
|
|
|
* Setup Agenda Files
|
2023-07-17 00:09:08 +02:00
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq org-agenda-files
|
2023-10-31 22:29:24 +01:00
|
|
|
(quote ("~/Documents/Org/inbox.org"
|
2023-07-17 00:09:08 +02:00
|
|
|
"~/Documents/Org/journal.org"
|
|
|
|
"~/Documents/Org/private.org"
|
|
|
|
"~/Documents/Org/projects.org"
|
2023-10-31 22:29:24 +01:00
|
|
|
"~/Documents/Org/tasks.org"
|
2023-07-17 00:09:08 +02:00
|
|
|
"~/Documents/Org/birthdays.org")))
|
2023-10-31 22:29:24 +01:00
|
|
|
(setq org-refile-targets '(("~/Documents/Org/projects.org" :maxlevel . 3)
|
|
|
|
("~/Documents/Org/journal.org" :level . 1)
|
|
|
|
("~/Documents/Org/private.org" :maxlevel . 2)))
|
|
|
|
#+end_src
|
|
|
|
|
2024-04-17 08:41:12 +02:00
|
|
|
* Custom TODO keywords
|
2023-10-31 22:29:24 +01:00
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq org-todo-keywords
|
|
|
|
(quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
|
|
|
|
(sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" "PHONE" "MEETING"))))
|
|
|
|
(setq org-todo-keyword-faces
|
|
|
|
(quote (("TODO" :foreground "red" :weight bold)
|
|
|
|
("NEXT" :foreground "blue" :weight bold)
|
|
|
|
("DONE" :foreground "forest green" :weight bold)
|
|
|
|
("WAITING" :foreground "orange" :weight bold)
|
|
|
|
("HOLD" :foreground "magenta" :weight bold)
|
|
|
|
("CANCELLED" :foreground "forest green" :weight bold)
|
|
|
|
("MEETING" :foreground "forest green" :weight bold)
|
|
|
|
("PHONE" :foreground "forest green" :weight bold))))
|
2023-07-17 00:09:08 +02:00
|
|
|
#+end_src
|
|
|
|
|
2024-04-18 14:31:30 +02:00
|
|
|
* Add Week to Calendar
|
2024-04-17 08:41:12 +02:00
|
|
|
|
|
|
|
- [ ] this should go into 'fschl-ui.el'
|
2023-07-17 00:09:08 +02:00
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq calendar-week-start-day 1)
|
|
|
|
(setq calendar-intermonth-text
|
|
|
|
'(propertize
|
|
|
|
(format "%2d"
|
|
|
|
(car
|
|
|
|
(calendar-iso-from-absolute
|
|
|
|
(calendar-absolute-from-gregorian (list month day year)))))
|
|
|
|
'font-lock-face 'font-lock-warning-face))
|
|
|
|
|
|
|
|
(setq calendar-intermonth-header
|
|
|
|
(propertize "KW" ; or e.g. "Wk"
|
|
|
|
'font-lock-face 'font-lock-keyword-face))
|
|
|
|
#+end_src
|
|
|
|
|
2024-04-17 08:41:12 +02:00
|
|
|
* Setup Capture Templates
|
2023-07-17 00:09:08 +02:00
|
|
|
|
|
|
|
- https://orgmode.org/manual/Template-elements.html
|
|
|
|
- https://orgmode.org/manual/Template-expansion.html
|
|
|
|
|
2024-04-18 14:31:30 +02:00
|
|
|
** TODO Export Letter [0/1]
|
2024-04-17 08:41:12 +02:00
|
|
|
- [ ] hide behind a 'latex installed' guard
|
2023-07-17 00:09:08 +02:00
|
|
|
#+begin_src emacs-lisp
|
2023-07-19 22:29:03 +02:00
|
|
|
(eval-after-load 'ox '(require 'ox-koma-letter))
|
|
|
|
(eval-after-load 'ox '(require 'ox-moderncv))
|
|
|
|
(eval-after-load 'ox '(require 'ox-awesomecv))
|
|
|
|
(eval-after-load 'ox-koma-letter
|
|
|
|
'(progn
|
|
|
|
(add-to-list 'org-latex-classes
|
|
|
|
'("Brief-de-modern"
|
|
|
|
"\\documentclass\[Brief-de-modern\]\{scrlttr2\}
|
|
|
|
\[DEFAULT-PACKAGES]
|
|
|
|
\[PACKAGES]
|
|
|
|
\[EXTRA]"))
|
|
|
|
|
|
|
|
;; \\usepackage[english]{babel}
|
|
|
|
;; \\setkomavar{frombank}{(1234)\\,567\\,890}
|
|
|
|
|
|
|
|
(setq org-koma-letter-default-class "Brief-de-modern")))
|
|
|
|
|
|
|
|
(defun fschl/create-org-letter ()
|
|
|
|
"Create a new letter in ~/Documents/letters/ with filename and date"
|
|
|
|
(interactive)
|
|
|
|
(let ((name (read-string "Filename: ")))
|
|
|
|
(expand-file-name (format "%s.org" name) "~/Documents/letters/") ))
|
2023-07-17 00:09:08 +02:00
|
|
|
#+end_src
|
|
|
|
|
2024-04-18 14:31:30 +02:00
|
|
|
** Org-Tempo shortcuts
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
|
|
|
;; This is needed as of Org 9.2
|
|
|
|
(use-package org-tempo
|
|
|
|
:ensure nil
|
|
|
|
:after org
|
|
|
|
:config
|
|
|
|
(dolist (item '(("sh" . "src sh")
|
|
|
|
("el" . "src emacs-lisp")
|
|
|
|
("li" . "src lisp")
|
|
|
|
("sc" . "src scheme")
|
|
|
|
("ts" . "src typescript")
|
|
|
|
("py" . "src python")
|
|
|
|
("go" . "src go")
|
|
|
|
("einit" . "src emacs-lisp :tangle ~/.config/emacs/init.el :mkdirp yes")
|
|
|
|
("emodule" . "src emacs-lisp :tangle ~/.config/emacs/modules/fschl-MODULE.el :mkdirp yes")
|
|
|
|
("yaml" . "src yaml")
|
|
|
|
("json" . "src json")))
|
|
|
|
(add-to-list 'org-structure-template-alist item)))
|
|
|
|
#+end_src
|
2024-04-17 08:41:12 +02:00
|
|
|
** Capture Templates
|
2023-07-17 00:09:08 +02:00
|
|
|
#+begin_src emacs-lisp
|
2023-07-17 22:08:19 +02:00
|
|
|
(setq org-capture-templates
|
|
|
|
'(("t" "todo list item" entry
|
2023-10-31 22:29:24 +01:00
|
|
|
(file+olp+datetree "~/Documents/Org/inbox.org")
|
2023-07-17 22:08:19 +02:00
|
|
|
"* TODO %?\n SCHEDULED: %^T"
|
|
|
|
:tree-type month
|
|
|
|
)
|
|
|
|
("T" "todo list item with source" entry
|
2023-10-31 22:29:24 +01:00
|
|
|
(file+olp+datetree "~/Documents/Org/inbox.org")
|
2023-07-17 22:08:19 +02:00
|
|
|
"* TODO %?\n %a \n SCHEDULED: %^T \n %^G \n"
|
|
|
|
:tree-type month
|
|
|
|
)
|
|
|
|
|
|
|
|
("r" "Todo research some website/software" entry
|
|
|
|
(file+olp+datetree "~/Documents/Org/tasks.org")
|
|
|
|
"* TODO %?\n SCHEDULED: %^T \n %^L \n"
|
|
|
|
:tree-type month
|
|
|
|
)
|
|
|
|
("l" "letter to Documents/letters/<datetime.org>"
|
|
|
|
entry (file fschl/create-org-letter)
|
2023-07-19 22:29:03 +02:00
|
|
|
"* Preamble :noexport:
|
|
|
|
\# #+TITLE: ?
|
|
|
|
\# #+DATE:
|
|
|
|
\
|
|
|
|
\#+SUBJECT: Betreff des Briefs
|
|
|
|
\
|
|
|
|
\#+LCO: Absender-Frieder
|
|
|
|
\# #+LCO: Absender-Marcelle
|
|
|
|
\# #+LCO: Absender-FamilieSchlesier
|
|
|
|
\#+LCO: Brief-de-modern
|
|
|
|
\#+STARTUP: showall
|
|
|
|
\
|
|
|
|
\* To-address :to:
|
|
|
|
\
|
|
|
|
\# * From :from:
|
|
|
|
\
|
|
|
|
\* Sehr geehrte Damen und Herren,
|
|
|
|
\?
|
|
|
|
\
|
|
|
|
\* Mit freundlichen Grüßen, :closing:
|
|
|
|
\
|
|
|
|
Frieder Schlesier")
|
2023-07-17 22:08:19 +02:00
|
|
|
("m" "Schedule a meeting" entry
|
2023-10-31 22:29:24 +01:00
|
|
|
(file+headline "~/Documents/Org/inbox.org")
|
2023-07-17 22:08:19 +02:00
|
|
|
"* MEETING %?\n SCHEDULED: %^T\n %a"
|
|
|
|
)
|
|
|
|
("p" "Schedule a phone call" entry
|
2023-10-31 22:29:24 +01:00
|
|
|
(file+headline "~/Documents/Org/inbox.org")
|
2023-07-17 22:08:19 +02:00
|
|
|
"* PHONE %?\n SCHEDULED: %^T\\n %a"
|
|
|
|
)
|
|
|
|
("a" "Articles: keep notes of online articles"
|
|
|
|
entry
|
2023-10-31 22:29:24 +01:00
|
|
|
(file+olp+datetree "~/Documents/Org/journal.org")
|
2023-07-17 22:08:19 +02:00
|
|
|
"* %? \n%x \n %u\n- $?"
|
|
|
|
:tree-type month
|
|
|
|
:kill-buffer t
|
|
|
|
:empty-lines-before 1)
|
|
|
|
)
|
2023-07-17 00:09:08 +02:00
|
|
|
)
|
|
|
|
#+end_src
|
|
|
|
|
2024-04-17 08:41:12 +02:00
|
|
|
* Setup Babel Support
|
2023-10-31 22:29:24 +01:00
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
;; active Babel languages
|
|
|
|
(org-babel-do-load-languages
|
|
|
|
'org-babel-load-languages
|
|
|
|
'((shell . t)
|
|
|
|
(emacs-lisp . t)
|
|
|
|
(dot . t)))
|
|
|
|
#+end_src
|
|
|
|
* Configure =Org-Roam= :noexport:
|
|
|
|
#+begin_src emacs-lisp :tangle no
|
|
|
|
;; ;; Setting the storage directory:
|
|
|
|
;; ;; Stores org-roam data in a subdirectory under the emacs directory
|
|
|
|
;; (customize-set-variable 'org-roam-database-connector "sqlite-builtin")
|
|
|
|
;; (customize-set-variable 'org-roam-directory (file-truename "~/org-roam"))
|
|
|
|
|
|
|
|
(use-package org-roam
|
|
|
|
:ensure t
|
|
|
|
:load-path "~/src/org-roam/"
|
|
|
|
:custom
|
|
|
|
(org-roam-directory (file-truename "~/org-roam/"))
|
|
|
|
:bind (("C-c n l" . org-roam-buffer-toggle)
|
|
|
|
("C-c n f" . org-roam-node-find)
|
|
|
|
("C-c n g" . org-roam-graph)
|
|
|
|
("C-c n i" . org-roam-node-insert)
|
|
|
|
("C-c n c" . org-roam-capture))
|
|
|
|
;; Dailies
|
|
|
|
;("C-c n j" . org-roam-dailies-capture-today)
|
|
|
|
|
|
|
|
:config
|
|
|
|
;; If you're using a vertical completion framework, you might want a more informative completion interface
|
|
|
|
(setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
|
|
|
|
(org-roam-db-autosync-mode)
|
|
|
|
(setq 'org-roam-database-connector "sqlite-builtin")
|
|
|
|
|
|
|
|
;; ;; If you're using a vertical completion framework, you might want a
|
|
|
|
;; ;; more informative completion interface:
|
|
|
|
;; (when (or (bound-and-true-p fido-vertical-mode)
|
|
|
|
;; (bound-and-true-p icomplete-vertical-mode)
|
|
|
|
;; (bound-and-true-p vertico))
|
|
|
|
;; (customize-set-variable 'org-roam-node-display-template
|
|
|
|
;; (concat "${title:*} "
|
|
|
|
;; (propertize "${tags:10}" 'face 'org-tag))))
|
|
|
|
)
|
|
|
|
|
|
|
|
;; ;; suggested keymap based on example from project documentation
|
|
|
|
;; (keymap-global-set "C-c r l" #'org-roam-buffer-toggle)
|
|
|
|
;; (keymap-global-set "C-c r f" #'org-roam-node-find)
|
|
|
|
;; (keymap-global-set "C-c r g" #'org-roam-graph)
|
|
|
|
;; (keymap-global-set "C-c r i" #'org-roam-node-insert)
|
|
|
|
;; (keymap-global-set "C-c r c" #'org-roam-capture)
|
|
|
|
;; ;(keymap-global-set "C-c r j" . org-roam-dailies-capture-today)
|
|
|
|
;; ;(org-roam-db-autosync-mode)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** And =org-roam-ui= :noexport:
|
|
|
|
#+begin_src emacs-lisp :tangle no
|
|
|
|
(use-package org-roam-ui
|
|
|
|
:after org-roam
|
|
|
|
;; normally we'd recommend hooking orui after org-roam, but since
|
|
|
|
;; org-roam does not have a hookable mode anymore, you're advised to
|
|
|
|
;; pick something yourself if you don't care about startup time, use
|
|
|
|
;; :hook (after-init . org-roam-ui-mode)
|
|
|
|
:config
|
|
|
|
(setq org-roam-ui-sync-theme t
|
|
|
|
org-roam-ui-follow t
|
|
|
|
org-roam-ui-update-on-save t
|
|
|
|
org-roam-ui-open-on-start t))
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
* Denote
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq org-directory "~/Documents/Org/denotes/")
|
|
|
|
(use-package denote
|
|
|
|
:bind
|
|
|
|
("C-c n n" . 'denote)
|
|
|
|
("C-c n f" . 'denote-open-or-create)
|
|
|
|
;; ("C-c n f" . 'my/project-org-file-file)
|
|
|
|
("C-c n k" . 'denote-keywords-add) ;; update file name automatically
|
|
|
|
("C-c n K" . 'denote-keywords-remove) ;; update file name automatically
|
|
|
|
("C-c n u" . 'denote-rename-file-using-front-matter)
|
|
|
|
("C-c n l" . 'denote-link-find-backlink)
|
|
|
|
("C-c n r" . 'my/denote-random-note)
|
|
|
|
:init
|
|
|
|
(setq denote-directory (expand-file-name org-directory))
|
|
|
|
:config
|
|
|
|
(setq denote-known-keywords '("emacs"))
|
|
|
|
(setq denote-prompts '(subdirectory title))
|
|
|
|
(setq denote-excluded-directories-regexp ".attachment")
|
|
|
|
|
|
|
|
;; Makes the denote links different from usual link.
|
|
|
|
(set-face-attribute 'denote-faces-link
|
|
|
|
nil :foreground "magenta" :inherit 'link)
|
|
|
|
|
|
|
|
;; Remove the date and the identifier. They are duplicated with the file name.
|
|
|
|
;; I want to remove filetags too but denote-keyword-* need that.
|
|
|
|
(setq denote-org-front-matter "#+title: %1$s\n#+filetags: %3$s\n")
|
|
|
|
|
|
|
|
(add-hook 'dired-mode-hook #'denote-dired-mode))
|
|
|
|
#+end_src
|
2024-04-17 08:41:12 +02:00
|
|
|
* TeX and research [0/1]
|
2023-07-17 00:09:08 +02:00
|
|
|
|
2023-07-17 22:08:19 +02:00
|
|
|
- Write a CV in org-mode: https://titan-c.gitlab.io/org-cv/
|
2023-07-19 22:29:03 +02:00
|
|
|
cloned to Path =~/src/org-cv=
|
2023-07-17 22:08:19 +02:00
|
|
|
- requires: ~texlive-latex-extra texlive-xetex~
|
2023-07-19 22:29:03 +02:00
|
|
|
- =git clone https://github.com/posquit0/Awesome-CV ~/texmf/tex/latex/awesome-cv=
|
2024-04-17 08:41:12 +02:00
|
|
|
- [ ] hide behind a 'latex installed' guard
|
2023-07-17 00:09:08 +02:00
|
|
|
#+begin_src emacs-lisp
|
2023-07-19 22:29:03 +02:00
|
|
|
(use-package ox-awesomecv
|
|
|
|
:load-path "~/src/org-cv/"
|
|
|
|
:init (require 'ox-awesomecv))
|
2023-07-17 22:08:19 +02:00
|
|
|
(use-package ox-moderncv
|
|
|
|
:load-path "~/src/org-cv/"
|
|
|
|
:init (require 'ox-moderncv))
|
|
|
|
(setq org-ref-default-bibliography '("~/Documents/references/references.bib")
|
|
|
|
org-ref-pdf-directory "~/Documents/references/"
|
|
|
|
org-ref-bibliography-notes "~/Documents/references/notes.org")
|
2023-07-17 00:09:08 +02:00
|
|
|
#+end_src
|