Commits

Anonymous committed b55fee4

Update

Comments (0)

Files changed (29)

       '(
         beautify-smex
         beginning-of-buffer
+        dired-up-directory
         elwm-activate-window
         eval-and-replace
         handle-switch-frame
-;; autoinstall packages
-(require 'cl)
-
-(defvar prelude-packages
+(defvar autoinstall-packages
   '(
-    ace-jump-mode
-    ack-and-a-half
+    ag
     bookmark+
     browse-kill-ring
     dash
     dired+
     dired-details
     eldoc-eval
+    eimp
+    elfeed
     emmet-mode
     expand-region
     f
     fuzzy-match
     golden-ratio
     haskell-mode
+    helm-descbinds
     ibuffer-vc
     icicles
     ido-ubiquitous
     jump-char
     keyfreq
+    legalese
     macrostep
     magit
-    map-regexp
+    make-it-so
     markdown-mode
     markdown-mode+
     multi-web-mode
     multiple-cursors
     noflet
+    ov
     parenface
-    php-mode
     pos-tip
     projectile
     rainbow-mode
     shell-pop
     smex
     undo-tree
-    w32-browser
+    visual-regexp
+    wgrep-ag
+    world-time-mode
     )
   "A list of packages to ensure are installed at launch.")
 
-(defun prelude-packages-installed-p ()
-  (loop for p in prelude-packages
-        when (not (package-installed-p p)) do (return nil)
-        finally (return t)))
-
-(unless (prelude-packages-installed-p)
+(when (--any? (not (package-installed-p it)) autoinstall-packages)
   ;; check for new packages (package versions)
-  (message "%s" "Emacs Prelude is now refreshing its package database...")
+  (message "%s" "Emacs is now refreshing its package database...")
   (package-refresh-contents)
   (message "%s" " done.")
   ;; install the missing packages
-  (dolist (p prelude-packages)
+  (dolist (p autoinstall-packages)
     (when (not (package-installed-p p))
       (package-install p))))
 
 (use-package dired-aux)
 (use-package dired-x
   :config
-  (defun dired-virtual-revert (&optional _arg _noconfirm)
-    "Enable revert for virtual direds."
-    (let ((m (dired-file-name-at-point))
-          (buffer-modified (buffer-modified-p)))
-      (goto-char 1)
-      (dired-next-subdir 1)
-      (dired-do-redisplay nil t)
-      (while (dired-next-subdir 1 t)
-        (dired-do-redisplay nil t))
-      (when m (dired-goto-file m))
-      (set-buffer-modified-p buffer-modified))))
+  (progn
+    (defun dired-virtual-revert (&optional _arg _noconfirm)
+      "Enable revert for virtual direds."
+      (let ((m (dired-file-name-at-point))
+            (buffer-modified (buffer-modified-p)))
+        (goto-char 1)
+        (dired-next-subdir 1)
+        (dired-do-redisplay nil t)
+        (while (dired-next-subdir 1 t)
+          (dired-do-redisplay nil t))
+        (when m (dired-goto-file m))
+        (set-buffer-modified-p buffer-modified)))
+
+    (add-to-list 'dired-guess-shell-alist-user
+                 (list (concat "\\."
+                               (regexp-opt my-dired-media-files-extensions)
+                               "\\'")
+                       "vlc"))))
 (use-package dired+)
 (use-package cl-lib)
 (use-package dired-details
-  :commands dired-details-toggle)
+  :init
+  (progn
+    (add-hook 'dired-after-readin-hook 'dired-details-activate)
+
+    (bind-key "(" 'dired-details-toggle dired-mode-map)
+
+    (defadvice dired-revert (before remember-the-details activate)
+      (dired-details-delete-overlays))))
 (use-package w32-browser
   :commands dired-w32-browser)
 (use-package dired-avfs)
     ("u" . dired-subtree-unmark-subtree)
     ("C-o C-f" . dired-subtree-only-this-file)
     ("C-o C-d" . dired-subtree-only-this-directory)))
-;; (use-package dired-images)
+
+;; we should just hijack C-t map from image-dired which is crap anyway
+(use-package dired-images)
 
 (use-package dired-rainbow
   :init
                :prefix-docstring "Map for ranger operations."
       ("c" . dired-ranger-copy)
       ("p" . dired-ranger-paste)
-      ("m" . dired-ranger-move))))
+      ("m" . dired-ranger-move))
+
+    (bind-keys :map dired-mode-map
+      ("'" . dired-ranger-bookmark)
+      ("`" . dired-ranger-bookmark-visit))))
+
+(use-package dired-narrow
+  :commands dired-narrow
+  :init
+  (bind-key "s" 'dired-narrow dired-mode-map))
+
+(use-package dired-tagsistant
+  :init
+  (progn
+    (bind-keys :map dired-mode-map
+               :prefix "M-t"
+               :prefix-map dired-tagsistant-map
+               :prefix-docstring "Dired tagsistant map."
+      ("t" . dired-tagsistant-tag)
+      ("s" . dired-tagsistant-tag-symlink))))
 
 (use-package make-it-so
   :init
     ("r" . mis-replace))
   (bind-key "<f5>" 'mis-save-and-compile makefile-mode-map))
 
-(add-to-list 'dired-guess-shell-alist-user (list (concat "\\."
-                                                         (regexp-opt my-dired-media-files-extensions)
-                                                         "\\'")
-                                                 "vlc"))
-
 ;;;_. Key bindings & hooks
 (defun my-image-dired-thumbnail-mode-init ()
   (bind-keys :map image-dired-thumbnail-mode-map
   ;; (define-prefix-command 'slash-dired-prefix-map)
 
   (bind-keys :map dired-mode-map
+    ;; clean bullshit bindings so C-h e b shows us real info
+    ("A") ("G") ("P") ("Q") ("X") ("Z") ("#") (".")
+    ("~") ("e") ("f") ("l") ("v") ("^") ("?")
+
     ("C-x C-f" . my-dired-ido-find-file)
     ("k" . my-dired-do-kill-lines)
 
     ("<delete>" . dired-unmark-backward)
     ("<backspace>" . dired-up-directory)
     ("C-o" . dired-filter-mode)
-    ("(" . dired-details-toggle)
     ("M-<f5>" . dired-arc-pack-files)
     ("M-<f6>" . dired-arc-unpack-file)
 
     ("* r" . diredp-mark-region-files)
-    )
+    ("E" . my-dired-encrypt-file))
 
   (dired-filter-mode t)
   (visual-line-mode -1)
         (replace-string "\\" "/")
         (dired-mode "/")))))
 
