From 3a2ceac7376727175e51ed9f9b21917cf0622a4f Mon Sep 17 00:00:00 2001 From: Marc Pohling Date: Sun, 6 May 2018 17:11:11 +0200 Subject: [PATCH] added defvar to know which pc it is --- config.org | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/config.org b/config.org index dc974ba..19d1ca7 100644 --- a/config.org +++ b/config.org @@ -2,12 +2,21 @@ #+AUTHOR: Marc Pohling * Personal Information - + #+BEGIN_SRC emacs-lisp (setq user-full-name "Marc Pohling" user-mail-address "marc.pohling@googlemail.com") #+END_SRC + I need a function to know what computer emacs is running on + +#+BEGIN_SRC emacs-lisp + (defvar my/whoami + (if (string-equal user-login-name "POH") + "work_remote" + (if (string-equal system-type "gnu/linux") + "home"))) +#+END_SRC * Stuff to add / to fix - smartparens a sane default configuration for navigation, manipulation etc. is still necessary @@ -593,6 +602,13 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it. rm ${ORG_DIR}/*.elc #+END_SRC +** Setup +*** Paths + Paths need to be different for work and home + +#+BEGIN_SRC emacs-lisp + +#+END_SRC *** Org key bindings Set up some global key bindings that integrate with Org mode features @@ -622,11 +638,9 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733 *** Org capture #+BEGIN_SRC emacs-lisp - (bind-key "C-c c" 'org-capture) (setq org-default-notes-file "~/Archiv/Dokumente/Notizen/notes.org") #+END_SRC -** Org Setup Speed commands are a nice and quick way to perform certain actions while at the beginning of a heading. It's not activated by default. See the doc for speed keys by checking out the documentation for speed keys in Org mode. @@ -646,12 +660,13 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733 Setting some environment paths #+BEGIN_SRC emacs-lisp - (if (string-equal user-login-name "POH") - (progn - (defvar PATH_ORG_FILES "p:/Eigene Dateien/Notizen/") - (defvar PATH_ORG_JOURNAL "p:/Eigene Dateien/Notizen/Journal/") - (defvar PATH_START "p:/Eigene Dateien/Notizen/")) - ) +(message my/whoami) +(if (string-equal my/whoami "work_remote") + (progn + (defvar PATH_ORG_FILES "p:/Eigene Dateien/Notizen/") + (defvar PATH_ORG_JOURNAL "p:/Eigene Dateien/Notizen/Journal/") + (defvar PATH_START "p:/Eigene Dateien/Notizen/")) +) #+END_SRC Sort org agenda by deadline and priority @@ -1103,7 +1118,7 @@ Common backends are: #+BEGIN_SRC emacs-lisp (defun company/python-mode-hook() (set (make-local-variable 'company-backends) - '((company-jedi :with company-dabbrev-code))) + '((company-jedi))) ; '((company-jedi company-dabbrev-code company-yasnippet) company-capf company-files)) ; '((company-lsp company-yasnippet) company-capf company-dabbrev company-files)) (company-mode t)