fix tangle all org-files
Signed-off-by: Frieder Schlesier <frieder@fschl.de>
This commit is contained in:
parent
c3b02f62fd
commit
6d84262718
12
TODO.org
12
TODO.org
|
@ -5,7 +5,7 @@ my Notes and LaTeX support.
|
|||
|
||||
** Handling emacs Configuration changes
|
||||
|
||||
*** TODO auto-tangle all .org files in this project
|
||||
*** DONE auto-tangle all .org files in this project
|
||||
currently every =fschl-module.org= file contains it's own
|
||||
=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
|
||||
|
@ -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 extend TODO-keyword: NEXT, MAYBE, MEETING, CALL, CANCELED, HOLD
|
||||
*** DONE extend TODO-keyword: NEXT, MAYBE, MEETING, CALL, CANCELED, HOLD
|
||||
|
||||
*** 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 graphviz setup
|
||||
*** TODO graphviz setup
|
||||
|
||||
# ** Communication Tools
|
||||
** Communication Tools
|
||||
|
||||
# *** TODO IRC client + setup
|
||||
# e.g. for system-crafter, gnu guix, rde
|
||||
*** TODO IRC client + setup
|
||||
e.g. for system-crafter, gnu guix, rde
|
||||
|
||||
*** TODO matrix client setup
|
||||
e.g. for Chemnitzer LinuxTage, system-crafter, rde,...
|
||||
|
|
14
custom.el
14
custom.el
|
@ -10,6 +10,20 @@
|
|||
(tool-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))
|
||||
(when (and fschl-org-file
|
||||
(file-exists-p fschl-org-file))
|
||||
|
|
71
fschl-org.el
71
fschl-org.el
|
@ -1,6 +1,6 @@
|
|||
;;; fschl-org.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
||||
;; This file is generated from fschl-org.org. If you want to edit the
|
||||
;; configuration, DO NOT edit fschl-org.el, edit fsch-org.org, instead.
|
||||
;; 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.
|
||||
|
||||
;;(add-to-list 'package-selected-packages 'org-roam)
|
||||
(add-to-list 'package-selected-packages 'ox-latex)
|
||||
|
@ -65,6 +65,29 @@
|
|||
;; \\setkomavar{frombank}{(1234)\\,567\\,890}
|
||||
|
||||
(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
|
||||
'(("t" "todo list item" entry
|
||||
|
@ -83,31 +106,10 @@
|
|||
"* TODO %?\n SCHEDULED: %^T \n %^L \n"
|
||||
:tree-type month
|
||||
)
|
||||
; ("l" "letter to Documents/letters/<datetime.org>"
|
||||
; entry (file fschl/create-org-letter)
|
||||
; "* 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"
|
||||
; )
|
||||
("l" "letter to Documents/letters/<datetime.org>"
|
||||
entry (file fschl/create-org-letter)
|
||||
letter-template
|
||||
)
|
||||
("m" "Schedule a meeting" entry
|
||||
(file+headline "~/Documents/Org/tasks.org")
|
||||
"* MEETING %?\n SCHEDULED: %^T\n %a"
|
||||
|
@ -126,18 +128,9 @@
|
|||
)
|
||||
)
|
||||
|
||||
(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")
|
||||
|
||||
;; 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)))
|
||||
|
|
114
fschl-org.org
114
fschl-org.org
|
@ -2,19 +2,17 @@
|
|||
#+PROPERTY: header-args:emacs-lisp :tangle ./fschl-org.el :mkdirp yes
|
||||
|
||||
* Basic configuration
|
||||
|
||||
** Additional Packages
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;;; fschl-org.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
||||
;; This file is generated from fschl-org.org. If you want to edit the
|
||||
;; configuration, DO NOT edit fschl-org.el, edit fsch-org.org, instead.
|
||||
;;; 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
|
||||
;; configuration, DO NOT edit this .el-file, edit .org, instead.
|
||||
|
||||
;;(add-to-list 'package-selected-packages 'org-roam)
|
||||
(add-to-list 'package-selected-packages 'ox-latex)
|
||||
(add-to-list 'package-selected-packages 'ox-koma-letter)
|
||||
(add-to-list 'package-selected-packages 'ox-moderncv)
|
||||
(package-install-selected-packages :noconfirm)
|
||||
;;(add-to-list 'package-selected-packages 'org-roam)
|
||||
(add-to-list 'package-selected-packages 'ox-latex)
|
||||
(add-to-list 'package-selected-packages 'ox-koma-letter)
|
||||
(add-to-list 'package-selected-packages 'ox-moderncv)
|
||||
(package-install-selected-packages :noconfirm)
|
||||
#+end_src
|
||||
|
||||
** Configure Org-Roam
|
||||
|
@ -42,7 +40,7 @@
|
|||
"~/Documents/Org/birthdays.org")))
|
||||
#+end_src
|
||||
|
||||
Add Week to Calendar
|
||||
*** Add Week to Calendar
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq calendar-week-start-day 1)
|
||||
|
@ -59,6 +57,7 @@ Add Week to Calendar
|
|||
'font-lock-face 'font-lock-keyword-face))
|
||||
#+end_src
|
||||
|
||||
*** Custom TODO keywords
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-todo-keywords
|
||||
(quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
|
||||
|
@ -80,11 +79,10 @@ Add Week to Calendar
|
|||
- https://orgmode.org/manual/Template-expansion.html
|
||||
|
||||
*** Export Letter
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(eval-after-load 'ox '(require 'ox-koma-letter))
|
||||
(eval-after-load 'ox '(require 'ox-moderncv))
|
||||
(eval-after-load 'ox-koma-letter
|
||||
(eval-after-load 'ox '(require 'ox-koma-letter))
|
||||
(eval-after-load 'ox '(require 'ox-moderncv))
|
||||
(eval-after-load 'ox-koma-letter
|
||||
'(progn
|
||||
(add-to-list 'org-latex-classes
|
||||
'("Brief-de-modern"
|
||||
|
@ -97,12 +95,34 @@ Add Week to Calendar
|
|||
;; \\setkomavar{frombank}{(1234)\\,567\\,890}
|
||||
|
||||
(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
|
||||
|
||||
*** Capture Templates
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-capture-templates
|
||||
(setq org-capture-templates
|
||||
'(("t" "todo list item" entry
|
||||
(file+olp+datetree "~/Documents/Org/tasks.org")
|
||||
"* TODO %?\n SCHEDULED: %^T"
|
||||
|
@ -119,31 +139,10 @@ Add Week to Calendar
|
|||
"* TODO %?\n SCHEDULED: %^T \n %^L \n"
|
||||
:tree-type month
|
||||
)
|
||||
; ("l" "letter to Documents/letters/<datetime.org>"
|
||||
; entry (file fschl/create-org-letter)
|
||||
; "* 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"
|
||||
; )
|
||||
("l" "letter to Documents/letters/<datetime.org>"
|
||||
entry (file fschl/create-org-letter)
|
||||
letter-template
|
||||
)
|
||||
("m" "Schedule a meeting" entry
|
||||
(file+headline "~/Documents/Org/tasks.org")
|
||||
"* MEETING %?\n SCHEDULED: %^T\n %a"
|
||||
|
@ -163,30 +162,15 @@ Add Week to Calendar
|
|||
)
|
||||
#+end_src
|
||||
|
||||
** TODO not sure if we actually need this
|
||||
** TeX and research
|
||||
|
||||
- Write a CV in org-mode: https://titan-c.gitlab.io/org-cv/
|
||||
- requires: ~texlive-latex-extra texlive-xetex~
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-ref-default-bibliography '("~/Documents/references/references.bib")
|
||||
(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")
|
||||
#+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
|
||||
|
|
16
init.el
16
init.el
|
@ -1,6 +1,6 @@
|
|||
;;; init.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
||||
;; This file is generated from init.org. If you want to edit the
|
||||
;; configuration, DO NOT edit init.el, edit init.org, instead.
|
||||
;; 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.
|
||||
|
||||
(setq user-emacs-directory "~/.config/crafted-emacs-configdir/")
|
||||
(setq crafted-emacs-home "~/src/crafted-emacs/")
|
||||
|
@ -29,15 +29,3 @@
|
|||
|
||||
(unless crafted-startup-inhibit-splash
|
||||
(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)))
|
||||
|
|
25
init.org
25
init.org
|
@ -6,8 +6,8 @@
|
|||
** Set import directories for =crafted-emacs=
|
||||
#+begin_src emacs-lisp
|
||||
;;; init.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
||||
;; This file is generated from init.org. If you want to edit the
|
||||
;; configuration, DO NOT edit init.el, edit init.org, instead.
|
||||
;; 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.
|
||||
|
||||
(setq user-emacs-directory "~/.config/crafted-emacs-configdir/")
|
||||
(setq crafted-emacs-home "~/src/crafted-emacs/")
|
||||
|
@ -43,24 +43,3 @@
|
|||
(unless crafted-startup-inhibit-splash
|
||||
(setq initial-buffer-choice #'crafted-startup-screen))
|
||||
#+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