This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defvar my-org-mobile-sync-timer nil) | |
| (defvar my-org-mobile-sync-secs (* 60 20)) | |
| (defun my-org-mobile-sync-pull-and-push () | |
| (require 'org) | |
| (org-mobile-pull) | |
| (org-mobile-push) | |
| (when (fboundp 'sauron-add-event) | |
| (sauron-add-event 'my 3 "Called org-mobile-pull and org-mobile-push"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun dotspacemacs/user-config () | |
| "Configuration function. | |
| This function is called at the very end of Spacemacs initialization after | |
| layers configuration." | |
| ;; Insert mode in capture mode | |
| (add-hook 'org-capture-mode-hook 'evil-insert-state) | |
| ;; Insert mode when adding headers | |
| (add-hook 'org-insert-heading-hook 'evil-insert-state) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Insert mode in capture mode | |
| (add-hook 'org-capture-mode-hook 'evil-insert-state) | |
| ;; Insert mode when adding headers | |
| (add-hook 'org-insert-heading-hook 'evil-insert-state) | |
| ;; (eval-after-load "org" | |
| ;; '(progn | |
| ;; (define-prefix-command 'org-todo-state-map) | |
| ;; (define-key org-mode-map "\C-cx" 'org-todo-state-map) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Google translate interactive mode | |
| (define-derived-mode google-translate-interactive-mode | |
| text-mode "Google Translate" | |
| (defun my/next-line-empty-p () | |
| "Check if next line empty" | |
| (save-excursion | |
| (beginning-of-line 2) | |
| (save-match-data | |
| (looking-at "[ \t]*$")))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Google translate interactive | |
| (define-derived-mode google-translate-interactive-mode | |
| text-mode "Google Translate" | |
| (defun translate-word-and-new-line () | |
| "Shows translation of current work in help buffer and inserts | |
| new line after it" | |
| (interactive) | |
| (let ((buffer (current-buffer)) ) | |
| (move-beginning-of-line nil) | |
| (set-mark-command nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (or (if overriding-terminal-local-map | |
| (FIND-IN overriding-terminal-local-map)) | |
| (if overriding-local-map | |
| (FIND-IN overriding-local-map) | |
| (or (FIND-IN (get-char-property (point) 'keymap)) | |
| (FIND-IN-ANY emulation-mode-map-alists) | |
| (FIND-IN-ANY minor-mode-overriding-map-alist) | |
| (FIND-IN-ANY minor-mode-map-alist) | |
| (if (get-text-property (point) 'local-map) | |
| (FIND-IN (get-char-property (point) 'local-map)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (setq org-capture-templates | |
| (quote (("t" "todo" entry (file "~/org/refile.org") | |
| "* TODO %?\n%U\n" :clock-in t :clock-resume t) | |
| ("b" "book" entry (file+headline "~/org/todo.org" "Book list") | |
| "* %x %?\n%U\n") | |
| ("m" "movie" entry (file+headline "~/org/todo.org" "Movie list") | |
| "* TODO %?\n%U\n") | |
| ("n" "note" entry (file "~/org/refile.org") | |
| "* %?\n%U\n%x") | |
| ("s" "snippet zsh" entry (file "~/org/refile.org") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (translate-keystrokes-ru->en) | |
| (add-hook 'evil-insert-state-minor-mode | |
| (lambda () (literal-insert-mode 1))) | |
| ;; Only buffers with literal-insert-mode active will be sensitive to the | |
| ;; environment language. Prefixed keybindings will still be usable. | |
| (defun translate-keystrokes-ru->en () | |
| "Make emacs output english characters, regardless whether | |
| the OS keyboard is english or russian" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; IRC | |
| (add-hook 'erc-insert-pre-hook | |
| (defun bb/erc-foolish-filter (msg) | |
| "Ignores messages matching `erc-foolish-content'." | |
| (when (erc-list-match erc-foolish-content msg) | |
| (setq erc-insert-this nil)))) | |
| (defun bb/erc-github-filter () | |
| "Shortens messages from gitter." | |
| (interactive) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (evil-leader/set-key | |
| "aiq" 'erc-quit-server | |
| "aig" (defun bb/gitter () | |
| (interactive) | |
| (erc-tls :server "irc.gitter.im" | |
| :port "6667" | |
| :nick "lislon" | |
| :password "password from https://irc.gitter.im/" | |
| :full-name "lislon")) | |
| "aif" (defun bb/freenode () |