From b3baf67eb4bfeab45cc50cb9834499cf39e1100e Mon Sep 17 00:00:00 2001 From: Frieder Schlesier Date: Wed, 19 Jul 2023 22:29:03 +0200 Subject: [PATCH] add org-cv, fix capturing letter Signed-off-by: Frieder Schlesier --- fschl-org.el | 80 +++++++++++++++++++++++++---------------------- fschl-org.org | 86 ++++++++++++++++++++++++++++----------------------- 2 files changed, 90 insertions(+), 76 deletions(-) diff --git a/fschl-org.el b/fschl-org.el index 5ce45d2..1f80f40 100644 --- a/fschl-org.el +++ b/fschl-org.el @@ -5,7 +5,6 @@ ;;(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) ;;(setq org-roam-directory (file-truename "~/org-roam")) @@ -51,22 +50,48 @@ ("PHONE" :foreground "forest green" :weight bold)))) (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" - "\\documentclass\[Brief-de-modern\]\{scrlttr2\} - \[DEFAULT-PACKAGES] - \[PACKAGES] - \[EXTRA]")) + (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} + ;; \\usepackage[english]{babel} + ;; \\setkomavar{frombank}{(1234)\\,567\\,890} - (setq org-koma-letter-default-class "Brief-de-modern"))) -(defvar letter-template - "* Preamble :noexport: + (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/") )) + +(setq org-capture-templates + '(("t" "todo list item" entry + (file+olp+datetree "~/Documents/Org/tasks.org") + "* TODO %?\n SCHEDULED: %^T" + :tree-type month + ) + ("T" "todo list item with source" entry + (file+olp+datetree "~/Documents/Org/tasks.org") + "* 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/" + entry (file fschl/create-org-letter) + "* Preamble :noexport: \# #+TITLE: ? \# #+DATE: \ @@ -88,28 +113,6 @@ \* Mit freundlichen Grüßen, :closing: \ Frieder Schlesier") - -(setq org-capture-templates - '(("t" "todo list item" entry - (file+olp+datetree "~/Documents/Org/tasks.org") - "* TODO %?\n SCHEDULED: %^T" - :tree-type month - ) - ("T" "todo list item with source" entry - (file+olp+datetree "~/Documents/Org/tasks.org") - "* 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/" - 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" @@ -128,6 +131,9 @@ Frieder Schlesier") ) ) +(use-package ox-awesomecv + :load-path "~/src/org-cv/" + :init (require 'ox-awesomecv)) (use-package ox-moderncv :load-path "~/src/org-cv/" :init (require 'ox-moderncv)) diff --git a/fschl-org.org b/fschl-org.org index 1088f58..25789fe 100644 --- a/fschl-org.org +++ b/fschl-org.org @@ -11,7 +11,6 @@ ;;(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 @@ -80,44 +79,28 @@ *** 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 - '(progn - (add-to-list 'org-latex-classes - '("Brief-de-modern" - "\\documentclass\[Brief-de-modern\]\{scrlttr2\} - \[DEFAULT-PACKAGES] - \[PACKAGES] - \[EXTRA]")) + (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} + ;; \\usepackage[english]{babel} + ;; \\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-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/") )) #+end_src *** Capture Templates @@ -141,8 +124,28 @@ ) ("l" "letter to Documents/letters/" 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 (file+headline "~/Documents/Org/tasks.org") "* MEETING %?\n SCHEDULED: %^T\n %a" @@ -165,8 +168,13 @@ ** TeX and research - Write a CV in org-mode: https://titan-c.gitlab.io/org-cv/ + cloned to Path =~/src/org-cv= - requires: ~texlive-latex-extra texlive-xetex~ +- =git clone https://github.com/posquit0/Awesome-CV ~/texmf/tex/latex/awesome-cv= #+begin_src emacs-lisp + (use-package ox-awesomecv + :load-path "~/src/org-cv/" + :init (require 'ox-awesomecv)) (use-package ox-moderncv :load-path "~/src/org-cv/" :init (require 'ox-moderncv))