From 90e534ff98c640aeb3953efb370cb3d7f9b10e13 Mon Sep 17 00:00:00 2001 From: Marc Pohling Date: Sat, 5 May 2018 20:39:40 +0200 Subject: [PATCH] forgot some fixes --- config.org | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/config.org b/config.org index 3080822..32004e7 100644 --- a/config.org +++ b/config.org @@ -625,32 +625,32 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733 See the doc for speed keys by checking out the documentation for speed keys in Org mode. - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (setq org-use-speed-commands t) (setq org-image-actual-width 550) (setq org-highlight-latex-and-related '(latex script entities)) - #+END_SRC +#+END_SRC Hide emphasis markup (e.g. / ... / for italics, etc.) - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (setq org-hide-emphasis-markers t) - #+END_SRC +#+END_SRC Setting some environment paths - #+BEGIN_SRC emacs-lisp +#+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/")) ) - #+END_SRC +#+END_SRC Sort org agenda by deadline and priority - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (setq org-agenda-sorting-strategy (quote ((agenda deadline-up priority-down) @@ -658,20 +658,20 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733 (tags priority-down category-keep) (search category-keep))) ) - #+END_SRC +#+END_SRC Custom todo-keywords, depending on environment - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (if (string-equal user-login-name "POH") (setq org-todo-keywords '((sequence "OPEN" "TODO" "UNCLEAR" "|" "DONE" "IMPOSSIBLE"))) ) - #+END_SRC +#+END_SRC Set locations of some org files - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (if (string-equal user-login-name "POH") (progn (setq org-default-notes-file (concat PATH_ORG_FILES "notes.org")) @@ -680,11 +680,11 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733 (concat PATH_ORG_FILES "todo.org")))) ) (setq org-id-locations-file (concat PATH_USER_LOCAL ".org-id-locations")) - #+END_SRC +#+END_SRC Work specific org-capture-templates - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (if (string-equal user-login-name "POH") (setq org-capture-templates '(("t" "todo" entry (file (concat PATH_ORG_FILES "todo.org")) @@ -695,11 +695,11 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733 ("u" "Unterbrechung" entry (file org-default-notes-file) "* Unterbrechnung durch %? :Unterbrechung:\n%t" :clock-in t :clock-resume t))) ) - #+END_SRC +#+END_SRC Customize the org agenda - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (defun my-org-skip-subtree-if-priority (priority) "Skip an agenda subtree if it has a priority of PRIORITY. @@ -725,19 +725,19 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733 (org-agenda-skip-if nil '(scheduled deadline)))) (org-agenda-overriding-header "Sonstige Aufgaben:")))))) ) - #+END_SRC +#+END_SRC ** Org tags The default value is -77, which is weird for smaller width windows. I'd rather have the tags align horizontally with the header. 45 is a good column number to do that. - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (setq org-tags-column 45) - #+END_SRC +#+END_SRC ** Org babel languages This code block is linux specific. Loading languages which aren't available seems to be a problem - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (cond ((eq system-type 'gnu/linux) (org-babel-do-load-languages 'org-babel-load-languages @@ -759,9 +759,9 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733 ) )) ) - #+END_SRC +#+END_SRC - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (defun my-org-confirm-babel-evaluate (lang body) "Do not confirm evaluation for these languages." (not (or (string= lang "beancount") @@ -773,30 +773,30 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733 (string= lang "R") (string= lang "sqlite")))) (setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate) - #+END_SRC +#+END_SRC I want plots! - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (use-package ess :ensure t ) (add-hook 'org-babel-after-execute-hook 'org-display-inline-images) (add-hook 'org-mode-hook 'org-display-inline-images) - #+END_SRC +#+END_SRC ** Org babel/source blocks I like to have source blocks properly syntax highlighted and with the editing popup window staying within the same window so all the windows don't jump around. Also, having the top and bottom trailing lines in the block is a waste of space, so we can remove them I noticed that fontification doesn't work with markdown mode when the block is indented after editing it in the org src buffer - the leading #s for headers don't get fontified properly because they apppear as Org comments. Setting ~org-src-preserve-identation~ makes things consistent as it doesn't pad source blocks with leading spaces - #+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp (setq org-src-fontify-natively t org-src-window-setup 'current-window org-src-strip-leading-and-trailing-blank-lines t org-src-preserve-indentation nil ; these two lines respect the indentation of org-edit-src-content-indentation 0 ; the surrounding text around the source block org-src-tab-acts-natively t) - #+END_SRC +#+END_SRC