Browse Source

more capslock

master
Marc Pohling 6 years ago
parent
commit
b7abc1c932
1 changed files with 70 additions and 70 deletions
  1. 140
      config.org

140
config.org

@ -3,10 +3,10 @@
* Personal Information
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(setq user-full-name "Marc Pohling"
user-mail-address "marc.pohling@googlemail.com")
#+end_src
#+END_SRC
* Stuff to add / to fix
- smartparens
@ -232,7 +232,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
Click [[https://github.com/justbur/emacs-which-key][here]] for source and more info.
Info in Emacs: M-x customize-group which-key
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package which-key
:ensure t
:diminish which-key-mode
@ -253,7 +253,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
** Hydra
Hydra allows grouping of commands
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package hydra
:ensure t
:bind
@ -333,12 +333,12 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
** List buffers
Ibuffer is the improved version of list-buffers.
Make ibuffer the default buffer lister. [[http://ergoemacs.org/emacs/emacs_buffer_management.html][Source]]
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(defalias 'list-buffers 'ibuffer)
#+end_src
Also auto refresh dired, but be quiet about it. [[http://whattheemacsd.com/sane-defaults.el-01.html][Source]]
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(add-hook 'dired-mode-hook 'auto-revert-mode)
(setq global-auto-revert-non-file-buffers t)
(setq auto-revert-verbose nil)
@ -346,13 +346,13 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
** ivy / counsel / swiper
Flx is required for fuzzy-matching
Is it really necessary?
begin_src emacs-lisp
BEGIN_SRC emacs-lisp
(use-package flx)
end_src
Ivy displays a window with suggestions for hotkeys and M-x
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package ivy
:ensure t
:diminish
@ -372,7 +372,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
The find-file replacement is nicer to navigate
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package counsel
:ensure t
:bind* ;; load counsel when pressed
@ -389,7 +389,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
Swiper ivy-enhances isearch
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package swiper
:ensure t
:bind
@ -448,7 +448,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
** Ido (currently inactive)
better completion
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
;(use-package ido
; :init
; (setq ido-enable-flex-matching t)
@ -478,7 +478,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
No idea what this executable-find is about.
TODO check it out!
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package treemacs
:ensure t
:defer t
@ -519,7 +519,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
Treemacs-projectile is useful for uhh.. TODO explain!
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package treemacs-projectile
:ensure t
:defer t
@ -542,7 +542,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
*** Ace-Window
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package ace-window
:ensure t
:init
@ -556,7 +556,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
CURRENTLY NOT WORKING, defaults are blocked.
Also not sure if necessary when using ace-window.
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package windmove
:ensure t
:config
@ -570,7 +570,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
Added a hook to complete org functions, company-capf is necessary for this
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package org
:ensure org-plus-contrib
:init
@ -580,7 +580,7 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
To avoid problems executing source blocks out of the box. [[https://emacs.stackexchange.com/a/28604][Others have the same problem, too]]. The solution is to remove the .elc files form the package directory:
#+begin_src shell
#+BEGIN_SRC shell
var ORG_DIR=(let* ((org-v (cadr (split-string (org-version nil t) "@"))) (len (length org-v))) (substring org-v 1 (- len 2)))
rm ${ORG_DIR}/*.elc
#+end_src
@ -588,14 +588,14 @@ Smooth scrolling. Emacs tends to be jumpy, this should change it.
*** Org key bindings
Set up some global key bindings that integrate with Org mode features
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(bind-key "C-c l" 'org-store-link)
(bind-key "C-c c" 'org-capture)
(bind-key "C-c a" 'org-agenda)
#+end_src
Org overwrites RET and C-j, so I need to disable the rebinds
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(define-key org-mode-map (kbd "RET") nil) ;;org-return
(define-key org-mode-map (kbd "C-j") nil) ;;org-return-indent
#+end_src
@ -603,7 +603,7 @@ Org overwrites RET and C-j, so I need to disable the rebinds
*** Org agenda
For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e473368adb1f63e582a6595450fcd0e787c/Sacha.org#org-agenda][see here]].
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(setq org-agenda-files
(delq nil
(mapcar (lambda (x) (and (file-exists-p x) x))
@ -613,7 +613,7 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
#+end_src
*** Org capture
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(bind-key "C-c c" 'org-capture)
(setq org-default-notes-file "~/Archiv/Dokumente/Notizen/notes.org")
#+end_src
@ -623,7 +623,7 @@ 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))
@ -631,13 +631,13 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
Hide emphasis markup (e.g. / ... / for italics, etc.)
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(setq org-hide-emphasis-markers t)
#+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/")
@ -648,7 +648,7 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
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)
@ -660,7 +660,7 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
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")))
@ -669,7 +669,7 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
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"))
@ -682,7 +682,7 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
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"))
@ -697,7 +697,7 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
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.
@ -729,13 +729,13 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
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
** 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,7 +759,7 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
)
#+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")
@ -774,7 +774,7 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
#+end_src
I want plots!
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package ess
:ensure t
)
@ -787,7 +787,7 @@ For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e4733
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
@ -829,7 +829,7 @@ sudo apt install pandoc
- hydra for notmuch?
- maybe org-notmuch?
- some way to refresh the notmuch db before I run notmuch?
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(unless (string-equal user-login-name "POH")
(use-package notmuch
:ensure t
@ -842,7 +842,7 @@ sudo apt install pandoc
Since there is no debian package, it is an option to install it via pip.
I picked /opt for the installation path
#+begin_src shell
#+BEGIN_SRC shell
sudo su
cd /opt
python3 -m venv beancount
@ -856,7 +856,7 @@ sudo apt install pandoc
Activate the beancount mode. ATTENTION: This mode is made by myself.
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(unless (string-equal user-login-name "POH")
(load "/home/marc/.emacs.d/user-local/elisp/beancount-mode.el") ; somehow load-path in use-package doesn't work
(use-package beancount
@ -877,7 +877,7 @@ sudo apt install pandoc
Installing fava for reports is strongly recommended.
#+begin_src shell
#+BEGIN_SRC shell
sudo su
cd /opt
python3 -m venv vava
@ -888,7 +888,7 @@ sudo apt install pandoc
#+end_src
Start fava with
#+begin_src shell
#+BEGIN_SRC shell
fava my_file.beancount
#+end_src
@ -902,7 +902,7 @@ List of plugins and settings which are shared between the language plugins
Highlight whitespaces, tabs, empty lines.
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package whitespace
:demand t
:ensure nil
@ -922,7 +922,7 @@ Highlight whitespaces, tabs, empty lines.
Disable Eldoc, it interferes with flycheck
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package eldoc
:ensure nil
:config
@ -931,7 +931,7 @@ Disable Eldoc, it interferes with flycheck
#+end_src
Colorize colors as text with their value
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package rainbow-mode
:ensure t
:init
@ -944,7 +944,7 @@ Colorize colors as text with their value
#+end_src
Highlight parens etc. for improved readability
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package rainbow-delimiters
:ensure t
:config
@ -954,7 +954,7 @@ Highlight parens etc. for improved readability
** Smartparens
Smartparens is a beast on its own, so it's worth having a dedicated section for it
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package smartparens
:ensure t
:diminish smartparens-mode
@ -981,7 +981,7 @@ Highlight parens etc. for improved readability
- P u git push
- F u git pull
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package magit
:ensure t
:init
@ -996,7 +996,7 @@ Highlight parens etc. for improved readability
*** Git-gutter
Display line changes in gutter based on git history. Enable it everywhere
[[https://github.com/syohex/emacs-git-gutter][Source]]
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package git-gutter
:ensure t
:config
@ -1037,7 +1037,7 @@ _l_: last hunk set start _R_evision
*** Git-timemachine
Time machine lets me step through the history of a file as recorded in git.
[[https://github.com/pidu/git-timemachine][Source]]
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package git-timemachine
:ensure t
)
@ -1048,7 +1048,7 @@ Complete Anything!
Activate company and make it react nearly instantly
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package company
:ensure t
:config
@ -1066,7 +1066,7 @@ Activate company and make it react nearly instantly
For a nicer suggestion box: company-box ([[https://github.com/sebastiencs/company-box][Source]])
It is only available for emacs 26 and higher.
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(when (> emacs-major-version 25)
(use-package company-box
:ensure t
@ -1086,7 +1086,7 @@ Common backends are:
- company-dabbrev: dynamic abbreviations
- company-ispell: ??
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(defun company/python-mode-hook()
(set (make-local-variable 'company-backends)
'((company-jedi company-dabbrev company-yasnippet) company-capf company-files))
@ -1101,7 +1101,7 @@ Common backends are:
(add-hook 'org-mode-hook #'add-pcomplete-to-capf)
Backend for Orgmode
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(defun company/org-mode-hook()
(set (make-local-variable 'company-backends)
'(company-capf company-files))
@ -1112,7 +1112,7 @@ Backend for Orgmode
Backend configuration for lisp-mode
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(defun company/elisp-mode-hook()
(set (make-local-variable 'company-backends)
'((company-elisp company-dabbrev) company-capf company-files))
@ -1122,7 +1122,7 @@ Backend configuration for lisp-mode
Backend configuration for beancount
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(defun company/beancount-mode-hook()
(set (make-local-variable 'company-backends)
'(company-beancount))
@ -1135,7 +1135,7 @@ Backend configuration for beancount
Addon to sort suggestions by usage
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package company-statistics
:ensure t
:after company
@ -1151,7 +1151,7 @@ For the popups the package pos-tip.el is used and automatically installed.
[[https://github.com/expez/company-quickhelp][Company Quickhelp]]
[[https://www.emacswiki.org/emacs/PosTip][See here for Pos-Tip details]]
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package company-quickhelp
:ensure t
:after company
@ -1164,7 +1164,7 @@ Maybe add [[https://github.com/hlissner/emacs-company-dict][company-dict]]? It's
** Flycheck
Show errors right away!
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package flycheck
:ensure t
:diminish flycheck-mode " ✓"
@ -1180,7 +1180,7 @@ Maybe add [[https://github.com/hlissner/emacs-company-dict][company-dict]]? It's
** Projectile
Brings search functions on project level
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package projectile
:ensure t
:defer t
@ -1203,7 +1203,7 @@ Maybe add [[https://github.com/hlissner/emacs-company-dict][company-dict]]? It's
Snippets!
TODO: yas-minor-mode? what's that?
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package yasnippet
:ensure t
:diminish yas-minor-mode
@ -1217,12 +1217,12 @@ Maybe add [[https://github.com/hlissner/emacs-company-dict][company-dict]]? It's
#+end_src
** Lisp
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(add-hook 'emacs-lisp-mode-hook 'company/elisp-mode-hook)
#+end_src
Add some helpers to handle and understand macros
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package macrostep
:ensure t
:init
@ -1246,7 +1246,7 @@ Add some helpers to handle and understand macros
Also limit the completion backends to those which make sense in Python.
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package python
:mode ("\\.py\\'" . python-mode)
:interpreter ("python" . python-mode)
@ -1266,7 +1266,7 @@ Jedi is a backend for python autocompletion and needs to be installed on the ser
Code checks need to be installed, too:
- pip install flake8
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package company-jedi
:defer t
;; :after company
@ -1286,7 +1286,7 @@ I strongly recommend to install virtual environments on the terminal, not throug
TODO: automatically start an inferior python process or switch to it if already created
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package pyvenv
:ensure t
:init
@ -1322,7 +1322,7 @@ Required is a .python-version file with, content in the first line being /path/t
Depends on pyvenv
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package auto-virtualenv
:ensure t
;; :after pyvenv
@ -1338,7 +1338,7 @@ Depends on pyvenv
Anaconda test
begin_src emacs-lisp
BEGIN_SRC emacs-lisp
(use-package anaconda-mode
:ensure t
:defer t
@ -1350,7 +1350,7 @@ begin_src emacs-lisp
)
end_src
begin_src emacs-lisp
BEGIN_SRC emacs-lisp
(use-package company-anaconda
:ensure t
:defer t
@ -1367,7 +1367,7 @@ end_src
- Latex
- pdf-tools
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(unless (string-equal user-login-name "POH")
(use-package pdf-tools
:ensure t
@ -1381,14 +1381,14 @@ end_src
For latex-preview-pane a patch might be necessary (as of 2017-10), see the issue [[https://github.com/jsinglet/latex-preview-pane/issues/37][here]]
Update 2018-03: It seems to work without this patch. I will keep it here in case something breaks again.
#+begin_src
#+BEGIN_SRC
latex-preview-pane-update-p()
--- (doc-view-revert-buffer nil t)
+++ (revert-buffer-nil t 'preserve-modes)
#+end_src
After that M-x byte-compile-file
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(use-package latex-preview-pane
:ensure t
)
@ -1417,7 +1417,7 @@ end_src
** Hydra Flycheck
Flycheck is necessary, obviously
#+begin_src emacs-lisp
#+BEGIN_SRC emacs-lisp
(defhydra hydra-flycheck (:color blue)
"

Loading…
Cancel
Save