Compare commits
No commits in common. "0ff6257a933e216735438f78e5cff81e1da264ff" and "c3b02f62fdee120c9fcd73c8bb8936848330dc4d" have entirely different histories.
0ff6257a93
...
c3b02f62fd
12
TODO.org
12
TODO.org
|
@ -5,7 +5,7 @@ my Notes and LaTeX support.
|
||||||
|
|
||||||
** Handling emacs Configuration changes
|
** Handling emacs Configuration changes
|
||||||
|
|
||||||
*** DONE auto-tangle all .org files in this project
|
*** TODO auto-tangle all .org files in this project
|
||||||
currently every =fschl-module.org= file contains it's own
|
currently every =fschl-module.org= file contains it's own
|
||||||
=org-babel-tangle-config()= block There must be a more generalized
|
=org-babel-tangle-config()= block There must be a more generalized
|
||||||
solution, e.g. set it up to auto-tangle all .org files within/below
|
solution, e.g. set it up to auto-tangle all .org files within/below
|
||||||
|
@ -27,7 +27,7 @@ solution, e.g. set it up to auto-tangle all .org files within/below
|
||||||
|
|
||||||
*** TODO syncable org-files, agenda files, calendar setup
|
*** TODO syncable org-files, agenda files, calendar setup
|
||||||
|
|
||||||
*** DONE extend TODO-keyword: NEXT, MAYBE, MEETING, CALL, CANCELED, HOLD
|
*** TODO extend TODO-keyword: NEXT, MAYBE, MEETING, CALL, CANCELED, HOLD
|
||||||
|
|
||||||
*** TODO make org-roam work with simple key chords
|
*** TODO make org-roam work with simple key chords
|
||||||
|
|
||||||
|
@ -37,12 +37,12 @@ solution, e.g. set it up to auto-tangle all .org files within/below
|
||||||
|
|
||||||
*** TODO get used to clocking and export
|
*** TODO get used to clocking and export
|
||||||
|
|
||||||
*** TODO graphviz setup
|
# *** TODO graphviz setup
|
||||||
|
|
||||||
** Communication Tools
|
# ** Communication Tools
|
||||||
|
|
||||||
*** TODO IRC client + setup
|
# *** TODO IRC client + setup
|
||||||
e.g. for system-crafter, gnu guix, rde
|
# e.g. for system-crafter, gnu guix, rde
|
||||||
|
|
||||||
*** TODO matrix client setup
|
*** TODO matrix client setup
|
||||||
e.g. for Chemnitzer LinuxTage, system-crafter, rde,...
|
e.g. for Chemnitzer LinuxTage, system-crafter, rde,...
|
||||||
|
|
39
custom.el
39
custom.el
|
@ -10,20 +10,6 @@
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
|
|
||||||
(defun org-babel-tangle-config ()
|
|
||||||
"Tangle all Org-mode files in `user-emacs-directory` after save."
|
|
||||||
(let ((user-emacs-dir (expand-file-name user-emacs-directory))
|
|
||||||
(buffer-file (expand-file-name (buffer-file-name))))
|
|
||||||
(when (and (string-equal (file-name-extension (buffer-file-name)) "org")
|
|
||||||
(string-equal (file-name-directory (buffer-file-name)) user-emacs-dir))
|
|
||||||
(let ((default-directory user-emacs-dir)
|
|
||||||
(org-confirm-babel-evaluate nil))
|
|
||||||
(org-babel-tangle-file (buffer-file-name))))))
|
|
||||||
|
|
||||||
(add-hook 'org-mode-hook
|
|
||||||
(lambda ()
|
|
||||||
(add-hook 'after-save-hook #'org-babel-tangle-config)))
|
|
||||||
|
|
||||||
(defvar fschl-org-file (expand-file-name "fschl-org.el" user-emacs-directory))
|
(defvar fschl-org-file (expand-file-name "fschl-org.el" user-emacs-directory))
|
||||||
(when (and fschl-org-file
|
(when (and fschl-org-file
|
||||||
(file-exists-p fschl-org-file))
|
(file-exists-p fschl-org-file))
|
||||||
|
@ -42,12 +28,7 @@
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(LaTeX-electric-left-right-brace t)
|
|
||||||
'(Man-notify-method 'aggressive t)
|
'(Man-notify-method 'aggressive t)
|
||||||
'(TeX-auto-save t)
|
|
||||||
'(TeX-electric-math '("$" . "$"))
|
|
||||||
'(TeX-electric-sub-and-superscript t)
|
|
||||||
'(TeX-parse-self t)
|
|
||||||
'(bookmark-save-flag 1 t)
|
'(bookmark-save-flag 1 t)
|
||||||
'(completion-category-overrides '((file (styles partial-completion))))
|
'(completion-category-overrides '((file (styles partial-completion))))
|
||||||
'(completion-cycle-threshold 3)
|
'(completion-cycle-threshold 3)
|
||||||
|
@ -73,26 +54,18 @@
|
||||||
'(ibuffer-movement-cycle nil)
|
'(ibuffer-movement-cycle nil)
|
||||||
'(ibuffer-old-time 24)
|
'(ibuffer-old-time 24)
|
||||||
'(kill-do-not-save-duplicates t)
|
'(kill-do-not-save-duplicates t)
|
||||||
'(load-prefer-newer t)
|
'(load-prefer-newer t t)
|
||||||
'(markdown-enable-html t)
|
'(org-hide-emphasis-markers t t)
|
||||||
'(markdown-enable-math t)
|
'(org-link-descriptive t t)
|
||||||
'(org-hide-emphasis-markers t)
|
'(org-mouse-1-follows-link t t)
|
||||||
'(org-latex-compiler "xelatex")
|
'(org-return-follows-link t t)
|
||||||
'(org-link-descriptive t)
|
|
||||||
'(org-mouse-1-follows-link t)
|
|
||||||
'(org-return-follows-link t)
|
|
||||||
'(package-archive-priorities
|
'(package-archive-priorities
|
||||||
'(("gnu" . 99)
|
'(("gnu" . 99)
|
||||||
("nongnu" . 80)
|
("nongnu" . 80)
|
||||||
("stable" . 70)
|
("stable" . 70)
|
||||||
("melpa" . 0)))
|
("melpa" . 0)))
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(auctex pandoc-mode markdown-mode combobulate treesit-auto ibuffer-project aggressive-indent editorconfig tree-sitter-langs tree-sitter-ispell tree-sitter-indent tree-sitter eglot magit helpful elisp-demos all-the-icons org-appear denote evil-nerd-commenter evil-collection evil vertico orderless marginalia embark-consult embark corfu-terminal corfu consult cape))
|
'(combobulate treesit-auto ibuffer-project aggressive-indent editorconfig tree-sitter-langs tree-sitter-ispell tree-sitter-indent tree-sitter eglot magit helpful elisp-demos all-the-icons org-appear denote evil-nerd-commenter evil-collection evil vertico orderless marginalia embark-consult embark corfu-terminal corfu consult cape))
|
||||||
'(reftex-plug-into-AUCTeX t t)
|
|
||||||
'(safe-local-variable-values
|
|
||||||
'((vc-prepare-patches-separately)
|
|
||||||
(diff-add-log-use-relative-names . t)
|
|
||||||
(vc-git-annotate-switches . "-w")))
|
|
||||||
'(scroll-conservatively 101)
|
'(scroll-conservatively 101)
|
||||||
'(scroll-margin 0)
|
'(scroll-margin 0)
|
||||||
'(scroll-preserve-screen-position t)
|
'(scroll-preserve-screen-position t)
|
||||||
|
|
71
fschl-org.el
71
fschl-org.el
|
@ -1,6 +1,6 @@
|
||||||
;;; fschl-org.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
;;; fschl-org.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
||||||
;; This file is generated from the .org-file with the same name. If you want to edit the
|
;; This file is generated from fschl-org.org. If you want to edit the
|
||||||
;; configuration, DO NOT edit this .el-file, edit .org, instead.
|
;; configuration, DO NOT edit fschl-org.el, edit fsch-org.org, instead.
|
||||||
|
|
||||||
;;(add-to-list 'package-selected-packages 'org-roam)
|
;;(add-to-list 'package-selected-packages 'org-roam)
|
||||||
(add-to-list 'package-selected-packages 'ox-latex)
|
(add-to-list 'package-selected-packages 'ox-latex)
|
||||||
|
@ -65,29 +65,6 @@
|
||||||
;; \\setkomavar{frombank}{(1234)\\,567\\,890}
|
;; \\setkomavar{frombank}{(1234)\\,567\\,890}
|
||||||
|
|
||||||
(setq org-koma-letter-default-class "Brief-de-modern")))
|
(setq org-koma-letter-default-class "Brief-de-modern")))
|
||||||
(defvar letter-template
|
|
||||||
"* 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")
|
|
||||||
|
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
'(("t" "todo list item" entry
|
'(("t" "todo list item" entry
|
||||||
|
@ -106,10 +83,31 @@ Frieder Schlesier")
|
||||||
"* TODO %?\n SCHEDULED: %^T \n %^L \n"
|
"* TODO %?\n SCHEDULED: %^T \n %^L \n"
|
||||||
:tree-type month
|
:tree-type month
|
||||||
)
|
)
|
||||||
("l" "letter to Documents/letters/<datetime.org>"
|
; ("l" "letter to Documents/letters/<datetime.org>"
|
||||||
entry (file fschl/create-org-letter)
|
; entry (file fschl/create-org-letter)
|
||||||
letter-template
|
; "* 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"
|
||||||
|
; )
|
||||||
("m" "Schedule a meeting" entry
|
("m" "Schedule a meeting" entry
|
||||||
(file+headline "~/Documents/Org/tasks.org")
|
(file+headline "~/Documents/Org/tasks.org")
|
||||||
"* MEETING %?\n SCHEDULED: %^T\n %a"
|
"* MEETING %?\n SCHEDULED: %^T\n %a"
|
||||||
|
@ -128,9 +126,18 @@ Frieder Schlesier")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(use-package ox-moderncv
|
|
||||||
:load-path "~/src/org-cv/"
|
|
||||||
:init (require 'ox-moderncv))
|
|
||||||
(setq org-ref-default-bibliography '("~/Documents/references/references.bib")
|
(setq org-ref-default-bibliography '("~/Documents/references/references.bib")
|
||||||
org-ref-pdf-directory "~/Documents/references/"
|
org-ref-pdf-directory "~/Documents/references/"
|
||||||
org-ref-bibliography-notes "~/Documents/references/notes.org")
|
org-ref-bibliography-notes "~/Documents/references/notes.org")
|
||||||
|
|
||||||
|
;; Tangle the code blocks to fschl-org.el on save.
|
||||||
|
(defun org-babel-tangle-config ()
|
||||||
|
(when (string-equal (buffer-file-name)
|
||||||
|
(expand-file-name "fschl-org.org" user-emacs-directory))
|
||||||
|
;; Dynamic scoping to the rescue
|
||||||
|
(let ((org-confirm-babel-evaluate nil))
|
||||||
|
(org-babel-tangle))))
|
||||||
|
|
||||||
|
(add-hook 'org-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(add-hook 'after-save-hook #'org-babel-tangle-config)))
|
||||||
|
|
|
@ -2,11 +2,13 @@
|
||||||
#+PROPERTY: header-args:emacs-lisp :tangle ./fschl-org.el :mkdirp yes
|
#+PROPERTY: header-args:emacs-lisp :tangle ./fschl-org.el :mkdirp yes
|
||||||
|
|
||||||
* Basic configuration
|
* Basic configuration
|
||||||
|
|
||||||
** Additional Packages
|
** Additional Packages
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;;; fschl-org.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
;;; fschl-org.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
||||||
;; This file is generated from the .org-file with the same name. If you want to edit the
|
;; This file is generated from fschl-org.org. If you want to edit the
|
||||||
;; configuration, DO NOT edit this .el-file, edit .org, instead.
|
;; configuration, DO NOT edit fschl-org.el, edit fsch-org.org, instead.
|
||||||
|
|
||||||
;;(add-to-list 'package-selected-packages 'org-roam)
|
;;(add-to-list 'package-selected-packages 'org-roam)
|
||||||
(add-to-list 'package-selected-packages 'ox-latex)
|
(add-to-list 'package-selected-packages 'ox-latex)
|
||||||
|
@ -40,7 +42,7 @@
|
||||||
"~/Documents/Org/birthdays.org")))
|
"~/Documents/Org/birthdays.org")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Add Week to Calendar
|
Add Week to Calendar
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq calendar-week-start-day 1)
|
(setq calendar-week-start-day 1)
|
||||||
|
@ -57,7 +59,6 @@
|
||||||
'font-lock-face 'font-lock-keyword-face))
|
'font-lock-face 'font-lock-keyword-face))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Custom TODO keywords
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq org-todo-keywords
|
(setq org-todo-keywords
|
||||||
(quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
|
(quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
|
||||||
|
@ -79,6 +80,7 @@
|
||||||
- https://orgmode.org/manual/Template-expansion.html
|
- https://orgmode.org/manual/Template-expansion.html
|
||||||
|
|
||||||
*** Export Letter
|
*** Export Letter
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(eval-after-load 'ox '(require 'ox-koma-letter))
|
(eval-after-load 'ox '(require 'ox-koma-letter))
|
||||||
(eval-after-load 'ox '(require 'ox-moderncv))
|
(eval-after-load 'ox '(require 'ox-moderncv))
|
||||||
|
@ -95,32 +97,10 @@
|
||||||
;; \\setkomavar{frombank}{(1234)\\,567\\,890}
|
;; \\setkomavar{frombank}{(1234)\\,567\\,890}
|
||||||
|
|
||||||
(setq org-koma-letter-default-class "Brief-de-modern")))
|
(setq org-koma-letter-default-class "Brief-de-modern")))
|
||||||
(defvar letter-template
|
|
||||||
"* 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")
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Capture Templates
|
*** Capture Templates
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
'(("t" "todo list item" entry
|
'(("t" "todo list item" entry
|
||||||
|
@ -139,10 +119,31 @@
|
||||||
"* TODO %?\n SCHEDULED: %^T \n %^L \n"
|
"* TODO %?\n SCHEDULED: %^T \n %^L \n"
|
||||||
:tree-type month
|
:tree-type month
|
||||||
)
|
)
|
||||||
("l" "letter to Documents/letters/<datetime.org>"
|
; ("l" "letter to Documents/letters/<datetime.org>"
|
||||||
entry (file fschl/create-org-letter)
|
; entry (file fschl/create-org-letter)
|
||||||
letter-template
|
; "* 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"
|
||||||
|
; )
|
||||||
("m" "Schedule a meeting" entry
|
("m" "Schedule a meeting" entry
|
||||||
(file+headline "~/Documents/Org/tasks.org")
|
(file+headline "~/Documents/Org/tasks.org")
|
||||||
"* MEETING %?\n SCHEDULED: %^T\n %a"
|
"* MEETING %?\n SCHEDULED: %^T\n %a"
|
||||||
|
@ -162,15 +163,30 @@
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** TeX and research
|
** TODO not sure if we actually need this
|
||||||
|
|
||||||
- Write a CV in org-mode: https://titan-c.gitlab.io/org-cv/
|
|
||||||
- requires: ~texlive-latex-extra texlive-xetex~
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ox-moderncv
|
|
||||||
:load-path "~/src/org-cv/"
|
|
||||||
:init (require 'ox-moderncv))
|
|
||||||
(setq org-ref-default-bibliography '("~/Documents/references/references.bib")
|
(setq org-ref-default-bibliography '("~/Documents/references/references.bib")
|
||||||
org-ref-pdf-directory "~/Documents/references/"
|
org-ref-pdf-directory "~/Documents/references/"
|
||||||
org-ref-bibliography-notes "~/Documents/references/notes.org")
|
org-ref-bibliography-notes "~/Documents/references/notes.org")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Auto-tangle on save
|
||||||
|
|
||||||
|
Whenever you edit =init.org= in Emacs and save it, it updates =init.el= in
|
||||||
|
the same directory.
|
||||||
|
|
||||||
|
See the [[https://orgmode.org/manual/Extracting-Source-Code.html][Org Manual]] for details and alternatives.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; Tangle the code blocks to fschl-org.el on save.
|
||||||
|
(defun org-babel-tangle-config ()
|
||||||
|
(when (string-equal (buffer-file-name)
|
||||||
|
(expand-file-name "fschl-org.org" user-emacs-directory))
|
||||||
|
;; Dynamic scoping to the rescue
|
||||||
|
(let ((org-confirm-babel-evaluate nil))
|
||||||
|
(org-babel-tangle))))
|
||||||
|
|
||||||
|
(add-hook 'org-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(add-hook 'after-save-hook #'org-babel-tangle-config)))
|
||||||
|
#+end_src
|
||||||
|
|
18
init.el
18
init.el
|
@ -1,6 +1,6 @@
|
||||||
;;; init.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
;;; init.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
||||||
;; This file is generated from the .org-file with the same name. If you want to edit the
|
;; This file is generated from init.org. If you want to edit the
|
||||||
;; configuration, DO NOT edit this .el-file, edit .org, instead.
|
;; configuration, DO NOT edit init.el, edit init.org, instead.
|
||||||
|
|
||||||
(setq user-emacs-directory "~/.config/crafted-emacs-configdir/")
|
(setq user-emacs-directory "~/.config/crafted-emacs-configdir/")
|
||||||
(setq crafted-emacs-home "~/src/crafted-emacs/")
|
(setq crafted-emacs-home "~/src/crafted-emacs/")
|
||||||
|
@ -16,7 +16,6 @@
|
||||||
(require 'crafted-org-packages)
|
(require 'crafted-org-packages)
|
||||||
(require 'crafted-ui-packages)
|
(require 'crafted-ui-packages)
|
||||||
(require 'crafted-ide-packages)
|
(require 'crafted-ide-packages)
|
||||||
(require 'crafted-writing-packages)
|
|
||||||
|
|
||||||
(package-install-selected-packages :noconfirm)
|
(package-install-selected-packages :noconfirm)
|
||||||
|
|
||||||
|
@ -27,7 +26,18 @@
|
||||||
(require 'crafted-org-config)
|
(require 'crafted-org-config)
|
||||||
(require 'crafted-ui-config)
|
(require 'crafted-ui-config)
|
||||||
(require 'crafted-ide-config)
|
(require 'crafted-ide-config)
|
||||||
(require 'crafted-writing-config)
|
|
||||||
|
|
||||||
(unless crafted-startup-inhibit-splash
|
(unless crafted-startup-inhibit-splash
|
||||||
(setq initial-buffer-choice #'crafted-startup-screen))
|
(setq initial-buffer-choice #'crafted-startup-screen))
|
||||||
|
|
||||||
|
;; Tangle the code blocks to config.el on save.
|
||||||
|
(defun org-babel-tangle-config ()
|
||||||
|
(when (string-equal (buffer-file-name)
|
||||||
|
(expand-file-name "init.org" user-emacs-directory))
|
||||||
|
;; Dynamic scoping to the rescue
|
||||||
|
(let ((org-confirm-babel-evaluate nil))
|
||||||
|
(org-babel-tangle))))
|
||||||
|
|
||||||
|
(add-hook 'org-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(add-hook 'after-save-hook #'org-babel-tangle-config)))
|
||||||
|
|
27
init.org
27
init.org
|
@ -6,8 +6,8 @@
|
||||||
** Set import directories for =crafted-emacs=
|
** Set import directories for =crafted-emacs=
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;;; init.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
;;; init.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
||||||
;; This file is generated from the .org-file with the same name. If you want to edit the
|
;; This file is generated from init.org. If you want to edit the
|
||||||
;; configuration, DO NOT edit this .el-file, edit .org, instead.
|
;; configuration, DO NOT edit init.el, edit init.org, instead.
|
||||||
|
|
||||||
(setq user-emacs-directory "~/.config/crafted-emacs-configdir/")
|
(setq user-emacs-directory "~/.config/crafted-emacs-configdir/")
|
||||||
(setq crafted-emacs-home "~/src/crafted-emacs/")
|
(setq crafted-emacs-home "~/src/crafted-emacs/")
|
||||||
|
@ -26,7 +26,6 @@
|
||||||
(require 'crafted-org-packages)
|
(require 'crafted-org-packages)
|
||||||
(require 'crafted-ui-packages)
|
(require 'crafted-ui-packages)
|
||||||
(require 'crafted-ide-packages)
|
(require 'crafted-ide-packages)
|
||||||
(require 'crafted-writing-packages)
|
|
||||||
|
|
||||||
(package-install-selected-packages :noconfirm)
|
(package-install-selected-packages :noconfirm)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -40,8 +39,28 @@
|
||||||
(require 'crafted-org-config)
|
(require 'crafted-org-config)
|
||||||
(require 'crafted-ui-config)
|
(require 'crafted-ui-config)
|
||||||
(require 'crafted-ide-config)
|
(require 'crafted-ide-config)
|
||||||
(require 'crafted-writing-config)
|
|
||||||
|
|
||||||
(unless crafted-startup-inhibit-splash
|
(unless crafted-startup-inhibit-splash
|
||||||
(setq initial-buffer-choice #'crafted-startup-screen))
|
(setq initial-buffer-choice #'crafted-startup-screen))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Auto-tangle on save
|
||||||
|
|
||||||
|
Whenever you edit =init.org= in Emacs and save it, it updates =init.el= in
|
||||||
|
the same directory.
|
||||||
|
|
||||||
|
See the [[https://orgmode.org/manual/Extracting-Source-Code.html][Org Manual]] for details and alternatives.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; Tangle the code blocks to config.el on save.
|
||||||
|
(defun org-babel-tangle-config ()
|
||||||
|
(when (string-equal (buffer-file-name)
|
||||||
|
(expand-file-name "init.org" user-emacs-directory))
|
||||||
|
;; Dynamic scoping to the rescue
|
||||||
|
(let ((org-confirm-babel-evaluate nil))
|
||||||
|
(org-babel-tangle))))
|
||||||
|
|
||||||
|
(add-hook 'org-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(add-hook 'after-save-hook #'org-babel-tangle-config)))
|
||||||
|
#+end_src
|
||||||
|
|
Loading…
Reference in New Issue