From 35ff80e97c5835ad5a087fc9109c11313f7e10ef Mon Sep 17 00:00:00 2001 From: Marc Pohling Date: Thu, 10 May 2018 20:29:20 +0200 Subject: [PATCH] changed checks for environment to pcase --- config.org | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/config.org b/config.org index 6b2f7b0..388e2e3 100644 --- a/config.org +++ b/config.org @@ -717,10 +717,11 @@ Org overwrites RET and C-j, so I need to disable the rebinds Custom todo-keywords, depending on environment #+BEGIN_SRC emacs-lisp - (if (string-equal my/whoami "work_remote") - (setq org-todo-keywords - '((sequence "OPEN" "TODO" "UNCLEAR" "|" "DONE" "IMPOSSIBLE"))) - ) +(pcase my/whoami + ("work_remote") + (setq org-todo-keywords + '((sequence "OPEN" "TODO" "UNCLEAR" "|" "DONE" "IMPOSSIBLE"))) +) #+END_SRC Sort org agenda by deadline and priority @@ -769,16 +770,17 @@ Org overwrites RET and C-j, so I need to disable the rebinds Work specific org-capture-templates #+BEGIN_SRC emacs-lisp - (if (string-equal my/whoami "work_remote") - (setq org-capture-templates - '(("t" "todo" entry (file (concat PATH_ORG_FILES "todo.org")) - "** TODO %\\n%u\n%a\n") - ("n" "note" entry (file org-default-notes-file)) - ("p" "project" entry (file (concat PATH_ORG_FILES "projects.org")) - "** OPEN %?\n%u\n** Beschreibung\n** Zu erledigen\n*** \n** Verlauf\n***" :clock-in t :clock-resume t) - ("u" "Unterbrechung" entry (file org-default-notes-file) - "* Unterbrechnung durch %? :Unterbrechung:\n%t" :clock-in t :clock-resume t))) - ) +(pcase my/whoami + ("work_remote" + (setq org-capture-templates + '(("t" "todo" entry (file (concat PATH_ORG_FILES "todo.org")) + "** TODO %\\n%u\n%a\n") + ("n" "note" entry (file org-default-notes-file)) + ("p" "project" entry (file (concat PATH_ORG_FILES "projects.org")) + "** OPEN %?\n%u\n** Beschreibung\n** Zu erledigen\n*** \n** Verlauf\n***" :clock-in t :clock-resume t) + ("u" "Unterbrechung" entry (file org-default-notes-file) + "* Unterbrechnung durch %? :Unterbrechung:\n%t" :clock-in t :clock-resume t)))) +) #+END_SRC ** Org babel languages