emacs: add config wide paths to important files
This commit is contained in:
parent
210d7d37b5
commit
ddc78add90
|
@ -1,14 +1,20 @@
|
||||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
||||||
;; config.el
|
|
||||||
|
|
||||||
(setq user-full-name "Jonathan Jenne"
|
(setq user-full-name "Jonathan Jenne"
|
||||||
user-mail-address "johnnie@posteo.de")
|
user-mail-address "johnnie@posteo.de")
|
||||||
|
|
||||||
|
(setq +user-org-path "~/Notes/Org"
|
||||||
|
+user-org-todo-file "Todo.org"
|
||||||
|
+user-org-notes-file "Notes.org"
|
||||||
|
+user-org-journal-file "Journal.org")
|
||||||
|
|
||||||
(setq shell-file-name (executable-find "bash"))
|
(setq shell-file-name (executable-find "bash"))
|
||||||
|
|
||||||
(setq display-line-numbers-type t)
|
(setq display-line-numbers-type t)
|
||||||
(setq doom-theme 'doom-one)
|
(setq doom-theme 'doom-one)
|
||||||
|
|
||||||
|
(setq org-src-tab-acts-natively t)
|
||||||
|
|
||||||
(after! org (setq
|
(after! org (setq
|
||||||
org-agenda-show-all-dates nil
|
org-agenda-show-all-dates nil
|
||||||
org-agenda-span 2
|
org-agenda-span 2
|
||||||
|
@ -22,21 +28,29 @@
|
||||||
"◀── now ──────────────────────────────────────────────── \\o/"
|
"◀── now ──────────────────────────────────────────────── \\o/"
|
||||||
org-agenda-block-separator ?─
|
org-agenda-block-separator ?─
|
||||||
;; Consider all org files part of the org-agenda
|
;; Consider all org files part of the org-agenda
|
||||||
org-agenda-files (list "~/Notes/Org")))
|
org-agenda-files (list +user-org-path)))
|
||||||
|
|
||||||
(setq org-auto-tangle-default nil)
|
(setq org-auto-tangle-default nil)
|
||||||
|
|
||||||
(after! org (setq +org-capture-notes-file "Notes.org"
|
(after! org (setq +org-capture-notes-file (expand-file-name +user-org-notes-file +user-org-path)
|
||||||
+org-capture-todo-file "Todo.org"))
|
+org-capture-todo-file (expand-file-name +user-org-todo-file +user-org-path)
|
||||||
|
+org-capture-journal-file (expand-file-name +user-org-journal-file +user-org-path)))
|
||||||
|
|
||||||
(setq org-directory "~/Notes/Org")
|
(setq org-capture-templates
|
||||||
|
'(("t" "Personal todo" entry
|
||||||
|
(file+headline +org-capture-todo-file "Inbox")
|
||||||
|
"* TODO %?\n" :prepend t)
|
||||||
|
|
||||||
|
("n" "Personal notes" entry
|
||||||
|
(file+headline +org-capture-notes-file "Inbox")
|
||||||
|
"* %u %?\n" :prepend t)
|
||||||
|
|
||||||
|
("j" "Journal" entry
|
||||||
|
(file+olp+datetree +org-capture-journal-file)
|
||||||
|
"* %U %?\n" :prepend t)))
|
||||||
|
|
||||||
|
(setq org-directory +user-org-path)
|
||||||
|
|
||||||
(add-hook 'org-mode-hook #'org-modern-mode)
|
(add-hook 'org-mode-hook #'org-modern-mode)
|
||||||
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
|
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
|
||||||
(add-hook 'org-mode-hook 'org-auto-tangle-mode)
|
(add-hook 'org-mode-hook 'org-auto-tangle-mode)
|
||||||
|
|
||||||
(setq org-journal-date-prefix "#+TITLE: "
|
|
||||||
org-journal-time-prefix "* "
|
|
||||||
org-journal-date-format "%a, %Y-%m-%d"
|
|
||||||
org-journal-file-format "%Y/%m/%Y-%m-%d.org"
|
|
||||||
org-journal-dir "~/Notes/Org/Journal")
|
|
||||||
|
|
|
@ -5,33 +5,37 @@
|
||||||
|
|
||||||
* Table of contents :toc:
|
* Table of contents :toc:
|
||||||
- [[#notes][Notes]]
|
- [[#notes][Notes]]
|
||||||
- [[#base-setup][Base Setup]]
|
- [[#config-basics][Config Basics]]
|
||||||
- [[#appearance][Appearance]]
|
- [[#appearance][Appearance]]
|
||||||
- [[#org-mode][Org Mode]]
|
- [[#org-mode][Org Mode]]
|
||||||
|
- [[#org-basics][Org Basics]]
|
||||||
- [[#org-agenda][Org Agenda]]
|
- [[#org-agenda][Org Agenda]]
|
||||||
- [[#org-auto-tangle][Org Auto Tangle]]
|
- [[#org-auto-tangle][Org Auto Tangle]]
|
||||||
- [[#org-capture][Org Capture]]
|
- [[#org-capture][Org Capture]]
|
||||||
- [[#org-directory][Org Directory]]
|
- [[#org-directory][Org Directory]]
|
||||||
- [[#org-hooks][Org Hooks]]
|
- [[#org-hooks][Org Hooks]]
|
||||||
- [[#org-journal][Org Journal]]
|
|
||||||
|
|
||||||
* Notes
|
* Notes
|
||||||
|
|
||||||
Remember, you do not need to run 'doom sync' after modifying this file!
|
Remember, you do not need to run 'doom sync' after modifying this file!
|
||||||
|
|
||||||
* Base Setup
|
* Config Basics
|
||||||
|
|
||||||
This codeblock should be the first in this file!
|
This codeblock should be the first in this file!
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
||||||
;; config.el
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq user-full-name "Jonathan Jenne"
|
(setq user-full-name "Jonathan Jenne"
|
||||||
user-mail-address "johnnie@posteo.de")
|
user-mail-address "johnnie@posteo.de")
|
||||||
|
|
||||||
|
(setq +user-org-path "~/Notes/Org"
|
||||||
|
+user-org-todo-file "Todo.org"
|
||||||
|
+user-org-notes-file "Notes.org"
|
||||||
|
+user-org-journal-file "Journal.org")
|
||||||
|
|
||||||
(setq shell-file-name (executable-find "bash"))
|
(setq shell-file-name (executable-find "bash"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -44,8 +48,17 @@ This codeblock should be the first in this file!
|
||||||
|
|
||||||
* Org Mode
|
* Org Mode
|
||||||
|
|
||||||
|
** Org Basics
|
||||||
|
*** TAB uses the language's major-mode binding in code blocks
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq org-src-tab-acts-natively t)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Org Agenda
|
** Org Agenda
|
||||||
|
|
||||||
|
To have a less overwhelming agenda, show only TODOs for today and tomorrow. DONE items are not interesting, so they are also hidden.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! org (setq
|
(after! org (setq
|
||||||
org-agenda-show-all-dates nil
|
org-agenda-show-all-dates nil
|
||||||
|
@ -60,26 +73,48 @@ This codeblock should be the first in this file!
|
||||||
"◀── now ──────────────────────────────────────────────── \\o/"
|
"◀── now ──────────────────────────────────────────────── \\o/"
|
||||||
org-agenda-block-separator ?─
|
org-agenda-block-separator ?─
|
||||||
;; Consider all org files part of the org-agenda
|
;; Consider all org files part of the org-agenda
|
||||||
org-agenda-files (list "~/Notes/Org")))
|
org-agenda-files (list +user-org-path)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Org Auto Tangle
|
** Org Auto Tangle
|
||||||
|
|
||||||
|
Only tangle org files where it has been explicitly enabled, like this config file
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq org-auto-tangle-default nil)
|
(setq org-auto-tangle-default nil)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Org Capture
|
** Org Capture
|
||||||
|
|
||||||
|
*** Capture Files
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! org (setq +org-capture-notes-file "Notes.org"
|
(after! org (setq +org-capture-notes-file (expand-file-name +user-org-notes-file +user-org-path)
|
||||||
+org-capture-todo-file "Todo.org"))
|
+org-capture-todo-file (expand-file-name +user-org-todo-file +user-org-path)
|
||||||
|
+org-capture-journal-file (expand-file-name +user-org-journal-file +user-org-path)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** Capture Templates
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq org-capture-templates
|
||||||
|
'(("t" "Personal todo" entry
|
||||||
|
(file+headline +org-capture-todo-file "Inbox")
|
||||||
|
"* TODO %?\n" :prepend t)
|
||||||
|
|
||||||
|
("n" "Personal notes" entry
|
||||||
|
(file+headline +org-capture-notes-file "Inbox")
|
||||||
|
"* %u %?\n" :prepend t)
|
||||||
|
|
||||||
|
("j" "Journal" entry
|
||||||
|
(file+olp+datetree +org-capture-journal-file)
|
||||||
|
"* %U %?\n" :prepend t)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Org Directory
|
** Org Directory
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq org-directory "~/Notes/Org")
|
(setq org-directory +user-org-path)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Org Hooks
|
** Org Hooks
|
||||||
|
@ -90,13 +125,3 @@ This codeblock should be the first in this file!
|
||||||
(add-hook 'org-mode-hook 'org-auto-tangle-mode)
|
(add-hook 'org-mode-hook 'org-auto-tangle-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Org Journal
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq org-journal-date-prefix "#+TITLE: "
|
|
||||||
org-journal-time-prefix "* "
|
|
||||||
org-journal-date-format "%a, %Y-%m-%d"
|
|
||||||
org-journal-file-format "%Y/%m/%Y-%m-%d.org"
|
|
||||||
org-journal-dir "~/Notes/Org/Journal")
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue