Skip to content

Instantly share code, notes, and snippets.

(evil-define-motion evil-search-forward ()
(format "Search forward for user-entered text.
Searches for regular expression if `evil-regexp-search' is t.%s"
(if (and (fboundp 'isearch-forward)
(documentation 'isearch-forward))
(format "\n\nBelow is the documentation string \
for `isearch-forward',\nwhich lists available keys:\n\n%s"
(documentation 'isearch-forward)) ""))
:jump t
:type exclusive
/* Copyright (c) 2016 All Rights Reserved
* Igor Avdeev <lislon@mail.ru>
*
* Autohotkey utility to make emacs switch input methods with Ctrl+Shift.
*/
#SingleInstance force
#NoTrayIcon
#IfWinActive, ahk_class Emacs
en := DllCall("LoadKeyboardLayout", "Str", "00000409", "Int", 1)
(defun my-count-maps (keymap depth)
(let ((count 0))
(cl-loop for touple in (cdr keymap)
;; touple == (27 keymap (9 . ispell-complete-word))
do
(progn
(if (eq (car-safe (cdr-safe touple)) 'keymap)
;; descent into sub keymap
(setq count (+ count
(my-count-maps (cdr touple) (1+ depth))))
(defun my-count-maps (keymap)
(let ((count 0))
(cl-loop for touple in (cdr keymap)
;; touple == (27 keymap (9 . ispell-complete-word))
do
(progn
(if (eq (car-safe (cdr-safe touple)) 'keymap)
;; descent into sub keymap
(setq count (+ count
(my-count-maps (cdr touple))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesClass{friggeri-cv}[2012/04/30 CV class]
\NeedsTeXFormat{LaTeX2e}
\DeclareOption{print}{\def\@cv@print{}}
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesClass{friggeri-cv}[2012/04/30 CV class]
\NeedsTeXFormat{LaTeX2e}
\DeclareOption{print}{\def\@cv@print{}}
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}%
(defun my/org-metaright-or-evil-shift-right-advice (orig-func &rest args)
"Overrides org-metaright if cursor is not at heading or item"
(if (org-at-heading-or-item-p)
(apply orig-func args)
(call-interactively 'evil-shift-right))
)
(defun my/org-metaleft-or-evil-shift-left-advice (orig-func &rest args)
"Overrides org-metaleft if cursor is not at heading or item"
(if (org-at-heading-or-item-p)
(apply orig-func args)
;; ------------------------------------------------------------------------------
;; lord-lislon hooks
;; ------------------------------------------------------------------------------
(add-to-list 'auto-mode-alist
'("lord-lislon\\.org\\'" . (lambda ()
(org-mode)
(add-hook 'org-insert-heading-hook 'my/lord-lislon-auto-insert-date-heading nil t))))
(defun my/lord-lislon-auto-insert-date-heading ()
;; ------------------------------------------------------------------------------
;; lord-lislon hooks
;; ------------------------------------------------------------------------------
(add-to-list 'auto-mode-alist
'("lord-lislon\\.org\\'" . (lambda ()
(message "Hello")
(org-mode)
(add-hook 'org-insert-heading-hook 'my/lord-lislon-auto-insert-date-heading nil t))))
(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")))