Add org-auto-tangle, org-journal

This commit is contained in:
Inhji 2024-02-02 09:28:35 +01:00
parent a58e02e433
commit 44e8f02225
4 changed files with 79 additions and 41 deletions

View File

@ -1,22 +1,14 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; config.el
(setq user-full-name "Jonathan Jenne"
user-mail-address "johnnie@posteo.de")
(setq shell-file-name (executable-find "bash"))
(setq display-line-numbers-type t)
(setq doom-theme 'doom-one)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/Notes/Org")
(after! org (setq +org-capture-notes-file "Notes.org"
+org-capture-todo-file "Todo.org"))
;; Configure Org-Agenda
(after! org (setq
org-agenda-show-all-dates nil
org-agenda-span 2
@ -32,13 +24,19 @@
;; Consider all org files part of the org-agenda
org-agenda-files (list "~/Notes/Org")))
;; Set bash as the default shell to run Emacs in since fish can cause problems
(setq shell-file-name (executable-find "bash"))
(setq org-auto-tangle-default nil)
(after! org (setq +org-capture-notes-file "Notes.org"
+org-capture-todo-file "Todo.org"))
(setq org-directory "~/Notes/Org")
;; Initialize org-modern
(add-hook 'org-mode-hook #'org-modern-mode)
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
(add-hook 'org-mode-hook 'org-auto-tangle-mode)
(add-hook! org-mode :append
(lambda () (add-hook 'after-save-hook
#'org-babel-tangle :append :local)))
(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")

View File

@ -1,41 +1,52 @@
#+TITLE: Literate Doom Emacs Config
#+AUTHOR: Inhji
#+PROPERTY: header-args :tangle config.el
#+auto_tangle: t
Place your private configuration here! Remember, you do not need to run 'doom sync' after modifying this file!
* Table of contents :toc:
- [[#notes][Notes]]
- [[#base-setup][Base Setup]]
- [[#appearance][Appearance]]
- [[#org-mode][Org Mode]]
- [[#org-agenda][Org Agenda]]
- [[#org-auto-tangle][Org Auto Tangle]]
- [[#org-capture][Org Capture]]
- [[#org-directory][Org Directory]]
- [[#org-hooks][Org Hooks]]
- [[#org-journal][Org Journal]]
* Notes
Remember, you do not need to run 'doom sync' after modifying this file!
* Base Setup
This codeblock should be the first in this file!
#+begin_src emacs-lisp
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; config.el
#+end_src
#+begin_src emacs-lisp
(setq user-full-name "Jonathan Jenne"
user-mail-address "johnnie@posteo.de")
(setq shell-file-name (executable-find "bash"))
#+end_src
* Appearance
#+begin_src emacs-lisp
(setq display-line-numbers-type t)
(setq doom-theme 'doom-one)
#+end_src
* Misc
* Org Mode
** Org Agenda
#+begin_src emacs-lisp
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/Notes/Org")
(after! org (setq +org-capture-notes-file "Notes.org"
+org-capture-todo-file "Todo.org"))
;; Configure Org-Agenda
(after! org (setq
org-agenda-show-all-dates nil
org-agenda-span 2
@ -50,16 +61,42 @@ Place your private configuration here! Remember, you do not need to run 'doom sy
org-agenda-block-separator ?─
;; Consider all org files part of the org-agenda
org-agenda-files (list "~/Notes/Org")))
#+end_src
;; Set bash as the default shell to run Emacs in since fish can cause problems
(setq shell-file-name (executable-find "bash"))
** Org Auto Tangle
;; Initialize org-modern
#+begin_src emacs-lisp
(setq org-auto-tangle-default nil)
#+end_src
** Org Capture
#+begin_src emacs-lisp
(after! org (setq +org-capture-notes-file "Notes.org"
+org-capture-todo-file "Todo.org"))
#+end_src
** Org Directory
#+begin_src emacs-lisp
(setq org-directory "~/Notes/Org")
#+end_src
** Org Hooks
#+begin_src emacs-lisp
(add-hook 'org-mode-hook #'org-modern-mode)
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
(add-hook! org-mode :append
(lambda () (add-hook 'after-save-hook
#'org-babel-tangle :append :local)))
(add-hook 'org-mode-hook 'org-auto-tangle-mode)
#+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

View File

@ -154,7 +154,8 @@
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
(org ; organize your plain life in plain text
+journal)
php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional

View File

@ -10,6 +10,8 @@
;; (package! some-package)
(package! org-modern)
(package! org-auto-tangle)
(package! org-journal)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here: