From 3310e5913a56ae75b36772c99c4b30c555829a77 Mon Sep 17 00:00:00 2001 From: Marc Pohling Date: Thu, 22 Mar 2018 12:54:50 +0100 Subject: [PATCH] Changes in font, magit and babel for work environment --- config.org | 66 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git a/config.org b/config.org index 0b6b9a0..2f6df25 100644 --- a/config.org +++ b/config.org @@ -1,4 +1,4 @@ -#+TITLE: Emacs Configuration +#+TITLE: Emacs Configuration #+AUTHOR: Marc Pohling * Personal Information @@ -48,8 +48,12 @@ customize settings in [[file:init.el][init.el]]. * Theme ** Font +Don't add the font in the work environment, which I am logged in as POH + #+begin_src emacs-lisp - (set-face-attribute 'default nil :font "Hack-12") + (unless (string-equal user-login-name "POH") + (set-face-attribute 'default nil :font "Hack-12") + ) #+end_src ** Material Theme @@ -260,22 +264,27 @@ The default value is -77, which is weird for smaller width windows. I'd rather h ** Org babel languages -#+begin_src emacs-lisp - (org-babel-do-load-languages -'org-babel-load-languages - '((python . t) - (C . t) - (calc . t) - (latex . t) - (java . t) - (ruby . t) - (lisp . t) - (R . t) - (scheme . t) - (shell . t) - (sqlite . t) - (js . t))) +This code block is linux specific. Loading languages which aren't available seems to be a problem +#+begin_src emacs-lisp + (cond ((eq system-type 'gnu/linux) + (org-babel-do-load-languages + 'org-babel-load-languages + '((python . t) + (C . t) + (calc . t) + (latex . t) + (java . t) + (ruby . t) + (lisp . t) + (R . t) + (scheme . t) + (shell . t) + (sqlite . t) + (js . t)))) + ) +#+end_src +#+begin_src emacs-lisp (defun my-org-confirm-babel-evaluate (lang body) "Do not confirm evaluation for these languages." (not (or (string= lang "C") @@ -431,12 +440,14 @@ Requires counsel - pdf-tools #+begin_src emacs-lisp - (use-package pdf-tools - :ensure t - :config - (pdf-tools-install) - (setq TeX-view-program-selection '((output-pdf "pdf-tools"))) - (setq TeX-view-program-list '(("pdf-tools" "Tex-pdf-tools-sync-view"))) + (unless (string-equal user-login-name "POH") + (use-package pdf-tools + :ensure t + :config + (pdf-tools-install) + (setq TeX-view-program-selection '((output-pdf "pdf-tools"))) + (setq TeX-view-program-list '(("pdf-tools" "Tex-pdf-tools-sync-view"))) + ) ) #+end_src @@ -463,6 +474,7 @@ Requires counsel (add-hook 'pdf-view-mode-hook (lambda () (linum-mode -1))) #+end_src + * Programming ** Common things List of plugins and settings which are shared between the language plugins @@ -530,10 +542,16 @@ Colorize colors as text with their value #+begin_src emacs-lisp (use-package magit :ensure t + :init + ;; set git-path in work environment + (if (string-equal user-login-name "POH") + (setq magit-git-executable "P:/Eigene Dateien/Tools/Git/bin/git.exe") + ) :defer t :bind (("C-x g" . magit-status)) ) #+end_src + ** Company Mode Complete Anything! @@ -928,6 +946,7 @@ _v_ verify setup _f_ check _s_ select - treemacs-find-file - treemacs-find-tag + * Window Handling Some tools to easen the navigation, creation and deletion of windows @@ -954,4 +973,5 @@ _v_ verify setup _f_ check _s_ select (windmove-default-keybindings) ) #+end_src + * Quality of Life