+;;;_. gpg stuff
+;; gpg --output passwords.gpg --symmetric passwords.txt
+(defun my-dired-encrypt-file ()
+  (interactive)
+  (require 'epa)
+  (if (not (dired-utils-is-file-p))
+      (message "We can only encrypt single files.")
+    (epa-encrypt-file (dired-utils-get-filename) nil)
+    (revert-buffer)))
+
+
+;;;_. other-marker-do
+(defun my-dired-with-marker-do (marker-char)
+  (interactive "cMarker char: ")
+  (let ((dired-marker-char marker-char))
+    (call-interactively (key-binding (read-key-sequence "Dired command: " t)))))
+
 ;;;_. Local var settings
 
 ;; Local Variables:

files/emacs-custom.el

  '(bmkp-bmenu-commands-file "~/.emacs.d/bookmarks/emacs-bmk-bmenu-commands.el")
  '(bmkp-bmenu-image-bookmark-icon-file nil)
  '(bmkp-bmenu-state-file "~/.emacs.d/bookmarks/emacs-bmk-bmenu-state.el")
- '(bmkp-last-as-first-bookmark-file "~/.emacs.d/bookmarks/bookmarks")
+ '(bmkp-last-as-first-bookmark-file "/home/matus/.emacs.d/bookmarks/bookmarks")
  '(bookmark-version-control t)
  '(browse-kill-ring-quit-action (quote save-and-restore))
  '(bs-configurations (quote (("all" nil nil nil nil nil) ("files" nil nil nil bs-visits-non-file bs-sort-buffer-interns-are-last) ("files-and-scratch" "^\\*scratch" nil nil bs-visits-non-file bs-sort-buffer-interns-are-last) ("all-intern-last" nil nil nil nil bs-sort-buffer-interns-are-last) ("dired" nil (lambda (b) (with-current-buffer b (eq major-mode (quote dired-mode)))) nil (lambda (b) t) nil))))
  '(calendar-mark-diary-entries-flag t)
  '(calendar-view-diary-initially-flag t)
  '(calendar-week-start-day 1)
+ '(circe-active-users-timeout 21600)
+ '(circe-default-nick "Fuco")
+ '(circe-default-part-message "Part")
+ '(circe-default-quit-message "Quit")
+ '(circe-default-realname "foobar")
+ '(circe-default-user "fuco")
+ '(circe-fool-list (quote ("Farsus")))
+ '(circe-format-action "--> {nick} {body}")
+ '(circe-format-not-tracked (quote (circe-format-server-message circe-format-server-notice circe-format-server-numeric circe-format-server-topic circe-format-server-rejoin circe-format-server-lurker-activity)))
+ '(circe-format-say "<{nick}> {body}")
+ '(circe-format-self-action "--> {nick} {body}")
+ '(circe-format-self-say "<{nick}> {body}")
+ '(circe-format-server-message "--> {body}")
+ '(circe-highlight-nick-type (quote all))
+ '(circe-network-options (quote (("FreeNodep" :host "dasnet.cz" :port 7001 :pass my-circe-get-dasnet-irssi-passwd) ("BitlBeep" :host "dasnet.cz" :port 7002 :pass my-circe-get-dasnet-irssi-passwd) ("OFTCp" :host "dasnet.cz" :port 7003 :pass my-circe-get-dasnet-irssi-passwd))))
+ '(circe-new-buffer-behavior (quote switch))
+ '(circe-new-buffer-behavior-ignore-auto-joins t)
+ '(circe-prompt-string ">")
+ '(circe-reduce-lurker-spam t)
+ '(circe-server-killed-confirmation (quote ask-and-kill-all))
  '(column-number-mode t)
  '(completion-ignored-extensions (quote (".cm/" ".o" "~" ".bin" ".lbin" ".so" ".a" ".ln" ".blg" ".bbl" ".elc" ".lof" ".glo" ".idx" ".lot" ".svn/" ".hg/" ".git/" ".bzr/" "CVS/" "_darcs/" "_MTN/" ".fmt" ".tfm" ".class" ".fas" ".lib" ".mem" ".x86f" ".sparcf" ".dfsl" ".pfsl" ".d64fsl" ".p64fsl" ".lx64fsl" ".lx32fsl" ".dx64fsl" ".dx32fsl" ".fx64fsl" ".fx32fsl" ".sx64fsl" ".sx32fsl" ".wx64fsl" ".wx32fsl" ".fasl" ".ufsl" ".fsl" ".dxl" ".lo" ".la" ".gmo" ".mo" ".toc" ".aux" ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs" ".pyc" ".pyo" ".hi")))
  '(cua-enable-cua-keys nil)
  '(cursor-color "#839496")
  '(custom-enabled-themes (quote (my-tango-dark)))
- '(custom-safe-themes (quote ("8dc1e9a2f6c91485ef919c59b3abe4b623bf656474fb7ef27ebd60979c71b22b" "c9625a98eea4274e4ce11197658f94ba0525a2053550ce23b5a33acc32789467" "a489662be7dc432d4912d8f8c59f63d6cf8aa283cba3aef2e6440ad563ce885b" "aa08d051adaff4d18f8517738584138d6a5ed17fd2133680f39d9aaadd5da842" "d54f9a57580321787112c32311e66379d9a3d2dc7db56b0e5678067cd604b188" "1630f22aec92f5ccfad35ff528b9b9231deca6d775666d7c9fc76876957ee51c" "2094974c6ba3dcac00d364404f11bcc18711750996e3b622c40e2764d4eaae01" "32a0ef08500036a4a96194f01fafe3b62c347e5d7bda218bac50a34ab92eab5b" "5758fad12d32577dfd86f53be523c16ceed5f6ad307e9967ac16fe82eef6e32a" "ac968ca0978459c43a263ce991d6385d8e59ae2242699c6907125daa6f0a0d20" "18b79c737a005b87246232739c5cd21aab19f8c15f3a822d64b8cbb8dbbc8525" "9eb325147f82880372869ae998bd6c93adb34fc80b1b5cb2976744fb4dc73cb7" "32807962da64511b0529913b8fc19d527b7bc1d32e6dc298066e53e5d67de571" default)))
+ '(custom-safe-themes (quote ("f0a8a275991a5015e9bdcc6a17acb5620636bdd2d47ef29f8ed3ca2437cf642a" "8dc1e9a2f6c91485ef919c59b3abe4b623bf656474fb7ef27ebd60979c71b22b" "c9625a98eea4274e4ce11197658f94ba0525a2053550ce23b5a33acc32789467" "a489662be7dc432d4912d8f8c59f63d6cf8aa283cba3aef2e6440ad563ce885b" "aa08d051adaff4d18f8517738584138d6a5ed17fd2133680f39d9aaadd5da842" "d54f9a57580321787112c32311e66379d9a3d2dc7db56b0e5678067cd604b188" "1630f22aec92f5ccfad35ff528b9b9231deca6d775666d7c9fc76876957ee51c" "2094974c6ba3dcac00d364404f11bcc18711750996e3b622c40e2764d4eaae01" "32a0ef08500036a4a96194f01fafe3b62c347e5d7bda218bac50a34ab92eab5b" "5758fad12d32577dfd86f53be523c16ceed5f6ad307e9967ac16fe82eef6e32a" "ac968ca0978459c43a263ce991d6385d8e59ae2242699c6907125daa6f0a0d20" "18b79c737a005b87246232739c5cd21aab19f8c15f3a822d64b8cbb8dbbc8525" "9eb325147f82880372869ae998bd6c93adb34fc80b1b5cb2976744fb4dc73cb7" "32807962da64511b0529913b8fc19d527b7bc1d32e6dc298066e53e5d67de571" default)))
  '(custom-theme-directory "~/.emacs.d/themes/")
  '(custom-unlispify-remove-prefixes t)
  '(custom-unlispify-tag-names nil)
  '(desktop-buffer-filter (quote my-desktop-filter))
  '(desktop-save t)
  '(diary-file "~/org/diary")
+ '(dired-avfs-archives (quote ("zip" "rar" "tar" "bz2")))
+ '(dired-details-hidden-string "")
+ '(dired-details-hide-extra-lines nil)
+ '(dired-details-hide-link-targets t)
+ '(dired-details-initially-hide t)
  '(dired-dwim-target t)
  '(dired-filter-mark-prefix "\\")
  '(dired-filter-prefix "/")
  '(golden-ratio-inhibit-functions (quote (my-golden-ratio-inhibit)))
  '(golden-ratio-mode t)
  '(golden-ratio-recenter t)
+ '(google-this-keybind "\"g\"")
  '(guide-key-mode t)
  '(guide-key/guide-key-sequence (quote ("C-x r" "C-x 4" "C-x j" "C-x p" "C-x n" "A-x" "M-g" "M-s" (calc-mode "V" "v" "k" "a" "u" "j") (dired-mode "/" "*" "C-t" "%" "c" "\\") (ibuffer-mode "/" "*" "%"))))
  '(guide-key/idle-delay 0.6)
  '(guide-key/recursive-key-sequence-flag t)
  '(haskell-mode-hook (quote (turn-on-haskell-indentation turn-on-haskell-doc-mode)))
  '(helm-descbinds-mode t)
+ '(history-length 3000)
  '(ibuffer-fontification-alist (quote ((10 buffer-read-only font-lock-constant-face) (15 (and buffer-file-name (string-match ibuffer-compressed-file-name-regexp buffer-file-name)) font-lock-doc-face) (20 (string-match "^*" (buffer-name)) font-lock-keyword-face) (25 (and (string-match "^ " (buffer-name)) (null buffer-file-name)) italic) (30 (memq major-mode ibuffer-help-buffer-modes) font-lock-comment-face) (35 (memq major-mode (quote (dired-mode sr-mode))) font-lock-function-name-face))))
  '(ibuffer-saved-filter-groups (quote (("default" ("Org" (mode . org-mode)) ("emacs-config" (or (predicate let ((bfn (buffer-file-name (current-buffer)))) (when bfn (and (string-match-p "\\.emacs\\.d" bfn) (eq major-mode (quote emacs-lisp-mode))))))) ("emacs" (or (mode . emacs-lisp-mode) (mode . lisp-interaction-mode) (mode . inferior-emacs-lisp-mode))) ("TeX" (or (mode . tex-mode) (mode . plain-tex-mode) (mode . latex-mode))) ("Markdown" (or (mode . markdown-mode) (mode . gfm-mode))) ("Web" (or (mode . html-mode) (mode . css-mode) (mode . php-mode) (mode . js-mode))) ("Dired" (mode . dired-mode)) ("Images" (or (mode . image-dired-display-image-mode) (mode . image-dired-thumbnail-mode) (mode . image-mode))) ("Tramp" (or (name . "tramp"))) ("Programming" (or (mode . c-mode) (mode . perl-mode) (mode . python-mode) (mode . cc-mode)))))))
  '(ibuffer-saved-filters (quote (("irc" ((mode . erc-mode))) ("dipl" ((filename . "_dipl"))) ("gnus" ((or (mode . message-mode) (mode . mail-mode) (mode . gnus-group-mode) (mode . gnus-summary-mode) (mode . gnus-article-mode)))) ("programming" ((or (mode . emacs-lisp-mode) (mode . cperl-mode) (mode . c-mode) (mode . java-mode) (mode . idl-mode) (mode . lisp-mode)))))))
  '(ido-enable-flex-matching t)
  '(ido-enable-last-directory-history nil)
  '(ido-everywhere t)
+ '(ido-ignore-buffers (quote ("\\` " my-ido-buffer-filter)))
  '(ido-max-directory-size 100000)
  '(ido-mode (quote both) nil (ido))
  '(ido-save-directory-list-file "~/.emacs.d/.ido.last")
  '(ls-lisp-use-insert-directory-program nil)
  '(ls-lisp-use-localized-time-format t)
  '(ls-lisp-verbosity (quote (uid gid)))
+ '(lui-fill-column 3000)
+ '(lui-highlight-keywords (quote (("^<.*?>" 0 circe-originator-face))))
+ '(lui-max-buffer-size 100000)
+ '(lui-time-stamp-format "[%H:%M:%S] ")
+ '(lui-time-stamp-only-when-changed-p nil)
+ '(lui-time-stamp-position (quote left))
  '(magit-diff-refine-hunk (quote all))
  '(make-pointer-invisible t)
  '(markdown-link-space-sub-char "-")
  '(mweb-default-major-mode (quote html-mode))
  '(notmuch-archive-tags (quote ("-inbox" "-unread" "+archived")))
  '(notmuch-search-oldest-first nil)
- '(notmuch-unread-mode t nil (notmuch))
  '(org-M-RET-may-split-line nil)
  '(org-agenda-clock-consistency-checks (quote (:max-duration "10:00" :min-duration 0 :max-gap "0:20" :gap-ok-around ("4:00") :default-face ((:foreground "Red")) :overlap-face nil :gap-face nil :no-end-time-face nil :long-face nil :short-face nil)))
  '(org-agenda-compact-blocks t)
  '(org-agenda-tags-column -140)
  '(org-agenda-window-setup (quote current-window))
  '(org-archive-location "%s_archive::* Archived Tasks")
+ '(org-babel-load-languages (quote ((emacs-lisp . t) (plantuml . t))))
  '(org-clock-history-length 36)
  '(org-clock-in-resume t)
  '(org-clock-in-switch-to-state (quote my-org-clock-in-to-next))
  '(org-clock-persist t)
  '(org-clock-persist-query-resume nil)
  '(org-clock-report-include-clocking-task t)
+ '(org-complete-tags-always-offer-all-agenda-tags t)
  '(org-completion-use-ido t)
+ '(org-contacts-files (quote ("~/org/contacts.org")))
  '(org-cycle-emulate-tab nil)
  '(org-deadline-warning-days 30)
  '(org-default-notes-file "~/org/refile.org")
  '(org-drill-learn-fraction 0.55)
  '(org-drill-maximum-duration nil)
  '(org-drill-maximum-items-per-session 40)
- '(org-drill-optimal-factor-matrix (quote ((17 (1.3 . 1.115)) (16 (1.1600000000000001 . 1.25) (1.3 . 1.071)) (15 (1.1600000000000001 . 1.072) (1.3 . 1.115)) (14 (1.1600000000000001 . 1.211) (1.3 . 1.26)) (13 (1.1600000000000001 . 1.072) (0.98 . 1.029) (1.3 . 1.115) (1.26 . 1.346)) (12 (1.5 . 1.454) (1.1600000000000001 . 1.072) (1.3 . 1.115) (1.4000000000000001 . 1.158)) (11 (1.26 . 1.346) (1.4000000000000001 . 1.158) (0.98 . 1.029) (1.1600000000000001 . 1.164) (1.3 . 1.115)) (10 (1.36 . 1.442) (1.4 . 1.4) (1.26 . 1.346) (1.3 . 1.16) (1.1600000000000001 . 1.072)) (9 (0.76 . 0.986) (0.98 . 1.029) (1.5 . 1.454) (1.4000000000000001 . 1.158) (1.1600000000000001 . 1.115) (1.3 . 1.115)) (8 (1.4000000000000001 . 1.238) (1.4 . 1.4) (1.1600000000000001 . 1.146) (1.3 . 1.192) (0.98 . 1.029)) (7 (1.48 . 1.433) (1.34 . 1.423) (1.52 . 1.596) (1.26 . 1.346) (1.3800000000000001 . 1.535) (1.4800000000000002 . 1.558) (1.38 . 1.38) (1.4000000000000001 . 1.378) (0.98 . 1.178) (1.24 . 1.327) (1.1600000000000001 . 1.159) (1.3 . 1.071)) (6 (1.4800000000000002 . 1.593) (2.18 . 2.18) (2.32 . 2.32) (1.5799999999999998 . 1.754) (1.26 . 1.346) (2.04 . 2.015) (1.34 . 1.378) (1.9400000000000002 . 2.053) (2.08 . 2.135) (1.3399999999999999 . 1.532) (2.14 . 2.119) (1.94 . 1.94) (1.4400000000000002 . 1.519) (1.66 . 1.66) (1.4000000000000001 . 1.158) (2.2800000000000002 . 2.264) (1.2 . 1.473) (1.8 . 1.865) (1.48 . 1.721) (1.9000000000000001 . 1.937) (1.76 . 1.724) (1.6600000000000001 . 1.793) (0.98 . 1.029) (1.0599999999999998 . 1.274) (1.62 . 1.657) (1.52 . 1.596) (1.38 . 1.38) (1.24 . 1.327) (0.76 . 0.986) (1.3 . 1.115) (1.3800000000000001 . 1.535) (1.1600000000000001 . 1.072)) (5 (3.0 . 3.012) (1.4 . 1.716) (2.76 . 2.788) (2.0 . 2.129) (2.1399999999999997 . 2.308) (1.26 . 1.346) (2.14 . 2.214) (2.7600000000000002 . 2.797) (2.6599999999999997 . 2.692) (1.4000000000000001 . 1.158) (1.9999999999999998 . 2.216) (2.7 . 2.7) (1.7200000000000002 . 1.825) (1.02 . 1.237) (1.86 . 2.047) (2.52 . 2.592) (2.8000000000000003 . 2.804) (2.28 . 2.4) (1.38 . 1.38) (2.66 . 2.692) (1.62 . 1.895) (2.42 . 2.492) (1.4800000000000002 . 1.558) (1.1199999999999999 . 1.468) (2.6 . 2.596) (2.46 . 2.496) (2.36 . 2.404) (1.72 . 1.917) (0.98 . 1.029) (2.2199999999999998 . 2.311) (2.2800000000000002 . 2.302) (2.56 . 2.592) (1.9000000000000001 . 2.05) (2.3200000000000003 . 2.305) (1.58 . 1.654) (1.3399999999999999 . 1.532) (1.54 . 1.84) (2.18 . 2.217) (2.04 . 2.132) (2.22 . 2.22) (2.32 . 2.4) (1.94 . 1.94) (1.6199999999999999 . 1.791) (1.0599999999999998 . 1.274) (1.9400000000000002 . 2.053) (1.2 . 1.473) (2.1799999999999997 . 2.308) (1.76 . 1.971) (1.48 . 1.721) (2.08 . 2.135) (1.1600000000000001 . 1.072) (1.24 . 1.327) (1.6600000000000001 . 1.793) (1.3 . 1.115) (1.8 . 1.865) (1.3800000000000001 . 1.535) (1.52 . 1.596)) (4 (1.9 . 1.9) (1.5 . 1.454) (2.28 . 2.397) (2.4799999999999995 . 2.584) (1.4800000000000002 . 1.593) (1.4000000000000001 . 1.112) (1.2000000000000002 . 1.591) (1.54 . 1.717) (2.2 . 2.389) (1.34 . 1.655) (2.52 . 2.588) (2.48 . 2.472) (2.8 . 2.8) (2.1399999999999997 . 2.304) (2.2800000000000002 . 2.302) (1.38 . 1.38) (2.0 . 1.973) (1.62 . 1.658) (1.66 . 1.66) (2.24 . 2.392) (0.98 . 1.307) (2.6599999999999997 . 2.692) (1.26 . 1.346) (2.9 . 2.908) (0.76 . 0.986) (1.9999999999999998 . 2.215) (1.0599999999999998 . 1.274) (1.3399999999999999 . 1.532) (2.8000000000000003 . 2.8) (2.7 . 2.696) (1.1600000000000001 . 1.227) (2.66 . 2.693) (2.42 . 2.492) (2.56 . 2.592) (1.3 . 1.276) (1.7200000000000002 . 1.788) (1.94 . 1.94) (2.32 . 2.4) (2.6 . 2.596) (2.04 . 2.015) (2.36 . 2.404) (2.5 . 2.5) (1.3800000000000001 . 1.535) (1.24 . 1.327) (1.2 . 1.473) (2.46 . 2.496) (2.1799999999999997 . 2.308) (2.2199999999999998 . 2.311) (1.48 . 1.721) (2.18 . 2.217) (1.52 . 1.596) (2.22 . 2.22) (1.9000000000000001 . 1.937) (1.6600000000000001 . 1.793) (2.08 . 2.135) (1.6199999999999999 . 1.791) (2.3200000000000003 . 2.305) (1.8 . 1.865) (1.76 . 1.971) (1.9400000000000002 . 2.053)) (3 (2.86 . 2.866) (2.0 . 1.973) (1.7200000000000002 . 1.721) (1.4 . 1.4) (2.3400000000000003 . 2.326) (1.4400000000000002 . 1.519) (1.2000000000000002 . 1.325) (1.62 . 1.657) (1.44 . 1.819) (1.34 . 1.378) (2.66 . 2.692) (1.66 . 1.66) (1.4000000000000001 . 1.325) (2.52 . 2.588) (1.4800000000000002 . 1.558) (2.38 . 2.368) (2.42 . 2.492) (1.72 . 2.048) (2.14 . 2.304) (2.2800000000000002 . 2.302) (0.98 . 1.029) (1.1600000000000001 . 1.227) (1.2 . 1.473) (1.3 . 1.327) (1.0599999999999998 . 1.274) (1.24 . 1.327) (2.8000000000000003 . 2.8) (1.3399999999999999 . 1.532) (1.3800000000000001 . 1.535) (2.1799999999999997 . 2.309) (1.86 . 1.923) (1.52 . 1.596) (2.1399999999999997 . 2.192) (2.04 . 2.132) (1.6600000000000001 . 1.793) (1.48 . 1.721) (1.94 . 1.94) (1.6199999999999999 . 1.791) (1.8 . 1.865) (2.18 . 2.217) (2.7 . 2.696) (2.6 . 2.596) (2.56 . 2.592) (1.76 . 1.971) (2.5 . 2.5) (2.3200000000000003 . 2.305) (1.9400000000000002 . 2.053) (2.22 . 2.22) (2.36 . 2.404) (2.32 . 2.4) (2.46 . 2.496) (2.2199999999999998 . 2.311) (1.9000000000000001 . 2.05) (2.08 . 2.135)) (2 (1.44 . 1.686) (2.7600000000000002 . 2.762) (1.4000000000000001 . 1.158) (1.72 . 2.048) (1.9999999999999998 . 2.141) (1.58 . 1.654) (1.34 . 1.655) (2.2399999999999998 . 2.288) (1.66 . 1.66) (2.0 . 2.058) (2.42 . 2.409) (1.9599999999999997 . 2.148) (1.86 . 2.046) (2.0999999999999996 . 2.234) (1.62 . 1.757) (1.5799999999999998 . 1.754) (1.8199999999999998 . 2.126) (2.28 . 2.327) (2.56 . 2.592) (1.38 . 1.38) (1.1600000000000001 . 1.159) (1.2 . 1.473) (1.26 . 1.669) (1.0599999999999998 . 1.274) (1.3 . 1.115) (0.98 . 1.178) (1.24 . 1.327) (1.1199999999999999 . 1.468) (1.6800000000000002 . 1.964) (2.32 . 2.4) (1.3800000000000001 . 1.535) (1.52 . 1.596) (1.3399999999999999 . 1.532) (1.6600000000000001 . 1.793) (1.94 . 1.94) (2.2800000000000002 . 2.396) (2.3200000000000003 . 2.305) (1.48 . 1.721) (1.6199999999999999 . 1.791) (2.22 . 2.22) (1.8 . 1.865) (1.4 . 1.736) (2.18 . 2.217) (1.9400000000000002 . 2.053) (1.76 . 1.827) (2.08 . 2.135) (1.9000000000000001 . 1.937) (2.7 . 2.696) (2.1799999999999997 . 2.308) (2.5 . 2.5) (2.46 . 2.496) (2.2199999999999998 . 2.311) (2.04 . 2.015) (2.6 . 2.596) (2.36 . 2.404)) (1 (1.4000000000000001 . 3.994) (2.6599999999999997 . 3.846) (1.7200000000000002 . 3.846) (1.2000000000000002 . 3.846) (1.4800000000000002 . 3.282) (2.38 . 3.846) (1.62 . 3.413) (1.94 . 4.0) (2.1399999999999997 . 3.556) (2.28 . 3.698) (0.98 . 3.55) (1.8199999999999998 . 3.402) (2.42 . 3.846) (2.46 . 3.994) (1.66 . 4.0) (1.38 . 4.0) (2.3200000000000003 . 4.154) (1.1600000000000001 . 3.698) (1.2 . 3.55) (1.3 . 3.846) (1.24 . 3.846) (1.0599999999999998 . 3.692) (1.6800000000000002 . 3.538) (1.3800000000000001 . 3.698) (2.22 . 4.0) (2.32 . 3.84) (1.48 . 3.55) (1.52 . 3.846) (1.3399999999999999 . 3.692) (1.6600000000000001 . 3.698) (1.6199999999999999 . 3.692) (1.8 . 3.846) (1.76 . 4.154) (1.9400000000000002 . 3.698) (1.9000000000000001 . 3.994) (2.08 . 3.846) (2.04 . 3.55) (2.2199999999999998 . 3.698) (2.6 . 4.154) (2.1799999999999997 . 3.692) (2.5 . 4.0) (2.36 . 3.846) (1.7000000000000002 . 3.44) (1.96 . 3.538)))))
+ '(org-drill-optimal-factor-matrix (quote ((19 (1.3 . 1.115)) (18 (1.3 . 1.16) (1.1600000000000001 . 1.25)) (17 (1.1600000000000001 . 1.072) (1.3 . 1.115)) (16 (1.1600000000000001 . 1.03) (1.3 . 1.071)) (15 (1.1600000000000001 . 1.072) (1.3 . 1.115)) (14 (1.1600000000000001 . 1.072) (1.3 . 1.115)) (13 (1.4000000000000001 . 1.158) (1.36 . 1.442) (1.1600000000000001 . 1.072) (0.98 . 1.029) (1.3 . 1.115) (1.26 . 1.346)) (12 (1.5 . 1.454) (1.1600000000000001 . 1.072) (1.3 . 1.115) (1.4000000000000001 . 1.158)) (11 (1.2200000000000002 . 1.308) (1.26 . 1.346) (1.4000000000000001 . 1.158) (0.98 . 1.029) (1.1600000000000001 . 1.072) (1.3 . 1.115)) (10 (0.98 . 1.029) (1.36 . 1.442) (1.4 . 1.4) (1.26 . 1.346) (1.3 . 1.115) (1.1600000000000001 . 1.072)) (9 (1.26 . 1.346) (0.76 . 0.986) (0.98 . 1.029) (1.5 . 1.454) (1.4000000000000001 . 1.158) (1.1600000000000001 . 1.072) (1.3 . 1.115)) (8 (1.34 . 1.423) (1.3800000000000001 . 1.461) (1.24 . 1.327) (1.26 . 1.346) (1.4000000000000001 . 1.205) (1.4 . 1.4) (1.1600000000000001 . 1.072) (1.3 . 1.115) (0.98 . 1.029)) (7 (1.0599999999999998 . 1.274) (1.76 . 1.827) (1.6600000000000001 . 1.731) (1.66 . 1.66) (1.2000000000000002 . 1.368) (1.2 . 1.473) (1.62 . 1.692) (1.48 . 1.433) (1.34 . 1.423) (1.52 . 1.596) (1.26 . 1.346) (1.3800000000000001 . 1.535) (1.4800000000000002 . 1.627) (1.38 . 1.38) (1.4000000000000001 . 1.158) (0.98 . 1.178) (1.24 . 1.327) (1.1600000000000001 . 1.072) (1.3 . 1.294)) (6 (2.28 . 2.28) (2.38 . 2.368) (2.1399999999999997 . 2.192) (1.9999999999999998 . 2.183) (2.3200000000000003 . 2.305) (2.1799999999999997 . 2.274) (1.6199999999999999 . 1.791) (1.2000000000000002 . 1.325) (1.5 . 1.5) (1.86 . 2.012) (2.22 . 2.22) (1.7200000000000002 . 1.935) (1.3599999999999999 . 1.681) (1.58 . 1.861) (1.72 . 1.935) (1.4800000000000002 . 1.593) (2.18 . 2.18) (2.32 . 2.365) (1.5799999999999998 . 1.754) (1.26 . 1.346) (2.04 . 2.096) (1.34 . 1.378) (1.9400000000000002 . 2.053) (2.08 . 2.135) (1.3399999999999999 . 1.532) (2.14 . 2.119) (1.94 . 1.94) (1.4400000000000002 . 1.519) (1.66 . 1.66) (1.4000000000000001 . 1.158) (2.2800000000000002 . 2.264) (1.2 . 1.473) (1.8 . 1.865) (1.48 . 1.721) (1.9000000000000001 . 1.937) (1.76 . 1.971) (1.6600000000000001 . 1.793) (0.98 . 1.029) (1.0599999999999998 . 1.274) (1.62 . 1.895) (1.52 . 1.596) (1.38 . 1.38) (1.24 . 1.327) (0.76 . 0.986) (1.3 . 1.071) (1.3800000000000001 . 1.535) (1.1600000000000001 . 1.072)) (5 (1.9 . 1.9) (1.4400000000000002 . 1.59) (2.8 . 2.8) (1.44 . 1.686) (2.9 . 2.908) (2.48 . 2.48) (1.66 . 1.66) (1.5 . 1.5) (1.34 . 1.655) (2.4799999999999995 . 2.584) (3.0 . 3.02) (1.4 . 1.716) (2.76 . 2.796) (2.0 . 2.129) (2.1399999999999997 . 2.304) (1.26 . 1.346) (2.14 . 2.214) (2.7600000000000002 . 2.796) (2.6599999999999997 . 2.692) (1.4000000000000001 . 1.158) (1.9999999999999998 . 2.215) (2.7 . 2.696) (1.7200000000000002 . 1.825) (1.02 . 1.237) (1.86 . 2.047) (2.52 . 2.588) (2.8000000000000003 . 2.8) (2.28 . 2.396) (1.38 . 1.38) (2.66 . 2.692) (1.62 . 1.757) (2.42 . 2.492) (1.4800000000000002 . 1.689) (1.1199999999999999 . 1.468) (2.6 . 2.596) (2.46 . 2.496) (2.36 . 2.404) (1.72 . 1.917) (0.98 . 1.029) (2.2199999999999998 . 2.311) (2.2800000000000002 . 2.302) (2.56 . 2.592) (1.9000000000000001 . 2.05) (2.3200000000000003 . 2.305) (1.58 . 1.654) (1.3399999999999999 . 1.532) (1.54 . 1.84) (2.18 . 2.217) (2.04 . 2.015) (2.22 . 2.22) (2.32 . 2.4) (1.94 . 1.94) (1.6199999999999999 . 1.791) (1.0599999999999998 . 1.274) (1.9400000000000002 . 2.053) (1.2 . 1.473) (2.1799999999999997 . 2.308) (1.76 . 1.971) (1.48 . 1.433) (2.08 . 2.135) (1.1600000000000001 . 1.072) (1.24 . 1.327) (1.6600000000000001 . 1.793) (1.3 . 1.115) (1.8 . 1.865) (1.3800000000000001 . 1.535) (1.52 . 1.596)) (4 (0.94 . 1.522) (1.86 . 1.979) (1.58 . 1.654) (2.1999999999999997 . 2.25) (1.9 . 1.9) (1.5 . 1.454) (2.28 . 2.397) (2.4799999999999995 . 2.584) (1.4800000000000002 . 1.822) (1.4000000000000001 . 1.112) (1.2000000000000002 . 1.591) (1.54 . 1.717) (2.2 . 2.389) (1.34 . 1.655) (2.52 . 2.588) (2.48 . 2.472) (2.8 . 2.8) (2.1399999999999997 . 2.305) (2.2800000000000002 . 2.302) (1.38 . 1.38) (2.0 . 1.973) (1.62 . 1.757) (1.66 . 1.66) (2.24 . 2.392) (0.98 . 1.178) (2.6599999999999997 . 2.692) (1.26 . 1.346) (2.9 . 2.908) (0.76 . 0.986) (1.9999999999999998 . 2.215) (1.0599999999999998 . 1.274) (1.3399999999999999 . 1.532) (2.8000000000000003 . 2.8) (2.7 . 2.696) (1.1600000000000001 . 1.227) (2.66 . 2.692) (2.42 . 2.492) (2.56 . 2.592) (1.3 . 1.276) (1.7200000000000002 . 1.788) (1.94 . 1.94) (2.32 . 2.4) (2.6 . 2.596) (2.04 . 2.132) (2.36 . 2.404) (2.5 . 2.5) (1.3800000000000001 . 1.535) (1.24 . 1.327) (1.2 . 1.473) (2.46 . 2.496) (2.1799999999999997 . 2.308) (2.2199999999999998 . 2.311) (1.48 . 1.721) (2.18 . 2.217) (1.52 . 1.596) (2.22 . 2.22) (1.9000000000000001 . 2.05) (1.6600000000000001 . 1.793) (2.08 . 2.135) (1.6199999999999999 . 1.791) (2.3200000000000003 . 2.305) (1.8 . 1.865) (1.76 . 1.827) (1.9400000000000002 . 2.053)) (3 (2.62 . 2.688) (2.86 . 2.866) (2.0 . 1.973) (1.7200000000000002 . 1.721) (1.4 . 1.4) (2.3400000000000003 . 2.326) (1.4400000000000002 . 1.519) (1.2000000000000002 . 1.325) (1.62 . 1.757) (1.44 . 1.819) (1.34 . 1.378) (2.66 . 2.692) (1.66 . 1.66) (1.4000000000000001 . 1.325) (2.52 . 2.588) (1.4800000000000002 . 1.822) (2.38 . 2.368) (2.42 . 2.492) (1.72 . 2.048) (2.14 . 2.304) (2.2800000000000002 . 2.302) (0.98 . 1.029) (1.1600000000000001 . 1.072) (1.2 . 1.473) (1.3 . 1.115) (1.0599999999999998 . 1.274) (1.24 . 1.327) (2.8000000000000003 . 2.8) (1.3399999999999999 . 1.532) (1.3800000000000001 . 1.535) (2.1799999999999997 . 2.308) (1.86 . 2.046) (1.52 . 1.596) (2.1399999999999997 . 2.192) (2.04 . 2.132) (1.6600000000000001 . 1.793) (1.48 . 1.721) (1.94 . 1.94) (1.6199999999999999 . 1.791) (1.8 . 1.865) (2.18 . 2.217) (2.7 . 2.696) (2.6 . 2.596) (2.56 . 2.592) (1.76 . 1.827) (2.5 . 2.5) (2.3200000000000003 . 2.305) (1.9400000000000002 . 2.053) (2.22 . 2.22) (2.36 . 2.404) (2.32 . 2.4) (2.46 . 2.496) (2.2199999999999998 . 2.311) (1.9000000000000001 . 2.049) (2.08 . 2.135)) (2 (2.52 . 2.558) (1.44 . 1.686) (2.7600000000000002 . 2.762) (1.4000000000000001 . 1.158) (1.72 . 1.968) (1.9999999999999998 . 2.141) (1.58 . 1.654) (1.34 . 1.655) (2.2399999999999998 . 2.288) (1.66 . 1.66) (2.0 . 2.058) (2.42 . 2.409) (1.9599999999999997 . 2.148) (1.86 . 2.046) (2.0999999999999996 . 2.234) (1.62 . 1.757) (1.5799999999999998 . 1.754) (1.8199999999999998 . 2.126) (2.28 . 2.327) (2.56 . 2.592) (1.38 . 1.38) (1.1600000000000001 . 1.072) (1.2 . 1.473) (1.26 . 1.669) (1.0599999999999998 . 1.274) (1.3 . 1.115) (0.98 . 1.029) (1.24 . 1.327) (1.1199999999999999 . 1.468) (1.6800000000000002 . 1.964) (2.32 . 2.4) (1.3800000000000001 . 1.535) (1.52 . 1.596) (1.3399999999999999 . 1.532) (1.6600000000000001 . 1.793) (1.94 . 1.94) (2.2800000000000002 . 2.396) (2.3200000000000003 . 2.305) (1.48 . 1.721) (1.6199999999999999 . 1.791) (2.22 . 2.22) (1.8 . 1.865) (1.4 . 1.736) (2.18 . 2.217) (1.9400000000000002 . 2.053) (1.76 . 1.827) (2.08 . 2.135) (1.9000000000000001 . 2.05) (2.7 . 2.696) (2.1799999999999997 . 2.308) (2.5 . 2.5) (2.46 . 2.496) (2.2199999999999998 . 2.311) (2.04 . 2.132) (2.6 . 2.596) (2.36 . 2.404)) (1 (1.34 . 3.413) (1.4000000000000001 . 3.994) (2.6599999999999997 . 3.846) (1.7200000000000002 . 3.846) (1.2000000000000002 . 3.846) (1.4800000000000002 . 3.282) (2.38 . 3.846) (1.62 . 3.698) (1.94 . 4.0) (2.1399999999999997 . 3.556) (2.28 . 3.698) (0.98 . 3.55) (1.8199999999999998 . 3.402) (2.42 . 3.846) (2.46 . 3.994) (1.66 . 4.0) (1.38 . 4.0) (2.3200000000000003 . 4.154) (1.1600000000000001 . 3.556) (1.2 . 3.55) (1.3 . 3.846) (1.24 . 3.846) (1.0599999999999998 . 3.692) (1.6800000000000002 . 3.538) (1.3800000000000001 . 3.698) (2.22 . 4.0) (2.32 . 3.84) (1.48 . 3.55) (1.52 . 3.846) (1.3399999999999999 . 3.692) (1.6600000000000001 . 3.698) (1.6199999999999999 . 3.692) (1.8 . 3.846) (1.76 . 3.846) (1.9400000000000002 . 3.698) (1.9000000000000001 . 3.698) (2.08 . 3.846) (2.04 . 4.154) (2.2199999999999998 . 3.698) (2.6 . 4.154) (2.1799999999999997 . 3.692) (2.5 . 4.0) (2.36 . 3.846) (1.7000000000000002 . 3.44) (1.96 . 3.538)))))
  '(org-drill-save-buffers-after-drill-sessions-p nil)
  '(org-drill-scope (quote directory))
  '(org-emphasis-alist (quote (("*" my-org-bold) ("/" my-org-italic) ("_" underline) ("=" my-org-code verbatim) ("~" my-org-code verbatim) ("+" (:strike-through t)))))
  '(org-file-apps (quote ((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . "zathura --fork %s"))))
  '(org-footnote-auto-label (quote random))
  '(org-footnote-define-inline t)
+ '(org-format-latex-options (quote (:foreground default :background default :scale 3.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))))
  '(org-habit-following-days 1)
  '(org-habit-graph-column 80)
  '(org-habit-preceding-days 30)
  '(org-lowest-priority 69)
  '(org-modules (quote (org-bbdb org-bibtex org-crypt org-gnus org-habit org-id org-info org-drill)))
  '(org-outline-path-complete-in-steps nil)
+ '(org-plantuml-jar-path "~/bin/plantuml.jar")
  '(org-priority-start-cycle-with-default nil)
  '(org-refile-allow-creating-parent-nodes (quote confirm))
  '(org-refile-target-verify-function (quote my-org-verify-refile-target))
  '(org-refile-use-outline-path t)
  '(org-special-ctrl-a/e t)
  '(org-src-fontify-natively t)
+ '(org-src-lang-modes (quote (("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist) ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql) ("calc" . fundamental) ("C" . c) ("cpp" . c++) ("C++" . c++) ("screen" . shell-script) ("plantuml" . fundamental))))
+ '(org-src-preserve-indentation t)
  '(org-structure-template-alist (quote (("s" "#+BEGIN_SRC ?
 
 #+END_SRC" "<src lang=\"?\">
  '(org-support-shift-select t)
  '(org-tags-exclude-from-inheritance (quote ("folder")))
  '(org-time-clocksum-format (quote (:hours "%d" :require-hours t :minutes ":%02d" :require-minutes t)))
+ '(org-use-speed-commands t)
  '(pj-line-width 1100)
  '(preview-scale-function 1.5)
  '(projectile-global-mode t)
  '(projectile-globally-ignored-directories (quote (".idea" ".eunit" ".git" ".hg" ".fslckout" ".bzr" "_darcs" "elpa")))
  '(projectile-project-root-files (quote (".dir-locals.el" ".projectile" ".git" ".hg" ".fslckout" ".bzr" "_darcs" "rebar.config" "project.clj" "pom.xml" "build.sbt" "Gemfile" "Makefile")))
- '(rcirc-fill-column (quote frame-width))
- '(rcirc-server-alist (quote (("dasnet.cz" :port 7001 :password "polakmajstersveta" nil nil))))
+ '(rcirc-server-alist (quote (("chat.freenode.org"))))
  '(reftex-label-alist (quote (("lemma" 32 "lem:" "~\\cref{%s}" nil nil) ("theorem" 32 "th:" "~\\cref{%s}" nil nil))))
- '(safe-local-variable-values (quote ((eval font-lock-add-keywords nil (quote (("(\\(dired-filter-define\\)[[:blank:]]+\\(.+\\)" (1 (quote font-lock-keyword-face)) (2 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face))) ("(defexamples[[:blank:]]+\\(.*\\)" (1 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face))) ("(defexamples[[:blank:]]+\\(.*?\\)" (1 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face))) ("(defexamples[:blank:]+\\(.*?\\)" (1 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face))) ("(defexamples[ ]+\\(.*?\\)" (1 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face))) ("(defexamples +\\(.*?\\)" (1 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face)))))) (org-refile-targets ("~/org/bookmarks.org" :tag . "folder")) (org-tags-exclude-from-inheritance "folder") (org-tags-exclude-from-inheritance . folder) (org-tags-exclude-from-inheritance . "folder") (eval progn (variable-pitch-mode 1) (text-scale-adjust 2) (overlay-put (make-overlay (point-min) (point-max)) (quote face) (quote my-reading-face))) (dired-filter-stack (dot-files) (omit)) (my-inhibit-buffer-cleanup . t) (eval progn (local-set-key (kbd "C-=") (quote my-org-add-drill-entry)) (local-set-key (kbd "C-<") (quote my-format-russian-verb)) (local-set-key (kbd "C->") (quote my-format-meaning))) (eval progn (local-set-key (kbd "C-=") (quote my-org-add-drill-entry)) (local-set-key (kbd "C->") (quote my-format-meaning))) (eval progn (local-set-key (kbd "C-=") (quote my-org-add-drill-entry)) (local-set-key (kbd "C->") (quote my-format-latin-meaning))) (eval progn (local-set-key (kbd "C-=") (quote my-org-add-drill-entry)) (local-set-key (kbd "C-<") (quote my-format-russian-verb)) (local-set-key (kbd "C->") (quote my-format-russian-meaning))) (eval progn (variable-pitch-mode 1) (text-scale-adjust 2)) (cursor-type . bar) (eval progn (variable-pitch-mode 1) (text-scale-adjust 3)) (my-org-drill-language . "Latin") (eval local-set-key (kbd "C-=") (quote my-org-add-drill-entry)) (eval set-input-method "cyrillic-translit") (my-org-drill-language . "Russian") (my-org-drill-file . t) (my-org-drill-local-language . "Polish") (eval virtual-dired "d:/") (eval font-lock-add-keywords nil (\` (((\, (concat "(" (regexp-opt (quote ("wd-cond")) t) "\\_>")) 1 (quote font-lock-keyword-face))))) (eval push (file-name-directory (buffer-file-name)) load-path) (eval font-lock-add-keywords nil (\` (((\, (concat "(" (regexp-opt (quote ("sp-do-move-op" "sp-do-move-cl" "sp-do-put-op" "sp-do-put-cl" "sp-do-del-op" "sp-do-del-cl")) t) "\\_>")) 1 (quote font-lock-variable-name-face))))) (TeX-master . main) (eval font-lock-add-keywords nil (quote (("(\\(dm-defun\\)\\(?:\\s-\\)+\\(\\_<.*?\\_>\\)" (1 font-lock-keyword-face) (2 font-lock-function-name-face))))) (eval font-lock-add-keywords nil (quote (("defexamples\\| => " (0 (quote font-lock-keyword-face)))))) (reftex-default-bibliography "./bibliography") (eval allout-mode t))))
+ '(safe-local-variable-values (quote ((eval when (and (buffer-file-name) (file-regular-p (buffer-file-name)) (string-match-p "^[^.]" (buffer-file-name))) (emacs-lisp-mode) (when (fboundp (quote flycheck-mode)) (flycheck-mode -1)) (unless (featurep (quote package-build)) (let ((load-path (cons ".." load-path))) (require (quote package-build)))) (package-build-minor-mode)) (my-org-drill-language . "French") (eval font-lock-add-keywords nil (quote (("(\\(dired-filter-define\\)[[:blank:]]+\\(.+\\)" (1 (quote font-lock-keyword-face)) (2 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face))) ("(defexamples[[:blank:]]+\\(.*\\)" (1 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face))) ("(defexamples[[:blank:]]+\\(.*?\\)" (1 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face))) ("(defexamples[:blank:]+\\(.*?\\)" (1 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face))) ("(defexamples[ ]+\\(.*?\\)" (1 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face))) ("(defexamples +\\(.*?\\)" (1 (quote font-lock-function-name-face)))))) (eval font-lock-add-keywords nil (quote (("defexamples\\|def-example-group\\| => " (0 (quote font-lock-keyword-face)))))) (org-refile-targets ("~/org/bookmarks.org" :tag . "folder")) (org-tags-exclude-from-inheritance "folder") (org-tags-exclude-from-inheritance . folder) (org-tags-exclude-from-inheritance . "folder") (eval progn (variable-pitch-mode 1) (text-scale-adjust 2) (overlay-put (make-overlay (point-min) (point-max)) (quote face) (quote my-reading-face))) (dired-filter-stack (dot-files) (omit)) (my-inhibit-buffer-cleanup . t) (eval progn (local-set-key (kbd "C-=") (quote my-org-add-drill-entry)) (local-set-key (kbd "C-<") (quote my-format-russian-verb)) (local-set-key (kbd "C->") (quote my-format-meaning))) (eval progn (local-set-key (kbd "C-=") (quote my-org-add-drill-entry)) (local-set-key (kbd "C->") (quote my-format-meaning))) (eval progn (local-set-key (kbd "C-=") (quote my-org-add-drill-entry)) (local-set-key (kbd "C->") (quote my-format-latin-meaning))) (eval progn (local-set-key (kbd "C-=") (quote my-org-add-drill-entry)) (local-set-key (kbd "C-<") (quote my-format-russian-verb)) (local-set-key (kbd "C->") (quote my-format-russian-meaning))) (eval progn (variable-pitch-mode 1) (text-scale-adjust 2)) (cursor-type . bar) (eval progn (variable-pitch-mode 1) (text-scale-adjust 3)) (my-org-drill-language . "Latin") (eval local-set-key (kbd "C-=") (quote my-org-add-drill-entry)) (eval set-input-method "cyrillic-translit") (my-org-drill-language . "Russian") (my-org-drill-file . t) (my-org-drill-local-language . "Polish") (eval virtual-dired "d:/") (eval font-lock-add-keywords nil (\` (((\, (concat "(" (regexp-opt (quote ("wd-cond")) t) "\\_>")) 1 (quote font-lock-keyword-face))))) (eval push (file-name-directory (buffer-file-name)) load-path) (eval font-lock-add-keywords nil (\` (((\, (concat "(" (regexp-opt (quote ("sp-do-move-op" "sp-do-move-cl" "sp-do-put-op" "sp-do-put-cl" "sp-do-del-op" "sp-do-del-cl")) t) "\\_>")) 1 (quote font-lock-variable-name-face))))) (TeX-master . main) (eval font-lock-add-keywords nil (quote (("(\\(dm-defun\\)\\(?:\\s-\\)+\\(\\_<.*?\\_>\\)" (1 font-lock-keyword-face) (2 font-lock-function-name-face))))) (eval font-lock-add-keywords nil (quote (("defexamples\\| => " (0 (quote font-lock-keyword-face)))))) (reftex-default-bibliography "./bibliography") (eval allout-mode t))))
  '(save-place t nil (saveplace))
  '(save-place-file "~/.emacs.d/.emacs-places")
  '(send-mail-function (quote smtpmail-send-it))
  '(shell-pop-window-height 50)
  '(show-smartparens-global-mode t)
  '(shr-max-image-proportion 0.9)
- '(smartparens-global-mode t)
- '(smartparens-global-strict-mode t)
  '(smex-save-file "~/.emacs.d/.smex-items")
  '(smtpmail-default-smtp-server "smtp.gmail.com")
  '(smtpmail-local-domain "herakleitos")
  '(sp-autowrap-region t)
  '(sp-comment-string (quote (((emacs-lisp-mode) . ";; "))))
  '(sp-hybrid-kill-excessive-whitespace nil)
- '(sp-ignore-modes-list (quote (image-dired-display-image-mode image-dired-thumbnail-mode ediff-mode recentf-dialog-mode google-maps-static-mode ibuffer-mode org-agenda-mode dired-mode elfeed-search-mode elfeed-show-mode notmuch-search-mode notmuch-show-mode)))
+ '(sp-ignore-modes-list (quote (image-dired-display-image-mode image-dired-thumbnail-mode ediff-mode recentf-dialog-mode google-maps-static-mode ibuffer-mode org-agenda-mode dired-mode elfeed-search-mode elfeed-show-mode notmuch-search-mode notmuch-show-mode notmuch-hello-mode circe-channel-mode)))
  '(sp-navigate-close-if-unbalanced t)
  '(sp-navigate-comments-as-sexps t)
  '(sp-navigate-consider-sgml-tags (quote (html-mode markdown-mode gfm-mode rst-mode)))
  '(sp-undo-pairs-separately t)
  '(sp-wrap-deactivate-smart-symbol-wrapping nil)
  '(sp-wrap-from-point nil)
- '(split-width-threshold 360)
+ '(split-height-threshold 10)
+ '(split-width-threshold 100)
  '(system-time-locale "C" t)
  '(texmathp-tex-commands (quote (("derivation" env-on))))
  '(text-mode-hook (quote (text-mode-hook-identify)))
+ '(tracking-ignored-buffers (quote ("#openttd")))
  '(transient-mark-mode t)
  '(truncate-partial-width-windows nil)
  '(uniquify-buffer-name-style (quote forward) nil (uniquify))
  '(visible-bell nil)
  '(w3m-command nil)
  '(w3m-imagick-convert-program "c:\\cygwin\\bin\\convert.exe")
- '(whitaker-program "(cd /home/matus/languages/Latin/Words/ && wine words.exe)")
+ '(whitaker-program "words")
  '(winner-mode t)
  '(x-select-enable-clipboard t))
 
  '(bmkp-local-directory ((t (:inherit dired-directory))))
  '(eldoc-highlight-function-argument ((t (:inherit bold :foreground "#4e9a06"))))
  '(erc-nick-default-face ((t (:inherit erc-default))) t)
- '(eshell-prompt ((t (:foreground "#73d216" :weight normal))) t)
+ '(eshell-prompt ((t (:foreground "#73d216" :weight normal))))
  '(eyebrowse-mode-line-active ((t (:inherit mode-line))) t)
  '(eyebrowse-mode-line-inactive ((t (:inherit mode-line-secondary))) t)
  '(fixed-pitch ((t (:family "Inconsolata"))))
- '(font-latex-sedate-face ((t (:inherit font-lock-keyword-face))))
+ '(font-latex-sedate-face ((t (:inherit font-lock-keyword-face))) t)
  '(guide-key/key-face ((t (:inherit font-lock-keyword-face))))
  '(header-line ((t (:inherit mode-line))))
  '(italic ((t (:slant italic))))
  '(my-org-italic ((t (:inherit font-lock-variable-name-face :slant italic))))
  '(my-space-2 ((t (:inherit default :height 0.21))) t)
  '(my-space-px-4 ((t (:inherit default :height 2.0 :width ultra-condensed))) t)
+ '(shadow ((t (:foreground "gray50"))))
  '(sp-pair-overlay-face ((t (:background "#004a5d"))))
  '(sp-show-pair-enclosing ((t (:background "#004a5d"))))
  '(variable-pitch ((t (:weight normal :height 144 :family "Droid Sans "))))
- '(w3m-anchor ((t (:foreground "#729fcf"))))
- '(w3m-arrived-anchor ((t (:inherit font-lock-builtin-face))))
+ '(w3m-anchor ((t (:foreground "#729fcf"))) t)
+ '(w3m-arrived-anchor ((t (:inherit font-lock-builtin-face))) t)
  '(wgrep-delete-face ((t (:inherit font-lock-warning-face)))))
 ;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Some text-mode settings
 
+;; TODO: move this to the settings of these respective modes
 (setq-default cursor-type 'box)
 (dolist (hook '(LaTeX-mode-hook
                 org-mode-hook
                 markdown-mode-hook
                 gnus-article-mode-hook))
-  (add-hook hook 'init-text-based-modes))
+  (add-hook hook 'my-init-text-based-modes))
 
 ;; Use variable width font faces in current buffer
 (defun my-buffer-face-mode-variable ()
   (setq buffer-face-mode-face '(:family "Consolas" :height 100))
   (buffer-face-mode))
 
-(defun init-text-based-modes ()
+(defun my-init-text-based-modes ()
   (my-buffer-face-mode-variable)
   (setq cursor-type 'bar)
   (setq indent-tabs-mode t)
-  (turn-on-visual-line-mode))
+  (turn-on-visual-line-mode)
+  (smartparens-mode 1))
+
+(add-hook 'prog-mode-hook 'turn-on-smartparens-strict-mode)
+(add-hook 'minibuffer-setup-hook 'turn-on-smartparens-strict-mode)

files/ibuffer-defs.el

                  ))
                ("IRC"
                 (or (mode . erc-mode)
-                    (mode . rcirc-mode)))
+                    (mode . rcirc-mode)
+                    (mode . circe-channel-mode)
+                    (mode . circe-server-mode)))
                ("Search"
                 (or (mode . ag-mode)))
                ("Org Agenda"
 (defun ido-disable-line-trucation () (set (make-local-variable 'truncate-lines) nil))
 (add-hook 'ido-minibuffer-setup-hook 'ido-disable-line-trucation)
 
+(defun my-ido-buffer-filter (buffer)
+  "Should we try to switch to BUFFER?"
+  (let ((frame-type (frame-parameter (selected-frame) :frame-type)))
+    (cond
+     ((eq frame-type :circe)
+      (with-current-buffer buffer
+        (not (or (memq major-mode '(circe-channel-mode circe-server-mode circe-query-mode))
+                 (equal (buffer-name) (and (boundp 'my-lui-highlight-buffer) my-lui-highlight-buffer))))))
+     (t nil))))
+
 ;; see: http://emacswiki.org/emacs/InteractivelyDoThings#toc25
 (defun ido-smart-select-text ()
   "Select the current completed item.  Do NOT descend into directories."
 
 ;; Easier buffer killing
 (bind-key "M-k" 'my-kill-this-buffer)
-(bind-key "M-K" (lambda () (interactive) (kill-buffer (window-buffer (next-window)))))
 (bind-key "C-x C-k" 'kill-buffer-and-window)
 
 ;; imenu
 (bind-key "M-`" 'jump-to-mark)
 (global-set-key [remap exchange-point-and-mark] 'exchange-point-and-mark-no-activate)
 
-;; customize
-(bind-keys :prefix "C-c c"
-           :prefix-map ctl-c-c-map
-           :prefix-docstring "Customize map"
-  ("v" . customize-variable)
-  ("f" . customize-face)
-  ("g" . customize-group))
-
 (bind-keys :prefix "C-h e"
            :prefix-map ctl-h-e-map
            :prefix-docstring "List find/help map"
 
 (bind-key "C-h D" 'describe-personal-keybindings)
 
-(defvar ctl-dot-prefix-map)
-(define-prefix-command 'ctl-dot-prefix-map)
-(bind-key "C-." 'ctl-dot-prefix-map)
-(bind-key "C-. p f" 'elp-instrument-function)
-(bind-key "C-. p r" 'elp-results)
-(bind-key "C-. p R" 'elp-restore-all)
-
-(bind-key "C-. u" 'unfill-paragraph)
-(bind-key "C-. c" 'create-scratch-buffer)
-(bind-key "C-. k" 'browse-kill-ring)
-
-(bind-key "C-. m s" 'kmacro-set-counter)
-(bind-key "C-. m a" 'kmacro-add-counter)
-(bind-key "C-. m f" 'kmacro-set-format)
+(bind-keys :prefix "C-."
+           :prefix-map ctl-dot-prefix-map
+           :prefix-docstring "Second auxiliary map on C-."
+  ("p f" . elp-instrument-function)
+  ("p r" . elp-results)
+  ("p R" . elp-restore-all)
+  ("c" . create-scratch-buffer)
+  ("k" . browse-kill-ring)
+  ("m s" . kmacro-set-counter)
+  ("m a" . kmacro-add-counter)
+  ("m f" . kmacro-set-format)
+  ("z" . my-insert-no-move)
+  ("-" . macrostep-expand)
+  ("0" . my-kill-pp-eval-expression-window)
+  ("s" . my-sprunge))
 
 (bind-key "C-. e" 'eval-region emacs-lisp-mode-map)
 
-(bind-key "C-. z" 'my-insert-no-move)
-
-(bind-key "C-. -" 'macrostep-expand)
-
 (bind-key "<XF86HomePage>" 'toggle-input-method)
 (bind-keys :prefix "C-. i"
            :prefix-map ctl-dot-i-prefix-map
   ("r" . (lambda () "Toggle on russian-computer input method." (interactive) (set-input-method "russian-computer")))
   ("q" . (lambda () "Toggle on cyrillic-translit input method." (interactive) (set-input-method "cyrillic-translit")))
   ("i" . (lambda () "Toggle on italian-keyboard input method." (interactive) (set-input-method "italian-keyboard")))
-  ("g" . (lambda () "Toggle on german input method." (interactive) (set-input-method "german")))
+  ("d" . (lambda () "Toggle on german input method." (interactive) (set-input-method "german")))
   ("t" . (lambda () "Toggle on TeX input method." (interactive) (set-input-method "TeX")))
   ("l" . (lambda () "Toggle on latin-macrons input method." (interactive) (set-input-method "latin-macrons")))
-  ("f" . (lambda () "Toggle on french-keyboard input method." (interactive) (set-input-method "french-keyboard"))))
+  ("f" . (lambda () "Toggle on french-keyboard input method." (interactive) (set-input-method "french-keyboard")))
+  ("g" . (lambda () "Toggle on greek-mizuochi input method." (interactive) (set-input-method "greek-mizuochi")))
+  ("j" . (lambda () "Toggle on japanese input method." (interactive) (set-input-method "japanese"))))
 
 (bind-key "H-u" 'universal-argument)
 (bind-key "H-u" 'universal-argument-more universal-argument-map)
 (bind-keys :prefix "C-c s"
            :prefix-map ctl-c-s-map)
 
-(bind-keys :prefix "C-c m"
-           :prefix-map ctl-c-m-map
-           :prefix-docstring "Magit map"
-  ("b" . magit-key-mode-popup-branching)
-  ("c" . magit-key-mode-popup-committing)
-  ("d" . magit-key-mode-popup-dispatch)
-  ("f" . magit-key-mode-popup-fetching)
-  ("i" . magit-key-mode-popup-diff-options)
-  ("l" . magit-key-mode-popup-logging)
-  ("m" . magit-key-mode-popup-merging)
-  ("p" . magit-key-mode-popup-pushing)
-  ("v" . magit-branch-manager)
-  ("s" . magit-status))
-
 ;; zapping
 (bind-key "M-z" 'zap-up-to-char)
 (bind-key "M-Z" 'zap-to-char)

files/markdown-defs.el

   (modify-syntax-entry ?\" "$\""))
 (add-hook 'gfm-mode-hook 'my-markdown-init)
 
-(defun -repeat (n x)
-  "Return a list with X repeated N times.
-Returns nil if N is less than 1."
-  (let (ret)
-    (--dotimes n (!cons x ret))
-    ret))
-
 (defun my-markdown-toc ()
   "Generate table of content from # to ####### headers."
   (interactive)
 ;; set frame format
+(setq global-mode-string '(""))
+(add-to-list 'mode-line-misc-info '(tracking-mode ("" tracking-mode-line-buffers " ")) t)
+
 (setq-default
  frame-title-format
  '("%b ; %*"
 (use-package org-agenda
   :defer t
   :config
-  (bind-keys :map org-agenda-mode-map
-             ("C-n" . org-agenda-next-item)
-             ("C-p" . org-agenda-previous-item)
-             ("P" . my-org-narrow-to-project)
-             ("U" . my-org-narrow-to-parent)
-             ("N" . my-org-narrow-to-subtree)
-             ("W" . my-org-widen)))
+  (progn
+    (defun my-org-agenda-open-at-point (&optional arg)
+      "Open the first link after the headline under point."
+      (interactive "P")
+      (org-with-point-at (org-get-at-bol 'org-hd-marker)
+        (my-org-open-at-point arg)))
+
+    (bind-keys :map org-agenda-mode-map
+      ("C-n" . org-agenda-next-item)
+      ("C-p" . org-agenda-previous-item)
+      ("P" . my-org-narrow-to-project)
+      ("U" . my-org-narrow-to-parent)
+      ("N" . my-org-narrow-to-subtree)
+      ("W" . my-org-widen)
+      ("/" . my-org-agenda-filter-by-tag)
+      ("\\" . my-org-agenda-filter-by-tag-refine)
+      ("o" . my-org-agenda-open-at-point))))
 
 (use-package org-protocol
   :init
             :kill-client nil)
           org-protocol-protocol-alist)))
 
+(use-package org-contacts)
+
 (defface my-org-bold
   '((t (:weight bold :inherit font-lock-variable-name-face)))
   "The face used to highlight pair overlays.")
 
 (font-lock-add-keywords 'org-mode
                         `(("[[:space:]]+\\(\\$[^[:space:]].*?\\$\\)[^[:word:]]+"
-                           1 'my-org-math)))
+                           1 'my-org-math)
+                          ;; TODO: nefunguje ak je {... \n ...}
+                          ("\\(?:^\\| \\)\\({.*?}\\)\\(?:$\\| \\|\\s.\\)"
+                           1 (progn (put-text-property
+                                     (match-beginning 1)
+                                     (match-end 1)
+                                     'face
+                                     'shadow)
+                                    (backward-char 1)
+                                    nil))))
 
 (bind-keys :map org-mode-map
   ("TAB" . smart-tab)
 
   ("C-c M-`" . org-mark-ring-goto)
 
-  ("C-c C-N" . my-org-add-sibling))
+  ("C-c C-S-n" . my-org-add-sibling)
+  ("C-c C-n" . outline-next-visible-heading))
+
 
 ;; global keys
 (bind-keys
         ("w" "water" table-line (file+datetree "~/org/water.org")
          "|%<%H:%M:%S>|%?|" :table-line-pos "III-1")
         ("b" "bookmark" entry (file+function "~/org/bookmarks.org" my-org-handle-bookmark)
-         "* %:description\n- source: %:link\n%(if (not (equal %:initial \"\"))
-                                                        (concat \"- selection:\n  \" %:initial) \"\")")))
+         "* %:description\n- %:link\n%(if (not (equal %:initial \"\"))
+                                        (concat \"- \" %:initial) \"\")")
+        ("c" "contact" entry (file "~/org/contacts.org")
+         "* %(org-contacts-template-name)
+    :PROPERTIES:
+    :EMAIL: %(org-contacts-template-email)
+    :END:")))
 
 (defun my-org-handle-bookmark ()
   (let ((link (caar org-stored-links)))
 
 ;; TODO KEYWORDS SETTINGS
 (setq org-todo-keywords
-      '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)")
-        (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)")
-        (sequence "SOMEDAY(S)" "|")))
+      '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)" "MOVE(m@)")
+        (sequence "WAIT(w@/!)" "HOLD(h@/!)" "|" "STOP(s@/!)")
+        (sequence "IDEA(i)" "|")))
 
 (setq org-todo-keyword-faces
       (quote (("TODO" :foreground "IndianRed1" :weight bold)
               ("NEXT" :foreground "RoyalBlue" :weight bold)
               ("DONE" :foreground "LimeGreen" :weight bold)
-              ("WAITING" :foreground "orange" :weight bold)
+              ("WAIT" :foreground "orange" :weight bold)
               ("HOLD" :foreground "orange" :weight bold)
-              ("CANCELLED" :foreground "LimeGreen" :weight bold)
-              ("SOMEDAY" :foreground "pink" :weight bold))))
+              ("STOP" :foreground "LimeGreen" :weight bold)
+              ("IDEA" :foreground "pink" :weight bold))))
 
 (setq org-todo-state-tags-triggers
-      (quote (("CANCELLED" ("CANCELLED" . t))
-              ("WAITING" ("WAITING" . t))
-              ("HOLD" ("WAITING" . t) ("HOLD" . t))
-              (done ("WAITING") ("HOLD"))
-              ("TODO" ("WAITING") ("CANCELLED") ("HOLD"))
-              ("SOMEDAY" ("WAITING") ("CANCELLED") ("HOLD"))
-              ("NEXT" ("WAITING") ("CANCELLED") ("HOLD"))
-              ("DONE" ("WAITING") ("CANCELLED") ("HOLD")))))
+      (quote (("STOP" ("STOP" . t))
+              ("WAIT" ("WAIT" . t))
+              ("HOLD" ("HOLD" . t))
+              (done ("WAIT") ("HOLD"))
+              ("TODO" ("WAIT") ("STOP") ("HOLD"))
+              ("IDEA" ("WAIT") ("STOP") ("HOLD"))
+              ("NEXT" ("WAIT") ("STOP") ("HOLD"))
+              ("DONE" ("WAIT") ("STOP") ("HOLD")))))
 
 ;; Tags shortcuts
 (setq org-tag-alist (quote ((:startgroup)
                    "Stuck Projects"
                    "Next Tasks"
                    "Tasks"
+                   "Waiting Tasks"
                    "Projects"
-                   "Waiting and Postponed Tasks"
+                   "Subprojects (and children tasks)"
+                   "Postponed Projects and Tasks"
                    "Reading")))
     (let ((case-fold-search nil))
       (--each headers
         (save-excursion
           (goto-char (point-min))
-          (re-search-forward (concat "^" (regexp-quote it)) nil t)
-          (unless (save-excursion
-                    (forward-line)
-                    (my-org-agenda-is-task-p))
-            (delete-region (line-beginning-position) (1+ (line-end-position))))))
+          (when (re-search-forward (concat "^" (regexp-quote it)) nil t)
+            (unless (save-excursion
+                      (forward-line)
+                      (my-org-agenda-is-task-p))
+              (delete-region (line-beginning-position) (1+ (line-end-position)))))))
       (save-excursion
         (goto-char (point-min))
         (when (re-search-forward (concat "^" (regexp-opt headers)) nil t)
           (tags-todo "BUG/!NEXT"
                      ((org-agenda-overriding-header "Bugs")
                       (org-tags-match-list-sublevels nil)))
-          (tags-todo "-CANCELLED/!"
+          (tags-todo "-STOP/!-WAIT"
                      ((org-agenda-overriding-header "Stuck Projects")
                       (org-agenda-skip-function 'my-org-skip-non-stuck-projects)))
-          (tags-todo "-WAITING-CANCELLED-BOOKS-BUG/!NEXT"
+          (tags-todo "-WAIT-HOLD-STOP-BOOKS-BUG/!NEXT"
                      ((org-agenda-overriding-header "Next Tasks")
                       (org-agenda-skip-function 'my-org-skip-projects-and-habits-and-single-tasks)
                       (org-agenda-todo-ignore-scheduled t)
                       (org-agenda-todo-ignore-with-date t)
                       (org-tags-match-list-sublevels t)
                       (org-agenda-sorting-strategy '(priority-down todo-state-down effort-up category-keep))))
-          (tags-todo "-REFILE-CANCELLED-Reading/!-HOLD-WAITING-SOMEDAY"
+          (tags-todo "-REFILE-STOP-BOOKS/!-HOLD-WAIT-IDEA"
                      ((org-agenda-overriding-header "Tasks")
                       (org-agenda-skip-function 'my-org-skip-project-tasks-maybe)
                       (org-agenda-todo-ignore-scheduled t)
                       (org-agenda-todo-ignore-deadlines t)
                       (org-agenda-todo-ignore-with-date t)
                       (org-agenda-sorting-strategy '(priority-down category-keep))))
-          (tags-todo "-HOLD-CANCELLED-GENERAL/!"
-                     ((org-agenda-overriding-header "Projects")
+          (tags-todo "-STOP/!+WAIT"
+                     ((org-agenda-overriding-header "Waiting Tasks")
+                      (org-agenda-skip-function 'my-org-skip-projects)
+                      (org-tags-match-list-sublevels nil)
+                      (org-agenda-todo-ignore-scheduled 'future)
+                      (org-agenda-todo-ignore-deadlines 'future)))
+          ;; Active projects and projects that wait on something
+          ;; Things we are working on
+          ;; TODO: should show immediate children tasks if narrowed
+          (tags-todo "-HOLD-STOP-GENERAL/!"
+                     ((org-agenda-overriding-header (if (my-org-restricted-p)
+                                                        "Subprojects (and children tasks)"
+                                                      "Projects"))
                       (org-agenda-skip-function 'my-org-skip-non-projects)
+                      (org-tags-match-list-sublevels 'indented)
                       (org-agenda-sorting-strategy '(priority-down category-keep))))
-          (tags-todo "-CANCELLED+WAITING/!"
-                     ((org-agenda-overriding-header "Waiting and Postponed Tasks")
+          ;; Projects/tasks on HOLD: projects that are not cancelled, but we don't want to work on them now
+          (tags-todo "-STOP/!+HOLD"
+                     ((org-agenda-overriding-header "Postponed Projects and Tasks")
                       (org-agenda-skip-function 'my-org-skip-stuck-projects)
                       (org-tags-match-list-sublevels nil)
                       (org-agenda-todo-ignore-scheduled 'future)
-                      (org-agenda-todo-ignore-deadlines 'future)))
-          (tags-todo "Reading"
-                     ((org-agenda-overriding-header "Reading"))))
+                      (org-agenda-todo-ignore-deadlines 'future))))
          nil)
-        ("h" "Habits" tags-todo "STYLE=\"habit\""
-         ((org-agenda-overriding-header "Habits")
-          (org-agenda-sorting-strategy '(todo-state-down effort-up category-keep))))
-        ,@(my-org-agenda-filter "f" "Media filter" '("b" . "BOOKS") '("m" . "MOV"))))
+        ,@(my-org-agenda-filter "f" "Media filter" '("b" . "BOOKS") '("m" . "MOV"))
+        ("k" . "Knowledge-base operations")
+        ("ks" "Knowledge-base search" search nil
+         ((org-agenda-files '("~/org/kb.org"))))
+        ("km" "Knowledge-base tag match" tags nil
+         ((org-agenda-files '("~/org/kb.org"))))
+        ("b" . "Bookmarks operations")
+        ("bs" "Bookmarks search" search nil
+         ((org-agenda-files '("~/org/bookmarks.org"))))
+        ("bm" "Bookmakrs tag match" tags nil
+         ((org-agenda-files '("~/org/bookmarks.org"))))
+        ;; Reading items are not marked with TODO, we use this view instead.
+        ;; Item that we are reading at the moment, however, is marked
+        ;; NEXT as every other current task.
+        ("r" "Reading"
+         ((tags "+Reading/-DONE"
+                ((org-agenda-overriding-header "To read")))
+          (tags "+Reading/DONE"
+                ((org-agenda-overriding-header "Finished")))))))
 
 (defun my-org-compare-closed-entries (a b)
   "Compare two agenda entries A and B based on CLOSED time."
 ;; Resume clocking task when emacs is restarted
 (org-clock-persistence-insinuate)
 
-;; this is added to the clock-in hook
 (defun my-org-clock-in-to-next (kw)
   "Switch a task from TODO to NEXT when clocking in.
-Skips capture tasks, projects, and subprojects.
+
+Skips capture tasks, standalone tasks, projects, and subprojects.
+
 Switch projects and subprojects from NEXT back to TODO"
-  (when (not (and (boundp 'org-capture-mode) org-capture-mode))
+  (when (not (bound-and-true-p org-capture-mode))
     (cond
      ((and (member (org-get-todo-state) (list "TODO"))
            (my-org-is-task-p)
+           (not (my-org-is-standalone-task-p))
            (not (org-is-habit-p)))
       "NEXT")
+     ;; Handles the case when we clock in into a project.  We want
+     ;; projects to always have TODO keyword
      ((and (member (org-get-todo-state) (list "NEXT"))
            (my-org-is-project-p))
       "TODO"))))
       (outline-next-heading)))
     (if (= (point) (point-max)) (newline) (open-line 1))
     (insert (make-string cdepth ?*) " ")))
+
+
+;; better org-agenda s/m UI
+;; TODO: move to defun-macros
+(defmacro my-with-each-line (&rest body)
+  (declare (indent 0)
+           (debug (body)))
+  `(save-excursion
+     (goto-char (point-min))
+     ,@body
+     (while (= (forward-line) 0)
+       ,@body)))
+
+(defun my-org--get-agenda-tags ()
+  "Return all tags present in current agenda view."
+  (let (tags)
+    (my-with-each-line
+      (--when-let (org-get-at-bol 'tags)
+        (--each it (push it tags))))
+    (-uniq tags)))
+
+(defun my-org-agenda-filter-by-tag-refine (strip &optional char)
+  "Just like `org-agenda-filter-by-tag-refine' but with tags from
+current agenda view added to `org-tag-alist'."
+  (interactive "P")
+  (unless (local-variable-p 'org-global-tags-completion-table (current-buffer))
+    (org-set-local 'org-global-tags-completion-table
+                   (-uniq (-map 'downcase
+                                (-concat (my-org--get-agenda-tags)
+                                         (-filter 'stringp (-map 'car org-tag-alist)))))))
+  (org-agenda-filter-by-tag-refine strip char))
+
+(defun my-org-agenda-filter-by-tag (strip &optional char narrow)
+  "Just like `org-agenda-filter-by-tag' but with tags from
+current agenda view added to `org-tag-alist'."
+  (interactive "P")
+  (unless (local-variable-p 'org-global-tags-completion-table (current-buffer))
+    (org-set-local 'org-global-tags-completion-table
+                   (-uniq (-map 'downcase
+                                (-concat (my-org--get-agenda-tags)
+                                         (-filter 'stringp (-map 'car org-tag-alist)))))))
+  (org-agenda-filter-by-tag strip char narrow))
+
+
+;; tags
+(defun my-org-add-tags-at (tags)
+  "Add TAGS to current entry."
+  (let* ((ctags (org-get-local-tags-at))
+         (tags (-union tags ctags)))
+    (org-set-tags-to tags)))
+
+(defun my-org-remove-tags-at (tags)
+  "Remove TAGS from current entry."
+  (let* ((ctags (org-get-local-tags-at))
+         (tags (-difference ctags tags)))
+    (org-set-tags-to tags)))
+
+
+;; more org macros
+(defmacro my-org-with-children (&rest body)
+  "Execute BODY with point at the beginning of each child of current node."
+  (declare (indent 0)
+           (debug (body)))
+  `(let ((start-level (org-current-level)))
+     (while (and (outline-next-heading)
+                 (> (org-current-level) start-level))
+       (when (= (org-current-level) (1+ start-level))
+         ,@body))))
+
+(defmacro my-org-with-descendants (&rest body)
+  "Execute BODY with point at the beginning of each descendant of current node."
+  (declare (indent 0)
+           (debug (body)))
+  `(let ((start-level (org-current-level)))
+     (while (and (outline-next-heading)
+                 (> (org-current-level) start-level))
+       ,@body)))
   "Tasks with these tags should be ignored when determining if a
 task is a subtask in a project.")
 
+(defun my-org-restricted-p ()
+  "Return non-nil if org is restricted to a subtree."
+  (marker-buffer org-agenda-restrict-begin))
+
 (defun my-org-entry-is-task-p ()
   "Return non-nil if header at point has any keyword."
   (member (org-get-todo-state) org-todo-keywords-1))
 
+(defun my-org-is-standalone-task-p ()
+  "Any task which is not a project and is not a subtask in a project."
+  (and (not (my-org-is-project-p))
+       (= (save-excursion (my-org-find-project-task))
+          ;; TODO: make a version of this where we don't have to pass
+          ;; an argument.  We always want all headings when doing
+          ;; "logic".  Also, make it return point
+          (save-excursion (org-back-to-heading 'invisible-ok) (point)))))
+
 (defun my-org-is-project-p ()
   "Any task with a todo keyword subtask.
 
               (setq has-subtask t)))))
       (not has-subtask))))
 
-(defun my-org-list-sublevels-for-projects-indented ()
-  "Set org-tags-match-list-sublevels so when restricted to a subtree we list all subtasks.
-  This is normally used by skipping functions where this variable is already local to the agenda."
-  (if (marker-buffer org-agenda-restrict-begin)
-      (setq org-tags-match-list-sublevels 'indented)
-    (setq org-tags-match-list-sublevels nil))
-  nil)
+(defun my-org-skip-projects ()
+  "Skip trees that are projects"
+  (save-restriction
+    (widen)
+    (let ((next-headline (save-excursion (or (outline-next-heading) (point-max)))))
+      (if (my-org-is-project-p) next-headline nil))))
 
-(defun my-org-list-sublevels-for-projects ()
-  "Set org-tags-match-list-sublevels so when restricted to a subtree we list all subtasks.
-  This is normally used by skipping functions where this variable is already local to the agenda."
-  (if (marker-buffer org-agenda-restrict-begin)
-      (setq org-tags-match-list-sublevels t)
-    (setq org-tags-match-list-sublevels nil))
-  nil)
+(defun my-org-skip-non-projects ()
+  "Skip trees that are not projects"
+  (save-restriction
+    (widen)
+    (let ((next-headline (save-excursion (or (outline-next-heading) (point-max)))))
+      (if (my-org-is-project-p) nil next-headline))))
 
 (defun my-org-skip-stuck-projects ()
   "Skip trees that are stuck projects"
             (save-excursion
               (forward-line 1)
               (while (and (not has-next) (< (point) subtree-end) (re-search-forward "^\\*+ NEXT " subtree-end t))
-                (unless (member "WAITING" (org-get-tags-at))
+                (unless (member "WAIT" (org-get-tags-at))
                   (setq has-next t))))
             (if has-next nil next-headline)) ; a stuck project, has subtasks but no next task
         nil))))
 
 (defun my-org-skip-non-stuck-projects ()
   "Skip trees that are not stuck projects"
-  (my-org-list-sublevels-for-projects-indented)
   (save-restriction
     (widen)
     (let ((next-headline (save-excursion (or (outline-next-heading) (point-max)))))
             (save-excursion
               (forward-line 1)
               (while (and (not has-next) (< (point) subtree-end) (re-search-forward "^\\*+ NEXT " subtree-end t))
-                (unless (member "WAITING" (org-get-tags-at))
+                (unless (member "WAIT" (org-get-tags-at))
                   (setq has-next t))))
             (if has-next next-headline nil)) ; a stuck project, has subtasks but no next task
         next-headline))))
 
-(defun my-org-skip-non-projects ()
-  "Skip trees that are not projects"
-  (my-org-list-sublevels-for-projects-indented)
-  (if (save-excursion (my-org-skip-non-stuck-projects))
-      (save-restriction
-        (widen)
-        (let ((subtree-end (save-excursion (org-end-of-subtree t))))
-          (cond
-           ((and (my-org-is-project-p)
-                 (marker-buffer org-agenda-restrict-begin))
-            nil)
-           ((and (my-org-is-project-p)
-                 (not (marker-buffer org-agenda-restrict-begin))
-                 (not (my-org-is-project-subtree-p)))
-            nil)
-           (t
-            subtree-end))))
-    (save-excursion (org-end-of-subtree t))))
-
 (defun my-org-skip-projects-and-habits-and-single-tasks ()
   "Skip trees that are projects, tasks that are habits, single non-project tasks"
   (save-restriction
     (widen)
     (let* ((subtree-end (save-excursion (org-end-of-subtree t)))
            (next-headline (save-excursion (or (outline-next-heading) (point-max))))
-           (limit-to-project (marker-buffer org-agenda-restrict-begin)))
+           (limit-to-project (my-org-restricted-p)))
       (cond
        ((my-org-is-project-p)
         next-headline)
   (labels ((smart-tab-must-expand (&optional prefix)
                                   (unless (or (consp prefix)
                                               mark-active)
-                                    (looking-at "\\_>"))))
+                                    (looking-at "\\_>")))
+           (default ()
+             (cond
+              ((smart-tab-must-expand prefix)
+               (hippie-expand prefix))
+              ((smart-indent)))))
     (cond
+     ((bound-and-true-p elfeed-search-live)
+      (completion-at-point))
+     ((minibufferp)
+      (unless (minibuffer-complete)
+        (unless (completion-at-point)
+          (default))))
      ((and (eq major-mode 'org-mode)
            (looking-back "^<\\sw")
            (org-cycle)))
      ((and (eq major-mode 'org-mode)
-           (not (smart-tab-must-expand prefix))
-           (org-cycle)))
-     ((cond
-       ((smart-tab-must-expand prefix)
-        (hippie-expand prefix))
-       ((smart-indent)))))))
+           (unless (default)
+             (org-cycle))))
+     (:else (default)))))
 
 (defun smart-indent ()
   "Indents region if mark is active, or current line otherwise."
 (use-package better-jump
   :bind (("C-\\" . bjump-word-jump)
          ("A-l" . bjump-word-jump-line)
-         ("A-;" . bjump-word-jump-paragraph))
+         ("A-;" . bjump-word-jump-paragraph)
+         ("s-o" . bjump-window-jump)
+         ("A-k" . bjump-window-delete))
   :config
   (progn
     (define-key Info-mode-map "o" 'bjump-info-link-jump)
     (define-key help-mode-map "o" 'bjump-help-link-jump)))
 
 (use-package bookmark+
-  :bind ("C-x j t t" . my-tag-jump)
+  :defer t
   :init
   (progn
-    (require 'bookmark+-autoloads))
+    (require 'bookmark+-autoloads)
+    (autoload #'my-bmkp-tag-jump "bookmark+" nil t)
+    (autoload #'my-bmkp-tag-dired "bookmark+" nil t)
+    ;; TODO: funguje ako autoload, ale ked sa nacita package `bkmp'
+    ;; tak to asi predefinuje mapu C-x j t a bindy sa zrusia.
+    (bind-key "C-x j t t" 'my-bmkp-tag-jump)
+    (bind-key "C-x j t d" 'my-bmkp-tag-dired))
   :config
   (progn
-    (defun my-tag-jump (tag)
+    (defun my-bmkp-tag-jump (tag)
       "Jump to bookmark that has TAG.
 
 This is like `bmkp-some-tags-jump' but reads only one tag."
-      (bookmark-maybe-load-default-file)
-      (interactive (list (completing-read "Tag: " bmkp-tags-alist nil t)))
+      (interactive (list (progn
+                           (bookmark-maybe-load-default-file)
+                           (completing-read "Tag: " (or bmkp-tags-alist (bmkp-tags-list)) nil t))))
       (let* ((alist (bmkp-some-tags-alist-only (list tag))))
         (unless alist (error "No bookmarks have any of the specified tags"))
         (bookmark-jump
          (bookmark-completing-read "Bookmark" (bmkp-default-bookmark-name alist) alist))))
+
+    (defun my-bmkp-tag-dired (tags)
+      "Dieplay a dired buffer containing all files tagged with TAGS."
+      (interactive (list (bmkp-read-tags-completing)))
+      (let* ((alist (bmkp-all-tags-alist-only tags))
+             (files (-map 'f-canonical (--map (cdr (assoc 'filename it)) alist)))
+             (common-parent (f-common-parent files))
+             (files (--map (s-chop-prefix common-parent it) files))
+             ;; the following two settings take care of dired bullshit
+             (dired-buffers nil)
+             (default-directory common-parent))
+        (dired (cons (concat common-parent) files))
+        (rename-buffer (with-temp-buffer
+                         (insert "Tags")
+                         (--each tags (insert ":") (insert it))
+                         (insert ":" common-parent)
+                         (buffer-string))
+                       :uniquify)))
+
     (bind-key "M-o" 'elwm-activate-window bookmark-bmenu-mode-map)))
 
 (use-package calc
         ad-do-it
         (mapc (lambda (w) (when (car w) (delete-window (cdr w)))) wins-to-kill)))))
 
+(use-package circe
+  :commands circe
+  :init
+  (progn
+    (autoload #'my-circe-open-irc-frame "circe" nil t)
+    (setq circe-networks nil))
+  :config
+  (progn
+    (tracking-mode 1)
+
+    (defun my-circe-get-dasnet-irssi-passwd (_)
+      (with-temp-buffer
+        (insert-file-contents "~/secrets/dasnet-irssi-proxy")
+        (buffer-string)))
+
+    ;; TODO: write a macro to fontify nicks
+    (setq lui-highlight-keywords
+          '(("^--> .*" (face (:foreground "#4e9a06")))
+            ;; specific nick highlights
+            ("^<taylanub[`_]*>" (face (:foreground "#3465a4")))
+            ("<queen[`_]*>" (face (:foreground "#e6a8df")))
+            ("<jordigh[`_]*>" (face (:foreground "#e6a8df")))
+            ("<fsbot[`_]*>" (face (:foreground "#41423f")))
+            ("<rudybot[`_]*>" (face (:foreground "#41423f")))
+            ("<rhemaxx0s[`_]*>" (face (:foreground "#8ae234")))
+            ("<rhemax0s[`_]*>" (face (:foreground "#8ae234")))
+            ("<rhemaxxos[`_]*>" (face (:foreground "#8ae234")))
+            ("<rhemaxos[`_]*>" (face (:foreground "#8ae234")))
+            ("<magnars[`_]*>" (face (:foreground "#5c3566")))
+            ("<tanagoljerova[`_]*>" (face (:foreground "#ef2929")))
+            ("<nicferrier[`_]*>" (face (:foreground "#ef2929")))
+            ("<macrobat[`_]*>" (face (:foreground "#5c3566")))
+            ("<ijp[`_]*>" (face (:foreground "#729fcf")))
+            ("<johnw[`_]*>" (face (:foreground "#5c3566")))
+            ("<godmy[`_]*>" (face (:foreground "#ef2929")))
+            ("<lambdabot[`_]*>" (face (:foreground "#41423f")))
+            ("<wgreenhouse[`_]*>" (face (:foreground "#8ae234")))
+            ("<tali713[`_]*>" (face (:foreground "#8ae234")))
+            ("<forcer[`_]*>" (face (:foreground "#4e9a06")))
+            ("<tonitrus[`_]*>" (face (:foreground "#4e9a06")))
+            ;; default nick
+            ("^<.*?>" circe-originator-face)))
+
+    (defun my-circe-after-colon (_ _ _)
+      (save-excursion
+        (backward-char 1)
+        (looking-back ":")))
+
+    (sp-with-modes 'circe-channel-mode
+      (sp-local-pair "`" "'")
+      (sp-local-pair "(" nil :unless '(:add my-circe-after-colon)))
+
+    (add-hook 'circe-channel-mode-hook 'my-circe-channel-setup)
+    (add-hook 'circe-query-mode-hook 'my-circe-channel-setup)
+    (defun my-circe-channel-setup ()
+      "Setup channel buffer."
+      (my-init-text-based-modes)
+      (smartparens-mode t)
+      (set (make-local-variable 'sp-autoescape-string-quote) nil))
+
+    (defvar my-lui-highlight-buffer "*Circe-Highlights*"
+      "Name of the highlight buffer.")
+
+    (defvar my-lui-highlight-filter (lambda ()
+                                      (memq 'circe-highlight-nick-face
+                                            (lui-faces-in-region (point-min)
+                                                                 (point-max))))
+      "A function used to filter messages which should go into highlight buffer.
+
+Should return non-nil if we want to keep the message.
+
+Called with zero argument in a buffer narrowed to the current
+message.")
+
+    (defun my-lui-highlight-filter ()
+      "Return non-nil if we should keep the message."
+      (and (memq 'circe-highlight-nick-face
+                 (lui-faces-in-region (point-min)
+                                      (point-max)))
+           (not (text-property-any (point-min) (point-max)
+                                   'lui-format 'circe-format-server-numeric))))
+
+    (setq my-lui-highlight-filter 'my-lui-highlight-filter)
+
+    ;; TODO: napisat "go to mention" ktore skoci na miesto kde nastal highlight
+    (add-hook 'lui-post-output-hook 'my-lui-save-highlights)
+    (defun my-lui-save-highlights ()
+      (when (funcall my-lui-highlight-filter)
+        (let ((buffer (buffer-name))
+              (target circe-chat-target)
+              (network (with-circe-server-buffer
+                         circe-server-network))
+              (text (buffer-substring (next-single-property-change (point-min) 'face) (point-max))))
+          (with-current-buffer (get-buffer-create my-lui-highlight-buffer)
+            (goto-char (point-max))
+            (save-restriction
+              ;; TODO: abstract this into a formatter
+              (narrow-to-region (point) (point))
+              (insert (propertize (format-time-string "[%Y-%m-%d %H:%M:%S]")
+                                  'face 'lui-time-stamp-face)
+                      " "
+                      (propertize
+                       (concat (or target buffer)
+                               "@"
+                               network)
+                       'face '(:foreground "#8ae234"))
+                      " "
+                      (my-remove-text-properties-when
+                       'face '(circe-highlight-nick-face)
+                       0 (1- (length text))
+                       '(face)
+                       text))
+              (lui-buttonize))))))
+
+    ;; autoloaded
+    (defun my-circe-open-irc-frame ()
+      "Open an IRC frame."
+      (interactive)
+      (select-frame (make-frame-command))
+      (set-frame-parameter (selected-frame) :frame-type :circe)
+      (set-frame-parameter (selected-frame) 'name "Circe")
+      (set-frame-parameter (selected-frame) 'explicit-name "Circe")
+      (set-frame-parameter (selected-frame) 'background-color "#111111"))
+
+    (defun my-circe-kill-all-irc-buffers ()
+      "Kill all circe buffers."
+      (interactive)
+      (--each (buffer-list)
+        (with-current-buffer it
+          (when (eq major-mode 'circe-server-mode)
+            (kill-buffer it)))))))
+
 (use-package clippy
   :commands clippy-describe-function)
 
     (add-hook 'css-mode-hook 'my-css-mode-setup)))
 
 (use-package custom
-  :defer t
+  :pre-init
+  (bind-keys :prefix "C-c c"
+             :prefix-map ctl-c-c-map
+             :prefix-docstring "Customize map")
+  :bind (("C-c c v" . customize-variable)
+         ("C-c c f" . customize-face)
+         ("C-c c g" . customize-group))
   :config
   (progn
     (defun my-custom-jump-to-state ()
         (ido-dired))))
   :config
   (progn
-    (load "files/dired-defs")))
+    (load "files/dired-defs")
+
+    ;; overload to fix bullshit
+    (defun dired-hack-local-variables () nil)))
+
+(use-package dired-tagsistant
+  :pre-init
+  (bind-keys :prefix-map ctl-x-t-map
+             :prefix "C-x T"
+             :prefix-docstring "C-x T prefix map")
+  :bind (("C-x T r" . dired-tagsistant-add-relation)
+         ("C-x T +" . dired-tagsistant-some-tags)
+         ("C-x T *" . dired-tagsistant-all-tags)
+         ("C-x T % +" . dired-tagsistant-some-tags-regexp)
+         ("C-x T % *" . dired-tagsistant-all-tags-regexp)))
 
 (use-package ediff
   :pre-init
     (add-hook 'ediff-quit-hook 'my-ediff-quit)))
 
 (use-package elfeed
-  :bind (("C-. f" . elfeed))
+  :bind (("C-. C-f" . elfeed))
   :config
   (progn
     (bind-keys :map elfeed-show-mode-map
 (use-package google-maps
   :commands google-maps)
 
+(use-package google-this
+  :defer t
+  :init
+  (progn
+    (defvar google-this-mode-submap)
+    (define-prefix-command 'google-this-mode-submap)
+    (define-key google-this-mode-submap [return] 'google-search)
+    (define-key google-this-mode-submap " " 'google-region)
+    (define-key google-this-mode-submap "t" 'google-this)
+    (define-key google-this-mode-submap "g" 'google-lucky-search)
+    (define-key google-this-mode-submap "i" 'google-lucky-and-insert-url)
+    (define-key google-this-mode-submap "w" 'google-word)
+    (define-key google-this-mode-submap "s" 'google-symbol)
+    (define-key google-this-mode-submap "l" 'google-line)
+    (define-key google-this-mode-submap "e" 'google-error)
+    (define-key google-this-mode-submap "f" 'google-forecast)
+    (define-key google-this-mode-submap "r" 'google-cpp-reference)
+    (define-key google-this-mode-submap "m" 'google-maps)
+    ;; "c" is for "convert language" :-P
+    (define-key google-this-mode-submap "c" 'google-translate-query-or-region)
+    (bind-key "C-x g" google-this-mode-submap)))
+
 (use-package guide-key
   :diminish guide-key-mode
   :config
   :commands letcheck-mode)
 
 (use-package magit
-  :defer t
+  :pre-init
+  (bind-keys :prefix "C-c m"
+             :prefix-map ctl-c-m-map
+             :prefix-docstring "Magit map")
+  :bind (("C-c m b" . magit-key-mode-popup-branching)
+         ("C-c m c" . magit-key-mode-popup-committing)
+         ("C-c m d" . magit-key-mode-popup-dispatch)
+         ("C-c m f" . magit-key-mode-popup-fetching)
+         ("C-c m i" . magit-key-mode-popup-diff-options)
+         ("C-c m l" . magit-key-mode-popup-logging)
+         ("C-c m m" . magit-key-mode-popup-merging)
+         ("C-c m p" . magit-key-mode-popup-pushing)
+         ("C-c m v" . magit-branch-manager)
+         ("C-c m s" . magit-status))
   :config
   (progn
     (require 'flyspell)))
     (setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5"))))
 
 (use-package notmuch
-  :defer t
+  :bind (("C-. C-n" . notmuch))
+  :init
+  (progn
+    ;; TODO: create an autoload from this
+    (defun my-notmuch-unread ()
+      "Display buffer with unread mail."
+      (interactive)
+      (require 'notmuch)
+      (notmuch-search "tag:unread"))
+
+    (bind-key "C-. C-u" 'my-notmuch-unread))
   :config
   (progn
+    (use-package notmuch-unread)
     ;; REDEFINED FROM notmuch-unread-mode
     ;; Don't show anything if there's no unread mail
     (defun notmuch-unread-update-handler ()
       (force-mode-line-update))
 
     (defun my-notmuch-update-mail ()
+      (interactive)
       (start-process "mail-update" nil "/bin/bash" "/home/matus/bin/run-getmail"))
 
     (defvar my-notmuch-update-mail-timer
           (notmuch-show-tag change))))
 
     (bind-key "d" 'my-notmuch-delete-mail notmuch-show-mode-map)
-    (bind-key "d" 'my-notmuch-delete-mail notmuch-search-mode-map)))
+    (bind-key "d" 'my-notmuch-delete-mail notmuch-search-mode-map)
+    (bind-key "g" 'notmuch-poll-and-refresh-this-buffer notmuch-search-mode-map)))
 
 (use-package org
   :mode ("\\.org\\'" . org-mode)
   :config
   (progn
     (load "files/org-defs.el")
+    ;; TODO: move to org-defs
     (load "projects/org-velocity/org-velocity.el")
     (bind-key "C-c s" 'org-velocity org-mode-map)))
 
                     (concat "-path \"*/" x "\"")) projectile-globally-ignored-directories " -not ")
        " -type f -print0"))))
 
-(use-package recentf
-  :bind (("C-c r f" . recentf-open-files)
-         ("C-x C-r" . recentf-open-files)
-         ("C-c r c" . recentf-cleanup))
-  :config
-  (progn
-    (load "files/recentf-defs")))
-
 (use-package revbufs
   :bind ("C-<f5>" . revbufs))
 
     (add-hook 'html-mode-hook 'my-html-mode-setup)))
 
 (use-package skeleton-complete
-  :defer t
+  :commands skeleton-complete-mode
   :diminish skeleton-complete-mode)
 
 (use-package smartparens
              yas-expand)
   :init
   (progn
-    (autoload 'yas/hippie-try-expand "yasnippet"))
+    (autoload #'yas/hippie-try-expand "yasnippet"))
   :config
   (progn
     (require 'dropdown-list)
 
 (use-package-with-elapsed-timer "Initializing packages"
   (package-initialize)
-  ;; TODO: get rid of autoinstall, rewrite it using something nicer
+  (load "~/.emacs.d/dev/dash.el/dash")
+  (load "~/.emacs.d/dev/dash.el/dash-functional")
   (load "~/.emacs.d/autoinstall")
 
   (require 'parenface)
   (require 'uniquify)
-  (load "dev/dash.el/dash.el")
-  (load "dev/dash.el/dash-functional.el")
   (require 'f)
-  (require 's))
+  (require 's)
 
-;; add load paths
-(add-to-list 'load-path "~/.emacs.d/")
-(mapc (apply-partially 'add-to-list 'load-path) (f-directories "~/.emacs.d/vendor"))
-(mapc (apply-partially 'add-to-list 'load-path) (f-directories "~/.emacs.d/projects"))
+  ;; add load paths
+  (add-to-list 'load-path "~/.emacs.d/")
+  (mapc (apply-partially 'add-to-list 'load-path) (f-directories "~/.emacs.d/vendor"))
+  (mapc (apply-partially 'add-to-list 'load-path) (f-directories "~/.emacs.d/projects")))
 
 ;; autoloads
 (autoload 'calc-same-interface "calc" nil t)
   (load "site-lisp/vendor")
   (load "site-lisp/redef")
 
-  ;; ;; load keys
+  ;; load keys
   (load "files/keys"))
 
 ;; load settings
 ;; Reload theme -- hackish
 (load "~/.emacs.d/themes/my-tango-dark-theme")
 
-;; xiki support
-;; (add-to-list 'load-path "/usr/share/emacs/site-lisp")
-;; (require 'el4r)
-;; (el4r-boot)
-
 ;;; post init.
 (when window-system
   (add-hook 'after-init-hook

site-lisp/advices.el

File contents unchanged.

site-lisp/anki-to-tex.el

-(defun my-dictionary-format ()
-  (interactive)
-  (fix-reset-after-each
-    (replace-regexp "" "")
-    (replace-regexp "" "")
-    (replace-string "E'" "\\`E")
-    (replace-regexp "~" "\\\\mytilde{}")
-    (replace-regexp "intransitive" "$\\\\iota$")
-    (replace-regexp "transitive" "$\\\\tau$")
-    (replace-regexp "reflexive" "$\\\\rho$")
-    (replace-regexp "auxiliary" "$\\\\alpha$")
-    (replace-regexp "impersonal" "$\\\\mu$")
-    (replace-regexp "<div><div>" "<div>")
-    (replace-regexp "</div></div>" "</div>")
-    (replace-regexp "&nbsp;" " ")
-    (replace-regexp "&lt;" "<")
-    (replace-regexp "&gt;" ">")
-    (replace-string "< " "$<$ ")
-    (replace-regexp "^<div>" "")
-    (replace-regexp "\t</div>" "\t")
-    (replace-regexp "<br />" "")
-    (replace-regexp "(<i>" "<i>(")
-    (replace-regexp "</i>)" ")</i>")
-    (replace-regexp "<i>\\(.*?\\)</i>" "\\\\emph{\\1}")
-    (replace-regexp "\\([^{]\\)(syn: \\(.*?\\))" "\\1\\\\emph{(syn: \\2)}")
-    (replace-regexp "(syn: \\(.*?\\))" "{\\\\footnotesize ($\\\\sigma\\\\!\\\\!:\\\\!$ \\1)}")
-    (replace-regexp "\\.\\.\\." "\\\\dots ")
-    ;; remove all the divs in front of first tab
-    (with-lines-narrow
-      (goto-char (point-min))
-      (save-excursion
-        (save-restriction
-          (narrow-to-region (point) (save-excursion (re-search-forward "\t" nil t)))
-          (replace-string "<div>" "")
-          (replace-string "</div>" ""))))
-    (while (re-search-forward "\t.*?<div>" nil t)
-      (beginning-of-line)
-      (re-search-forward "\t" nil t)
-      (unless (looking-at "<div>")
-        (insert "<div>")
-        (re-search-forward "<div>" nil t)
-        (backward-char 5)
-        (insert "</div>"))
-      (end-of-line)
-      (unless (looking-back "</div>")
-        (insert "</div>")))
-    (while (re-search-forward "\t<div>" nil t)
-      (backward-delete-char 5)
-      (insert "
-\\begin{enumerate}
-\\item ")
-      (end-of-line)
-      (backward-delete-char 6)
-      (insert "
-\\end{enumerate}"))
-    (replace-regexp "^\\(.*?\\)\t" "{\\\\bfseries \\1} ")
-    (replace-regexp "</div><div>" "
-\\\\item ")
-    ;; what is this??
-    (while (re-search-forward "\\\\item \\[" nil t)
-      (backward-delete-char 7)
-      (when (looking-back "^")
-        (backward-delete-char 1))
-      (insert "[")
-      (save-excursion
-        (save-restriction
-          (narrow-to-region (point) (save-excursion (re-search-forward "\\]" nil t)))
-          (goto-char (point-min))
-          (replace-regexp "
-\\\\item " "; "))))
-    (while (re-search-forward "\\[" nil t)
-      (save-excursion
-        (save-restriction
-          (narrow-to-region (point) (1- (save-excursion (re-search-forward "\\]" nil t))))
-          (goto-char (point-min))
-          (insert "{\\footnotesize ")
-          (if (re-search-forward "= " nil t)
-              (progn
-                (backward-delete-char 2)
-                (insert "\\emph{")
-                (goto-char (point-max))
-                (insert ";}}"))
-            (goto-char (point-max))
-            (insert ";}")))))
-    (replace-regexp "\\[\\(.*?\\)\\]" "\\\\emph{\\1}")
-    (let ((case-fold-search nil)) (replace-string "\\Bf" "\\bf"))
-    (my-dictionary-fix-quotes)
-    (replace-regexp "$" "
-")
-    (my-dictionary-remove-single-item-list)
-    (replace-string "enumerate" "enumerate*")))
-
-(provide 'anki-to-tex)
+(defun my-dictionary-format ()
+  (interactive)
+  (fix-reset-after-each
+    (replace-regexp "" "")
+    (replace-regexp "" "")
+    (replace-string "E'" "\\`E")
+    (replace-regexp "~" "\\\\mytilde{}")
+    (replace-regexp "intransitive" "$\\\\iota$")
+    (replace-regexp "transitive" "$\\\\tau$")
+    (replace-regexp "reflexive" "$\\\\rho$")
+    (replace-regexp "auxiliary" "$\\\\alpha$")
+    (replace-regexp "impersonal" "$\\\\mu$")
+    (replace-regexp "<div><div>" "<div>")
+    (replace-regexp "</div></div>" "</div>")
+    (replace-regexp "&nbsp;" " ")
+    (replace-regexp "&lt;" "<")
+    (replace-regexp "&gt;" ">")
+    (replace-string "< " "$<$ ")
+    (replace-regexp "^<div>" "")
+    (replace-regexp "\t</div>" "\t")
+    (replace-regexp "<br />" "")
+    (replace-regexp "(<i>" "<i>(")
+    (replace-regexp "</i>)" ")</i>")
+    (replace-regexp "<i>\\(.*?\\)</i>" "\\\\emph{\\1}")
+    (replace-regexp "\\([^{]\\)(syn: \\(.*?\\))" "\\1\\\\emph{(syn: \\2)}")
+    (replace-regexp "(syn: \\(.*?\\))" "{\\\\footnotesize ($\\\\sigma\\\\!\\\\!:\\\\!$ \\1)}")
+    (replace-regexp "\\.\\.\\." "\\\\dots ")
+    ;; remove all the divs in front of first tab
+    (with-lines-narrow
+      (goto-char (point-min))
+      (save-excursion
+        (save-restriction
+          (narrow-to-region (point) (save-excursion (re-search-forward "\t" nil t)))
+          (replace-string "<div>" "")
+          (replace-string "</div>" ""))))
+    (while (re-search-forward "\t.*?<div>" nil t)
+      (beginning-of-line)
+      (re-search-forward "\t" nil t)
+      (unless (looking-at "<div>")
+        (insert "<div>")
+        (re-search-forward "<div>" nil t)
+        (backward-char 5)
+        (insert "</div>"))
+      (end-of-line)
+      (unless (looking-back "</div>")
+        (insert "</div>")))
+    (while (re-search-forward "\t<div>" nil t)
+      (backward-delete-char 5)
+      (insert "
+\\begin{enumerate}
+\\item ")
+      (end-of-line)
+      (backward-delete-char 6)
+      (insert "
+\\end{enumerate}"))
+    (replace-regexp "^\\(.*?\\)\t" "{\\\\bfseries \\1} ")
+    (replace-regexp "</div><div>" "
+\\\\item ")
+    ;; what is this??
+    (while (re-search-forward "\\\\item \\[" nil t)
+      (backward-delete-char 7)
+      (when (looking-back "^")
+        (backward-delete-char 1))
+      (insert "[")
+      (save-excursion
+        (save-restriction
+          (narrow-to-region (point) (save-excursion (re-search-forward "\\]" nil t)))
+          (goto-char (point-min))
+          (replace-regexp "
+\\\\item " "; "))))
+    (while (re-search-forward "\\[" nil t)
+      (save-excursion
+        (save-restriction
+          (narrow-to-region (point) (1- (save-excursion (re-search-forward "\\]" nil t))))
+          (goto-char (point-min))
+          (insert "{\\footnotesize ")
+          (if (re-search-forward "= " nil t)
+              (progn
+                (backward-delete-char 2)
+                (insert "\\emph{")
+                (goto-char (point-max))
+                (insert ";}}"))
+            (goto-char (point-max))
+            (insert ";}")))))
+    (replace-regexp "\\[\\(.*?\\)\\]" "\\\\emph{\\1}")
+    (let ((case-fold-search nil)) (replace-string "\\Bf" "\\bf"))
+    (my-dictionary-fix-quotes)
+    (replace-regexp "$" "
+")
+    (my-dictionary-remove-single-item-list)
+    (replace-string "enumerate" "enumerate*")))
+
+(defun my-dictionary-fix-quotes ()
+  (let ((single 0)
+        (double 0))
+    (fix-reset-after-each
+      (replace-regexp "\\(\\W\\)'\\(\\w\\)" "\\1`\\2")
+      ;; (while (re-search-forward "[^a-z]'[^a-z]" nil t)
+      ;;   (backward-char 1)
+      ;;   (backward-delete-char 1)
+      ;;   (if (= (mod double 2) 0)
+      ;;       (insert "`")
+      ;;     (insert "'"))
+      ;;   (setq single (1+ single)))
+      (while (re-search-forward "\"" nil t)
+        (backward-delete-char 1)
+        (if (= (mod double 2) 0)
+            (insert "``")
+          (insert "''"))
+        (setq double (1+ double))))))
+
+(defun my-dictionary-remove-single-item-list ()
+  (goto-char (point-min))
+  (while (re-search-forward "\\\\begin{enumerate}" nil t)
+    (save-excursion
+      (save-restriction
+        (narrow-to-region (match-beginning 0) (save-excursion (re-search-forward "\\\\end{enumerate}" nil t)))
+        (goto-char (point-min))
+        (when (= 1 (count-matches "^\\\\item"))
+          (kill-line 2)
+          (delete-char 6)
+          (end-of-line)
+          (delete-region (point) (point-max))))
+      (beginning-of-line)
+      (backward-delete-char 2)
+      (insert " "))))
+
+(defun my-format-synonyms ()
+  (interactive)
+  (goto-char (point-min))
+  (re-search-forward "Synonyms" nil t)
+  (my-kill-entire-line)
+  (while (re-search-forward "(\\([0-9]+\\))" nil t)
+    (save-excursion
+      (let ((text (buffer-substring-no-properties (point) (point-at-eol))))
+        (goto-char (point-min))
+        (goto-line (string-to-int (match-string 1)))
+        (end-of-line)
+        (insert " (syn:" text ")")))
+    (my-kill-entire-line))
+  (goto-char (point-min))
+  (replace-regexp "\n\\'" "")
+  (clipboard-kill-region (point-min) (point-max)))
+
+(provide 'anki-to-tex)

site-lisp/defuns-buffer.el

   "Fix the display of octal chars instead of decoded text."
   (set-buffer-multibyte nil)
   (set-buffer-multibyte t))
+
+(defun my-kill-pp-eval-expression-window ()
+  (interactive)
+  (--when-let (--first (equal (buffer-name (window-buffer it)) "*Pp Eval Output*") (window-list))
+    (delete-window it)))

site-lisp/defuns-edit.el

   (interactive "p")
   (downcase-region (point) (+ arg (point))))
 
+;; TODO: add docstrings
+;; TODO: doesn't properly downcase words in row if called
+;; repeatedly. We should skip whitespace somewhere
 (defun my-smart-downcase-word (&optional arg)
   (interactive "P")
   (cond

site-lisp/defuns-macros.el

File contents unchanged.
                   (backward-char)
                   (insert ", " plural))))))))))
 
+;; should go into s.el
+(defun my-next-property-value (start prop val &optional object limit)
+  "Find next position where PROP has value VAL."
+  (let ((point start) done)
+    (or (and (equal (plist-get (text-properties-at point object) prop) val)
+             point)
+        (progn
+          (while (and (not done)
+                      (if (or (not object)
+                              (bufferp object))
+                          (/= point (point-max))
+                        (/= point (1- (length object))))
+                      (setq point (next-single-property-change point prop object limit)))
+            (setq done (equal (plist-get (text-properties-at point object) prop) val)))
+          point))))
+
+;; should go into s.el
+(defun my-next-property-not-value (start prop val &optional object limit)
+  "Find next position where PROP does not have value VAL."
+  (let ((point start) done)
+    (or (and (not (equal (plist-get (text-properties-at point object) prop) val))
+             point)
+        (progn
+          (while (and (not done)
+                      (if (or (not object)
+                              (bufferp object))
+                          (/= point (point-max))
+                        (/= point (1- (length object))))
+                      (setq point (next-single-property-change point prop object limit)))
+            (setq done (not (equal (plist-get (text-properties-at point object) prop) val))))
+          point))))
+
+;; ported from gnus-*... should go into s.el
+;; TODO: add more general version where we can pass a predicate
+(defun my-remove-text-properties-when
+  (property value start end properties &optional object)
+  "Like `remove-text-properties', only applied on where PROPERTY is VALUE."
+  (let (point)
+    (setq start (my-next-property-value start property value object end))
+    (while (and start
+                (< start end)
+                (setq point (my-next-property-not-value start property value object end)))
+      (remove-text-properties start point properties object)
+      (setq start (my-next-property-value point property value object end)))
+    object))
+
+(defun my-sprunge (text &optional language)
+  "Paste TEXT to sprunge.us.
+
+With non-nil prefix argument, ask for LANGUAGE."
+  (interactive (list (if (use-region-p)
+                         (buffer-substring-no-properties (region-beginning) (region-end))
+                       (read-from-minibuffer "Text: "))
+                     (when current-prefix-arg (read-from-minibuffer "Language: " nil
+                                                                    nil nil nil "cl"))))
+  (let* ((buf (get-buffer-create " *sprunge-result*"))
+         (url (with-current-buffer buf
+                (shell-command (concat "echo "
+                                       (shell-quote-argument text)
+                                       " | curl -s -F 'sprunge=<-' http://sprunge.us")
+                               buf)
+                (s-trim (buffer-string)))))
+    (kill-buffer buf)
+    (kill-new (if language (concat url "?" language) url))))
+
+;; TODO: abstract the feature detection and the final assembly
 (defun my-emacs-status ()
-  (let ((org-active-task (cond
-                          ((not (marker-buffer org-clock-marker))
-                           "<fc=#d3d7cf>-:--</fc>")
-                          (t
-                           (let* ((status (substring-no-properties org-mode-line-string 1
-                                                                   (1- (length org-mode-line-string))))
-                                  (split-status (split-string status " (")))
-                             (concat "<fc=#8ae234>" (car split-status) "</fc>")))))
-        (unread-mail-count (let ((count (notmuch-unread-count)))
-                             (if (> count 0) (format "<fc=#ef2929>[✉ %d]</fc>" count) ""))))
-    (concat unread-mail-count org-active-task)))
+  (let ((org-active-task (and (featurep 'org)
+                              (cond
+                               ((not (marker-buffer org-clock-marker))
+                                "<fc=#d3d7cf>-:--</fc>")
+                               (t
+                                (let* ((status (substring-no-properties org-mode-line-string 1
+                                                                        (1- (length org-mode-line-string))))
+                                       (split-status (split-string status " (")))
+                                  (concat "<fc=#8ae234>" (car split-status) "</fc>"))))))
+        (unread-mail-count (and (featurep 'notmuch)
+                                (let ((count (notmuch-unread-count)))
+                                  (if (> count 0) (format "<fc=#ef2929>[✉ %d]</fc>" count) ""))))
+        (tracking-urgent (and (featurep 'tracking)
+                              (let* ((shortened (tracking-shorten tracking-buffers))
+                                     (urgent-buffers (--filter (text-property-any 0 (length it)
+                                                                                  'face 'circe-highlight-nick-face
+                                                                                  it)
+                                                               shortened))
+                                     (status (concat "<fc=#ef2929>["
+                                                     (mapconcat 'identity urgent-buffers ",")
+                                                     "]</fc>")))
+                                (when urgent-buffers (substring-no-properties status 0 (length status)))))))
+    (concat (or tracking-urgent "")
+            (or unread-mail-count "")
+            (or org-active-task ""))))

site-lisp/emacs-lisp-mode.el

     (require 'thingatpt)
     (use-package eldoc :diminish eldoc-mode)
 
+    (font-lock-add-keywords 'emacs-lisp-mode '(("\\(?:^\\| \\)\\('\\sw\\(?:\\sw\\|\\s_\\)*\\)"
+                                                1 'font-lock-constant-face)))
+
     (defvar my-emacs-lisp-open-line-list '(
                                            if
                                               when
       (let ((function (function-called-at-point))
             (variable (variable-at-point)))
         (cond
-         ((/= variable 0) (describe-variable variable))
+         ((not (numberp variable)) (describe-variable variable))
          (function (describe-function function)))))