add org-cv, fix capturing letter

Signed-off-by: Frieder Schlesier <frieder@fschl.de>
This commit is contained in:
Frieder Schlesier 2023-07-19 22:29:03 +02:00
parent fc9a69a894
commit b3baf67eb4
2 changed files with 90 additions and 76 deletions

View File

@ -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"))
@ -52,6 +51,7 @@
(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
@ -65,7 +65,32 @@
;; \\setkomavar{frombank}{(1234)\\,567\\,890}
(setq org-koma-letter-default-class "Brief-de-modern")))
(defvar letter-template
(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/<datetime.org>"
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/<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"
@ -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))

View File

@ -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
@ -82,6 +81,7 @@
#+begin_src emacs-lisp
(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
@ -95,29 +95,12 @@
;; \\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")
(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/<datetime.org>"
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))