-#+TITLE: My Personal Init Customization
+#+title: My Personal Init Customization
#+OPTIONS: toc:nil num:nil ^:nil
-* copyright
-# Copyright (C) 2016 Ian Kelling
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-* things that should be at the beginning
-#+begin_src emacs-lisp
-;; todo, evaluating this manually disables debug on error instead of toggling it
-;(toggle-debug-on-error) ;uncomment to help debug and catch errors
-
-
-#+end_src
-
-
-packages installed from package manager: i pretty much prioritize repos this way: gnu, then melpa, then marmalade.
-
-package-activated-list:
-ac-dabbrev ac-haskell-process ack-and-a-half alect-themes auctex bash-completion bbdb csv-mode cyberpunk-theme dot-mode expand-region f find-file-in-project flycheck foreign-regexp ggtags ghc gnuplot-mode goto-chg haskell-mode heroku-theme highlight-indentation highlight-symbol htmlize inf-ruby info+ inkpot-theme jedi auto-complete jedi-core epc ctable concurrent key-chord leuven-theme logstash-conf magit git-commit magit-popup misc-fns mouse+ naquadah-theme nginx-mode occidental-theme org paredit pcsv php-mode pkg-info epl popup py-autopep8 python-environment deferred python-info python-mode rainbow-mode rust-mode rw-hunspell s smartparens smex smooth-scroll sr-speedbar strings swiper ivy tabulated-list tangotango-theme thingatpt+ undo-tree vimrc-mode volatile-highlights web-mode with-editor dash async ws-butler yasnippet
-
-alternate keyboards
-#+begin_src emacs-lisp
-;; todo, figure out an easy way to disable this when using external keyboard
-(if (display-graphic-p)
- (setq
- enter-key (kbd "<return>")
- s-enter-key (kbd "<S-return>")
- c-m-enter-key (kbd "<C-M-return>")
- m-enter (kbd "<M-return>")
- c-enter (kbd "<C-return>"))
- (setq
- enter-key (kbd "C-m")
- s-enter-key (kbd "C-8")
- c-m-enter-key (kbd "C-M-8")
- m-enter (kbd "M-m")
- c-enter (kbd "C-8")))
-
-(setq tp (string= (system-name) "tp"))
-(setq x200 (string= (system-name) "x2"))
-(setq laptop-keyboard (or tp x200))
-#+end_src
-
-- Ubiquitous Packages which should be loaded on startup rather than
- autoloaded on demand since they are likely to be used in every
- session.
- #+name: starter-kit-load-on-startup
- #+begin_src emacs-lisp
- (require 'saveplace)
- (require 'ffap)
- (require 'uniquify)
- (require 'ansi-color)
- (require 'recentf)
-
- #+end_src
-
-
-- Better to have a list of packages in here vs installed manually.
- However, I install manually because sometimes there are two
- versions and it is not necessarily easy to reconcile that.
- #+begin_src emacs-lisp
- ;; based on marmalage website front page.
-(require 'package)
-
-;; little kit to help remove a down server
-;; (setq package-archives nil)
-
-(add-to-list 'package-archives
- '("marmalade" .
- "http://marmalade-repo.org/packages/"))
-
-(add-to-list 'package-archives
- '("melpa" . "http://melpa.milkbox.net/packages/") t)
-(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
-
-;; if this is a new machine/config, get package list
-;; not sure why we need it, but it is recommended in starter kit,
-;; and doesn't seem like a bad thing
-(unless package-archive-contents (package-refresh-contents))
-
- #+end_src
-
-
- keep our init.el clean, by moving customization elisp to it's own file
-#+name: m-x-customize-customizations
-#+begin_src emacs-lisp
-(setq custom-file "~/.emacs.d/custom.el")
-(load custom-file 'noerror)
-#+end_src
-
-undo tree stuff
-#+begin_src emacs-lisp
-;; more resilient undo-tree-history if we have their locations set up front.
-(setq undo-tree-history-directory-alist '(("." . "~/.undo-tree-history")))
-;; Undo in region just happens accidentally, and throws me off, and it's been buggy in the past
-(setq undo-tree-enable-undo-in-region nil)
-#+end_src
-
-* Stuff that I do not recommend that others use without reading,
-understanding, and customizing themselves are
-
-all mouse stuff disabled till i have time to figure it out again.
-#+begin_src emacs-lisp :tangle no
-(defun xterm-mouse-translate-1 (&optional extension)
- (save-excursion
- (let* ((event (xterm-mouse-event extension))
- (ev-command (nth 0 event))
- (ev-data (nth 1 event))
- (ev-where (nth 1 ev-data))
- (vec (vector event))
- (is-down (string-match "down-" (symbol-name ev-command))))
-
- (cond
- ((null event) nil) ;Unknown/bogus byte sequence!
- (is-down
- (setf (terminal-parameter nil 'xterm-mouse-last-down) event)
- vec)
- (t
- (let* ((down (terminal-parameter nil 'xterm-mouse-last-down))
- (down-data (nth 1 down))
- (down-where (nth 1 down-data)))
- (setf (terminal-parameter nil 'xterm-mouse-last-down) nil)
- (cond
- ((null down)
- ;; This is an "up-only" event. Pretend there was an up-event
- ;; right before and keep the up-event for later.
- (push event unread-command-events)
- (vector (cons (intern (replace-regexp-in-string
- "\\`\\([ACMHSs]-\\)*" "\\&down-"
- (symbol-name ev-command) t))
- (cdr event))))
- ((equal ev-where down-where) vec)
- (t
- (let ((drag (if (symbolp ev-where)
- 0 ;FIXME: Why?!?
- (list (intern (replace-regexp-in-string
- "\\`\\([ACMHSs]-\\)*" "\\&drag-"
- (symbol-name ev-command) t))
- down-data ev-data))))
- (if (null track-mouse)
- (vector drag)
- (push drag unread-command-events)
- (vector (list 'mouse-movement ev-data))))))))))))
-
-#+end_src
-* how to find auto-saved files that need recovering
-find a recently dated file in ~/.emacs.d/auto-save-list/, and see the files listed in it.
-#file# is an auto-save file. It may or may not be different than the file is corresponds to.
-If it is different, emacs will give a message about recovering it when you open it.
-
-
-
-* TODO learn some more ivy mode stuff
-* TODO declarative package installations,
-with documentation.
-* TODO shell mode reverse search hides 2nd+ line of multi-line result
-* TODO report bug in latest emacs,
-c-c ', does't exit org-mode src editing mode.
-* TODO button for switching to scratch buffer
-* TODO figure out browsing files with broken nfs mount
-causes emacs to freeze until I kill -9 it.
-* TODO make a keybind to print var under cursor
-and actually, putting the start of it in th emodeline might be cool
-* TODO fix undo tree files literering filesystem
-* TODO c-<delete> in shell mode should send over
-previous line if current line is empty
-* TODO make c-m-s be just a control key for easier use
-* TODO try out avy mode for laptop
-i used to have ace jump mode, but google says avy is better.
-* TODO bind a in group mode of gnus to c-u a,
-also, make a default for number of articles
-* TODO make auto-complete be on by default in sql-mode
-* TODO make an easy bind for open previous buffer
-* TODO i think my autosave for sudo-edit might be too fast
-it sometimes leaves #_asdfjasdf files littered
-* TODO readline-compleste doesn't work when you cat a file without a newline,
-and so the prompt is messed up. not sure exactly what needs to be in end, or if its anything
-* TODO figure out how to paste a path into find file
-probably have to use the old kind of find file
-* TODO readline-complete doesn't escape special chars in filenames
-* TODO readline-complete dev
-
-
-
-** misc fixes
-
-bad code, the comment this relates to was removed, but not the comment
- /* If waiting for this channel, arrange to return as
- soon as no more input to be processed. No more
- waiting. */
-
-
-(status_notify): New arg WAIT_PROC. this is unused, this is a bug.
-The change in status_notify's return is just passing more information
-from what it did already. No changes at all inside this function.
-
-* TODO consider whether to bind indent-for-tab-command
-I removed it from m-tab for terminal compatibility.
-It's the default tab command, which yasnippet replaces.
-* TODO readline-complete: remove the hardcoded rlc-no-readline-hook
-* TODO isearch doesn't automatically wrap in info
-* TODO look into fixing shell mode reverse search
-and why auto-complete dies
-caveat is that it doesn't work well with certain unusual prompts, for example if $/# is not used at the end
-see if we can load history, or reverse search with history commands
-* TODO keybinds for s-delete/tab etc
-* TODO fix bbdb info packaging in melpa
-* TODO figure out why my emacs startup script doesn't work from dmenu
-* TODO post idea to make customize group show function var names so we can read doc strings
-* TODO report/fix bug that kill-whole-line doesn't work right with append kill
-* TODO make bash keybind for copy paste interoperate with x windows
-* TODO fix org stderr redirection
-make this produce output of "ok"
-#+begin_src sh
-echo ok >&2
-
-#+end_src
-* TODO make ido keybinds better
-* TODO fix indenting in org
-
- (defun my-org-indent-region (start end)
- "Indent region."
- (interactive "r")
- (save-excursion
- (let ((line-end (org-current-line end)))
- (goto-char start)
- (while (< (org-current-line) line-end)
- (cond ((org-in-src-block-p) (org-babel-do-in-edit-buffer (indent-according-to-mode)))
- (t (call-interactively 'org-indent-line)))
- (move-beginning-of-line 2)))))
-
-
-
-org-indent-region is broken for source blocks
-the above function works, but has several problems.
-first: it should not have separate logic from org-indent-line
-second: it runs way too slow, mainly the command
- (org-babel-do-in-edit-buffer (indent-according-to-mode)))
-
-
-* TODO figure out newline in prompt shell issue
-setting this before readline-complete is loaded allows completion to work,
-but auto-completion still fails. Need to debug readline-complete to figure this out.
-(setq shell-prompt-pattern "^[^#$%>]*[#$]\n")
-* TODO setup bind for find tag / lisp function at point
-
-* TODO org-delete-char should also work for the delete/backspace keys!
- fix and send patch
-
-* TODO checkout projectile / graphene's project settings
-
-* TODO check up on recent changes to 3rd party default configs
-- last checked apr 24
- https://github.com/eschulte/emacs24-starter-kit/commits/master
-
-last checked mayish
-https://github.com/bbatsov/prelude
-- redefined mouse functions from this file
-
-* TODO figure out how to setup emacs to format text nicely like thunderbird
-* TODO it appears impossible make C-[ not be the same as escape
-* TODO movement within info buffer after opening a link doesn't cancel isearch
-leads to many frustrations
-* TODO fix org resolve clock message. it is innacurate
- i is not the same, becuase it does not make org realize there is an active clock
-
-* TODO add apropos commands to help prefix, from
- http://stackoverflow.com/questions/3124844/what-are-your-favorite-global-key-bindings-in-emacs
-* TODO my autosave goes into an endless prompting loop
-when running save buffer, and the buffer has been changed
-outside of emacs
-* TODO smart peren does not see ?\\) as a valid paren
-
-* TODO why does org-end-of-line not go all the way to the end on a closed headline?
-* TODO org makes random ... things, and delete right before them does ctrl-i
-* TODO try mark word, which might be a useful keybind
-* TODO fix org-cycle: it assumes which key it is bound to for its last alternative
-* TODO checkout lisp-complete-symbol to augment auto-complete
-* TODO learn dired.
-* TODO emacs keylogger to optimize key binds
-* TODO remap/investigate find tag, find tag at point
-* TODO set key to cycle buffers by mode, example below
-
-(defun cycle-buffer-by-mode (p-mode)
- "Cycle buffers by mode name"
- (interactive)
- (dolist (buffer (buffer-list))
- (with-current-buffer buffer
- (when (buffer-live-p buffer)
- (if (string-match p-mode mode-name) ;(regexp-quote p-mode)
- (setq switch2buffer buffer)))))
- (when (boundp 'switch2buffer)
- (switch-to-buffer switch2buffer)))
-
-And I have bound this to my F9 key
-
-(global-set-key [f9] '(lambda () (interactive) (cycle-buffer-by-mode "Shell$")))
-
-* TODO test out usefulness of forward/back sexp in different languages
-
-* TODO major mode settings to check out in future
-** emacs24 starter kit
-- Nxhtml -- utilities for web development
-[[http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html][Nxhtml]] is a large package of utilities for web development and for
-embedding multiple major modes in a single buffer.
-
-Nxhtml is not installed in this version of the starter-kit by default,
-for information on installing nxhtml see [[http://www.emacswiki.org/emacs/NxhtmlMode][EmacsWiki-Nxhtml]].
-
-web-mode is competing package and actively developed, so i'm using that instead
-
-
- (dolist (package '(yaml-mode js2-mode))
- (unless (package-installed-p package)
-
-- Associate modes with file extensions
-
-(add-to-list 'auto-mode-alist '("COMMIT_EDITMSG$" . diff-mode))
-(add-to-list 'auto-mode-alist '("\\.css$" . css-mode))
-(require 'yaml-mode)
-(add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode))
-(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
-(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
-(add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js2-mode))
-;; (add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
-
-- clojure in starter-kit-lisp.org
-
-- others = gnus, js, publish, perl, python, perl, ruby
- they each have their own starter kit file.
-
-- snippets for various modes other than org-mode
-
-* TODO update yasnippet documentation
- yas expand key customization is rediculously hard to figure out
- and completely undocumented
-* TODO fix org source indenting, send patch
-* TODO check out bundling aka compiling yasnippet
-* TODO try xml/html mode url func
-
-(defun view-url ()
- "Open a new buffer containing the contents of URL."
- (interactive)
- (let* ((default (thing-at-point-url-at-point))
- (url (read-from-minibfer "URL: " default)))
- (switch-to-buffer (url-retrieve-synchronously url))
- (rename-buffer url t)
- ;; TODO: switch to nxml/nxhtml mode
- (cond ((search-forward "<?xml" nil t) (xml-mode))
- ((search-forward "<html" nil t) (html-mode)))))
-
-* TODO flyspell-buffer automatically
-
-* TODO respond to ediff thread
-* TODO fix horizontal mouse resizing
- resizing a window horizontally with the mouse should be allowed in more places
-
-* TODO try using / making abbreviations
-
-* abbreviations
-#+begin_src emacs-lisp
-
- ;; turn on abbrev mode globally
- (setq-default abbrev-mode t)
-
-#+end_src
-default abbreviation mode file is .emacs.d/abbrev_defs.
-add-global-abbrev, add-mode-abbrev for expansion at point
-if all else fails, edit the abbrev file
-
-* auto-complete
-
-#+begin_src emacs-lisp
-;; auto-completion in minibuffer
-;; disabled while I look for another alternative
-;;(icomplete-mode)
-
-(require 'auto-complete-config)
-(ac-config-default)
-
-
-;; complete after 1 char instead of default 2
-(setq ac-auto-start 1)
-(setq ac-delay 0.001)
-
-(add-to-list 'ac-modes 'org-mode 'sql-mode)
-
-(defun ac-common-setup ()
- (add-to-list 'ac-sources 'ac-source-yasnippet))
-
-;; for org mode completion source taken from wiki.
-;; it did not work. no idea why. todo, investigate
-;; the ac-sources code is at http://www.emacswiki.org/emacs/AutoCompleteSources
-;; i've deleted it here so as to save space and not spam this file
-;;(defun my-ac-org-mode ()
-;; (setq ac-sources (append ac-sources '(ac-source-org))))
-
-
-;; this makes the org-self-insert command not do a flyspell spell check.
-;; low priority thing to look into sometime
-(ac-flyspell-workaround)
-
-
-(define-key ac-completing-map (kbd "<up>") nil)
-(define-key ac-completing-map (kbd "<down>") nil)
-(define-key ac-completing-map (kbd "<S-return>") 'ac-expand)
-(define-key ac-completing-map "\t" 'ac-complete)
-(define-key ac-completing-map (kbd "<tab>") 'ac-complete)
-
-
-
-#+end_src
-* auto-complete readline-complete
-#+begin_src emacs-lisp
-
-(add-to-list 'load-path "~/.emacs.d/src/readline-complete")
-(require 'readline-complete)
-;; not sure how I made these, but I deleted, and
-;; it would be nice to make them again sometime
-;;(require 'src-loaddefs)
-
-;; disabled cuz broken
-;; redefining function in readline-complete so ac-complete only uses readline as a source
-(defun ac-rlc-setup-sources ()
- "Add me to shell-mode-hook!"
- (setq ac-sources '(ac-source-shell)))
-(add-hook 'shell-mode-hook 'ac-rlc-setup-sources)
-
-;; generally unnecessary, but why not
-(setq explicit-shell-file-name "bash")
-
-;; readline-complete says to add this line.
-;; however, it messes up my procfs directory tracking hook
-;; because get-process doesn't notice the child shell.
-;; instead, I've removed export EMACS=t from
-;; comint-exec-1 (the function which initially sets it)
-;; by finding it in emacs sources and redefinind it here
-;; and done stty echo in my bashrc
-;;(setq explicit-bash-args '("-c" "export EMACS=; stty echo; bash"))
-
-(setenv "EMACS" "")
-(setq explicit-bash-args nil)
-(setq comint-process-echoes t)
-;; default of 30 is way too slow. todo, consider pushing this upstream
-(setq rlc-attempts 5)
-
-(add-to-list 'ac-modes 'shell-mode)
-
-;; readline-complete recommends this (i assume this format),
-;; but greping finds no reference in emacs or my .emacs.d
-;; so I'm assuming it is for an older emacs
-;;(setq explicit-ssh-args '("-t"))
-
-(add-hook 'shell-mode-hook
- (lambda ()
- (define-key shell-mode-map (kbd "<tab>") 'auto-complete)))
-
-
-#+end_src
-#+RESULTS:
-: comint-exec-1
-
-** readline complete fix
-
-I need this function here, where INSIDE_EMACS is replaced with RLC_INSIDE_EMACS.
-#+begin_src emacs-lisp
-;; ian: last update 2017-1-7. update this periodically from upstream
-;; like when we do a major emacs update
-(defun comint-exec-1 (name buffer command switches)
- (let ((process-environment
- (nconc
- ;; If using termcap, we specify `emacs' as the terminal type
- ;; because that lets us specify a width.
- ;; If using terminfo, we specify `dumb' because that is
- ;; a defined terminal type. `emacs' is not a defined terminal type
- ;; and there is no way for us to define it here.
- ;; Some programs that use terminfo get very confused
- ;; if TERM is not a valid terminal type.
- ;; ;; There is similar code in compile.el.
- (if (and (boundp 'system-uses-terminfo) system-uses-terminfo)
- (list "TERM=dumb" "TERMCAP="
- (format "COLUMNS=%d" (window-width)))
- (list "TERM=emacs"
- (format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width))))
- (list (format "RLC_INSIDE_EMACS=%s,comint" emacs-version))
- process-environment))
- (default-directory
- (if (file-accessible-directory-p default-directory)
- default-directory
- "/"))
- proc decoding encoding changed)
- (let ((exec-path (if (and command (file-name-directory command))
- ;; If the command has slashes, make sure we
- ;; first look relative to the current directory.
- (cons default-directory exec-path) exec-path)))
- (setq proc (apply 'start-file-process name buffer command switches)))
- ;; Some file name handler cannot start a process, fe ange-ftp.
- (unless (processp proc) (error "No process started"))
- (let ((coding-systems (process-coding-system proc)))
- (setq decoding (car coding-systems)
- encoding (cdr coding-systems)))
- ;; Even if start-file-process left the coding system for encoding data
- ;; sent from the process undecided, we had better use the same one
- ;; as what we use for decoding. But, we should suppress EOL
- ;; conversion.
- (if (and decoding (not encoding))
- (setq encoding (coding-system-change-eol-conversion decoding 'unix)
- changed t))
- (if changed
- (set-process-coding-system proc decoding encoding))
- proc))
-
-#+end_src
-
-* auto save & backup
-
-there is a bug that when emacs has been running for a long time,
-auto-save-timeout never happens simply by waiting.
-doing something like an M-x function will trigger it.
-Todo: report this bug.
-
-#+begin_src emacs-lisp
-
-;; enable auto-save hook
-(setq auto-save-timeout 1) ; idle time before auto-save.
-
-
-;; main hook for my auto save
-(add-hook 'auto-save-hook 'my-auto-save)
-;; additional hook to try to deal with emacs not auto-saving when a buffer isn't active
-(add-hook 'window-configuration-change-hook 'my-auto-save)
-
-
-(defun my-auto-save ()
- (if (and my-as (buffer-file-name) (buffer-modified-p))
- (let (message-log-max)
- ;; a bit of a hack to partially suppress the constant saving in the echo area
- (with-temp-message ""
- (basic-save-buffer)))))
-
-(defun my-as-off ()
- (interactive)
- (setq my-as nil))
-
-(defun my-as-on ()
- (interactive)
- (setq my-as t))
-
-;; based on suggestion in the emacs docs, redefine these 2 functions
-;; to avoid prompt spamming the user when we do auto-save
-(defun ask-user-about-supersession-threat (fn)
- (discard-input)
- (message
- "File for %s has changed on disk outside of emacs. Auto-save is overwriting it, however
-a backup is being created in case that is not what you intended." buffer-file-name)
- (setq buffer-backed-up nil))
-
-(defadvice ask-user-about-lock (before lock-deactivate-as activate)
- (make-local-variable 'my-as)
- (setq my-as nil)
- (message "proper autosave has been turned off for this buffer because of lock file problem.
- In this buffer, do M-x my-as-on to reenable"))
-
-;; todo, this doesn't work consistently to override the auto-save message
-(defalias 'do-auto-save-original (symbol-function 'do-auto-save))
-(defun do-auto-save (&optional no-message current-only)
- "This function has been modified to wrap the original so that NO-MESSAGE
-is always set to t, since we auto-save a lot, it spams otherwise.
-The original doc string is as follows:
-
-Auto-save all buffers that need it.
-This is all buffers that have auto-saving enabled
-and are changed since last auto-saved.
-Auto-saving writes the buffer into a file
-so that your editing is not lost if the system crashes.
-This file is not the file you visited; that changes only when you save.
-Normally we run the normal hook `auto-save-hook' before saving.
-
-
-A non-nil NO-MESSAGE argument means do not print any message if successful.
-A non-nil CURRENT-ONLY argument means save only current buffer."
- (interactive)
- (do-auto-save-original t current-only))
-
-;; enable MY auto-save
-(my-as-on)
-
-#+end_src
-
-
-backups, separate from auto-save
-
-#+begin_src emacs-lisp
-
- ;; set backup file location
-(setq backup-directory-alist '(("." . "~/.editor-backups")))
-(setq auto-save-file-name-transforms
- '((".*" "~/.editor-backups/" t)))
-
-(setq version-control t ;; Use version numbers for backups
- kept-new-versions 100
- kept-old-versions 2
- delete-old-versions t ;; delete old versions silently
- ;; assume hard linked files are done on purpose, don't screw them up
- backup-by-copying-when-linked t)
-
-;; todo, the time needs to be an integer, not a vector type thing
-(defun constant-backup ()
- "Backup conditioned on some time passing since last one.
- Hooked into 'before-save-hook."
- (cl-flet ((b-time (minutes)
- (< last-backup-time
- (- (current-time) (* 60 minutes)))))
- (when (or (not (boundp 'last-backup-time)) (and (< (buffer-size) 10000000) (b-time 5)) (b-time 30))
- (setq buffer-backed-up nil)
- (setq-local last-backup-time (current-time)))))
-
-;; make a backup on auto-save, because the backup feature is not
-;; utilized with my-auto-save, only normal interactive save.
-;; todo, enable when fixed
-;;(add-hook 'before-save-hook 'constant-backup)
-
-(add-hook 'auto-save-hook 'auto-save-size-limit)
-
-(defun auto-save-size-limit ()
- (when (and (not backup-inhibited) (> (buffer-size) 2000000))
- (message "Backups disabled for this buffer due to size > 2 megs")
- (make-local-variable 'backup-inhibited)
- (setq backup-inhibited t)))
-
-#+end_src
-
-
-
-background:
- the faq suggests to auto-save using
-(setq auto-save-visited-file-name t)
- and to toggle auto-saving in the current buffer, type `M-x auto-save-mode'
-
- however, this is buggy.
- it leaves around lock files, which can be disabled with
- (setq create-lockfiles nil)
- but it is also buggy on other things that appear to hook onto file saving
- so i created my own function, which originally had bugs,
- but new emacs version fixed all that, yay!.
-
-
-; not using, but here for documentation,
-; alternate way to enable and specify how long between autosaves.
- ; number of input events between autosave.
- ; lowest bound of functionality is actually about 15 input events
- ;(setq auto-save-interval
-** todo keep an eye out for why/when and fix the fact that normal auto-save files are being made soemtimes
-they are #filename#
-seems they are created
-
-* bbdb
-#+begin_src emacs-lisp
-;; based on bbdb manual
-;; also has instructions to initialize upon launching gnus, etc
-;; but I figure try this to make sure everything works all the time first
-(require 'bbdb)
-(bbdb-initialize 'message)
-
-;; recommended by gnus,
-;; but seems like it could be good to have set for other stuff
-(setq user-full-name "Ian Kelling"
- user-mail-address "ian@iankelling.org")
-;; general email setting? recommended by mu4e
-(setq message-kill-buffer-on-exit t)
-
-
-;; based on emacs24-starter-kit
-(setq bbdb-offer-save 'auto
- bbdb-notice-auto-save-file t
- bbdb-expand-mail-aliases t
- bbdb-canonicalize-redundant-nets-p t
- bbdb-complete-name-allow-cycling t)
-
-;; use d instead
-(add-hook 'bbdb-mode-hook
- (lambda () (define-key bbdb-mode-map (kbd "C-k") nil)))
-
-(add-to-list 'load-path "~/.emacs.d/src/bbdb-csv-import")
-(require 'bbdb-csv-import)
- #+end_src
-
-* bookmark settings
-#+begin_src emacs-lisp
-; save bookmarks whenever they are changed instead of just when emacs quits
-(setq bookmark-save-flag 1)
-; increase bookmark context size for better functionality
-(setq bookmark-search-size 2000)
-#+end_src
-* c-like settings
-#+begin_src emacs-lisp
-;; change last thing from gnu.
-;; notably this avoids brace indent after if, and 4 space indent
-(setq c-default-style '((java-mode . "java")
- (awk-mode . "awk")
- (other . "stroustrup")))
-;; for emacs itself, use
-;; (setq c-default-style '((java-mode . "java")
-;; (awk-mode . "awk")
-;; (other . "gnu")))
-;; (setq-default c-basic-offset 2)
-#+end_src
-* color theme
-
-A Theme builder is available at http://elpa.gnu.org/themes/ along with
-a list of pre-built themes at http://elpa.gnu.org/themes/view.html and
-themes are available through ELPA.
-
-
-interesting light themes
-
-
- #+begin_src emacs-lisp
- (defun override-theme (arg)
- (interactive)
- (while custom-enabled-themes
- (disable-theme (car custom-enabled-themes)))
- (load-theme arg t))
- (setq color-theme-is-global t)
-
- (defun toggle-night ()
- (interactive)
- (if (equal (car custom-enabled-themes) 'naquadah)
- (override-theme 'leuven)
- (override-theme 'naquadah)))
-
-
- (override-theme 'leuven) ;; org mode features, with monitor darkened. part of org-mode i think
-
-
-
- ;; disable color thing with this:
- ;;(disable-theme (car custom-enabled-themes))
-
- ;; decent dark themes
-
- ;;(override-theme 'tangotango)
- ;;(override-theme 'deeper-blue)
- ;;(override-theme 'tango-dark)
- ;;(override-theme 'tsdh-dark)
-
- ;;(override-theme 'heroku)
- ;;(override-theme 'inkpot) ;; part of inkpot-theme package
- ;;(override-theme 'naquadah) ; org mode features, part of naquadah-theme package
- ;;(override-theme 'spolsky) ;; part of sublime-themes package
- ;;(override-theme 'twilight-anti-bright) ;; from twilight-anti-bright-theme package
-
- ;; interesting but not usable colors
- ;;(override-theme 'cyberpunk) ; cool org mode features, from cyberpunk-theme package
- ;;(override-theme 'wombat) ; cursor not visible enough. from a wombat package, not sure which
- ;;(override-theme 'misterioso) ; cursor not visible enough
-
-
-
- ;;decent light themes
- ;;(override-theme 'alect-light) ; theres a -alt version, don't see a dif. could use this without dimming. from alect-something package
- ;;(override-theme 'occidental) ; from occidental-theme package
-
-
- ;;color-theme is deprecated in emacs 24.
-
-;; theme packages i tried then removed:
-;; ignored ones that didn't use the new theme engine
-
-;;66 packages (zenburn-theme-2.1, zen-and-art-theme-1.0.1, waher-theme-20130917.7, ujelly-theme-1.0.35, twilight-theme-1.0.0, twilight-bright-theme-20130605.143, twilight-anti-bright-theme-20120713.316, tronesque-theme-1.3, tron-theme-12, toxi-theme-0.1.0, tommyh-theme-1.2, tango-2-theme-1.0.0, sunny-day-theme-20131203.1250, sublime-themes-20140117.323, subatomic-theme-20131011.1048, soothe-theme-0.3.16, soft-morning-theme-20131211.1342, soft-charcoal-theme-20130924.1206, sea-before-storm-theme-0.3, purple-haze-theme-20130929.1751, phoenix-dark-pink-theme-20130905.941, phoenix-dark-mono-theme-20130306.1215, pastels-on-dark-theme-0.3, obsidian-theme-20130920.937, nzenburn-theme-20130513, noctilux-theme-20131019.31, mustang-theme-20130920.939, monokai-theme-0.0.10, molokai-theme-20130828.0, late-night-theme-0.0, jujube-theme-0.1, ir-black-theme-20130302.2355, gruvbox-theme-20131229.1458, gruber-darker-theme-0.6, grandshell-theme-20140118.1003, github-theme-0.0.3, gandalf-theme-0.1, flatland-theme-20131204.858, django-theme-20131022.202, deep-thought-theme-0.1.1, dakrone-theme-20131212.1159, colorsarenice-theme-20131128.1106, color-theme-wombat+-0.0.2, color-theme-wombat-0.0.1, color-theme-twilight-0.1, color-theme-tango-0.0.2, color-theme-solarized-20120301, color-theme-sanityinc-solarized-2.25, color-theme-railscasts-0.0.2, color-theme-monokai-0.0.5, color-theme-molokai-0.1, color-theme-ir-black-1.0.1, color-theme-heroku-1.0.0, color-theme-github-0.0.3, color-theme-eclipse-0.0.2, color-theme-dpaste-0.0.1, color-theme-dawn-night-1.0, color-theme-colorful-obsolescence-0.0.1, color-theme-cobalt-0.0.2, color-theme-20080305.34, clues-theme-20130908.801, busybee-theme-20130920.942, bubbleberry-theme-0.1.2, assemblage-theme-20130715.621, anti-zenburn-theme-20140104.1542, ample-zen-theme-0.2)
-
-
-
-#+end_src
-
-* yasnippet
-cd ~/.emacs.d/src
-git clone --recursive https://github.com/capitaomorte/yasnippet
-touch snippets/.yas-make-groups
-
- This all makes it so I can look through the default snippets
- in the menu bar, but they don't show up elsewhere, because they are
- mostly things I don't want.
-
-#+begin_src emacs-lisp
-
- (require 'yasnippet)
- ;; this needs to be before yas-global-mode
- (setq yas-snippet-dirs (list "~/.emacs.d/snippets"))
- (yas-global-mode 1)
-
- (setq
- yas-also-auto-indent-first-line t
- yas-choose-tables-first t
- yas-use-menu (quote full)
- ;; this sets ido-prompt as first function
- yas-prompt-functions
- '(yas-ido-prompt yas-dropdown-prompt yas-x-prompt yas-completing-prompt yas-no-prompt))
-
- ;; todo, explore this option for wrapping region
- ;; '(yas/wrap-around-region t))
-
-#+end_src
-
-#+RESULTS:
-| yas-ido-prompt | yas-dropdown-prompt | yas-x-prompt | yas-completing-prompt | yas-no-prompt |
-
-* cross session settings
- #+begin_src emacs-lisp
-
-;; Save a list of recent files visited.
-(recentf-mode 1)
-(setq recentf-max-saved-items 200
- recentf-max-menu-items 15)
-
-
-(setq save-place t
- save-place-version-control 'nospecial
- save-place-limit 40000
- save-place-file "~/.emacs.d/places")
-
-
-
-;; savehist keeps track of some history
-;; search entries
-(setq savehist-additional-variables '(kill-ring search-ring regexp-search-ring)
- ;; save every minute
- savehist-autosave-interval 60
- ;; keep the home clean
- savehist-file "~/.emacs.d/.savehist")
-(savehist-mode 1)
-
-#+end_src
-
-* ediff
-#+begin_src emacs-lisp
-;; ediff-buffers is the main command to use
-
-;; ediff - don't start another frame for the control panel
-;; unfortunately, this doesn't allow me to use 2 frames for the diff buffers
-;; so disable this temporarily with the next line if you want that
-;; sometime I should setup 2 functions to explicitly do each type
-(setq ediff-window-setup-function 'ediff-setup-windows-plain)
-;;(setq ediff-window-setup-function 'ediff-setup-windows-default)
-
-;; do side by side diffs
-(setq ediff-split-window-function 'split-window-horizontally)
-
-
-#+end_src
-
-
-
-Things I tried which didn't work, which intuitively I think should work better: I can open the second diff buffer in a new frame, and close it's window in the first frame after starting ediff, but when I hit n to go to the next diff, it restores the window in the first frame. Another thing I tried is to open 2 new frames and set them up as I want. However, if I try to open the *Ediff Control Panel* buffer in a different window from its original one, my mouse jumps to one of the diff frames, or if that isn't visible, the buffer just hangs until I select the original ediff control panel window. This seems like a bug to me. I am using a very recent development version of emacs.
-
-* dired
-#+begin_src emacs-lisp
-
-;; dired - reuse current buffer by pressing 'a'
-(put 'dired-find-alternate-file 'disabled nil)
-#+end_src
-
-* disabled but saved for documentation purposes
- :PROPERTIES:
- :header-args: :tangle no
- :END:
-** indent settings for git's perl code
-don't have a way to set this automatically or a good place to put this
-#+begin_src emacs-lisp
-(setq
- perl-indent-level 8
- perl-continued-statement-offset 8
- perl-continued-brace-offset -8
- perl-brace-offset 0
- perl-brace-imaginary-offset 0
- indent-tabs-mode t
- )
-#+end_src
-** org mode website
-
-#+begin_src emacs-lisp
-;; use org-publish-current-project with a project file open
-(setq org-publish-project-alist
- '(("org"
- :base-directory "/a/h/src"
- :publishing-directory "/a/h/output"
- :base-extension "org"
- ;;:publishing-function org-org-publish-to-org
- :publishing-function org-html-publish-to-html
- :preserve-breaks t
- :html-postamble "Everything here is <a rel=\"license\"
- href=\"http://creativecommons.org/licenses/by-sa/4.0/\"><img
- alt=\"Creative Commons License\" style=\"border-width:0\"
- src=\"http://i.creativecommons.org/l/by-sa/4.0/80x15.png\" /></a>"
- :html-head "<link rel=\"stylesheet\"
- href=\"style.css\"
- type=\"text/css\"/>"
- :htmlized-source t)
- ("othersrc"
- :base-directory "/a/h/src"
- :base-extension "css\\|el\\|"
- :publishing-directory "/a/h/output"
- :publishing-function org-publish-attachment)
- ("other"
- :base-directory "/a/h/other"
- :base-extension ".*"
- :publishing-directory "/a/h/output"
- :publishing-function org-publish-attachment)))
-;; default is xhtml-strict. don't really care, but this is more common
-(setq org-html-doctype "html4-strict")
-
-;; this is needed for worg
-;; todo: for my own site, I need to define the css in a separate file
-;; in order to use this setting. see the variable help for info
-(setq org-export-htmlize-output-type t)
-
-
-#+end_src
-
-** bash-completion
-#+begin_src emacs-lisp
-;; this eventually gets set in
-;; comint-dynamic-complete-functions
-;; (car comint-dynamic-complete-functions)
-(autoload 'bash-completion-dynamic-complete "bash-completion"
- "BASH completion hook")
-(add-hook 'shell-dynamic-complete-functions
- 'bash-completion-dynamic-complete)
-
-;; this appears useless, but was in the recommended init code
-(add-hook 'shell-command-complete-functions
- 'bash-completion-dynamic-complete)
-
-(defun ac-rlc-setup-sources ()
- "Add me to shell-mode-hook!"
- (setq ac-sources '(ac-source-shell)))
-(add-hook 'shell-mode-hook 'ac-rlc-setup-sources)
-
-#+end_src
-
-** misc stuff
- It is an awesome mode for keyboard navigation.
- However, using the mouse takes less thought and works as well
-
- #+begin_src emacs-lisp
-
-
- ;; whitespace-mode config. minimal for bad whitespace
- ;(setq whitespace-line-column 80) ; for style of lines-tail, but I have it disabled
- (setq whitespace-style '(face tabs empty trailing))
- ;to enable whitespace mode
- (whitespace-mode +1)
-
-
-
- (defun org-set-mark-command (arg)
- "Do set-mark-command and then org-show-context if the point
- moves to invisible text."
- (interactive "P")
- (let ((initial-point (point)))
- (setq this-command 'set-mark-command)
- (set-mark-command (arg))
- (if (and (not (= (point) initial-point))
- (or (outline-invisible-p) (org-invisible-p2)))
- (org-show-context 'mark-goto))))
-
- (defun org-exchange-point-and-mark (&optional arg)
- (interactive "P")
- (let ((initial-point (point)))
- (exchange-point-and-mark)
- (if (and (not (= (point) initial-point))
- (or (outline-invisible-p) (org-invisible-p2)))
- (org-show-context 'mark-goto))))
-
-
- (defun toggle-mode-line ()
- "Toggle mode line on and off."
- (interactive)
- (if mode-line-format
- (progn (setq my-saved-mode-line-format mode-line-format)
- (setq mode-line-format nil))
- (setq mode-line-format my-saved-mode-line-format))
- (force-mode-line-update))
- (toggle-mode-line)
- (global-set-key (kbd "M-m") 'toggle-mode-line)
- (add-hook 'after-change-major-mode-hook
- (lambda () (setq my-saved-mode-line-format mode-line-format)
- (setq mode-line-format nil)))
-
-
- #+end_src
-
-** Copy mode-line to the top
- #+begin_src emacs-lisp
-;; Copy mode-line to the top
-(setq-default header-line-format mode-line-format
-mode-line-format nil)
-;; copied the mode-line theme into the header theme, else it is unreadable
-;; this goes after loading the theme
-(let ((class '((class color) (min-colors 89))))
-(custom-theme-set-faces
- 'leuven
- `(header-line ((,class (:box (:line-width 1 :color "#1A2F54") :foreground "#85CEEB" :background "#335EA8"))))))
-
- #+end_src
-
-** tab bindings for when I wanted to make tab be for search
-#+begin_src emacs-lisp
-
- (define-key emacs-lisp-mode-map (kbd "<tab>") nil)
- (define-key button-buffer-map "\t" nil)
- (define-key button-buffer-map (kbd "f") 'forward-button)
- (define-key Info-mode-map "\t" nil)
- (define-key widget-keymap "\t" nil)
- (define-key widget-keymap (kbd "<tab>") nil)
-
- (add-hook 'compilation-mode-hook (lambda ()
- (define-key compilation-mode-map (kbd "<tab>") nil)
- (define-key compilation-mode-map "\t" nil)))
-
-;; unbind c-i for yas. it already separately binds <tab>
- (add-hook 'yas-minor-mode-hook (lambda ()
- (define-key yas-minor-mode-map "\t" nil)))
-
- (add-hook 'haskell-interactive-mode-hook
- (lambda ()
- (define-key haskell-interactive-mode-map "\t" nil)
- (define-key haskell-interactive-mode-map (kbd "<tab>") 'haskell-interactive-mode-tab)))
-
- (define-key minibuffer-local-must-match-map "\t" nil)
- (define-key minibuffer-local-must-match-map (kbd "<tab>") 'minibuffer-complete)
- (define-key minibuffer-local-completion-map (kbd "<tab>") 'minibuffer-complete)
- (define-key minibuffer-local-completion-map "\t" 'minibuffer-complete)
-
- (add-hook 'ido-setup-hook
- (lambda()
- (define-key ido-completion-map (kbd "<tab>") 'ido-complete)
- (define-key ido-completion-map "\t" nil)))
-
-#+end_src
-
-** kill buffer and window
-#+begin_src emacs-lisp
- (defun kill-buffer-and-window ()
- "Close the current window and kill the buffer it's visiting."
- (interactive)
- (progn
- (kill-buffer)
- (delete-window)))
-#+end_src
-** sending multiple commands to a comint buffer
-without waiting for commands to finish is unreliable.
-seems like 1 in 100 times, an invisible command to restore prompt didn't work
-#+begin_src emacs-lisp
-(setq shell-unset-prompt "unset PROMPT_COMMAND; unset PS1")
- (setq shell-set-prompt "PROMPT_COMMAND=prompt_command")
-
-(if (boundp 'shell-unset-prompt)
- (send-invisible-string proc shell-unset-prompt))
-(if (boundp 'shell-set-prompt)
- (send-invisible-string proc shell-set-prompt))
-
-
- (defun send-invisible-string (proc string)
- "Like send-invisible, but non-interactive"
- (comint-snapshot-last-prompt)
- (funcall comint-input-sender proc string))
-
-#+end_src
-
-
-
-** mu4e
-
-alsot tried notmuch, it had some glitches, and it's config
-has a list of folders which i'd rather not publish, so it's config is archived.
-
-#+begin_src emacs-lisp
-(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
-(require 'mu4e)
-(setq send-mail-function (quote sendmail-send-it) ;; common to gnus also
- mu4e-sent-folder "/Sent Items"
- mu4e-drafts-folder "/Drafts"
- mu4e-trash-folder "/Trash"
- mu4e-refile-folder "/Archive"
- mu4e-get-mail-command "offlineimap"
- mu4e-update-interval 60
- mu4e-sent-messages-behavior 'delete
- mu4e-use-fancy-chars t
- mu4e-confirm-quit nil
- mu4e-headers-leave-behavior 'apply ;; dont ask
- mu4e-headers-fields (delq (assoc :mailing-list mu4e-headers-fields) mu4e-headers-fields)
- ;; a bit faster than the default 500
- mu4e-headers-results-limit 80)
-
-(define-key mu4e-headers-mode-map (kbd "<return>") 'mu4e-headers-view-message)
-
-(defun my-mu4e-to ()
- "inspired by mu4e info manual"
- (--reduce-from (if (mu4e-message-contact-field-matches
- mu4e-compose-parent-message :to (cadr it))
- (concat (car it) (cadr it))
- acc)
- '("Ian Kelling <ian@iankelling.org")
- ;;'(("Ian Kelling " "<alternate1@example.com>")
- ;; ("Ian Kelling " "<alternate2@example.com>"))
- ))
-
-(add-hook 'mu4e-compose-pre-hook 'my-mu4e-to)
-
-(add-to-list 'mu4e-view-actions
- '("ViewInBrowser" . mu4e-action-view-in-browser) t)
-(setq mu4e-maildir-shortcuts
- '( ("/INBOX" . ?i)
- ("/bog" . ?b)
- ("/Drafts" . ?d)))
-
-#+end_src
-
-
-
-
-** org-mode auto-complete source
-
-todo, someday take a look at this. it is broken.
-
-;(defvar ac-source-eshell-pcomplete
-; '((candidates . (pcomplete-completions))))
-;(defun ac-complete-eshell-pcomplete ()
-; (interactive)
-; (auto-complete '(ac-source-eshell-pcomplete)))
-
-;(add-hook 'org-mode-hook (lambda () (setq ac-sources (cons 'ac-source-eshell-pcomplete ac-sources))))
-;(add-to-list 'ac-modes 'eshell-mode)
-
-
-** gnus nice unicode
-
-
-this looks nice, but it lags gnus just a bit
-#+begin_src emacs-lisp
-
-(defun gnus-pretty-chars-setup ()
- (when window-system
- (setq gnus-sum-thread-tree-indent " "
- gnus-sum-thread-tree-root "● "
- gnus-sum-thread-tree-false-root "◯ "
- gnus-sum-thread-tree-single-indent "◎ "
- gnus-sum-thread-tree-leaf-with-other "├─► "
- gnus-sum-thread-tree-vertical "│"
- gnus-sum-thread-tree-single-leaf "╰─► ")))
-;; dunno why, but this didn't work just setting on startup
-(add-hook 'gnus-startup-hook 'gnus-pretty-chars-setup)
-
-#+end_src
-
-** misc
-#+begin_src emacs-lisp
-
-; todo, is this require things necessary?
-; (require 'flyspell)
-
-
-
- ; whenever M-tab is completion, swap it with tab
- ;(define-key emacs-lisp-mode-map (kbd "<tab>") 'completion-at-point)
- ;(define-key emacs-lisp-mode-map (kbd "C-M-i") 'indent-for-tab-command)
- ;(define-key lisp-interaction-mode-map (kbd "<tab>") 'completion-at-point)
- ;(define-key lisp-interaction-mode-map (kbd "C-M-i") 'indent-for-tab-command)
- ;the global tab keyind. for some reason this totally screws up mini-buffer tab.
- ; disabled until I actually find myself using this, and find a fix for the above problem
- ;(global-set-key (kbd "<tab>") 'complete-symbol)
-
-
- ; todo, make my custom overlays have an underline if they are
- ; overriding a paren matching overlay
- ; make right click set the mark
- ; make search tab do completion instead of meta-tab
- ; in isearch, move C-y to C-v
- ; in isearch, move c-s to c-f
-
- ; some testing to figure out the underlining when paren highlight conflicts
- ; (let ((extra-overlays (overlays-at (1+ end-point))))
- ; (when extra-overlays (print extra-overlays)))
-
-
-
-
- ; commented out because it messes up yank-pop.
-; todo, fix it someday
- ; make yank linewise if it ends in a newline
- ;(defadvice yank (before linewise-yank-advice activate)
- ; (let ((arg (ad-get-arg 0)))
- ; (when (string-match "\n[ \t]*$" (current-kill (cond
- ;; ((listp arg) 0)
- ;; ((eq arg '-) -2)
- ;; (t (1- arg))) t))
- ;; (move-beginning-of-line nil))))
-
-
-
-; todo, look into augmenting auto-complete with hippie expand.
-; starter kit has some hippie expand settings to look into:
-; (when (boundp 'hippie-expand-try-functions-list)
-; (delete 'try-expand-line hippie-expand-try-functions-list)
-; (delete 'try-expand-list hippie-expand-try-functions-list))
-
-
-;; hippie expand is dabbrev expand on steroids
-;(setq hippie-expand-try-functions-list '(try-expand-dabbrev
-; try-expand-dabbrev-all-buffers
-; try-expand-dabbrev-from-kill
-; try-complete-file-name-partially
-; try-complete-file-name
-; try-expand-all-abbrevs
-; try-expand-list
-; try-expand-line
-; try-complete-lisp-symbol-partially
-; try-complete-lisp-symbol))
-;; use hippie-expand instead of dabbrev
-;(global-set-key (kbd "M-/") 'hippie-expand)
-
-
-; commented because i haven't had time to check it out yet
-;; shorter aliases for ack-and-a-half commands
-;(defalias 'ack 'ack-and-a-half)
-;(defalias 'ack-same 'ack-and-a-half-same)
-;(defalias 'ack-find-file 'ack-and-a-half-find-file)
-;(defalias 'ack-find-file-same 'ack-and-a-half-find-file-same)
-
-
-
-
-; todo. take a look at fixing this
-;delete-old-versions t ; fix description in http://www.emacswiki.org/emacs/ForceBackups
-
-
-
-
-;; prelude uses paredit mode.
-;; paredit has some useful stuff but also annoying stuff.
-;; if I ever do a ton of lisp coding, I should look into it
-
-
-
-
-
-
- ; random notes and example code
-
-
- ; usefull thing
- ;(map 'list #'list tabSwapKeys (reverse (getBinds tabSwapKeys)))
-
- ; example of getting keymap info
- ;(car (car (minor-mode-key-binding (kbd "C-/") t)))
- ;(cdr (car (minor-mode-key-binding (kbd "C-/") t)))
- ;(global-key-binding (kbd "C-M-i") t)
- ;(minor-mode-key-binding (kbd "<tab>") t)
- ;(local-key-binding (kbd "C-M-i") t)
- ;(current-minor-mode-maps)
- ;(cdr (assq 'undo-tree-mode minor-mode-map-alist))
-
-
- ; center on incremental search, instead of being at top or bottom of screen.
- ; i'm hoping that setting Isearch Allow Scroll is good enough to fix this annoyance
- ;from http://stackoverflow.com/questions/11052678/emacs-combine-iseach-forward-and-recenter-top-bottom
-
- ;example of constant definition of an overlay and propreries
- ;(defface mouse-flash-position '((t (:background "Yellow")))
- ; "*Face used to highlight mouse position temporarily."
- ; :group 'mouse)
- ;(defface mouse-flash-position '((t (:background "Yellow")))
- ; "*Face used to highlight mouse position temporarily."
- ; :group 'mouse)
- ;(defconst mouse-flash-posn-overlay
- ; ;; Create and immediately delete, to get "overlay in no buffer".
- ; (let ((ol (make-overlay (point-min) (point-max))))
- ; ;(delete-overlay ol)
- ; ;(overlay-put ol 'face 'mouse-flash-position)
- ; (overlay-put ol 'mouse-face 'mouse-flash-position)
- ; (overlay-put ol 'priority 1000000)
- ; ol)
- ; "Overlay to highlight current mouse position.")
-
-
- ;tip, put the last interactive command as elisp on the kill ring:
- ;C-x <ESC> <ESC> C-a C-k C-g
-
- ; example of overlay testing
- ;(setq foo (make-overlay 2 3 nil t nil))
- ;(setq foo2 (make-overlay 3 4 nil t nil))
- ;(overlay-put foo 'face '(:background "red3" :foreground "black"))
- ;(overlay-put foo2 'face '(:background "red1" :foreground "black"))
- ;(overlay-put foo 'face 'visible-mark-face)
- ;(overlay-put foo 'face visible-mark-face2)
-
-
-#+end_src
-
-
-** SQL
-
-disabled, as I haven't used it in a long time. I think it was good for learning some sql stuff.
-#+begin_src emacs-lisp :tangle no
-(require 'sqlup-mode)
-(add-hook 'sql-mode-hook 'sqlup-mode)
-(add-hook 'sql-interactive-mode-hook 'sqlup-mode)
-
-(setq sql-product 'postgres)
-#+end_src
-
-
-** icomplete
-#+begin_src emacs-lisp
-;; without this, on partial completion return would exit the minibuffer, and i had to
-;; keep typing out letters do a full completion before pressing enter.
-;; super annoying. So I picked ctrl-j as a free key to put exit,
-;; but in practice, I would just use ctrl-g to quit. Anyways,
-;; ivy is doing all the minibuffer stuff, so removed this as it's
-;; unused, so it can't cause any problems in future
-(when (boundp 'icomplete-minibuffer-map)
- (define-key icomplete-minibuffer-map (kbd "C-j") 'exit-minibuffer)
- (define-key icomplete-minibuffer-map (kbd "<return>")
- 'minibuffer-force-complete-and-exit))
-
-
-#+end_src
-* elisp settings
-#+begin_src emacs-lisp
-; when manually evaluating lisp, go into debugger on error
-(setq eval-expression-debug-on-error t)
-;reminder of useful var: debug-on-error
-#+end_src
-
-
-
-
-
-* gnus
-
-good info http://www.emacswiki.org/emacs/GnusTutorial
-good info http://www.emacs.uniyar.ac.ru/doc/em24h/emacs183.htm
-
-searching / accessing old mailing list messages:
-http://wiki.list.org/display/DOC/How+do+I+make+the+archives+searchable
-3 options suggested. nabble is very good, and you can even reply directly from their web interface with your own email
-address.
-google with site:example.com/archive works
-However, it has the downside of relying on a 3rd party running unreleased software.
-mail-archive.com and gmane.org search do not work.
-
-Some lists mirror to a newsgroup via gmane, and then mirror the newsgroup via a google group, which has good search
-ability, and you can post via the newsgroup.
-
-Downsides of nabble/google. Doesn't integrate with normal email programs, and lock in. They store and show you what you
-have and haven't read, what messages you've sent, etc. migrating that data to a normal mail program is undocumented and
- unsupported.
-
-mailmans normal public archives are a bit obfuscated, but there is also a "private" archive, available to subscribers,
-which is not obfuscated, and can be easily imported to your local email program.
-you have to sub and log in to the web interfact to access it, and then the url is unpublished, but follows a format,
-which is documented in a few places around the web like
-https://mail.python.org/pipermail/mailman-users/2005-September/046757.html
-its form is:
-https://lists.fedorahosted.org/mailman/private/hyperkitty-devel.mbox/hyperkitty-devel.mbox
-http://www.example.com/mailman/private/<listname>.mbox/<listname>.mbox
-if you copy the url after logging in, and pass it to this function, it will print the transformed url
-lurl() { local x="${1#*/options/}"; x="${x%%/*}.mbox"; echo "${1%/mailman/*}/mailman/private/$x/$x"; }
-
-Then you can download that url. Actually downloading the url is something firefox doesn't make the easiest out of the box.
- Here are some options:
-- paste in the url bar, the save the page
-as a file after it loads.
-- use downthemall extension or similar and paste the url in it.
-- put it in an html page as
-a link (or a small javascript program which will display input as a link), then right click and save as.
-wget won't work because you need to have (i assume) the authorization cookie mailman gives your browser
-
-people have written various tools to de-obfuscate the normal public archives and sometimes import them to a mail
-program. It seems they were not aware of the private archive. However, these tools are probably still useful to automate
-things. None of them has a lot of usage, so I decided it was not worth the risk of hitting bugs vs doing a few extra clicks.
-
-this was the most interesting one I found within a few minutes of googling.
-https://github.com/wcdolphin/mailman-downloader
-
-Once you have an mbox file, there are rather straightforward ways to get it into any mail program, but I will cover
-gnus, which I use and is a bit tricky.
-
-gnus has a native search (limited, too slow for body text searches), and external search engine integration.
-gnus manual recommends converting to maildir for searching local mail, but importing lots of maildir messages to gnus
-takes 10+ minutes, so scratch that option. it suggests 2 alternate options
-mairix. for mbox, it doesn't integrate 100% with gnus, it copies the search results to a mbox
-and tells gnus to make a group of that mbox and display it. This means the read state won't be persistent, but otherwise
-works great.
-
-local imap server which will use the mbox and provide search.
-dovecot is modular, theres a dovecot-common which uses recommends to install i guess it's most used modules. Its
-description is completely not useful. Anyways, I'm not sure if there is any benefit to installing this over just the
-module we need.
-pi dovecot-imapd
-
-dovecot by default also makes a an inbox folder based on the normal local mail location /var/mail/<username>
-those locations are adjustable and well documented via the var mail_location in
-/etc/dovecot/conf.d/10-mail.conf
-I forward my local mail, didn't see immediately how to turn off the inbox, but it will always be empty, so I left as
-is. you could make the var be empty, which apparently has the same effect.
-
-Originally just linked the default location ~/.mail, but I changed to altering the config since ~/.mail since it seems
-other things like postfix use that location
-
-based on http://roland.entierement.nu/blog/2010/09/08/gnus-dovecot-offlineimap-search-a-howto.html
-other links that poped up contained outdated, innacurate information
-http://sachachua.com/blog/2008/05/geek-how-to-use-offlineimap-and-the-dovecot-mail-server-to-read-your-gmail-in-emacs-efficiently/
-http://www.emacswiki.org/emacs/JamesFerguson
-http://www.sanityinc.com/articles/read-mailing-lists-in-emacs-over-imap/
-
-Within emacs you can move messages between mbox and maildir etc, which is a nice flexibility.
-
-
-
-doc group for mbox:
-in gnus, do gnus-group-make-doc-group (G f in groups buffer) and point to the file
-
-info about groups created within gnus is stored in ~/.newsrc.eld
-also stored is a duplication of what email messages are read/unread,
-what newsgroups are subsribed to and read/unread,
-probably more stuff, everything that gnus saves.
-
-
-searching the body of the messages, i cut off after a few minutes.
-i can grep the file in just a couple seconds
-
-
-random side note
-we can also get mbox from gmane
-http://notmuchmail.org/howto/#index7h2
-
-
-gnus can't search mboxes except with its builtin search which is extremely slow. mairix can do mbox files from the command
-line, but not from within gnus, but from mairix.el, which can then open the results in gnus
-
-mbox can be converted to maildir easily, but gnus loads lots of maildir messages extremely slow. it parses all the
-headers and generates a nov file for each.
-
-nnfolder-generate-active-file
-
-to reset things, when changing mail group. I duno all the proper way, but it works to delete
-~/Mail ~/.newsrc.eld ~/.dribble (or something)
-
-
-** mail sources vs select methods background
-I found this very confusing when first reading through the manual. "mail sources" is a term that does not simply mean
-sources of mail, it is much narrower for gnus. sources of mail can be either "mail sources" or select methods. Mail
-sources will move mail to ~/Mail (not sure what format), and split it into groups according to variables. You can use
-"mail sources" for maildir / imap, but those can also be read via select methods, which do not move the mail from their
-location, but use them in their native format. This is what I want to do, and I can simply ignore mail
-sources. Confusing terminology is that "fetching mail" "scanning mail", lots of things mail doesn't mean all mail, it
-means specifically from "mail sources". The words "articles" and "news" is used in connection with select methods, aka my actual mail.
-
-
-
-** caching background
-
-caching:
-there is also ~/News/cache, filled with a bunch of articles, like 300 megs. can't figure out why.
-Grepped for caching in the manual, found 2 main things.
-cache is for 2 purposes. to cache locally, and to keep articles from expiring, called persistence
-gnus-use-cache, which puts things if they are
-gnus-cache-enter-articles
-things go in cache when they are marked certain ways by default, ticked and dormant
-and read articles are moved out of the cache
-still no idea why i have a bunch in the cache, but I set a var so that my mail won't get cached
-I'm gonna delete the cache, and check on it later see what exactly is going in there
-And of course, I moved ~/News to my encrypted drive and symlinked it
-
-
-* haskell
-:LOGBOOK:
-:END:
-
-useful comint-shell mode commands. If not prefaced with *, it means it is not in the haskell custom repl
-*todo: setup haskell c-t toggle arrow keys
-tab completion
-C-q insert prev arg
-C-( history search
-c-m-left/right move to next/prev prompts
-*c-enter, multi-line input
-*s-delete, send input across windows. (i can implement this)
-*c-m-l clear screen
-*haskell-process-interrupt, c-cc terminate job (i can implement this maybe)
-
-nice bash/readline functions missing in comint:
-yank-nth-arg
-operate-get-next
-menu-complete
-
-usefull comint commands:
-c-cl : list historic command in temp buffer
-C-c C-o comint-delete-output
-comint-restore-input, todo: put this on a randomish c-c key
-
-
-
-todo:
-checkout haskell repl functions:
-c-cv haskell-check, hlint
-C-M-q prog-indent-sexp
-c-c. haskell-mode-format-imports
-C-c M-/ haskell-doc-check-active
-haskell-process-generate-tags
-haskell-process-cabal-build
-haskell-cabal-command.. or something
-haskell-process-restart
-C-h v haskell-process-log
-C-h v haskell-process-show-debug-tips
-
-various not immediately useful functions:
-haskell-process-add-dependency
-haskell-process-touch-buffer
-haskell-process-cd
-haskell-process-unignore
-haskell-process-reload-devel-main
-
-
-rebind
-home: C-a haskell-interactive-mode-beginning
-c-return: C-j haskell-interactive-mode-newline-indent
-up/down: <C-down> haskell-interactive-mode-history-next
-
-todo haskell mode better binds for:
-'haskell-process-load-file
-'haskell-process-do-type
-'haskell-process-do-info
-'inferior-haskell-send-decl
-
-
-commands which don't work in haskell-interactive-mode(hi) vs inferior-haskell-mode(ih, default)
-functions not in hi:
-inferior-haskell-find-definition, use tags instead
-inferior-haskell-find-haddock, todo, test if this works
-
-redefined ih to hi
-switch-to-haskell -> 'haskell-interactive-switch
-haskell-process-load-file -> inferior-haskell-load-file
-haskell-process-do-type -> inferior-haskell-type
-switch-to-haskell -> haskell-interactive-switch
-inferior-haskell-load-file -> 'haskell-process-load-file
-
-
-haskell-mode installation from source, based on its readme
-in the git directory,
-make all
-
-#+begin_src emacs-lisp
-
-
-
-;; remove default option to not link the file
-(setq haskell-compile-command "ghc -Wall -ferror-spans -fforce-recomp %s")
-(add-hook 'haskell-indentation-mode-hook
- (lambda ()
- (define-key haskell-indentation-mode-map [?\C-d] nil)
- (define-key haskell-indentation-mode-map
- (kbd "<deletechar>")
- 'haskell-indentation-delete-char)))
-
-;;copied from haskell-mode docs in order to use the new, better, nondefault
-;;interactive mode.
-(eval-after-load "haskell-mode"
- '(progn
- (define-key haskell-mode-map (kbd "C-x C-d") nil)
- (define-key haskell-mode-map (kbd "C-c C-z") 'haskell-interactive-switch)
- (define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-file)
- (define-key haskell-mode-map (kbd "C-c C-b") 'haskell-interactive-switch)
- (define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
- (define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
- (define-key haskell-mode-map (kbd "C-c M-.") nil)
- (define-key haskell-mode-map (kbd "C-c C-d") nil)))
-
-;; ghc-mod install http://www.mew.org/~kazu/proj/ghc-mod/en/emacs.html
-;; todo, try this out
-;; (autoload 'ghc-init "ghc" nil t)
-;;(add-hook 'haskell-mode-hook (lambda () (ghc-init) (flymake-mode)))
-
-
-
-(add-to-list 'load-path "~/.emacs.d/src/ghci-completion")
-;; from the package readme for ghci-completion
-(require 'ghci-completion)
-(add-hook 'inferior-haskell-mode-hook 'turn-on-ghci-completion)
-
-
-;; disable some rebinds. they are set to appropriate keys in the keybinds section
-(eval-after-load "haskell-mode"
- '(progn
- (define-key haskell-mode-map (kbd "C-a") 'nil)
- (define-key haskell-mode-map (kbd "C-j") 'nil)))
-
-(defun pretty-lambdas-haskell ()
- (font-lock-add-keywords
- nil `((,(concat "(?\\(" (regexp-quote "\\") "\\)")
- (0 (progn (compose-region (match-beginning 1) (match-end 1)
- ,(make-char 'greek-iso8859-7 107))
- nil))))))
-;; from haskell-mode manual
-(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
-(when (window-system)
- (add-hook 'haskell-mode-hook 'pretty-lambdas-haskell))
-
-;; added from haskell-mode website install instructions
- ;(load "/usr/share/emacs/site-lisp/haskell-mode/haskell-site-file")
-(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
-;;the three indentation modules are mutually exclusive - add at most one. Trying out the "most advanced"
-(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
-;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
-;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
-
-
-;; todo, set this to some other key
-;; (local-set-key (kbd "C-e") 'my-haskell-load-and-run)
-
-(defun my-haskell-load-and-run ()
- "Loads and runs the current Haskell file."
- (interactive)
- (let ((start-buffer (current-buffer)))
- (inferior-haskell-load-and-run inferior-haskell-run-command)
- (sleep-for 0 100)
- (end-of-buffer)
- (pop-to-buffer start-buffer)))
-
-;; show haskell function in mode line
-;; todo, this broke after updating emacs
-;;(eval-after-load "which-func"
-;; '(add-to-list 'which-func-modes 'haskell-mode))
-
-
-
-(add-hook 'interactive-haskell-mode-hook 'ac-haskell-process-setup)
-(add-hook 'haskell-interactive-mode-hook 'ac-haskell-process-setup)
-(eval-after-load "auto-complete"
- '(add-to-list 'ac-modes 'haskell-interactive-mode))
-
-(add-hook 'haskell-mode-hook
- (lambda () (define-key haskell-mode-map (kbd "C-(")
- (lambda () (interactive)
- (basic-save-buffer)
- (haskell-compile)
- (run-with-timer .3 nil 'repeat-shell)))))
-(add-hook 'haskell-cabal-mode-hook
- (lambda () (define-key haskell-cabal-mode-map (kbd "C-(") 'haskell-compile)))
-
-
-
-(add-hook 'haskell-interactive-mode-hook
- (lambda ()
- (define-key haskell-interactive-mode-map "\r" nil)
- (define-key haskell-interactive-mode-map (kbd "<return>") 'haskell-interactive-mode-return)))
-(add-hook 'haskell-indentation-mode-hook (lambda () (define-key haskell-indentation-mode-map "\r" nil)))
-
-
-
-(add-hook 'haskell-interactive-mode-hook
- (lambda ()
- (define-key haskell-interactive-mode-map (kbd "<C-M-return>") 'haskell-interactive-mode-newline-indent)))
-
- #+end_src
-
-#+RESULTS:
-| (lambda nil (define-key haskell-interactive-mode-map (kbd <C-M-return>) (quote haskell-interactive-mode-newline-indent))) | (lambda nil (define-key haskell-interactive-mode-map \n nil) (define-key haskell-interactive-mode-map (kbd <return>) (quote haskell-interactive-mode-return))) | ac-haskell-process-setup |
-
-* isearch
-#+begin_src emacs-lisp
-(setq
-isearch-allow-scroll t
-search-ring-update t) ;; dont start an edit when going to previous search
-
- (defun isearch-yank-regexp (regexp)
- "Pull REGEXP into search regexp."
- (let ((isearch-regexp nil)) ;; Dynamic binding of global.
- (isearch-yank-string regexp))
- (isearch-search-and-update))
-
- (defun isearch-yank-symbol (&optional partialp backward)
- "Put symbol at current point into search string.
-
- If PARTIALP is non-nil, find all partial matches."
- (interactive "P")
-
- (let (from to bound sym)
- (setq sym
- ; this block taken directly from find-tag-default
- ; we couldn't use the function because we need the internal from and to values
- (when (or (progn
- ;; Look at text around `point'.
- (save-excursion
- (skip-syntax-backward "w_") (setq from (point)))
- (save-excursion
- (skip-syntax-forward "w_") (setq to (point)))
- (> to from))
- ;; Look between `line-beginning-position' and `point'.
- (save-excursion
- (and (setq bound (line-beginning-position))
- (skip-syntax-backward "^w_" bound)
- (> (setq to (point)) bound)
- (skip-syntax-backward "w_")
- (setq from (point))))
- ;; Look between `point' and `line-end-position'.
- (save-excursion
- (and (setq bound (line-end-position))
- (skip-syntax-forward "^w_" bound)
- (< (setq from (point)) bound)
- (skip-syntax-forward "w_")
- (setq to (point)))))
- (buffer-substring-no-properties from to)))
- (cond ((null sym)
- (message "No symbol at point"))
- ((null backward)
- (goto-char (1+ from)))
- (t
- (goto-char (1- to))))
- (isearch-search)
- (if partialp
- (isearch-yank-string sym)
- (isearch-yank-regexp
- (concat "\\_<" (regexp-quote sym) "\\_>")))))
-
- (defun isearch-current-symbol (&optional partialp)
- "Incremental search forward with symbol under point.
-
- Prefixed with \\[universal-argument] will find all partial
- matches."
- (interactive "P")
- (let ((start (point)))
- (isearch-forward-regexp nil 1)
- (isearch-yank-symbol partialp)))
-;; todo, make this
-
- (defun isearch-backward-current-symbol (&optional partialp)
- "Incremental search backward with symbol under point.
-
- Prefixed with \\[universal-argument] will find all partial
- matches."
- (interactive "P")
- (let ((start (point)))
- (isearch-backward-regexp nil 1)
- (isearch-yank-symbol partialp)))
-
-
-
- ; lets look through emacs starter kit before we throw this out.
-
-
- ; automatically wrap to the top of the buffer when isearch fails
- (defadvice isearch-search (after isearch-no-fail activate)
- (unless isearch-success
- (ad-disable-advice 'isearch-search 'after 'isearch-no-fail)
- (ad-activate 'isearch-search)
- (isearch-repeat (if isearch-forward 'forward))
- (ad-enable-advice 'isearch-search 'after 'isearch-no-fail)
- (ad-activate 'isearch-search)))
-
- ;; Activate occur easily inside isearch
- (define-key isearch-mode-map (kbd "C-o")
- (lambda () (interactive)
- (let ((case-fold-search isearch-case-fold-search))
- (occur (if isearch-regexp
- isearch-string
- (regexp-quote isearch-string))))))
-
-
-#+end_src
-
-* lisp / elisp mode setings
-#+begin_src emacs-lisp
-
- (add-hook 'emacs-lisp-mode-hook 'starter-kit-remove-elc-on-save)
- (defun starter-kit-remove-elc-on-save ()
- "If you're saving an elisp file, likely the .elc is no longer valid."
- (make-local-variable 'after-save-hook)
- (add-hook 'after-save-hook
- (lambda ()
- (if (file-exists-p (concat buffer-file-name "c"))
- (delete-file (concat buffer-file-name "c"))))))
-
-
- (defun emacs-lisp-mode-defaults ()
- ;; checkdoc has an annoying feature that wants a header and footer
- ;; in every elisp buffer as if they all were packages
- ;; todo, see if there is a way
- ;; to make checkdoc usable instead of just disabling it as I do here
- (if (boundp 'flycheck-checkers)
- (setq flycheck-checkers (remove 'emacs-lisp-checkdoc flycheck-checkers)))
- (eldoc-mode 1))
- (add-hook 'emacs-lisp-mode-hook 'emacs-lisp-mode-defaults)
-
- (define-key lisp-mode-map (kbd "<M-up>") 'backward-up-list)
- (define-key lisp-mode-map (kbd "<M-down>") 'down-list)
- (define-key emacs-lisp-mode-map (kbd "<M-up>") 'backward-up-list)
- (define-key emacs-lisp-mode-map (kbd "<M-down>") 'down-list)
- (define-key emacs-lisp-mode-map (kbd "<M-escape>") 'find-function-at-point)
-
- ;; interactive modes don't need whitespace checks
- (defun interactive-lisp-coding-defaults ()
- (whitespace-mode -1))
- (setq prelude-interactive-lisp-coding-hook 'prelude-interactive-lisp-coding-defaults)
-
-
- ;; ielm is an interactive Emacs Lisp shell
- (defun ielm-mode-defaults ()
- (run-hooks 'prelude-interactive-lisp-coding-hook)
- (turn-on-eldoc-mode))
- (add-hook 'ielm-mode-hook 'ielm-mode-defaults)
-
-#+end_src
-
-
-* java eclim
-
-based on https://github.com/senny/emacs-eclim
-
-
-eclim: eclipse completion, searching, validation, etc inside emacs
-install
-#+begin_src sh :tangle no
-cd ~/opt
-git clone git://github.com/ervandew/eclim.git
-cd eclim
-pi ant
-ant -Declipse.home=/a/opt/eclipse
-#+end_src
-
-
-currently makes emacs hang a bunch. dunno why. just using eclipse instead
-#+begin_src emacs-lisp :tangle no
-(require 'eclim)
-(global-eclim-mode)
-
-;; just do java
-(setq eclim-accepted-file-regexps
- '("\\.java"))
-
-(custom-set-variables
- '(eclim-eclipse-dirs '("/a/opt/eclipse"))
- '(eclim-executable "/a/opt/eclipse/eclim"))
-
-(setq help-at-pt-display-when-idle t)
-(setq help-at-pt-timer-delay 0.1)
-(help-at-pt-set-timer)
-
-;; dunno if this line is needed
-(require 'eclimd)
-(setq eclimd-default-workspace "/a/bin/eclipse-workspace")
-
-;;add the emacs-eclim source
-(require 'ac-emacs-eclim-source)
-(add-hook 'java-mode-hook 'ac-emacs-eclim-java-setup)
-
-#+end_src
-
-#+RESULTS:
-| ac-emacs-eclim-java-setup |
-
-* mediawiki
-#+begin_src emacs-lisp
-
-(add-to-list 'load-path "~/.emacs.d/src/mediawiki-el")
-(eval-after-load "mediawiki"
- '(progn
- (remove-hook 'outline-minor-mode-hook 'mediawiki-outline-magic-keys)
- (add-hook 'mediawiki-mode-hook
- (lambda () (define-key mediawiki-mode-map (kbd "C-(") 'mediawiki-save-reload)))
-
- ;; mediawiki mode has a bug that it will claim an edit conflict unless you reload after saving.
- ;; I also like to save with no edit summary for previewing on my local mw instance
- (defun mediawiki-save-reload ()
- (interactive)
- (and (mediawiki-save "") (mediawiki-reload)))))
-#+end_src
-* modes with little configuration needed
- #+begin_src emacs-lisp
-
-;;(require 'dtrt-indent)
-;;(setq dtrt-indent-mode t)
-
-(setq css-indent-offset 2)
-
-(load-file "/a/h/iank-mod.el")
-
-(require 'ws-butler)
-(ws-butler-global-mode)
-
-
-(defun ws-butler-clean-region (beg end)
- "Delete trailing blanks in region BEG END."
- (interactive "*r")
- (ws-butler-with-save
- (narrow-to-region beg end)
- ;; _much slower would be: (replace-regexp "[ \t]+$" "")
- (goto-char (point-min))
- (while (not (eobp))
- (end-of-line)
- (delete-horizontal-space)
- (forward-line 1)))
- ;; clean return code for hooks
- nil)
-
-
-(require 'nginx-mode)
-;;The mode should automatically activate for files called nginx.conf and files under /etc/nginx - if not, you can add something like this to your init file:
-;;(add-to-list 'auto-mode-alist '("/etc/nginx/sites-available/.*" . nginx-mode))
-
-;; todo, put this on a hook with prog mode
-;;(highlight-indentation-mode 1)
-
-(add-hook 'auto-revert-tail-mode-hook
- (lambda ()
- (when (string=
- buffer-file-name
- "/var/log/cloudman/development/cm-service.log")
- (setq-local prev-auto-revert-max 0)
- ;; set buffer-local hook
- (add-hook 'after-revert-hook 'tail-colorize nil t))))
-(defun tail-colorize ()
- (ansi-color-apply-on-region prev-auto-revert-max (point-max))
- (setq-local prev-auto-revert-max (point-max)))
-
-
-;; gnu global
-(require 'ggtags)
-(add-hook 'c-mode-common-hook
- (lambda () (ggtags-mode 1)
- (setq c-label-minimum-indentation 0)))
-
-;; specific to my unusual keybind setup, you may want to
-;; pick different keys
-(define-key ggtags-mode-map (kbd "C-M-o") 'ggtags-find-tag-dwim)
-(define-key ggtags-mode-map (kbd "C-M-m") 'ggtags-grep)
-
-(defun gtags-update-single(filename)
- "Update Gtags database for changes in a single file"
- (interactive)
- (start-process "update-gtags" "update-gtags" "bash" "-c" (concat "cd " ggtags-project-root " ; gtags --single-update " filename )))
-
-(defun gtags-update-current-file()
- (interactive)
- (let ((rel-filename (replace-regexp-in-string
- ggtags-project-root "."
- (buffer-file-name (current-buffer)))))
- (gtags-update-single rel-filename)))
-
-(defun gtags-update-hook()
- "Update GTAGS file incrementally upon saving a file"
- (when (and ggtags-mode ggtags-project-root)
- (gtags-update-current-file)))
-
-(add-hook 'after-save-hook 'gtags-update-hook)
-
-;; i'd like to make some elisp which modifies a keymap to remove
-;; all binds which don't match a predicate.
-;; I tried setting a keymap to a new keymap,
-;; but that didn't register as functional.
-;; so I'd need to modify the list in place.
-
-(require 'magit)
-
-
-;; colorize hex colors: use rainbow mode
-
-
-;; message mode prompted me on first message.
-;; a function which describes options then sets this
-;; the other options were to use smtp directly or pass to another mail client
-;; here we use the standard sendmail interface, which I use postfix for
-(setq send-mail-function (quote sendmail-send-it))
-
-(add-to-list 'load-path "~/.emacs.d/src/spray")
-(require 'spray)
-(global-set-key (kbd "C-M-w") 'spray-mode)
-;; remember, h/l = move. f/s = faster/slower, space = pause, all others quit
-
-;; delete active selection with self-insert commands
-(delete-selection-mode t)
-
-;; Transparently open compressed files
-(auto-compression-mode t)
-
-;; Highlight matching parenthesesq when the pointq is on them.
-;; not needed since smart paren mode?
-;; (show-paren-mode 1)
-
-
-;; not documented, but looking at the source, I find this
-;; stops me from being asked what command on every C-c-c
-;; when doing a latex document.
-(setq TeX-command-force "LaTeX")
-
-;; dot mode, repeats last action
-(require 'dot-mode)
-(add-hook 'find-file-hooks 'dot-mode-on)
-
-
-;; clean up obsolete buffers automatically at midnight
-(require 'midnight)
-
-
-;; disabled because it takes 400ms on startup
-;; ;; emacs regexes are too limited.
-;; (require 'foreign-regexp)
-;; ;; perl is most powerful, but javascript is pretty close and
-;; ;; I'd rather know javascript stuff than perl
-;; (custom-set-variables
-;; '(foreign-regexp/regexp-type 'javascript) ;; Choose by your preference.
-;; '(reb-re-syntax 'foreign-regexp)) ;; Tell re-builder to use foreign regexp.
-;; ;; it would be nice to add documentation to do this for more commands to that package
-;; ;; disabled because it's too slow. but I'd still m-x it for advanced replacements
-;; ;;(define-key global-map [remap isearch-forward-regexp] 'foreign-regexp/isearch-forward)
-
-
-;; saner regex syntax
-(require 're-builder)
-(setq reb-re-syntax 'string)
-
-
-;; use shift + arrow keys to switch between visible buffers
-;; todo, set these keys to something else
-(require 'windmove)
-(windmove-default-keybindings)
-
-
-;; show the name of the current function definition in the modeline
-(require 'which-func)
-(setq which-func-modes t)
-(which-function-mode 1)
-
-
-;; enable winner-mode to manage window configurations
-(winner-mode +1)
-
-;; meaningful names for buffers with the same name
-(require 'uniquify)
-(setq uniquify-buffer-name-style 'forward
- uniquify-separator "/"
- ;; for sdx work. until I figure out a better way.
- ;; maybe something like projectile can do it,
- ;; or hacking around the status bar
- uniquify-min-dir-content 2
- uniquify-after-kill-buffer-p t ; rename after killing uniquified
- uniquify-ignore-buffers-re "^\\*") ; don't muck with special buffers
-
-
-;; makefiles require tabs
-;; todo: find a makefile indent function that works,
-;; best I could find is this one which means don't indent at all
-;;
-(add-hook 'makefile-mode-hook
- (lambda ()
- (setq indent-tabs-mode t)
- (setq indent-line-function (lambda () 'no-indent))))
-
-
-;; todo, turn on auto-fill just for txt files
-;;(add-hook 'text-mode-hook 'turn-on-auto-fill)
-(add-hook 'text-mode-hook 'turn-on-flyspell)
-
-
-;; auto indent shell script comments
-(setq sh-indent-comment t)
-
-;; random extra highlights
-(require 'volatile-highlights)
-(volatile-highlights-mode t)
-
-
-;; make help buffers smaller when it makes sense
-(temp-buffer-resize-mode 1)
-
-
-(require 'info+)
-;; based on suggestions in info+.el, I also installed misc-fns, strings, and thingatpt+
-;; remove some bad keybinds from info+
-(define-key Info-mode-map [mouse-4] nil)
-(define-key Info-mode-map [mouse-5] nil)
-
-
-(require 'smooth-scroll)
-;; long gnus summary buffers lags too much with this,
-;; but I like it enough to leave it enabled by default
-;; and crank up the step size to be faster
-;; and it doesn't have a way to enable it only for certain modes etc.
-;; todo sometime, make it work for certain modes only
-(smooth-scroll-mode t)
-;; its too slow with the default of 2
-(setq smooth-scroll/vscroll-step-size 7)
-;; sublimity doesn't work as good going fast by default
-;; smooth-scrolling.el, does not do smooth scrolling. its about cursor location
-
-
-(setq sh-here-document-word "'EOF'")
-
-(setq tramp-default-method "ssh")
- #+end_src
-* misc general settings
-
-#+begin_src emacs-lisp
-
-(setq vc-follow-symlinks t)
-
-;; give us a shell to start instead of scratch
-;;(setq initial-buffer-choice (lambda () (new-shell)))
-
-;; disable this nasty function, as I always use a gui
-(defun suspend-frame() (interactive))
-
-;; Seed the random-number generator
-(random t)
-
-;; easier to remember than keybinds
-(defalias 'scrypt 'mml-secure-message-encrypt-pgpmime)
-(defalias 'sign 'mml-secure-message-sign-pgpmime)
-(defun encrypt ()
- (interactive)
- (mml-secure-message-encrypt-pgpmime 'dontsign))
-
-;; don't highlight the region.
-(set-face-background 'region nil)
-
-;; this fixes save error for python example code
-(define-coding-system-alias 'UTF-8 'utf-8)
-
-;; i don't use frame titles, but if I ever do
-;; this starter kit setting is probably good
-(if window-system (setq frame-title-format '(buffer-file-name "%f" ("%b"))))
-
-(set-terminal-coding-system 'utf-8)
-(set-keyboard-coding-system 'utf-8)
-(prefer-coding-system 'utf-8)
-
-;; remove ugly 3d box feature
-(set-face-attribute 'mode-line nil :box nil)
-
-(add-to-list 'default-frame-alist
- '(font . "DejaVu Sans Mono-11"))
-; the default will jump 2 sizes.
-(setq text-scale-mode-step 1.1)
-(setq font-lock-maximum-decoration t
- inhibit-startup-message t
- transient-mark-mode t
- delete-by-moving-to-trash t
- shift-select-mode nil
- truncate-partial-width-windows nil
- uniquify-buffer-name-style 'forward
- oddmuse-directory "~/.emacs.d/oddmuse"
- echo-keystrokes 0.1
- mark-ring-max 160
- sort-fold-case t ; case insensitive line sorting
- global-mark-ring-max 1000
- ;; the visible bell seems to lag the ui
- ;;visible-bell t
- ;; turn off audible bell
- ;; https://www.emacswiki.org/emacs/AlarmBell
- ring-bell-function 'ignore
- case-replace nil
- revert-without-query '(".*")
- ;; don't pause display code on input.
- ;; smoother display performance at slight cost of input performance
- redisplay-dont-pause t
- font-lock-maximum-decoration t) ; probably default and not necesary
-
-
-(setq-default indent-tabs-mode nil ;; don't use tabs to indent
- cursor-type 'box
- fill-column 72
-
- ;; wrap at word boundaries instead of mid-word
- word-wrap t
- imenu-auto-rescan t
- indicate-empty-lines t) ; mark end of buffer
-
-
-(blink-cursor-mode '(-4))
-(menu-bar-mode -1)
-(tool-bar-mode -1)
-(set-scroll-bar-mode 'left)
-
-
-;; enable various commands
-(put 'narrow-to-region 'disabled nil)
-(put 'narrow-to-page 'disabled nil)
-(put 'narrow-to-defun 'disabled nil)
-(put 'upcase-region 'disabled nil)
-(put 'downcase-region 'disabled nil)
-(put 'scroll-left 'disabled nil)
-;; these from graphene, haven't read about them yet
-(put 'ido-complete 'disabled nil)
-(put 'ido-exit-minibuffer 'disabled nil)
-(put 'dired-find-alternate-file 'disabled nil)
-(put 'autopair-newline 'disabled nil)
-
-
-
-;;disable and minimize various prompts/messages
-(fset 'yes-or-no-p 'y-or-n-p)
-(setq confirm-nonexistent-file-or-buffer nil
- inhibit-startup-message t
- inhibit-startup-echo-area-message t
- inhibit-startup-screen t
- compilation-read-command nil ;; just don't compile with unsafe file local vars
- kill-buffer-query-functions (remq 'process-kill-buffer-query-function
- kill-buffer-query-functions))
-
-
-;; exit without bothering me
-;; http://stackoverflow.com/questions/2706527/make-emacs-stop-asking-active-processes-exist-kill-them-and-exit-anyway/2708042#2708042
-(add-hook 'comint-exec-hook
- (lambda () (set-process-query-on-exit-flag (get-buffer-process (current-buffer)) nil)))
-;; based on save-buffers-kill-emacs help string, don't ask about clients when exiting
-;; apparently this would need to be in some later hook. dunno where is best, but this works
-(defadvice save-buffers-kill-emacs (before no-client-prompt-advice activate)
- (setq kill-emacs-query-functions (delq 'server-kill-emacs-query-function kill-emacs-query-functions)))
-
-
-
-;; (custom-set-faces
-;; ;; setting header-line-format to " " as a hack for a top margin the oly thning I could find to do a top margin
-;; '(header-line ((t (:background "default" :foreground "default" :overline nil :underline nil))))
-;; ;; don't highlight the region
-;; '(region ((t nil))))
-(setq-default header-line-format " ")
-
-
-(setq initial-scratch-message nil)
- #+end_src
-
-
-vertical margin background.
-google turned up: http://lists.gnu.org/archive/html/help-gnu-emacs/2014-03/msg00544.html
-the xresource doesn't work for me, probably an xmonad thing.
-
-figured out I needed to customize the header line face. To find the face, M-x list-faces-display or just google / search
-info,
-then M-x customize-face
-header-line
-unchecked some stuff so that it inherits from default.
-
-* misc function definitions
-#+begin_src emacs-lisp
-
-
-
-
-
-(defun next-backup-dir ()
-"In a directory listing from rsync -n,
-Go to the next directory based on where the cursor is."
- (interactive)
- (let* ((start-col (current-column))
- (end-col (progn (skip-chars-forward "^/\n") (current-column)))
- (dir (progn
- (beginning-of-line 1)
- (buffer-substring-no-properties (point) (+ (point) end-col)))))
- (message dir)
- (forward-line 1)
- (while (and (not (eobp))
- (string= dir (buffer-substring-no-properties (point) (+ (point) end-col))))
- (forward-line 1))
- (forward-char-same-line start-col)))
-;; copy paste this for fast keybind
-;;(local-set-key (kbd "<kp-enter>"))
-
-
-(defun goto-buffer-or-find-file (file-name)
- "If buffer is with FILE-NAME exists, go to it, else open the file using full path."
- (interactive)
- (let ((b (get-buffer (file-name-nondirectory file-name))))
- (if b
- (switch-to-buffer b)
- (find-file file-name))))
-
-
-
-
-;; todo, i think this is broken. perhaps the last goto-char is not accounting for buffer or something
-(defun unpop-global-mark ()
- "Unpop off global mark ring. Does nothing if mark ring is empty."
- (interactive)
- (when global-mark-ring
- (setq global-mark-ring (cons (copy-marker (mark-marker)) global-mark-ring))
- (let ((lm (car (last global-mark-ring))))
- (set-marker (mark-marker) (marker-position lm) (marker-buffer lm)))
- (when (null (mark t)) (ding))
- (setq global-mark-ring (nbutlast global-mark-ring))
- (goto-char (marker-position (mark-marker)))))
-
-(defun indent-buffer ()
- "Indents the entire buffer."
- (interactive)
- (cond ((derived-mode-p 'org-mode)
- (org-indent-region (point-min) (point-max)))
- ((derived-mode-p 'python-mode)
- (py-autopep8))
- (t
- (indent-region (point-min) (point-max)))))
-
-
-;; TODO doesn't work with uniquify
-(defun rename-file-and-buffer ()
- "Renames current buffer and file it is visiting."
- (interactive)
- (let ((name (buffer-name))
- (filename (buffer-file-name)))
- (if (not (and filename (file-exists-p filename)))
- (message "Buffer '%s' is not visiting a file!" name)
- (let ((new-name (read-file-name "New name: " filename)))
- (cond ((get-buffer new-name)
- (message "A buffer named '%s' already exists!" new-name))
- (t
- (rename-file name new-name 1)
- (rename-buffer new-name)
- (set-visited-file-name new-name)
- (set-buffer-modified-p nil)))))))
-
-
-
-(defun sudo-edit (&optional arg)
- (interactive "P")
- (if (or arg (not buffer-file-name))
- (find-file (concat "/sudo:root@localhost:" (ido-read-file-name "File: ")))
- (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
-
-
-
-(defun backward-symbol (arg)
- (interactive "p")
- (forward-symbol (- arg)))
-
-#+end_src
-
-* mode line
-#+begin_src emacs-lisp
-
- ; -----------------------------
- ; fixing up the mode line
- ; modified from mastering emacs blog
- ; ----------------------------
-
- (defvar mode-line-cleaner-alist
- `((auto-complete-mode . "")
- (yas/minor-mode . "")
- (paredit-mode . "")
- (auto-fill-function . "")
- (eldoc-mode . "")
- (abbrev-mode . "")
- (flyspell-mode . "")
- (glasses-mode . "")
- (dot-mode . "")
- (yas-global-mode . "")
- (yas-minor-mode . "")
- (undo-tree-mode . "")
- (volatile-highlights-mode . "")
- (highlight-symbol-mode . "")
- ;; Major modes
- (lisp-interaction-mode . "λ")
- (hi-lock-mode . "")
- (python-mode . "Py")
- (emacs-lisp-mode . "EL")
- (nxhtml-mode . "nx"))
- "Alist for `clean-mode-line'.
-
- When you add a new element to the alist, keep in mind that you
- must pass the correct minor/major mode symbol and a string you
- want to use in the modeline *in lieu of* the original.")
-
-
- (defun clean-mode-line ()
- (interactive)
- (loop for cleaner in mode-line-cleaner-alist
- do (let* ((mode (car cleaner))
- (mode-str (cdr cleaner))
- (old-mode-str (cdr (assq mode minor-mode-alist))))
- (when old-mode-str
- (setcar old-mode-str mode-str))
- ;; major mode
- (when (eq mode major-mode)
- (setq mode-name mode-str)))))
-
-; disabled
-; (add-hook 'after-change-major-mode-hook 'clean-mode-line)
-
-
- ;;; alias the new `flymake-report-status-slim' to
- ;;; `flymake-report-status'
- (defalias 'flymake-report-status 'flymake-report-status-slim)
- (defun flymake-report-status-slim (e-w &optional status)
- "Show \"slim\" flymake status in mode line."
- (when e-w
- (setq flymake-mode-line-e-w e-w))
- (when status
- (setq flymake-mode-line-status status))
- (let* ((mode-line " Φ"))
- (when (> (length flymake-mode-line-e-w) 0)
- (setq mode-line (concat mode-line ":" flymake-mode-line-e-w)))
- (setq mode-line (concat mode-line flymake-mode-line-status))
- (setq flymake-mode-line mode-line)
- (force-mode-line-update)))
-
-
-(add-hook 'after-change-major-mode-hook (lambda ()
-
-(setq mode-line-mule-info nil
-mode-line-position nil
-mode-line-modes nil))) ; todo, make only flymake status show up
-
-#+end_src
-
-* mouse related
-** settings
-#+begin_src emacs-lisp
- (setq focus-follows-mouse t
- mouse-autoselect-window t
- xterm-mouse-mode t)
-#+end_src
-** move-mouse-to-point
-todo, this is buggy with multiple windows open.
-#+begin_src emacs-lisp
-(defun move-mouse-to-point ()
- (interactive)
- (let* ((pos (posn-col-row (posn-at-point)))
- (x (+ (car pos) 2)) ; no idea why this is off by 1-2
- (y (cdr pos)))
- (set-mouse-position (selected-frame) x y)))
-#+end_src
-** cursor highlight
-disabled until fixed
-#+begin_src emacs-lisp :tangle no
- (defun mouse-follow-cursor ()
- ;(if (not (equal this-command last-command)) (print this-command))
-;debug
- ; (print this-command)
- (when (and this-command (not (string= this-command "show-pointer")))
- (let* ((pos (posn-col-row (posn-at-point)))
- (x (1+ (car pos))) ; no idea why this is off by 1
- (y (cdr pos)))
- (setq ignore-mouse-visibility t)
- (set-mouse-position (selected-frame) x y))
- ;(sleep-for 0 100)
- (frame-make-pointer-invisible)))
-
- ; (when this-command
- ; (if (string= this-command "show-pointer")
- ; (frame-make-pointer-visible)
- ;))
-
-
-
- (defun show-pointer ()
- (interactive)
- (if ignore-mouse-visibility
- (setq ignore-mouse-visibility nil)
-; (print "visible")
- (frame-make-pointer-visible)))
-
- (setq ignore-mouse-visibility t)
-; disabled
- ; (global-set-key (kbd "<mouse-movement>") 'show-pointer)
-
- ; (add-hook 'post-command-hook 'mouse-follow-cursor t)
-
-
- ; status. working, except that all scroll wheel actions send a mouse-movement command before doing their actual command, which makes the pointer flicker.
- ; this is just an artifact of xbindkeys. when i do my own mouse chip, it will fix this.
-
-; we could set track-mouse to nil, then do the command, then set it back. i like that idea a bit better.
- ; we could do the same thing in the other case of ignore-mouse-visibility.
-
- ; there are also other issues, it doesn't work with changing buffers on a split screen.
- ; i think a good idea along with this would be for the cursor to follow the mouse all the time.
- ; i have done code for that in my mouse 1 function,
- ; i just need to read it again and try it out.
-
-
-
-
- ; this does not take care of scrolling,
- ; a post-command hook function below does,
- ; but it breaks when the frame is split.
- ; the bug is specifically in mouse-pixel-position
- ; todo, fix this eventually
- (defun mouse-highlight-event (event)
- (interactive "e")
- (when (or (not event) (mouse-movement-p event)
- (memq (car-safe event) '(switch-frame select-window)))
- (let ((pos (posn-point (event-end event))))
- (if (eq (overlay-buffer mouse-hi-ov) (current-buffer))
- (move-overlay mouse-hi-ov pos (1+ pos))
- (delete-overlay mouse-hi-ov)
- (setq mouse-hi-ov
- (make-overlay pos (1+ pos)))
- (overlay-put mouse-hi-ov
- 'insert-in-front-hooks (list 'mouse-hi-modification))
- (overlay-put mouse-hi-ov 'priority 1001))
- (cond ((save-excursion (goto-char pos) (eolp))
- (overlay-put mouse-hi-ov 'face nil)
- (overlay-put mouse-hi-ov 'before-string
- (propertize
- " "
- 'cursor t
- 'face 'mouse-cursor-face)))
- (t
- (overlay-put mouse-hi-ov 'face 'mouse-cursor-face)
- (overlay-put mouse-hi-ov 'before-string nil))))))
-
-
- ; overlay changed hook function
- (defun mouse-hi-modification (ov timing beginning end &optional length)
- "Make an overlay of length 1 not expand when text is inserted at the front."
- (when timing
- (let ((start (overlay-start ov)))
- (move-overlay ov start (1+ start)))))
-
-
-
-
- (defun mouse-hi-command-hook ()
- ; not sure if I need to deal with case of a nil mouse position in some unforseen situation.
- (let ((x-y (cdr (mouse-pixel-position))))
- (when (wholenump (car x-y))
- (let ((pos (posn-point (posn-at-x-y (car x-y) (cdr x-y) nil t))))
- (when pos
- (if (eq (overlay-buffer mouse-hi-ov) (current-buffer))
- (move-overlay mouse-hi-ov pos (1+ pos))
- (delete-overlay mouse-hi-ov)
- (setq mouse-hi-ov
- (make-overlay pos (1+ pos)))
-
- (overlay-put mouse-hi-ov 'priority 1001))
- (cond ((save-excursion (goto-char pos) (eolp))
-
- (overlay-put mouse-hi-ov 'face nil)
- (overlay-put mouse-hi-ov 'before-string
- (propertize
- " "
- 'cursor t
- 'face 'mouse-cursor-face)))
- (t
- (overlay-put mouse-hi-ov 'face 'mouse-cursor-face)
- (overlay-put mouse-hi-ov 'before-string nil))))))))
- ; (pcase-let ((`(,_ ,x . ,y) (mouse-pixel-position)))
- ; (posn-point (posn-at-x-y x y)))))
- ; equivalent of above to find pos. todo, learn about the above syntax
-
- (setq mouse-hi-ov (make-overlay 1 1))
- (delete-overlay mouse-hi-ov)
- ; initialized overlay
- ; temporarily set to nil instead of t because it is broken and
- ; also has a bug that makes emacs not remember the column when
- ; doing up and down movements.
- ; it also messes up yas/insert-snippet, dunno why.
-; i should test out whether it is something in the post-command hook
-; (setq track-mouse t)
- ;(add-hook 'post-command-hook 'mouse-hi-command-hook)
-
- ;(mouse-hi-command-hook)
- ;(setq debug-on-error nil)
-
- #+end_src
-** mouse 1 drag func
- :PROPERTIES:
-
-disabled as it breaks in newer emacs versions with this error, when
-clicking on info links
-
-"and: Symbol's function definition is void: mouse--remap-link-click-p"
-
-#+begin_src emacs-lisp :tangle no
-
- ; Copied from mouse.el and modified.
- ; my modifications have comments prefaced by "ian"
- (defun mouse-drag-track (start-event &optional
- do-mouse-drag-region-post-process)
- "Track mouse drags by highlighting area between point and cursor.
- The region will be defined with mark and point.
- DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
- `mouse-drag-region'."
- (mouse-minibuffer-check start-event)
- (setq mouse-selection-click-count-buffer (current-buffer))
- ; ian. removed as unneeded since I don't use TMM
- ;(deactivate-mark)
- (let* ((scroll-margin 0) ; Avoid margin scrolling (Bug#9541).
- (original-window (selected-window))
- ;; We've recorded what we needed from the current buffer and
- ;; window, now let's jump to the place of the event, where things
- ;; are happening.
- (_ (mouse-set-point start-event))
- (echo-keystrokes 0)
- (start-posn (event-start start-event))
- (start-point (posn-point start-posn))
- (start-window (posn-window start-posn))
- (start-window-start (window-start start-window))
- (start-hscroll (window-hscroll start-window))
- (bounds (window-edges start-window))
- (make-cursor-line-fully-visible nil)
- (top (nth 1 bounds))
- (bottom (if (window-minibuffer-p start-window)
- (nth 3 bounds)
- ;; Don't count the mode line.
- (1- (nth 3 bounds))))
- (on-link (and mouse-1-click-follows-link
- ;; Use start-point before the intangibility
- ;; treatment, in case we click on a link inside
- ;; intangible text.
- (mouse-on-link-p start-posn)))
- (click-count (1- (event-click-count start-event)))
- (remap-double-click (and on-link
- (eq mouse-1-click-follows-link 'double)
- (= click-count 1)))
- ;; Suppress automatic hscrolling, because that is a nuisance
- ;; when setting point near the right fringe (but see below).
- (auto-hscroll-mode-saved auto-hscroll-mode)
- (auto-hscroll-mode nil)
- moved-off-start event end end-point)
-
- (setq mouse-selection-click-count click-count)
- ;; In case the down click is in the middle of some intangible text,
- ;; use the end of that text, and put it in START-POINT.
- (if (< (point) start-point)
- (goto-char start-point))
- (setq start-point (point))
- (if remap-double-click
- (setq click-count 0))
-
- ;; Activate the region, using `mouse-start-end' to determine where
- ;; to put point and mark (e.g., double-click will select a word).
- (setq transient-mark-mode
- (if (eq transient-mark-mode 'lambda)
- '(only)
- (cons 'only transient-mark-mode)))
- (delete-overlay mouse-hi-ov) ; ian, added this.
-
- (let ((range (mouse-start-end start-point start-point click-count)))
- (push-mark (nth 0 range) t t)
- (goto-char (nth 1 range)))
-
- ;; Track the mouse until we get a non-movement event.
- (track-mouse
- (while (progn
- (setq event (read-event))
- (or (mouse-movement-p event)
- (memq (car-safe event) '(switch-frame select-window))))
- (unless (memq (car-safe event) '(switch-frame select-window))
- ;; Automatic hscrolling did not occur during the call to
- ;; `read-event'; but if the user subsequently drags the
- ;; mouse, go ahead and hscroll.
- (let ((auto-hscroll-mode auto-hscroll-mode-saved))
- (redisplay))
- (setq end (event-end event)
- end-point (posn-point end))
- ;; Note whether the mouse has left the starting position.
- (unless (eq end-point start-point)
- (setq moved-off-start t))
- (if (and (eq (posn-window end) start-window)
- (integer-or-marker-p end-point))
- (mouse--drag-set-mark-and-point start-point
- end-point click-count)
- (let ((mouse-row (cdr (cdr (mouse-position)))))
- (cond
- ((null mouse-row))
- ((< mouse-row top)
- (mouse-scroll-subr start-window (- mouse-row top)
- nil start-point))
- ((>= mouse-row bottom)
- (mouse-scroll-subr start-window (1+ (- mouse-row bottom))
- nil start-point))))))
- (visible-mark-move-overlays))) ; ian, added this
-
-
- ;; Handle the terminating event if possible.
- (when (consp event)
- ;; Ensure that point is on the end of the last event.
- (when (and (setq end-point (posn-point (event-end event)))
- (eq (posn-window end) start-window)
- (integer-or-marker-p end-point)
- (/= start-point end-point))
- (mouse--drag-set-mark-and-point start-point
- end-point click-count))
-
- ;; Find its binding.
- (let* ((fun (key-binding (vector (car event))))
- (do-multi-click (and (> (event-click-count event) 0)
- (functionp fun)
- (not (memq fun '(mouse-set-point
- mouse-set-region))))))
- (if (and (/= (mark) (point))
- (not do-multi-click))
-
- ;; If point has moved, finish the drag.
- (let* (last-command this-command)
- (and mouse-drag-copy-region
- do-mouse-drag-region-post-process
- (let (deactivate-mark)
- (copy-region-as-kill (mark) (point)))))
-
- ;; Otherwise, run binding of terminating up-event.
- (if do-multi-click
- (goto-char start-point)
- (deactivate-mark)
- (unless moved-off-start
- ;; ian: poping the mark is a poor choice of behavior.
- ;; we should delete the mark instead.
- ;; The first way I found to delete it is to pop it first
- (pop-mark)
- (setq mark-ring (nbutlast mark-ring))))
-
- (when (and (functionp fun)
- (= start-hscroll (window-hscroll start-window))
- ;; Don't run the up-event handler if the window
- ;; start changed in a redisplay after the
- ;; mouse-set-point for the down-mouse event at
- ;; the beginning of this function. When the
- ;; window start has changed, the up-mouse event
- ;; contains a different position due to the new
- ;; window contents, and point is set again.
- (or end-point
- (= (window-start start-window)
- start-window-start)))
-
- (when (and on-link
- (= start-point (point))
- (mouse--remap-link-click-p start-event event))
-
- ;; If we rebind to mouse-2, reselect previous selected
- ;; window, so that the mouse-2 event runs in the same
- ;; situation as if user had clicked it directly. Fixes
- ;; the bug reported by juri@jurta.org on 2005-12-27.
- (if (or (vectorp on-link) (stringp on-link))
- (setq event (aref on-link 0))
- (select-window original-window)
- (setcar event 'mouse-2)
- ;; If this mouse click has never been done by the
- ;; user, it doesn't have the necessary property to be
- ;; interpreted correctly.
- (put 'mouse-2 'event-kind 'mouse-click)))
- (push event unread-command-events)))))))
-#+end_src
-
-** mouse 3
-#+begin_src emacs-lisp :tangle no
-
-
- (defun mouse3-range-mark (start click click-count)
- (let* ((range (mouse-start-end start click click-count))
- (beg (nth 0 range))
- (end (nth 1 range)))
- (cond ((<= click start)
- (set-mark beg))
- (t
- (set-mark end))))
- (visible-mark-move-overlays))
-
-
- (defun mouse3-set-mark (event)
- "in development"
- (interactive "e")
- (mouse-minibuffer-check event)
- ;; Use event-end in case called from mouse-drag-region.
- ;; If EVENT is a click, event-end and event-start give same value.
- (set-mark (posn-point (event-end event)))
- (visible-mark-move-overlays))
-
-
- (defun mouse3-func (start-event)
- "in development"
- (interactive "e")
-
- (run-hooks 'mouse-leave-buffer-hook)
-
- (mouse-minibuffer-check start-event)
- (setq mouse-selection-click-count-buffer (current-buffer))
- (push-mark (posn-point (event-end start-event)))
-
- (let* ((scroll-margin 0) ; Avoid margin scrolling (Bug#9541).
- (original-window (selected-window))
- ;; We've recorded what we needed from the current buffer and
- ;; window, now let's jump to the place of the event, where things
- ;; are happening.
- ;(_ (mouse-set-point start-event)) ; ian: commented, replaced
- (echo-keystrokes 0)
- (start-posn (event-start start-event))
- (start-point (posn-point start-posn))
- (start-window (posn-window start-posn))
- (start-window-start (window-start start-window))
- (start-hscroll (window-hscroll start-window))
- (bounds (window-edges start-window))
- (make-cursor-line-fully-visible nil)
- (top (nth 1 bounds))
- (bottom (if (window-minibuffer-p start-window)
- (nth 3 bounds)
- ;; Don't count the mode line.
- (1- (nth 3 bounds))))
- (click-count (1- (event-click-count start-event)))
- ;; Suppress automatic hscrolling, because that is a nuisance
- ;; when setting point near the right fringe (but see below).
- (auto-hscroll-mode-saved auto-hscroll-mode)
- (auto-hscroll-mode nil)
- moved-off-start event end end-point)
-
- (setq mouse-selection-click-count click-count)
- ;; In case the down click is in the middle of some intangible text,
- ;; use the end of that text, and put it in START-POINT.
- (if (< (mark) start-point) ; ian: change point to the mark
- (set-mark start-point)
- (visible-mark-move-overlays))
- (setq start-point (mark))
-
- (delete-overlay mouse-hi-ov) ; ian, added this.
-
- ;; Activate the region, using `mouse-start-end' to determine where
- ;; to put point and mark (e.g., double-click will select a word).
- (let ((range (mouse-start-end start-point start-point click-count)))
- (set-mark (nth 1 range)))
- (visible-mark-move-overlays)
-
-
- ;; Track the mouse until we get a non-movement event.
- (track-mouse
-
- (while (progn
- (setq event (read-event))
- (or (mouse-movement-p event)
- (memq (car-safe event) '(switch-frame select-window))))
- (unless (memq (car-safe event) '(switch-frame select-window))
-
- ;; Automatic hscrolling did not occur during the call to
- ;; `read-event'; but if the user subsequently drags the
- ;; mouse, go ahead and hscroll.
- (let ((auto-hscroll-mode auto-hscroll-mode-saved))
- (redisplay))
- (setq end (event-end event)
- end-point (posn-point end))
- ;; Note whether the mouse has left the starting position.
-
- (unless (eq end-point start-point)
- (setq moved-off-start t))
- (if (and (eq (posn-window end) start-window)
- (integer-or-marker-p end-point))
- (mouse3-range-mark start-point end-point click-count); ian, set mark
-
- ; do scrolling if needed
- (let ((mouse-row (cdr (cdr (mouse-position)))))
- (cond
- ((null mouse-row))
- ((< mouse-row top)
- (mouse-scroll-subr start-window (- mouse-row top)
- nil start-point))
- ((>= mouse-row bottom)
- (mouse-scroll-subr start-window (1+ (- mouse-row bottom))
- nil start-point))))))))
-
- ;; Handle the terminating event if possible.
- (when (consp event)
- ;; Ensure that point is on the end of the last event.
- (when (and (setq end-point (posn-point (event-end event)))
- (eq (posn-window end) start-window)
- (integer-or-marker-p end-point)
- (/= start-point end-point))
- ;(mouse--drag-set-mark-and-point start-point ; ian, set mark
- ;end-point click-count))
- (mouse3-range-mark start-point end-point click-count)); ian, set mark
-
- ;; Find its binding.
- (let* ((fun (key-binding (vector (car event))))
- (do-multi-click (and (> (event-click-count event) 0)
- (functionp fun)
- (not (memq fun '(mouse3-set-mark))))))
- (if (and (/= end-point start-point)
- (not do-multi-click))
-
- ;; If point has moved, finish the drag.
- (let* (last-command this-command)
- (and mouse-drag-copy-region
- do-mouse-drag-region-post-process
- (let (deactivate-mark)
- (copy-region-as-kill (mark) (point)))))
-
- ;; Otherwise, run binding of terminating up-event.
- (when do-multi-click
- (set-mark start-point)) ; ian, change this. why?
- (visible-mark-move-overlays)
-
-
- (when (and (functionp fun)
- (= start-hscroll (window-hscroll start-window))
- ;; Don't run the up-event handler if the window
- ;; start changed in a redisplay after the
- ;; mouse-set-point for the down-mouse event at
- ;; the beginning of this function. When the
- ;; window start has changed, the up-mouse event
- ;; contains a different position due to the new
- ;; window contents, and point is set again.
- (or end-point
- (= (window-start start-window)
- start-window-start)))
-
- (push event unread-command-events)))))))
-
-#+end_src
-
-
-
-
-
-* org mode
-
-#+begin_src emacs-lisp
-
-;; todo work on org-cycle-emulate-tab
-
-;; todo, this doesn't work for a non-standard keybind
-;;(setq org-special-ctrl-k t)
-
-;; todo, generally fix org mode keys
-;; todo, org-mark-element, unbdind from M-h, bind to mark defun key
-
-(org-babel-do-load-languages
- 'org-babel-load-languages
- '((emacs-lisp . t)
- (sh . t)))
-
-;; make shell work like interactive bash shell
-(setq org-babel-default-header-args:sh
- '((:results . "output") (:shebang . "#!/bin/bash -l")))
-
-;; my patch to output stderr
-(setq org-babel-use-error-buffer nil)
-
- ;
-;; org-mode manual suggests these, but I haven't used them.
-;;(global-set-key "\C-cl" 'org-store-link)
-;;(global-set-key "\C-ca" 'org-agenda)
-;; this got in the way of a haskell mode command
-;;(global-set-key "\C-cb" 'org-iswitchb)
-
-
-
- ;; org-src-tab-acts-natively t ; broken option. using next instead, todo fix
-
-(setq org-src-fontify-natively t ; make babel blocks nice
- org-adapt-indentation nil
- org-src-preserve-indentation t
- ;; The most basic logging is to keep track of when a TODO item was finished.
- org-log-done 'time
- ;; use a drawer to keep the logs tidy
- org-log-into-drawer t
- org-extend-today-until 0
- org-startup-truncated nil
- org-clock-persist t
- org-clock-mode-line-total 'today
- ;; global STYLE property values for completion
- org-global-properties (quote (("STYLE_ALL" . "habit")))
- org-special-ctrl-a/e t ;; home and end work special in headlines
- org-completion-use-ido t
- org-catch-invisible-edits 'smart)
-
- ;; non universally recommended settings
-(setq
- org-default-notes-file (concat org-directory "/a/t.org")
- org-agenda-files (quote ("/a/t.org"))
- org-mobile-directory "/p/org-mobile"
- org-mobile-inbox-for-pull "/p/from-mobile.org"
- org-directory "/p")
-
-;; modeilne populated from (org-clock-get-clocked-time)
-;; which is populated from the var org-clock-total-time
-;; which is populated by a function which starts from (org-clock-get-sum-start)
-;;
-
-(org-clock-persistence-insinuate)
-
-
-(defun time-to-org-day (time)
- (round (time-to-number-of-days
- (time-subtract time (list 0 (* 3600 org-extend-today-until) 0)))))
-
-
-(defun my-org-confirm-babel-evaluate (lang body)
- (not (or (string= (buffer-file-name) "/a/t.org")
- (string= (buffer-file-name) "/home/ian/.emacs.d/my-init.org")
- )))
-(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
-
-
-(defun org-time-stamp-with-time (arg)
- (interactive "P")
- ;; '(4) is the argument passed by universal prefix
- (org-time-stamp (if arg arg '(4)) t))
-
-(defun ian-org-work-time ()
- (interactive)
- (save-excursion
- (set-buffer "t.org")
- (goto-char (org-find-entry-with-id "ian-identifier-1"))
- (org-clock-in)))
-
-(defun ian-org-idle-time ()
- (interactive)
- (save-excursion
- (goto-char (org-find-entry-with-id "ian-identifier-2"))
- (set-buffer "t.org")
- (org-clock-in)))
-
-
-
-;; based on http://stackoverflow.com/questions/3758139/variable-pitch-for-org-mode-fixed-pitch-for-tables
-;; keywords: proportional font, monospace
-
-(defun variable-pitch-on ()
- (variable-pitch-mode 1))
-(add-hook 'fundamental-mode-hook 'variable-pitch-on)
-(add-hook 'org-mode-hook 'variable-pitch-on)
-(add-hook 'text-mode-hook 'variable-pitch-on)
-
-(set-face-attribute 'org-table nil :family (face-attribute 'fixed-pitch :family))
-(set-face-attribute 'org-code nil :family (face-attribute 'fixed-pitch :family))
-(set-face-attribute 'org-formula nil :family (face-attribute 'fixed-pitch :family))
-(set-face-attribute 'org-link nil :family (face-attribute 'fixed-pitch :family))
-(set-face-attribute 'org-block nil :family (face-attribute 'fixed-pitch :family))
-(set-face-attribute 'org-date nil :family (face-attribute 'fixed-pitch :family))
-
-
-(defun remove-org-binds ()
- (define-key org-mode-map (kbd "<M-return>") nil)
- (define-key org-mode-map (kbd "C-'") nil)
- (define-key org-mode-map (kbd "C-y") nil)
- (define-key org-mode-map (kbd "<C-return>") nil)
- (define-key org-mode-map (kbd "<C-M-kp-enter>") nil)
- (define-key org-mode-map (kbd "C-,") nil)
- (define-key org-mode-map (kbd "C-M-m") nil)
- (define-key org-mode-map (kbd "C-k") nil)
- (define-key org-mode-map (kbd "C-j") nil)
- (define-key org-mode-map (kbd "C-M-i") nil)
- (define-key org-mode-map (kbd "C-M-t") nil)
- (define-key org-mode-map (kbd "M-a") 'nil)
- (define-key org-mode-map (kbd "C-a") nil)
- (define-key org-mode-map (kbd "M-e") nil)
- (define-key org-mode-map (kbd "C-e") nil)
- (define-key org-mode-map (kbd "C-3") nil)
- (define-key org-mode-map (kbd "<M-left>") nil)
- (define-key org-mode-map (kbd "<M-right>") nil)
- (define-key org-mode-map (kbd "<S-return>") nil)
- (define-key org-mode-map (kbd "<tab>") nil)
- (define-key org-mode-map (kbd "<C-S-down>") nil)
- (define-key org-mode-map (kbd "<C-S-up>") nil)
- (define-key org-mode-map (kbd "<S-down>") nil)
- (define-key org-mode-map (kbd "<S-up>") nil)
- (define-key org-mode-map "\t" nil))
-(add-hook 'org-mode-hook 'remove-org-binds)
-
-#+end_src
-
-
-* org drill
-
-
-#+begin_src emacs-lisp :tangle no
-
- (setq
- ;; account actual time, not just scheduled time
- org-drill-adjust-intervals-for-early-and-late-repetitions-p t
-
- ;; still show leeches, but warn
- org-drill-leech-method (quote warn)
- ;; increased from default 20
- org-drill-maximum-duration 60
- ;; especially when starting, I want to drill hard
- org-drill-maximum-items-per-session nil
- ;; don't prompt to save buffer, auto-save will do that
- org-drill-save-buffers-after-drill-sessions-p nil
-;; this one deals with varying difficulty items better
-;; sm2 is similar, but more simplistic
- org-drill-spaced-repetition-algorithm (quote simple8)
-)
-#+end_src
-;; todo, make the prompting text reflect this number.
- ;; org-drill-failure-quality
-
-* os specific settings
-
-disabled cuz I have none yet
- #+begin_src emacs-lisp :tangle no
- (cond ((eq system-type 'darwin))
- ((eq system-type 'gnu/linux))
- ((eq system-type 'windows-nt))
- (t ))
- #+end_src
-
-
-* prog-mode-defaults
-
-#+begin_src emacs-lisp
-
-
-(defun prog-mode-defaults ()
- "Default coding hook, useful with any programming language."
- ;; so that I can do completion before the dialog pops up
- (local-set-key (kbd "<tab>") 'auto-complete)
- ;; todo, this is causing error message on loading file, prolly not working
- ;;(flycheck-mode +1)
- (setq ac-sources (delq 'ac-source-dictionary ac-sources))
- (highlight-symbol-mode)
- (make-local-variable 'column-number-mode)
- ;; this says do autofilling using newcomment.el. The "only" is a misnomer.
- (set (make-local-variable 'comment-auto-fill-only-comments) t)
- (column-number-mode t)
- (turn-on-smartparens-mode)
-
- ;; prettify lambdas
- (font-lock-add-keywords
- nil `(("(\\(lambda\\>\\)"
- (0 (progn (compose-region (match-beginning 1) (match-end 1)
- ,(make-char 'greek-iso8859-7 107))
- nil))))))
-(add-hook 'prog-mode-hook 'prog-mode-defaults)
-
-;; enable flyspell in prog mode. text mode is handled
-(add-hook 'prog-mode-hook 'flyspell-prog-mode)
-
-
-
-#+end_src
-
-** yank auto-indent
-#+begin_src emacs-lisp
-;; automatically indenting yanked text if in programming-modes
-(defvar yank-indent-modes
- '(LaTeX-mode TeX-mode)
- "Modes in which to indent regions that are yanked (or yank-popped).
-Only modes that don't derive from `prog-mode' should be listed here.")
-
-(defvar yank-indent-blacklisted-modes
- '(python-mode slim-mode haml-mode)
- "Modes for which auto-indenting is suppressed.")
-
-(defvar yank-advised-indent-threshold 2000
- "Threshold (# chars) over which indentation does not automatically occur.")
-
-(defun yank-advised-indent-function (beg end)
- "Do indentation, as long as the region isn't too large."
- (if (<= (- end beg) yank-advised-indent-threshold)
- (indent-region beg end nil)))
-
-(defadvice yank (after yank-indent activate)
- "If current mode is one of 'yank-indent-modes,
-indent yanked text (with prefix arg don't indent)."
- (if (and (not (ad-get-arg 0))
- (not (member major-mode yank-indent-blacklisted-modes))
- (or (derived-mode-p 'prog-mode)
- (member major-mode yank-indent-modes)))
- (let ((transient-mark-mode nil))
- (yank-advised-indent-function (region-beginning) (region-end)))))
-
-(defadvice yank-pop (after yank-pop-indent activate)
- "If current mode is one of 'yank-indent-modes,
-indent yanked text (with prefix arg don't indent)."
- (if (and (not (ad-get-arg 0))
- (not (member major-mode yank-indent-blacklisted-modes))
- (or (derived-mode-p 'prog-mode)
- (member major-mode yank-indent-modes)))
- (let ((transient-mark-mode nil))
- (yank-advised-indent-function (region-beginning) (region-end)))))
-
-#+end_src
-
-
-* shell mode
- #+begin_src emacs-lisp
-;; avoid stupid git crap like "warning, terminal not fully functional"
-(setenv "PAGER" "cat")
-;; don't store successive duplicates in comint command history
-(setq comint-input-ignoredups t)
-
-(defun add-mode-line-dirtrack ()
- (add-to-list 'mode-line-buffer-identification
- '(:propertize (" " default-directory " ") face dired-directory)))
-(add-hook 'shell-mode-hook 'add-mode-line-dirtrack)
-
-
-;; don't fully understand it, but it works.
-;; http://www.emacswiki.org/emacs/ShellDirtrackByProcfs
-(defun track-shell-directory/procfs ()
- (shell-dirtrack-mode 0)
- (add-hook 'comint-preoutput-filter-functions
- (lambda (str)
- (prog1 str
- (when (string-match comint-prompt-regexp str)
- (cd (file-symlink-p
- (format "/proc/%s/cwd" (process-id
- (get-buffer-process
- (current-buffer)))))))))
- nil t))
-(setq comint-buffer-maximum-size 100000)
-(add-to-list 'comint-output-filter-functions 'comint-truncate-buffer)
-(defun new-shell ()
- (interactive)
- (shell (generate-new-buffer-name "*shell*")))
-;;
-(defun shell-wrap (prefix)
-"wrap the shell function, automatically generate a new name for a prefix arg"
- (interactive "P")
- (if prefix
- (new-shell)
- (shell)))
-
-(add-hook 'shell-mode-hook 'track-shell-directory/procfs)
-#+end_src
-* smartparens
-the melpa git version had a catastrophic bug I reported.
-downgraded to marmalade version and everything is working fine.
-#+begin_src emacs-lisp
-(require 'smartparens-config)
-(show-smartparens-global-mode t)
-
-
-(defun gp/sp/pair-on-newline-and-indent (id action context)
- "Open a new brace or bracket expression, with relevant newlines and indent. "
- (save-excursion
- (newline)
- (indent-according-to-mode))
- (indent-according-to-mode))
-
-;; when opening a pair, and then inserting a newline, push the closing pair to another newline
-(sp-pair "{" nil :post-handlers
- '(:add ((lambda (id action context)
- (gp/sp/pair-on-newline-and-indent id action context)) (kbd "<return>"))))
-(sp-pair "[" nil :post-handlers
- '(:add ((lambda (id action context)
- (gp/sp/pair-on-newline-and-indent id action context)) (kbd "<return>"))))
-
-
-;; in my version, this is not a pairing.
-;; not sure if it is in a future version since I reverted to marmalade
-;; Don't need c-comments in strings -- they frustrate filename globs
-;; (sp-pair "/*" nil :unless '(sp-in-string-p))
-
-;; Don't need quotes to pair next to words
-(sp-pair "\"" nil :unless '(sp-point-before-word-p sp-point-after-word-p))
-(sp-pair "'" nil :unless '(sp-point-before-word-p sp-point-after-word-p))
-
-
-;; todo, testout these mode specific settings from graphene.
-;; Ruby-specific pairs and handlers
-(require 'smartparens-ruby)
-
-;; Markdown
-(sp-local-pair '(markdown-mode gfm-mode) "*" "*"
- :unless '(sp-in-string-p)
- :actions '(insert wrap))
-
-;; Except in HTML
-(sp-local-pair 'html-mode "\"" nil :unless '(:rem sp-point-after-word-p))
-
-
- #+end_src
-* smex
- todo; check out smex-show-unbound-commands shows frequently used commands that have no key bindings.
- #+begin_src emacs-lisp
-; these must be before smex-initialize
- (setq
- smex-save-file "~/.emacs.d/.smex-items")
-
- (smex-initialize)
- #+end_src
-* speedbar
-(sr-speedbar-close)
-(sr-speedbar-open)
-
-** todo, disabled cuz of broken package
- #+begin_src emacs-lisp :tangle no
-(require 'sr-speedbar)
- (setq speedbar-hide-button-brackets-flag t ;; didn't notice a diff
- speedbar-file-unshown-regexp "flycheck-.*"
- sr-speedbar-width 40
- sr-speedbar-width-x 40
- sr-speedbar-auto-refresh nil
- sr-speedbar-skip-other-window-p t
- sr-speedbar-right-side nil
-speedbar-hide-button-brackets-flag nil)
- #+end_src
-* spell correction
-#+begin_src emacs-lisp
- (setq
- ispell-program-name "hunspell"
- ispell-silently-savep t) ; don't prompt to save personal dictionary
-
- (require 'rw-hunspell)
-#+end_src
-rw-hunspell sets up hunspell dictionary automagically.
-
-
-Rant: Hunspell SHOULD be standard. its used by firefox and openoffice and
-osx. In contrast, the first few words I added to aspell dictionary were
-"emacs" "customizable" and "timestamp". Hunspell already has those,
-thank god.
-
-ispell-personal-dictionary does not document where the hunspell
-dictionary goes by default, but it is ~/.hunspell_en_US for me
-
-
-* tex
-#+begin_src emacs-lisp
-(setq-default TeX-PDF-mode t) ; use pdf
-
-; more sensible defaults based on info manual quickstart
- (setq TeX-auto-save t)
- (setq TeX-parse-self t)
-
-
-#+end_src
-* undo tree
-#+begin_src emacs-lisp
-
- ;; undo-tree checks for minor modes which override
- ;; its minor mode keymap, and sets global keybinds if
- ;; that happens. this will prevent that, but I have no
- ;; reason to do that, so it is commented.
- ;; (defun undo-tree-overridden-undo-bindings-p () nil)
-
-;; todo, send patch undo-tree-visualize should scroll with the scroll key, instead of just pgup pgdn (aka next/prior)
- (global-undo-tree-mode)
- ;; disabled due to bug, something like unknown entry in undo tree canary
- ;; (setq undo-tree-auto-save-history t)
- (setq undo-outer-limit 100000000 ; per undo command
- undo-limit 500000000 ; undo history limit
- undo-strong-limit 600000000) ; undo history limit plus some extra
-
-
-#+end_src
-
-* visible mark mode
-
-these colors were better for dark theme
-#+begin_src emacs-lisp :tangle no
-
-
-
-(defface visible-mark-face1
- '((((type tty) (class mono)))
- (t (:background "LimeGreen"))) "")
- (defface visible-mark-face2
- '((((type tty) (class mono)))
- (t (:background "red4"))) "")
- (defface visible-mark-forward-face1
- '((((type tty) (class mono)))
- (t (:background "dark magenta"))) "")
- (defface visible-mark-active
- '((((type tty) (class mono)))
- (t (:background "gold"))) "")
- (defface mouse-cursor-face
- '((((type tty) (class mono)))
- (t (:background "DeepPink1"))) "")
-
-#+end_src
-
-
-#+begin_src emacs-lisp
-
-(add-to-list 'load-path "~/.emacs.d/src/visible-mark")
-
- ;; since it is not easy to change the mark overlay priority, I change this one.
- (setq show-paren-priority 999)
-
-
- (defface visible-mark-active
- '((((type tty) (class mono)))
- (t (:background "magenta"))) "")
-
-
-
- (defface mouse-cursor-face
- '((((type tty) (class mono)))
- (t (:background "DeepPink1"))) "")
-
-
- (require 'visible-mark)
-
-(setq visible-mark-faces '(visible-mark-face1 visible-mark-face2))
- (setq visible-mark-forward-faces '(visible-mark-forward-face1))
-
-
- ; highlight the last 2 marks
- (setq visible-mark-max 2)
- ; highlight 1 forward mark
- (setq visible-mark-forward-max 1)
- ; globally activate visible-mark-mode
- (global-visible-mark-mode +1)
-
-
-;; todo, it doesn't seem to be exposed in elisp, but it would be nice
-;; if I could define overlay faces to use inverse foreground color
-
-
-#+end_src
-
-#+RESULTS:
-: t
* key binds. keep at end of file
#+end_src
** named commands
+*** gdb
+gdb-many-windows
*** tramp sudo
/ssh:host|sudo:host:
when in the same session, you can then do:
*** org insert table row
[org-shiftmetadown/up]
-*** toggle line continuation / truncation / wrap :drill:
-SCHEDULED: <2014-04-07 Mon>
-:PROPERTIES:
-:ID: 5f3f567a-0926-4d92-81f3-4e4cd6070af2
-:DRILL_LAST_INTERVAL: 28.6736
-:DRILL_REPEATS_SINCE_FAIL: 5
-:DRILL_TOTAL_REPEATS: 5
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 3.4
-:DRILL_EASE: 2.666
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:37>
-:END:
- [toggle-truncate-lines]
-*** auto-save on/off :drill:
-SCHEDULED: <2014-05-13 Tue>
-:PROPERTIES:
-:ID: 462f859d-1a06-46a3-ac72-6ffe5b4417c9
-:DRILL_LAST_INTERVAL: 71.5839
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.75
-:DRILL_EASE: 4.85
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:11>
-:END:
- [my-as-on/my-as-off]
+*** toggle line continuation / truncation / wrap
+ toggle-truncate-lines
+*** auto-save on/off
+ my-as-on/my-as-off
*** toggle menu bar
-[menu-bar-mode]
-*** show abbreviations :drill:
-SCHEDULED: <2014-03-24 Mon>
-:PROPERTIES:
-:ID: 479a2ced-b952-4088-a6e3-862cd37693a9
-:DRILL_LAST_INTERVAL: 32.7466
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.0
-:DRILL_EASE: 3.204
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 18:03>
-:END:
-[list-abbrevs]
+menu-bar-mode
+*** show abbreviations
+list-abbrevs
*** rename-file-and-buffer
*** ediff-buffers
*** executable-make-buffer-file-executable-if-script-p
make a script executable
*** (setq lazy-highlight-cleanup nil)
+keep search highlight on after search is done
*** auto-revert-tail-mode
tail a file
*** trash-file-and-buffer
toggle word wrap.
** compound commands
*** C-xc
-:PROPERTIES:
-:ID: d0802daa-9281-4a9f-ab4a-47d9f7ef7cfd
-:END:
-exit
-*** [C-x x] :drill:
-SCHEDULED: <2014-03-24 Mon>
-:PROPERTIES:
-:ID: 2f7d1353-3c20-4e00-95ea-1f84c4d87fc1
-:DRILL_LAST_INTERVAL: 32.7466
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.0
-:DRILL_EASE: 3.204
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 18:03>
-:END:
+exit0
+*** C-x s
save file
-*** [C-x e] :drill:
-SCHEDULED: <2014-03-27 Thu>
-:PROPERTIES:
-:ID: b802eeb8-ddcd-4778-844a-b6e737b54d7d
-:DRILL_LAST_INTERVAL: 50.6823
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 5.0
-:DRILL_EASE: 5.815
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:41>
-:END:
+*** C-x e
eval last sexp
*** C-x u
[undo-tree-visualize]
[undo-tree save/restore state via register]
*** C-c -
[org insert table horizontal line or create list]
-*** [C-x tab] :drill:
-SCHEDULED: <2014-03-24 Mon>
-:PROPERTIES:
-:ID: ceb701d7-3d44-4781-ae23-7309ca887a01
-:DRILL_LAST_INTERVAL: 32.7466
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.0
-:DRILL_EASE: 3.204
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:50>
-:END:
-dumb indent
+*** C-x tab
+indent/dedent region
[shift-left and shift-right are default for indenting by tab stop,
and they are only defined as lambdas so I copy them here
(next (indent--next-tab-stop current 'prev)))
(indent-rigidly beg end (- next current))))))
#+end_src
-]
*** C-x *
[calc-dispatch]
*** C-x =
#+begin_src emacs-lisp
(global-set-key (kbd "C-x C-b") 'ibuffer)
#+end_src
+
+*** C-x r c
+rectangular clear, replace area with whitespace
** gnus
searching overview.
3 types:
ingroup searching
nnir searching with notmuch, specific group (not sure if it can do multiple)
search all groups with mairix
-*** [a]
+*** a]
compose new message
-*** [C-c C-c]
+*** C-c C-c]
send message
-*** [s]
+*** s]
save newsrc file, alterations to groups.
-*** [g]
+*** g]
gnus refresh / get new
-*** [m]
+*** m]
gnus new message
-*** [F]
+*** F]
gnus quoted reply all
-*** [e]
+*** e]
gnus draft edit message
-*** [delete]
+*** delete]
gnus delete draft
#+begin_src emacs-lisp
(add-hook 'gnus-startup-hook
(define-key gnus-summary-mode-map (kbd "<delete>") 'gnus-summary-delete-article)))
#+end_src
-*** [b]
+*** b]
mairix search
#+begin_src emacs-lisp
(add-hook 'gnus-startup-hook
(define-key gnus-group-mode-map "b" 'nnmairix-search)
(define-key gnus-summary-mode-map "b" 'nnmairix-search)))
#+end_src
-*** [B m]
+*** B m]
move message, or messages in region
-*** [#]
+*** #]
mark article, move with B m
-*** [B delete]
+*** B delete]
gnus delete draft
-*** [/ plus x a / b]
+*** / plus x a / b]
search current group (or see info manual for more groups),
using the gnus native search (its slow, do a notmuch or mairix search instead)
x= extra (ie. to)
/ = subject
b = body
see C-h m for a full list
-*** [ G G ]
+*** G G ]
do a nnir notmuch search, for the group on the current line
-*** [ A T ]
+*** A T ]
jump to thread from nnir group
-*** [marks]
+*** marks]
! = saved for later
E = expired
M-& apply process mark to a non-process mark command
-*** [S D e]
+*** S D e]
edit as new
+*** T k / C-M-k
+maybe rebind this to a shorter keybind, like del
+gnus-summary-kill-thread
** message mode
-*** [C-ck]
+*** C-ck]
discard message
** notmuch
-*** [space]
+*** space]
notmuch advance to next message/thread
** readline / bash / .inputrc
-*** [M-0-9]
-SCHEDULED: <2014-05-13 Tue>
-:PROPERTIES:
-:ID: dac68f2e-37c2-448e-861d-0554e51f1414
-:DRILL_LAST_INTERVAL: 71.5839
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.75
-:DRILL_EASE: 4.85
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:10>
-:END:
-bash digit-argument
-
-removed drill from all these because I'm using emacs for shell now
-*** [C-2]
-SCHEDULED: <2014-03-15 Sat>
-:PROPERTIES:
-:ID: d2e87812-6ab7-432f-ad7c-4281c0e3b86b
-:DRILL_LAST_INTERVAL: 12.979
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.333
-:DRILL_EASE: 2.626
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:00>
-:END:
-terminal X paste
-*** [C-3]
-SCHEDULED: <2014-03-15 Sat>
-:PROPERTIES:
-:ID: 3b156730-eb92-4149-b4ce-f93a9098d2b4
-:DRILL_LAST_INTERVAL: 12.979
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.333
-:DRILL_EASE: 2.626
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:00>
-:END:
-terminal open file manager
-*** [C-q]
-SCHEDULED: <2014-03-12 Wed>
-:PROPERTIES:
-:ID: ed6a19de-d000-4469-9dd9-7b9e35f6c751
-:DRILL_LAST_INTERVAL: 2.8975
-:DRILL_REPEATS_SINCE_FAIL: 2
-:DRILL_TOTAL_REPEATS: 10
-:DRILL_FAILURE_COUNT: 12
-:DRILL_AVERAGE_QUALITY: 2.692
-:DRILL_EASE: 2.311
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:33>
-:END:
-bash exchange-point-and-mark
-
-*** [C-M-q]
-SCHEDULED: <2014-03-14 Fri>
-:PROPERTIES:
-:ID: 9827eb7e-532e-41fb-8d91-8c95c23553f5
-:DRILL_LAST_INTERVAL: 11.6739
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.333
-:DRILL_EASE: 2.626
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:09>
-:END:
-quoted insert
-*** [C-w]
-SCHEDULED: <2014-04-07 Mon>
-:PROPERTIES:
-:ID: 58fea89a-def9-4aac-95d4-fdd63fde8097
-:DRILL_LAST_INTERVAL: 28.6736
-:DRILL_REPEATS_SINCE_FAIL: 5
-:DRILL_TOTAL_REPEATS: 5
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 3.4
-:DRILL_EASE: 2.666
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:36>
-:END:
- bash kill-region
-*** [C-e]
-SCHEDULED: <2014-03-27 Thu>
-:PROPERTIES:
-:ID: 3ee7662f-3ac7-46ff-afe7-73244656d48b
-:DRILL_LAST_INTERVAL: 50.6823
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 5.0
-:DRILL_EASE: 5.815
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:40>
-:END:
- bash yank-last-arg
-*** C-r
-:PROPERTIES:
-:ID: 579a9008-0758-4ba9-a52f-175f264fe96a
-:END:
- bash history-search-backward
-*** [C-t]
-SCHEDULED: <2014-04-04 Fri>
-:PROPERTIES:
-:ID: 25e737fe-52c4-452b-ab93-037575375579
-:DRILL_LAST_INTERVAL: 26.2331
-:DRILL_REPEATS_SINCE_FAIL: 5
-:DRILL_TOTAL_REPEATS: 5
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 3.2
-:DRILL_EASE: 2.554
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:36>
-:END:
- shell-expand-line, expand like bash does u hit enter
-*** [C-a]
-SCHEDULED: <2014-04-06 Sun>
-:PROPERTIES:
-:ID: 384b3337-3cb0-4b3b-8a1a-8ae299ae212b
-:DRILL_LAST_INTERVAL: 27.9921
-:DRILL_REPEATS_SINCE_FAIL: 5
-:DRILL_TOTAL_REPEATS: 5
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 3.6
-:DRILL_EASE: 2.802
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:37>
-:END:
- bash comment-line
-*** [C-s]
-SCHEDULED: <2014-03-10 Mon>
-:PROPERTIES:
-:ID: 4b5c71f9-6035-4b92-bcad-e400e5e25d66
-:DRILL_LAST_INTERVAL: 8.225
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 7
-:DRILL_FAILURE_COUNT: 4
-:DRILL_AVERAGE_QUALITY: 2.879
-:DRILL_EASE: 2.399
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 20:57>
-:END:
- bash yank-nth-arg
- yank $1 of last argument, or nth if prefixed with a digit argument
-*** [C-d]
-SCHEDULED: <2014-03-12 Wed>
-:PROPERTIES:
-:ID: f5da97c1-6e3c-44dd-a2f1-7dacd7f523da
-:DRILL_LAST_INTERVAL: 9.8132
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 7
-:DRILL_FAILURE_COUNT: 3
-:DRILL_AVERAGE_QUALITY: 3.21
-:DRILL_EASE: 2.559
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:04>
-:END:
- bash undo
-*** [C-f]
-SCHEDULED: <2014-05-13 Tue>
-:PROPERTIES:
-:ID: 0f1def18-0d94-45e7-b258-f621e67cefd7
-:DRILL_LAST_INTERVAL: 71.5839
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.75
-:DRILL_EASE: 4.85
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:11>
-:END:
-bash menu-complete
-*** [C-g]
-SCHEDULED: <2014-03-10 Mon>
-:PROPERTIES:
-:ID: 263e9479-de1d-4e78-8600-5a0f3a8e2dd9
-:DRILL_LAST_INTERVAL: 8.0608
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 8
-:DRILL_FAILURE_COUNT: 5
-:DRILL_AVERAGE_QUALITY: 2.966
-:DRILL_EASE: 2.439
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:04>
-:END:
- bash edit-and-execute-command
-*** C-z
-*** C-x
- emacs hard to rebind
- looks like it actually wouldn't be that hard.
- possibly take the output from bind -p, make all those keys undefined.
-*** C-c
- quit/cancel
-*** C-v
- yank, aka paste
-*** C-M-v
- yank-pop
-*** [C-b]
-SCHEDULED: <2014-03-14 Fri>
-:PROPERTIES:
-:ID: 1a688c40-4bba-4053-a28b-0e1e8d3f4985
-:DRILL_LAST_INTERVAL: 4.9208
-:DRILL_REPEATS_SINCE_FAIL: 2
-:DRILL_TOTAL_REPEATS: 8
-:DRILL_FAILURE_COUNT: 4
-:DRILL_AVERAGE_QUALITY: 3.066
-:DRILL_EASE: 2.487
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:33>
-:END:
- bash menu-complete-backward
-*** tab
-completion
-*** [C-tab]
-SCHEDULED: <2014-03-14 Fri>
-:PROPERTIES:
-:ID: 75d57537-8a32-4a18-982e-6d6f756a9ba6
-:DRILL_LAST_INTERVAL: 12.2744
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 2
-:DRILL_AVERAGE_QUALITY: 3.667
-:DRILL_EASE: 2.855
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:09>
-:END:
-terminal find
-*** [C-left/right]
-SCHEDULED: <2014-03-27 Thu>
-:PROPERTIES:
-:ID: 5587c07b-c003-470f-bef4-fa55f00524ff
-:DRILL_LAST_INTERVAL: 50.6823
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 5.0
-:DRILL_EASE: 5.815
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:41>
-:END:
- forward/backward-word
-
-*** [C-u]
-SCHEDULED: <2014-03-19 Wed>
-:PROPERTIES:
-:ID: b5342b6b-f14f-4a6b-99d8-110fdef243f2
-:DRILL_LAST_INTERVAL: 24.3844
-:DRILL_REPEATS_SINCE_FAIL: 5
-:DRILL_TOTAL_REPEATS: 5
-:DRILL_FAILURE_COUNT: 2
-:DRILL_AVERAGE_QUALITY: 3.0
-:DRILL_EASE: 2.456
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-02-23 Sun 01:51>
-:END:
- bash backward-kill-word
-*** [C-i]
-SCHEDULED: <2014-03-14 Fri>
-:PROPERTIES:
-:ID: 6e306a04-8f21-4142-8c00-8a87a3544d6e
-:DRILL_LAST_INTERVAL: 11.6739
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.333
-:DRILL_EASE: 2.626
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 20:58>
-:END:
-terminal find up
-[ terminal crap, duplicate of tab ]
-*** [C-o]
-SCHEDULED: <2014-03-15 Sat>
-:PROPERTIES:
-:ID: 40b6d9ce-2427-4905-b444-d6d90c5a4da4
-:DRILL_LAST_INTERVAL: 23.5247
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.5
-:DRILL_EASE: 2.73
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:25>
-:END:
- bash operate-and-get-next, submit and bring up next item in history
-*** [C-p]
-SCHEDULED: <2014-03-11 Tue>
-:PROPERTIES:
-:ID: 4956027e-c5da-48de-8925-6f6b6dd98cec
-:DRILL_LAST_INTERVAL: 1.575
-:DRILL_REPEATS_SINCE_FAIL: 1
-:DRILL_TOTAL_REPEATS: 9
-:DRILL_FAILURE_COUNT: 8
-:DRILL_AVERAGE_QUALITY: 2.597
-:DRILL_EASE: 2.265
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:38>
-:END:
-bash dabbrev-expand,
- complete historical command names
-*** C-h
- terminal incompatible junk
-*** [C-k]
-SCHEDULED: <2014-05-09 Fri>
-:PROPERTIES:
-:ID: f91ff161-8d8c-4f47-beb5-09f86bf774d5
-:DRILL_LAST_INTERVAL: 67.6174
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 4.75
-:DRILL_EASE: 4.85
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:10>
-:END:
- bash kill-line, to end of line
-*** [C-l]
-SCHEDULED: <2014-05-13 Tue>
-:PROPERTIES:
-:ID: 4798acc1-4fc8-406e-bc95-8131cfa255a5
-:DRILL_LAST_INTERVAL: 71.5839
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.75
-:DRILL_EASE: 4.85
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:12>
-:END:
- bash clear screen
-*** [C-m]
-SCHEDULED: <2014-03-14 Fri>
-:PROPERTIES:
-:ID: 119a0a90-9253-4131-b0c8-5aa7d8cf2259
-:DRILL_LAST_INTERVAL: 11.6739
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.333
-:DRILL_EASE: 2.626
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 20:58>
-:END:
+*** C-m
[--------]
#+begin_src emacs-lisp
(add-hook 'comint-mode-hook
(lambda ()
(define-key comint-mode-map "\C-m" nil)))
-
#+end_src
-*** [C-space]
-SCHEDULED: <2014-03-12 Wed>
-:PROPERTIES:
-:ID: 803e2480-4e11-41d0-a261-4f5930a7f9a9
-:DRILL_LAST_INTERVAL: 10.0687
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 6
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 2.875
-:DRILL_EASE: 2.397
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:06>
-:END:
-bash set mark
-*** [C-delete]
-SCHEDULED: <2014-03-15 Sat>
-:PROPERTIES:
-:ID: 3d0c188b-3cf0-4f0a-83c8-78f6e4040ee5
-:DRILL_LAST_INTERVAL: 24.4352
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.75
-:DRILL_EASE: 2.929
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:44>
-:END:
- bash delete word
+terminal crap, duplicate of enter
+
** isearch
-*** [C-w] :drill:
-SCHEDULED: <2014-03-27 Thu>
-:PROPERTIES:
-:ID: f0e2b6e2-809b-40c2-8d72-0f7e35eda9b3
-:DRILL_LAST_INTERVAL: 50.6823
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 5.0
-:DRILL_EASE: 5.815
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:40>
-:END:
+*** C-w
paste word/char under cursor into isearch
-*** [M-n/p] :drill:
-SCHEDULED: <2014-03-27 Thu>
-:PROPERTIES:
-:ID: b3692e47-458e-41a0-b2be-c5f61b4eadbd
-:DRILL_LAST_INTERVAL: 50.6823
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 5.0
-:DRILL_EASE: 5.815
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:41>
-:END:
+*** M-n/p
next/previous isearch history
-*** [C-o] :drill:
-SCHEDULED: <2014-03-11 Tue>
-:PROPERTIES:
-:ID: 8e36b562-7e0c-45e6-a41b-3cd96c134b33
-:DRILL_LAST_INTERVAL: 19.9622
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.5
-:DRILL_EASE: 2.73
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:30>
-:END:
+*** C-o
isearch-occur
Activate occur easily inside isearch
-[
from starter-kit
#+begin_src emacs-lisp
- (define-key isearch-mode-map (kbd "C-o")
- (lambda () (interactive)
- (let ((case-fold-search isearch-case-fold-search))
- (occur (if isearch-regexp
- isearch-string
- (regexp-quote isearch-string))))))
+(define-key isearch-mode-map (kbd "C-o")
+ (lambda () (interactive)
+ (let ((case-fold-search isearch-case-fold-search))
+ (occur (if isearch-regexp
+ isearch-string
+ (regexp-quote isearch-string))))))
#+end_src
-]
-*** [m-r]
+*** m-r
#+begin_src emacs-lisp
- (defun my-isearch-toggle-regexp ()
- (interactive)
- (isearch-toggle-regexp)
- (cond (isearch-regexp
- (global-set-key (kbd "C-r") 'isearch-backward-regexp)
- (define-key global-map (kbd "<kp-add>") 'isearch-forward-regexp))
- (t
- (global-set-key (kbd "C-r") 'isearch-backward)
- (define-key global-map (kbd "<kp-add>") 'isearch-forward))))
- (define-key isearch-mode-map (kbd "M-r") 'my-isearch-toggle-regexp)
+(defun my-isearch-toggle-regexp ()
+ (interactive)
+ (isearch-toggle-regexp)
+ (cond (isearch-regexp
+ (global-set-key (kbd "C-r") 'isearch-backward-regexp)
+ (define-key global-map (kbd "<f12>") 'isearch-forward-regexp)
+ (define-key global-map (kbd "<kp-add>") 'isearch-forward-regexp))
+ (t
+ (global-set-key (kbd "C-r") 'isearch-backward)
+ (define-key global-map (kbd "<f12>") 'isearch-forward)
+ (define-key global-map (kbd "<kp-add>") 'isearch-forward))))
+(define-key isearch-mode-map (kbd "M-r") 'my-isearch-toggle-regexp)
#+end_src
** icomplete
*** C-. C-,
icomplete-forward/backward-completions
-** ido
-*** [C-j] :drill:
-SCHEDULED: <2014-04-01 Tue>
-:PROPERTIES:
-:ID: 9cc3392d-00a1-4564-8c57-b418a20d9235
-:DRILL_LAST_INTERVAL: 22.6411
-:DRILL_REPEATS_SINCE_FAIL: 5
-:DRILL_TOTAL_REPEATS: 6
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 2.833
-:DRILL_EASE: 2.378
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:34>
-:END:
-ido-find-file create file
-*** [//] :drill:
-SCHEDULED: <2014-03-27 Thu>
-:PROPERTIES:
-:ID: 18ce7d51-93ca-4d41-8e8d-1958cff9c726
-:DRILL_LAST_INTERVAL: 50.6823
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 5.0
-:DRILL_EASE: 5.815
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:40>
-:END:
-ido goto root
-*** [C-k] :drill:
-:PROPERTIES:
-:ID: af4cc865-fe0c-424b-aa5b-2097320d6fb6
-:DRILL_LAST_INTERVAL: 0.0
-:DRILL_REPEATS_SINCE_FAIL: 0
-:DRILL_TOTAL_REPEATS: 5
-:DRILL_FAILURE_COUNT: 2
-:DRILL_AVERAGE_QUALITY: 3.083
-:DRILL_EASE: 2.496
-:DRILL_LAST_QUALITY: 2
-:DRILL_LAST_REVIEWED: <2014-04-14 Mon 11:31>
-:END:
- ido kill buffer/file
-*** [C-d] :drill:
-SCHEDULED: <2014-04-04 Fri>
-:PROPERTIES:
-:ID: c93d6e0c-ae33-45aa-9610-ce33cfc406a0
-:DRILL_LAST_INTERVAL: 25.8141
-:DRILL_REPEATS_SINCE_FAIL: 5
-:DRILL_TOTAL_REPEATS: 5
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 3.0
-:DRILL_EASE: 2.456
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:37>
-:END:
-ido open dired buffer
-*** [M-d] :drill:
-SCHEDULED: <2014-03-11 Tue>
-:PROPERTIES:
-:ID: 8eab4299-207f-4a4a-a698-38f31cb5ff1b
-:DRILL_LAST_INTERVAL: 1.7651
-:DRILL_REPEATS_SINCE_FAIL: 1
-:DRILL_TOTAL_REPEATS: 6
-:DRILL_FAILURE_COUNT: 6
-:DRILL_AVERAGE_QUALITY: 2.583
-:DRILL_EASE: 2.258
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:38>
-:END:
-ido search within all subdirectories
-*** [M-m] :drill:
-SCHEDULED: <2014-03-10 Mon>
-:PROPERTIES:
-:ID: cb7f6420-1f70-4ddb-ad73-83c3b22ef0e2
-:DRILL_LAST_INTERVAL: 7.6174
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 8
-:DRILL_FAILURE_COUNT: 4
-:DRILL_AVERAGE_QUALITY: 2.583
-:DRILL_EASE: 2.257
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:01>
-:END:
-ido create subdirectory
-*** [M-s] :drill:
-SCHEDULED: <2014-04-01 Tue>
-:PROPERTIES:
-:ID: eb798918-4dd2-40e1-9d08-82ade145869d
-:DRILL_LAST_INTERVAL: 23.2268
-:DRILL_REPEATS_SINCE_FAIL: 5
-:DRILL_TOTAL_REPEATS: 6
-:DRILL_FAILURE_COUNT: 4
-:DRILL_AVERAGE_QUALITY: 3.083
-:DRILL_EASE: 2.496
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:34>
-:END:
-ido search recently used directories
-*** [M-n/p] :drill:
-SCHEDULED: <2014-03-14 Fri>
-:PROPERTIES:
-:ID: db965c9e-feb0-4213-b631-7cfa0208cfdb
-:DRILL_LAST_INTERVAL: 23.0811
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 3.75
-:DRILL_EASE: 2.929
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:36>
-:END:
-ido next/previous recently used directory
-*** [C-s]
-**** TODO implement this keybind, normally ctrl-space
-ido use current pattern and start a new one
** info
-*** [[]]
-goto next-prev node regardless of structure
-*** [f]
-goto cross reference
-*** [x]
+*** [, ]
+forward / previous node, descend/ascend tree as needed
+*** x
Info-follow-nearest-node
#+begin_src emacs-lisp
(define-key Info-mode-map "x" 'Info-follow-nearest-node)
#+end_src
m, f, n, p or ^ command, depending on where you click.
** auto-complete
-*** [S-return] :drill:
-SCHEDULED: <2014-03-11 Tue>
-:PROPERTIES:
-:ID: b9e47939-8033-4adc-8bf4-734b25f4fc47
-:DRILL_LAST_INTERVAL: 2.0943
-:DRILL_REPEATS_SINCE_FAIL: 1
-:DRILL_TOTAL_REPEATS: 7
-:DRILL_FAILURE_COUNT: 3
-:DRILL_AVERAGE_QUALITY: 2.633
-:DRILL_EASE: 2.282
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:38>
-:END:
-ac-expand, then select next candidates
-*** [C-s] :drill:
-SCHEDULED: <2014-03-14 Fri>
-:PROPERTIES:
-:ID: 828416d4-7ce4-4817-aede-068b80f3041f
-:DRILL_LAST_INTERVAL: 23.0811
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 3.75
-:DRILL_EASE: 2.929
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:38>
-:END:
-ac filter completions
+*** S-return
+select next completion candidate
+ac-expand
** agenda
-*** [t] :drill:
-SCHEDULED: <2014-03-22 Sat>
-:PROPERTIES:
-:ID: 173e9cec-e401-4f03-90cc-72cba462b2f2
-:DRILL_LAST_INTERVAL: 31.1381
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.75
-:DRILL_EASE: 2.929
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:50>
-:END:
+*** t]
agenda cycle todo state
** org
-*** [C-c / t] :drill:
-SCHEDULED: <2014-03-13 Thu>
-:PROPERTIES:
-:ID: a5775c4f-c5d3-4024-a280-6628c5e7ab39
-:DRILL_LAST_INTERVAL: 10.7692
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 6
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 3.167
-:DRILL_EASE: 2.537
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:09>
-:END:
-show todo items
-*** [S-<tab>] :drill:
-SCHEDULED: <2014-03-27 Thu>
-:PROPERTIES:
-:ID: 1c1a4061-5cff-4826-aec2-8f677aab33a9
-:DRILL_LAST_INTERVAL: 50.6823
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 5.0
-:DRILL_EASE: 5.815
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:44>
-:END:
+*** C-c / t]
+make just todo items visible
+*** S-<tab>
org-shifttab global visibility cycle / move table cell
-*** [C-cs] :drill:
-SCHEDULED: <2014-03-14 Fri>
-:PROPERTIES:
-:ID: 9ba74a38-655c-4f96-8443-b574ee25c544
-:DRILL_LAST_INTERVAL: 5.238
-:DRILL_REPEATS_SINCE_FAIL: 2
-:DRILL_TOTAL_REPEATS: 7
-:DRILL_FAILURE_COUNT: 2
-:DRILL_AVERAGE_QUALITY: 2.801
-:DRILL_EASE: 2.362
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:33>
-:END:
+*** C-cs]
schedule todo item
-*** [C-cx p] :drill:
-SCHEDULED: <2014-03-15 Sat>
-:PROPERTIES:
-:ID: 4b486f48-219d-4517-96c2-83ef839abda5
-:DRILL_LAST_INTERVAL: 24.4352
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.75
-:DRILL_EASE: 2.929
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:39>
-:END:
+*** C-cx p]
org set property
-*** [C-c -] :drill:
-SCHEDULED: <2014-03-24 Mon>
-:PROPERTIES:
-:ID: 60e57e56-d815-4d9b-ba78-2a56164db209
-:DRILL_LAST_INTERVAL: 32.7466
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.0
-:DRILL_EASE: 3.204
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:52>
-:END:
+*** C-c -]
org insert horizontal line
-*** [C-cq] :drill:
-SCHEDULED: <2014-03-24 Mon>
-:PROPERTIES:
-:ID: 6987ba15-fbc0-459b-bc27-cf9016baebc3
-:DRILL_LAST_INTERVAL: 32.7466
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.0
-:DRILL_EASE: 3.204
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:50>
-:END:
+*** C-cq]
org tag
** calc
i'd like to drill these sometime when I have space in my head, or I
[calc edit mode, to edit the top of stack]
** single/special keys
-:PROPERTIES:
-:ID: beginning-of-keybind-table-data
-:END:
-*** [tab key]
-:PROPERTIES:
-:CUSTOM_ID: 6c10a716-1d8e-4ce4-8e26-64468f19c17a
-:END:
+*** tab
isearch
#+begin_src emacs-lisp
(define-key isearch-mode-map (kbd "<tab>") 'isearch-query-replace)
#+end_src
-*** tab
- :PROPERTIES:
- :ID: d93321a4-6732-421f-9c03-0073c4cbfdcb
- :CUSTOM_ID: 51ece189-1840-41a1-8ca0-19f9a0481895
- :END:
+*** f12
isearch-forward
#+begin_src emacs-lisp
;; explained in http://stackoverflow.com/questions/7411920/how-to-bind-search-and-search-repeat-to-c-f-in-emacs
(global-set-key (kbd "<kp-add>") 'isearch-forward)
+(global-set-key (kbd "<f12>") 'isearch-forward)
(define-key isearch-mode-map "\t" nil)
(define-key isearch-mode-map (kbd "<kp-add>") 'isearch-repeat-forward)
+(define-key isearch-mode-map (kbd "<f12>") 'isearch-repeat-forward)
;; get rid of the standard completion binding, always use auto-complete
;; this didn't work very well
;;(global-set-key (kbd "TAB") 'auto-complete)
#+end_src
*** end
- :PROPERTIES:
- :ID: 7e71b6fe-dcef-4f91-87d9-d996ddf7db5d
- :CUSTOM_ID: 00d589b7-2b8e-494c-b761-3afefebe6ec6
- :END:
move-end-of-line
#+begin_src emacs-lisp
;; taken from emacs wiki, along with home function
#+end_src
*** home
- :PROPERTIES:
- :ID: f52de4a4-212c-4133-9038-2b652c739ad2
- :CUSTOM_ID: 7800e455-c3f6-4a8f-8907-b2292449ab67
- :END:
back-to-indentation
#+begin_src emacs-lisp
(defun back-to-indentation-or-beginning ()
#+end_src
-*** [s-tab]
-:PROPERTIES:
-:CUSTOM_ID: 3072901e-5cf3-4d6e-9ac8-3ef64a5f6ad2
-:END:
+*** s-tab
indent-buffer
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<S-iso-lefttab>") 'indent-buffer)
#+end_src
- ]
-*** [s-delete]
-:PROPERTIES:
-:CUSTOM_ID: e53728b6-054d-4443-a03e-6cf02d13724d
-:END:
+*** s-delete
send-shell
#+begin_src emacs-lisp
(send-comint-input buffer-name start end init))))
;; supporting functions
-
-
(defun send-comint-input (buffer-name start end &optional init)
"Input the region to BUFFER-NAME, assuming it is a comint-derived buffer.
Show BUFFER-NAME if it is not show.
Call INIT if BUFFER-NAME does not exist."
- (let ((input (filter-buffer-substring start end))
- (buffer (get-buffer buffer-name)))
+ (let ((input (filter-buffer-substring start end)))
+ (send-comint-string buffer-name input init)))
+
+(defun send-comint-string (buffer-name string &optional init)
+ "Input the string to BUFFER-NAME, assuming it is a comint-derived buffer.
+ Show BUFFER-NAME if it is not show.
+ Call INIT if BUFFER-NAME does not exist."
+ (let ((buffer (get-buffer buffer-name)))
(unless buffer
(message "nobuffer")
;; save-excursion etc. don't work for (shell), so I do this instead
(with-current-buffer buffer
(let ((proc (get-buffer-process buffer)))
(goto-char (process-mark proc))
- (insert input)
+ (insert string)
(comint-send-input nil t)))))
(defun buffer-window-show (&optional buffer action)
#+end_src
*** s-left arrow
-:PROPERTIES:
-:CUSTOM_ID: d8c473ac-5507-4a6b-9e5a-46558c17b09f
-:END:
shell
#+begin_src emacs-lisp
(global-set-key (kbd "<S-kp-equal>") 'shell-wrap)
+(global-set-key (kbd "<S-left>") 'shell-wrap)
#+end_src
*** s-right arrow
-:LOGBOOK:
-CLOCK: [2016-11-28 Mon 11:03]--[2016-11-28 Mon 11:03] => 0:00
-:END:
-:PROPERTIES:
-:CUSTOM_ID: 2365f5a7-b89a-4a97-b272-ac8ae9c2cc66
-:END:
previous-buffer
#+begin_src emacs-lisp
(global-set-key (kbd "<S-kp-divide>") 'previous-buffer)
#+end_src
*** esc
-:PROPERTIES:
-:CUSTOM_ID: 60a56803-f38d-4d0a-8ed5-1c94ba97b6f6
-:END:
*** return
-:PROPERTIES:
-:CUSTOM_ID: fab6adea-ed20-45ab-a0a3-776c68d5c3a5
-:END:
new line
#+begin_src emacs-lisp
;; todo, this doesn't set the keybind for the help minibuffer
-;;(global-set-key (kbd "<return>") 'indent-new-comment-line)
+(global-set-key (kbd "\r") 'indent-new-comment-line)
;; don't use enter for autocomplete, we use tab or something
(define-key ac-completing-map (kbd "<return>") nil)
#+end_src
-*** [s-return] :drill:
-SCHEDULED: <2014-03-10 Mon>
- :PROPERTIES:
- auto-correct-prev-word
- :ID: db46193b-f202-4927-bc76-2ad74d9f0ed7
- :CUSTOM_ID: 819cfb55-3a2f-4f20-8591-f819d1a6869a
- :DRILL_LAST_INTERVAL: 7.9493
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 7
- :DRILL_FAILURE_COUNT: 4
- :DRILL_AVERAGE_QUALITY: 2.696
- :DRILL_EASE: 2.312
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:05>
- :END:
+*** s-return
auto-correct-prev-word
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<S-return>") 'flyspell-auto-correct-previous-word)
#+end_src
-]
*** down arrow
- :PROPERTIES:
- :CUSTOM_ID: 7a868484-9c63-4a73-abda-7751cb2c02be
- :END:
mark
#+begin_src emacs-lisp
(global-set-key (kbd "<kp-enter>") 'set-mark-command)
#+end_src
*** s-down arrow
-:PROPERTIES:
-:CUSTOM_ID: 097b97e0-8ad8-40f7-8388-c4ace1706b38
-:END:
extended command
#+begin_src emacs-lisp
(global-set-key (kbd "<S-kp-enter>") 'smex)
*** s-up arrow
** mouse
-*** [mouse-2 mode line] :drill:
-SCHEDULED: <2014-03-17 Mon>
- :PROPERTIES:
- :ID: d79167ad-9782-40b3-8e40-55aaa8428dec
- :CUSTOM_ID: 69aaa631-6fb5-4beb-b2d8-c0f3d92c0a98
- :DRILL_LAST_INTERVAL: 15.2345
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 7
- :DRILL_FAILURE_COUNT: 2
- :DRILL_AVERAGE_QUALITY: 2.893
- :DRILL_EASE: 2.405
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:06>
- :END:
- mouse-delete-other-windows
+*** mouse-2 mode line
+mouse-delete-other-windows
*** C-mouse-2 mode line
-:PROPERTIES:
-:CUSTOM_ID: 501479ab-e1e2-497e-bd86-071f8afa3378
-:END:
mouse-split-window-horizontally
*** M-mouse-2 mode line
-:PROPERTIES:
-:CUSTOM_ID: 8de14d73-499e-406a-b5c4-e295e53d3f4c
-:END:
*** S-mouse-2 mode line
-:PROPERTIES:
-:CUSTOM_ID: f389cdbb-186a-4cad-af45-b3c75a508275
-:END:
*** C-M-mouse-2 mode line
-:PROPERTIES:
-:CUSTOM_ID: cb2be69c-f86c-4120-b7f2-1c09b7bcd816
-:END:
*** C-S-mouse2 mode line
-:PROPERTIES:
-:CUSTOM_ID: 7b4eced3-ce5e-49ce-8bfe-8823e8f5f93e
-:END:
-*** [mouse-3 mode line] :drill:
-SCHEDULED: <2014-03-19 Wed>
- :PROPERTIES:
- :ID: 324e43e7-d468-4edc-b892-c1e249ff49fa
- :CUSTOM_ID: 917a1844-8c38-4f31-8616-50fc81334f2c
- :DRILL_LAST_INTERVAL: 27.607
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.5
- :DRILL_EASE: 2.73
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:50>
- :END:
+*** mouse-3 mode line
mouse-delete-window
*** C-mouse-3 mode line
-:PROPERTIES:
-:CUSTOM_ID: b36a218f-6a92-4594-940b-13ffdf79cc9c
-:END:
*** M-mouse-3 mode line
-:PROPERTIES:
-:CUSTOM_ID: 11c48311-05a4-440e-b742-ec397f22f479
-:END:
*** S-mouse-3 mode line
-:PROPERTIES:
-:CUSTOM_ID: 03768943-d8cd-4dcb-bc48-393e9a6bb31f
-:END:
*** C-M-mouse-3 mode line
-:PROPERTIES:
-:CUSTOM_ID: ab213201-bab7-4d30-8f61-fee80e7f2c6f
-:END:
*** C-S-mouse-3 mode line
-:PROPERTIES:
-:CUSTOM_ID: 0bcac7a3-2943-49b7-b281-d834d374caf9
-:END:
*** mouse-1
-:PROPERTIES:
-:CUSTOM_ID: 4e60e2e4-8c2f-4450-8060-2d793ede530c
-:END:
set cursor/mark
-*** [C-mouse-1] :drill:
-SCHEDULED: <2014-03-15 Sat>
-:PROPERTIES:
-:CUSTOM_ID: b661f84f-57df-4095-9dc1-d1a876a53ee5
-:ID: 6b82708e-d5de-48cc-8abd-225186eb8729
-:DRILL_LAST_INTERVAL: 24.4352
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.75
-:DRILL_EASE: 2.929
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 18:03>
-:END:
+*** C-mouse-1
buffer list context menu
*** M-mouse-1
-:PROPERTIES:
-:CUSTOM_ID: c71c8a71-7027-44f3-be19-1d3c18ff5129
-:END:
*** S-mouse-1
-:PROPERTIES:
-:CUSTOM_ID: 84507cd6-8a75-4754-bf9e-5a30f57fa4ac
-:END:
*** C-M-mouse-1
-:PROPERTIES:
-:CUSTOM_ID: 95eea58e-82b0-48a3-a7c8-0d17c50b7c2e
-:END:
*** C-S-mouse-1
-:PROPERTIES:
-:CUSTOM_ID: 2d450c06-d9aa-4751-a926-0922c0c3a402
-:END:
*** mouse-2
-:PROPERTIES:
-:CUSTOM_ID: 086b0b50-054f-462d-92fa-b27852f887b0
-:END:
paste
*** C-mouse-2
-:PROPERTIES:
-:CUSTOM_ID: 48b8de22-6638-44da-986f-16e0e69312dd
-:END:
*** M-mouse-2
-:PROPERTIES:
-:CUSTOM_ID: fb315a27-6351-4ce2-9692-589608793c43
-:END:
*** S-mouse-2
-:PROPERTIES:
-:CUSTOM_ID: 7cc73036-844b-44d3-afe1-1e76ee626b53
-:END:
*** C-M-mouse-2
-:PROPERTIES:
-:CUSTOM_ID: 85f35287-5130-47ab-832d-af78dc2a3e70
-:END:
*** C-S-mouse-2
-:PROPERTIES:
-:CUSTOM_ID: a27ad43f-3be2-4155-9a9f-c144170372ce
-:END:
*** mouse-3
-:PROPERTIES:
-:CUSTOM_ID: 0481632e-9c50-4328-9365-c4b5bf967b66
-:END:
set-mark
#+begin_src emacs-lisp
(define-key global-map [down-mouse-3] 'mouse3-func)
(global-set-key [mouse-3] 'mouse3-set-mark)
(global-set-key [drag-mouse-3] 'mouse3-set-mark)
#+end_src
-*** [C-mouse-3] :drill:
-SCHEDULED: <2014-03-13 Thu>
- :PROPERTIES:
- :ID: b075e62c-55c6-46f5-a23a-4c4c5b9f267e
- :CUSTOM_ID: 9623c78f-7705-4cbe-a990-c24eb1067377
- :DRILL_LAST_INTERVAL: 22.1939
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.5
- :DRILL_EASE: 2.73
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:38>
- :END:
+*** C-mouse-3
global menu
*** M-mouse-3
-:PROPERTIES:
-:CUSTOM_ID: fb6f4840-7e44-4c94-b913-f2014fda3325
-:END:
*** S-mouse-3
-:PROPERTIES:
-:CUSTOM_ID: a6d91332-c731-474c-9959-ddd03e8b2786
-:END:
*** C-M-mouse-3
-:PROPERTIES:
-:CUSTOM_ID: 6b4d0e4d-1a2c-4e42-a925-e39548c4e264
-:END:
*** C-S-mouse-3
-:PROPERTIES:
-:CUSTOM_ID: a983a7c5-c17e-4e08-b3e2-a45a44d7a2b6
-:END:
-*** [mouse-9]
-:PROPERTIES:
-:CUSTOM_ID: efaec161-b279-4129-86fd-b410430926e4
-:END:
+*** mouse-9
move-mouse-to-point
-[
#+begin_src emacs-lisp
(global-set-key (kbd "<mouse-6>") 'move-mouse-to-point)
#+end_src
-]
*** C-mouse-9
-:PROPERTIES:
-:CUSTOM_ID: e055ae8a-cc94-4e0f-9e98-9cb62453b8d6
-:END:
*** M-mouse-9
-:PROPERTIES:
-:CUSTOM_ID: 7d1c03a9-b153-47dc-a037-7ee333ca8da9
-:END:
*** S-mouse-9
-:PROPERTIES:
-:CUSTOM_ID: 8f688d00-8cdb-4163-818c-a0cfba3b1c0a
-:END:
*** C-M-mouse-9
-:PROPERTIES:
-:CUSTOM_ID: 90ce7df8-2346-4203-8ced-5da51c7c1bfc
-:END:
*** C-S-mouse-9
-:PROPERTIES:
-:CUSTOM_ID: 0afdad0a-f9c4-4bfa-baa8-cc20d6cab628
-:END:
*** mouse-8
-:PROPERTIES:
-:CUSTOM_ID: ea9d2415-0fd7-4f83-9867-a7a81899e74b
-:END:
*** C-mouse-8
-:PROPERTIES:
-:CUSTOM_ID: dc2428d2-412c-4811-8327-3bb70bfa0e76
-:END:
*** M-mouse-8
-:PROPERTIES:
-:CUSTOM_ID: 530ed41d-6ed6-4bcd-9df7-58ddbfe8b44a
-:END:
*** S-mouse-8
-:PROPERTIES:
-:CUSTOM_ID: c7d388c3-f4a6-4489-b23a-20ebb7515430
-:END:
*** C-M-mouse-8
-:PROPERTIES:
-:CUSTOM_ID: fc6ac9e8-fd9a-4270-9cd8-26713d6bc40f
-:END:
*** C-S-mouse-8
-:PROPERTIES:
-:CUSTOM_ID: 401503ad-3750-4002-a28e-1f1345412bc6
-:END:
*** 1/kp-end
-:PROPERTIES:
-:CUSTOM_ID: c306a3ef-4b81-4d54-a914-99f312d8f92f
-:END:
*** C-1/kp-end
-:PROPERTIES:
-:CUSTOM_ID: 11059916-0a48-4f08-b85a-9b82243e4145
-:END:
*** M-1/kp-end
-:PROPERTIES:
-:CUSTOM_ID: fddd8716-5b16-484e-9d70-358fea201d99
-:END:
*** S-1/kp-end
-:PROPERTIES:
-:CUSTOM_ID: c6a7978b-a5cf-4ae7-b1d2-57ea72adb487
-:END:
*** C-M-1/kp-end
-:PROPERTIES:
-:CUSTOM_ID: 376b8b84-ae1b-4bff-b1c8-263049186637
-:END:
*** C-S-1/kp-end
-:PROPERTIES:
-:CUSTOM_ID: 4e8081cb-5692-4d2e-8657-c6c7931046fd
-:END:
*** 2/kp-down
-:PROPERTIES:
-:CUSTOM_ID: a1108fd9-0df0-43ac-9dbb-0402d24f5b57
-:END:
*** C-2/kp-down
-:PROPERTIES:
-:CUSTOM_ID: e9fe4916-14f5-4dc6-8dba-ed982b7172a1
-:END:
*** M-2/kp-down
-:PROPERTIES:
-:CUSTOM_ID: 50db5a06-452e-491f-875b-3de936a4d04a
-:END:
+smex
#+begin_src emacs-lisp
;; for when we have a standard keyboard which is not remapped
(global-set-key (kbd "M-2") 'smex)
#+end_src
*** S-2/kp-down
-:PROPERTIES:
-:CUSTOM_ID: c3ad691b-0082-46f3-8588-ef2223eab643
-:END:
*** C-M-2/kp-down
-:PROPERTIES:
-:CUSTOM_ID: 90963055-086b-4d96-8131-d890ff3cb597
-:END:
*** C-S-2/kp-down
-:PROPERTIES:
-:CUSTOM_ID: 4d13741e-2207-4d2c-a719-e818bb9f3419
-:END:
*** 3/kp-next
-:PROPERTIES:
-:CUSTOM_ID: b441f9e2-d035-4907-b947-0f3b4d6d062d
-:END:
*** C-3/kp-next
-:PROPERTIES:
-:CUSTOM_ID: 3ea6ff26-4db4-46c8-b681-e08acd9b6a06
-:END:
*** M-3/kp-next
-:PROPERTIES:
-:CUSTOM_ID: a376d2fb-999d-48fd-8c9e-36b7661c5ba7
-:END:
*** S-3/kp-next
-:PROPERTIES:
-:CUSTOM_ID: 50b8356c-7ba5-4e89-b4d6-618f6c571678
-:END:
*** C-M-3/kp-next
-:PROPERTIES:
-:CUSTOM_ID: cd997379-f611-4d06-91c7-ed6cabb618ee
-:END:
*** C-S-3/kp-next
-:PROPERTIES:
-:CUSTOM_ID: 1c8941c9-3025-4dff-bcf3-09d8de44f44f
-:END:
*** 4/kp-left
- :PROPERTIES:
- :ID: bef4fed5-5338-4c66-a759-13dc20ab9bfb
- :CUSTOM_ID: c44d0f65-9502-4cc6-9642-96d907f6b093
- :END:
indent-region
#+begin_src emacs-lisp
(global-set-key (kbd "<kp-left>") 'indent-region)
#+end_src
*** C-4/kp-left
-:PROPERTIES:
-:CUSTOM_ID: dd0cd32a-1d62-4b19-9d4f-ee242fb7c7b9
-:END:
*** M-4/kp-left
-:PROPERTIES:
-:CUSTOM_ID: 4f7c3799-28a7-4fc2-85fc-16d768d2047c
-:END:
*** S-4/kp-left
-:PROPERTIES:
-:CUSTOM_ID: f84a7347-f88a-4888-bf5d-e15b98b5c3a2
-:END:
*** C-M-4/kp-left
-:PROPERTIES:
-:CUSTOM_ID: 74a1afca-bd24-469b-93e9-7a9681a9e467
-:END:
*** C-S-4/kp-left
-:PROPERTIES:
-:CUSTOM_ID: 6c822a4a-0e64-430b-8d21-46b387911f2f
-:END:
*** 5/kp-begin
- :PROPERTIES:
- :ID: 0e93f6a0-3d6f-45b1-b14e-10abbdfa3ee4
- :CUSTOM_ID: 2458c6bc-7113-4d4b-bbdf-206e1cb842a7
- :END:
mark-defun
#+begin_src emacs-lisp
(global-set-key (kbd "<kp-begin>") 'mark-defun)
#+end_src
*** C-5/kp-begin
-:PROPERTIES:
-:CUSTOM_ID: 39588066-77b8-4863-be0d-0f1fad8f0e2a
-:END:
*** M-5/kp-begin
-:PROPERTIES:
-:CUSTOM_ID: b3542b42-9d71-4a3f-92b1-f79f275bcf52
-:END:
*** S-5/kp-begin
-:PROPERTIES:
-:CUSTOM_ID: 66aed3e7-d7bb-4393-a95b-b90b3a410684
-:END:
*** C-M-5/kp-begin
-:PROPERTIES:
-:CUSTOM_ID: 1060d464-eed3-4a17-a5c4-d8e8941f6925
-:END:
*** C-S-5/kp-begin
-:PROPERTIES:
-:CUSTOM_ID: efd7867a-a87f-43ef-a849-0e4029431d7f
-:END:
*** 6/kp-right
- :PROPERTIES:
- :ID: d156225a-b48e-45e2-80a7-ea1a7dbbc794
- :CUSTOM_ID: 3b79bc58-6067-43bd-9471-9d592744a25a
- :END:
ibuffer
#+begin_src emacs-lisp
(global-set-key (kbd "<kp-right>") 'ibuffer)
#+end_src
*** C-6/kp-right
-:PROPERTIES:
-:CUSTOM_ID: 5592b3d3-7ade-4486-ac94-aed0aa3d78f5
-:END:
*** M-6/kp-right
-:PROPERTIES:
-:CUSTOM_ID: c76bedd9-90a7-41fe-9327-607f88f60a3a
-:END:
*** S-6/kp-right
-:PROPERTIES:
-:CUSTOM_ID: 8bbda9a2-7909-44fb-af24-a86dbbd5d16f
-:END:
*** C-M-6/kp-right
-:PROPERTIES:
-:CUSTOM_ID: 7c5838f6-5cc9-4bbc-bd07-403cc009cf35
-:END:
*** C-S-6/kp-right
-:PROPERTIES:
-:CUSTOM_ID: c6f2edc9-ffd3-400f-8014-bb92ea6e520b
-:END:
*** 7/kp-home
-:PROPERTIES:
-:CUSTOM_ID: c98ba390-f2e3-4c14-8d41-142b54e76d77
-:END:
*** C-7/kp-home
-:PROPERTIES:
-:CUSTOM_ID: 5597d00f-4a89-4af2-aac1-98808763744c
-:END:
*** M-7/kp-home
-:PROPERTIES:
-:CUSTOM_ID: 5cbafd0e-0c8f-4e14-a24e-f847c341e5c1
-:END:
*** S-7/kp-home
-:PROPERTIES:
-:CUSTOM_ID: 92f7d836-ae32-4bba-9120-72e747feb832
-:END:
*** C-M-7/kp-home
-:PROPERTIES:
-:CUSTOM_ID: 30170d01-412e-4098-b27e-ed9294d8cf92
-:END:
*** C-S-7/kp-home
-:PROPERTIES:
-:CUSTOM_ID: 81300d39-e60e-4b09-865e-584153f3b827
-:END:
*** 8/kp-up
-:PROPERTIES:
-:CUSTOM_ID: 0591db2b-6c5c-4438-9451-dcd686170c9d
-:END:
*** C-8/kp-up
-:PROPERTIES:
-:CUSTOM_ID: 028ad953-1641-4f0c-83c2-72787310e447
-:END:
*** M-8/kp-up
-:PROPERTIES:
-:CUSTOM_ID: 7c55f717-1093-48a7-b764-8f788540a4d7
-:END:
*** S-8/kp-up
-:PROPERTIES:
-:CUSTOM_ID: f477fa15-3f04-48f6-a66a-4ba6eb0475f1
-:END:
*** C-M-8/kp-up
-:PROPERTIES:
-:CUSTOM_ID: f280c9ab-49a8-4399-987b-bfde07c339be
-:END:
*** C-S-8/kp-up
-:PROPERTIES:
-:CUSTOM_ID: 68a316aa-a05d-4ab0-87e4-88e8f2613795
-:END:
*** 9/kp-prior
- :PROPERTIES:
- :ID: f3c60889-d948-4144-b5b0-04aeeec95309
- :CUSTOM_ID: a3b51adb-4405-4d9f-9b88-a8faa479fbe7
- :END:
delete-horizontal-space
#+begin_src emacs-lisp
(global-set-key (kbd "<kp-prior>") 'delete-horizontal-space)
#+end_src
*** C-9/kp-prior
-:PROPERTIES:
-:CUSTOM_ID: 2683f49c-a465-42d0-b85b-6aa345ac2213
-:END:
*** M-9/kp-prior
-:PROPERTIES:
-:CUSTOM_ID: 91b0ee09-9eba-4b60-b05f-720eaca53065
-:END:
*** S-9/kp-prior
-:PROPERTIES:
-:CUSTOM_ID: b79e626c-4425-409f-92ce-b88335629c34
-:END:
*** C-M-9/kp-prior
-:PROPERTIES:
-:CUSTOM_ID: 4838285f-905b-4e18-8605-ff24a20ce9e1
-:END:
*** C-S-9/kp-prior
-:PROPERTIES:
-:CUSTOM_ID: 763edfac-da7d-4360-a383-6a7f42cc2e02
-:END:
*** 10/kp-insert
-:PROPERTIES:
-:CUSTOM_ID: 57e1a794-26f8-4fb6-b753-ef1ad1ff0af9
-:END:
*** C-10/kp-insert
-:PROPERTIES:
-:CUSTOM_ID: 32426751-f87b-4fd5-b435-914ac8f54e5f
-:END:
*** M-10/kp-insert
-:PROPERTIES:
-:CUSTOM_ID: 1b83659c-61dc-425f-bead-fc2a0d198dde
-:END:
*** S-10/kp-insert
-:PROPERTIES:
-:CUSTOM_ID: d2f07180-2d20-4633-9c79-78f4d992f7a6
-:END:
*** C-M-10/kp-insert
-:PROPERTIES:
-:CUSTOM_ID: 1f6eabdc-703c-4a05-829c-553ccf7d082d
-:END:
*** C-S-10/kp-insert
-:PROPERTIES:
-:CUSTOM_ID: bb361418-370f-4b15-b7e1-8e85c7a6f032
-:END:
*** 11/kp-subtract
-:PROPERTIES:
-:CUSTOM_ID: 0f84dddc-a1d2-428d-8c17-cf9ddbd24784
-:END:
*** C-11/kp-subtract
-:PROPERTIES:
-:CUSTOM_ID: 4c3309ee-eb67-43ff-bc4a-44574b1c5e0f
-:END:
*** M-11/kp-subtract
-:PROPERTIES:
-:CUSTOM_ID: e95a2822-5f0d-4b32-a17f-15d4650e086f
-:END:
*** S-11/kp-subtract
-:PROPERTIES:
-:CUSTOM_ID: 667a9853-38c6-4bb2-8c01-6a30075929b4
-:END:
*** C-M-11/kp-subtract
-:PROPERTIES:
-:CUSTOM_ID: d5b17698-9bfe-4bd7-af26-b5dd51684e7d
-:END:
*** C-S-11/kp-subtract
-:PROPERTIES:
-:CUSTOM_ID: cfde57be-a728-4955-8b96-9ae5aa1cce01
-:END:
*** 12/kp-add
-:PROPERTIES:
-:CUSTOM_ID: 5e7a0116-a847-4fec-81ed-a0286bb08ac5
-:END:
*** C-12/kp-add
-:PROPERTIES:
-:CUSTOM_ID: 41dcdb69-8436-495b-9e55-a0cd623ac5aa
-:END:
*** M-12/kp-add
-:PROPERTIES:
-:CUSTOM_ID: ebda57a2-cab3-4fed-b3b0-014a7e60c96f
-:END:
*** S-12/kp-add
-:PROPERTIES:
-:CUSTOM_ID: 7e4c6085-cfbe-4c05-9edb-2aec2325f7b9
-:END:
*** C-M-12/kp-add
-:PROPERTIES:
-:CUSTOM_ID: 7904cafb-7371-4bc9-a661-262d78f8f9b8
-:END:
*** C-S-12/kp-add
- :PROPERTIES:
- :CUSTOM_ID: dcf498f0-5bcf-4402-bce0-561c11effb38
- :END:
*** scroll
-:PROPERTIES:
-:CUSTOM_ID: 33433f0f-5b0e-46ba-8452-d2a51e54769b
-:END:
up/dn / scroll
on standard mouse, this scrolls,
because we have the accuracy to pick things up and
down easier, and because it is familiar.
-*** [C-scroll] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- cycle recent buffers
- :ID: 678b14e8-e991-46da-84a0-50d142ecbbba
- :CUSTOM_ID: 16506ba5-e8f2-4aec-bc1b-d2854d4e504c
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:36>
- :END:
+*** C-scroll
cursor up/down fast
- [
#+begin_src emacs-lisp
;; compiling warns that next-line should be called interactively,
;; but we would have to do something dumb, like give it a
(define-key comint-mode-map (kbd "<C-mouse-4>") 'comint-previous-prompt)
(define-key comint-mode-map (kbd "<C-mouse-5>") 'comint-next-prompt)))
#+end_src
-]
-*** [M-scroll]
-:PROPERTIES:
-:CUSTOM_ID: e1e2e253-450d-4620-af9e-78d378f49ad5
-:END:
+*** M-scroll
forward/back s-exp
-[
#+begin_src emacs-lisp
(global-set-key (kbd "<M-mouse-4>") 'backward-sexp)
(global-set-key (kbd "<M-mouse-5>") 'forward-sexp)
#+end_src
-]
-*** [S-scroll] :drill:
-SCHEDULED: <2014-03-22 Sat>
- :PROPERTIES:
- expand region
- :ID: c2da442e-b8c0-4b8a-899f-989af89bd857
- :CUSTOM_ID: 74b2196a-345d-453a-b7be-1915360eb201
- :DRILL_LAST_INTERVAL: 27.0855
- :DRILL_REPEATS_SINCE_FAIL: 5
- :DRILL_TOTAL_REPEATS: 5
- :DRILL_FAILURE_COUNT: 2
- :DRILL_AVERAGE_QUALITY: 3.4
- :DRILL_EASE: 2.666
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-23 Sun 02:26>
- :END:
+*** S-scroll
expand/contract region
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<S-mouse-13>") 'my-contract-region)
(global-set-key (kbd "<S-mouse-14>") 'er/expand-region)
(let ((current-prefix-arg '-))
(call-interactively 'er/expand-region)))
#+end_src
- ]
-*** [C-M-scroll] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- scroll
- :ID: b94d89ed-5a06-4916-b5f5-e0bf1a552362
- :CUSTOM_ID: bd2ca117-408c-49fc-a5ac-a938be21dfc0
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:40>
- :END:
+*** C-M-scroll
scroll
- [
background: I originally tried to make c-scroll be scroll
, but this made
for better compatibility with the standard mouse
; (global-set-key (kbd "<C-M-mouse-4>") 'scroll-up-1)
;(global-set-key (kbd "<C-M-mouse-5>") 'scroll-down-1)
#+end_src
-]
-*** [C-S-scroll] :drill:
-SCHEDULED: <2014-03-18 Tue>
- :PROPERTIES:
- zoom
- :ID: 368f60cb-91e5-4694-b342-e0049e5d3e2c
- :CUSTOM_ID: a69254a4-cf2d-450f-b477-2694b44a7e0d
- :DRILL_LAST_INTERVAL: 9.2113
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 7
- :DRILL_FAILURE_COUNT: 3
- :DRILL_AVERAGE_QUALITY: 2.943
- :DRILL_EASE: 2.429
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:34>
- :END:
+*** C-S-scroll
increase / decrease text size
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<C-S-mouse-4>") 'text-scale-increase)
(global-set-key (kbd "<C-S-mouse-5>") 'text-scale-decrease)
(global-set-key (kbd "<C-S-down>") 'text-scale-increase)
(global-set-key (kbd "<C-S-up>") 'text-scale-decrease)
#+end_src
-]
*** left-scroll
-:PROPERTIES:
-:CUSTOM_ID: d2d5c5c7-f0de-4e08-953b-d41d3e282ba7
-:END:
left/right
-*** [C-left-scroll] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- :CUSTOM_ID: 7bb95aa5-381e-454a-a6c6-aaeec728db08
- :ID: 04bdffa0-52fe-4d90-a222-a6e41d75b13b
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:35>
- :END:
+*** C-left-scroll
back / forward word
#+begin_src emacs-lisp
(global-set-key (kbd "<C-left>") 'backward-symbol)
(global-set-key (kbd "<C-right>") 'forward-symbol)
#+end_src
-*** [M-left-scroll] :drill:
- :PROPERTIES:
- winner undo redo
- :CUSTOM_ID: 49db3764-b154-4cfc-8d0d-f0e0451815e3
- :ID: 97ef29fd-aea5-49ce-aff2-7a8c8d1b3d5d
- :DRILL_LAST_INTERVAL: 0.0
- :DRILL_REPEATS_SINCE_FAIL: 0
- :DRILL_TOTAL_REPEATS: 9
- :DRILL_FAILURE_COUNT: 10
- :DRILL_AVERAGE_QUALITY: 2.518
- :DRILL_EASE: 2.225
- :DRILL_LAST_QUALITY: 2
- :DRILL_LAST_REVIEWED: <2014-04-14 Mon 11:30>
- :END:
-
+*** M-left-scroll
+---
+unreachable
*** S-left-scroll
-:PROPERTIES:
-:CUSTOM_ID: ca5cdcd4-b3da-4d7b-86ab-4c7c0ac2caf7
-:END:
---
- unreachable
+unreachable
*** C-M-left-scroll
+---
unreachable
*** C-S-left-scroll
-:PROPERTIES:
-:CUSTOM_ID: 7b4f1f49-6d93-4210-a30c-8278d6e63655
-:ID: b6ea3b66-d9a6-4a33-ae1c-0464d118f006
-:END:
+---
unreachable
** left primary
-*** [C-2] :drill:
-SCHEDULED: <2014-04-04 Fri>
- :PROPERTIES:
- :ID: 845cf47f-22d5-4100-837d-fbc066e33c9c
- :CUSTOM_ID: 4f29b011-3844-4a4a-b75d-cdf8f49e9adb
- :DRILL_LAST_INTERVAL: 26.3927
- :DRILL_REPEATS_SINCE_FAIL: 5
- :DRILL_TOTAL_REPEATS: 6
- :DRILL_FAILURE_COUNT: 2
- :DRILL_AVERAGE_QUALITY: 3.25
- :DRILL_EASE: 2.58
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:36>
- :END:
-narrow-to-defun/subtree
-[
+
+*** C-2
+copy-symbol
#+begin_src emacs-lisp
(global-unset-key (kbd "C-2"))
(defun copy-symbol (&optional arg)
(kill-new (thing-at-point 'symbol)))
(global-set-key (kbd "C-2") 'copy-symbol)
-
-(global-set-key (kbd "C-4") 'narrow-to-defun)
-(add-hook 'org-mode-hook
- (lambda () (local-set-key (kbd "C-4") 'org-narrow-to-subtree)))
#+end_src
-]
*** M-2
-:PROPERTIES:
-:CUSTOM_ID: 53ecfda2-d9f6-4882-b7a2-9b3c859e3bcb
-:END:
-*** [C-M-2]
-:PROPERTIES:
-:CUSTOM_ID: 33c4996d-92bc-4df0-b005-11553677be13
-:END:
+shell-cd-to-file
+#+begin_src emacs-lisp
+
+(defun shell-cd-to-file ()
+ (interactive)
+ (let ((file (buffer-file-name)))
+ (if file
+ (send-comint-string "*shell*"
+ (concat "c " (file-name-directory file))
+ 'shell)
+ (message "%s" "shell-cd-to-file: buffer has no file name"))))
+(global-set-key (kbd "M-2") 'shell-cd-to-file)
+#+end_src
+*** C-M-2
---
-[
#+begin_src emacs-lisp
(global-unset-key (kbd "C-M-2"))
#+end_src
-]
*** C-S-2
-:PROPERTIES:
-:CUSTOM_ID: 43af8e87-216d-47f7-9779-48ef66c7ca5f
-:END:
-*** [C-3] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- :ID: 9495ba60-017a-49b0-b0b6-366c3334e909
- :CUSTOM_ID: 7851a05e-7177-4a8f-af5a-3325a8f116fe
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:41>
- :END:
- dot-mode-execute
- [
+*** C-3
+dot-mode-execute
#+begin_src emacs-lisp
- (global-set-key (kbd "C-3") 'dot-mode-execute)
+(global-set-key (kbd "C-3") 'dot-mode-execute)
#+end_src
- ]
*** M-3
-:PROPERTIES:
-:CUSTOM_ID: ddceb843-06db-4078-914f-da225cac107e
-:END:
-*** [C-M-3] :drill:
-SCHEDULED: <2014-03-11 Tue>
- :PROPERTIES:
- :CUSTOM_ID: 9a00e17f-a1c9-48fc-b03b-c6a1a3cbda1c
- :ID: 75be5945-8bc4-4041-a44f-de2d9af66f4f
- :DRILL_LAST_INTERVAL: 19.6736
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 5
- :DRILL_FAILURE_COUNT: 1
- :DRILL_AVERAGE_QUALITY: 3.4
- :DRILL_EASE: 2.666
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:48>
- :END:
+*** C-M-3
recenter-top-bottom
- [
#+begin_src emacs-lisp
- (global-set-key (kbd "C-M-3") 'recenter-top-bottom)
+(global-set-key (kbd "C-M-3") 'recenter-top-bottom)
#+end_src
- ]
*** C-S-3
-:PROPERTIES:
-:CUSTOM_ID: 224cf9b0-2e12-4cc7-a7e1-746784c87777
-:END:
-*** [C-q] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- :ID: e7f30a61-8557-4b7e-898c-96db9d649f39
- :CUSTOM_ID: 679fd3cd-c43b-409c-be36-4175a5f27cd3
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:42>
- :END:
- org-cycle, comint previous arg
- [
+*** C-q
+org-cycle, comint previous arg
#+begin_src emacs-lisp
- (add-hook 'org-mode-hook
- (lambda () (define-key org-mode-map (kbd "C-q") 'org-cycle)))
- (define-key widget-keymap (kbd "C-q") 'widget-forward)
- (add-hook 'comint-mode-hook
- (lambda () (define-key comint-mode-map (kbd "C-q") 'comint-insert-previous-argument)))
-#+end_src
- ]
-*** [M-q] :drill:
-SCHEDULED: <2014-03-19 Wed>
-:PROPERTIES:
-org-archive-to-archive-sibling
-:CUSTOM_ID: 72bada0e-5d62-4a8f-ae62-4972778ff1bc
-:ID: 4c8104f4-9251-4915-b076-6989c7cce3be
-:DRILL_LAST_INTERVAL: 10.3717
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 8
-:DRILL_FAILURE_COUNT: 6
-:DRILL_AVERAGE_QUALITY: 2.6
-:DRILL_EASE: 2.266
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:35>
-:END:
+(global-set-key (kbd "C-q") 'outline-cycle)
+(add-hook 'org-mode-hook
+ (lambda () (define-key org-mode-map (kbd "C-q") 'org-cycle)))
+(define-key widget-keymap (kbd "C-q") 'widget-forward)
+(add-hook 'comint-mode-hook
+ (lambda () (define-key comint-mode-map (kbd "C-q") 'comint-insert-previous-argument)))
+#+end_src
+*** M-q
org-archive-to-archive-sibling
-[
#+begin_src emacs-lisp
(global-set-key (kbd "M-q") 'org-archive-to-archive-sibling)
#+end_src
-]
-
-*** [C-M-q] :drill:
-SCHEDULED: <2014-03-12 Wed>
-:PROPERTIES:
-:ID: ab67e1da-41dd-40bd-96c1-556cafc6b630
-:DRILL_LAST_INTERVAL: 9.9427
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 6
-:DRILL_FAILURE_COUNT: 2
-:DRILL_AVERAGE_QUALITY: 3.104
-:DRILL_EASE: 2.506
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 20:57>
-:CUSTOM_ID: 1f5e9b63-7ce0-445c-a426-b41839585d38
-:END:
+*** C-M-q
quoted-insert
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-q") 'quoted-insert)
#+end_src
- ]
*** C-S-q
-:PROPERTIES:
-:CUSTOM_ID: c16f1753-126b-499b-af0e-669129ccd3ea
-:END:
-*** [C-w]
-:PROPERTIES:
-:CUSTOM_ID: 20005b6d-9a9d-4b58-882c-7ce860c7a395
-:END:
+*** C-w
goto-t.org
- [
-#+begin_src emacs-lisp
- (global-set-key (kbd "C-w") (lambda () (interactive) (goto-buffer-or-find-file "/a/t.org")))
-#+end_src
-]
-*** [M-w] :drill:
-SCHEDULED: <2014-03-18 Tue>
- :PROPERTIES:
- org-clock-in
- :ID: c271d82d-e40a-43c3-9c16-753633c1fc14
- :CUSTOM_ID: 331da6e5-7936-4663-8f58-9d8601b5915c
- :DRILL_LAST_INTERVAL: 41.7787
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.667
- :DRILL_EASE: 4.583
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:36>
- :END:
+#+begin_src emacs-lisp
+(global-set-key (kbd "C-w") (lambda () (interactive) (goto-buffer-or-find-file "/a/t.org")))
+#+end_src
+*** M-w
org-clock-in
- [
#+begin_src emacs-lisp
- (global-set-key (kbd "M-w") 'org-clock-in)
+(global-set-key (kbd "M-w") 'org-clock-in)
#+end_src
- ]
*** C-M-w
-:PROPERTIES:
-:CUSTOM_ID: cede4936-de2f-404f-a0e6-264f08215a7c
-:END:
*** C-S-w
-:PROPERTIES:
-:CUSTOM_ID: 3465b986-717a-43b4-910f-3d187789c027
-:END:
-*** [C-e]
+*** C-e
copy-line
- [
#+begin_src emacs-lisp
-; todo, make repeated calls to this append the kills
- (defun copy-line (&optional arg)
- "Copy lines (as many as prefix argument) in the kill ring.
+;; todo, make repeated calls to this append the kills
+(defun copy-line (&optional arg)
+ "Copy lines (as many as prefix argument) in the kill ring.
Ease of use features:
- Move to start of next line.
- Appends the copy on sequential calls.
- Use newline as last char even on the last line of the buffer.
- If region is active, copy its lines."
- (interactive "p")
- (let ((beg (line-beginning-position))
- (end (line-end-position (or arg 1))))
- (when mark-active
- (if (> (point) (mark))
- (setq beg (save-excursion (goto-char (mark)) (line-beginning-position)))
- (setq end (save-excursion (goto-char (mark)) (line-end-position)))))
- (if (eq last-command 'copy-line)
- (kill-append (buffer-substring beg end) (< end beg))
- (kill-ring-save beg end)))
- (kill-append "\n" nil)
- ;; dun need cuz I have yank-better
- ;;(beginning-of-line (or (and arg (1+ arg)) 2))
- (if (and arg (not (= 1 arg))) (message "%d lines copied" arg)))
-
- (global-set-key (kbd "C-e") 'copy-line)
-#+end_src
- :PROPERTIES:
- :ID: 4ff8e0ad-15c0-4cb0-b6cc-314e7b5f80c0
- :CUSTOM_ID: 24e34f4b-d1e8-4380-933f-ab1f78ebc782
- :DRILL_LAST_INTERVAL: 2.4849
- :DRILL_REPEATS_SINCE_FAIL: 1
- :DRILL_TOTAL_REPEATS: 1
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-01-11 Sat 01:30>
- :END:
- ]
-*** [M-e] :drill:
-SCHEDULED: <2014-04-01 Tue>
- :PROPERTIES:
- org-clock-in-last
- :ID: 39424175-21e2-4126-9a51-dea451497841
- :CUSTOM_ID: 0a771449-0cd5-4dc9-82ca-bcac5f7abd17
- :DRILL_LAST_INTERVAL: 36.7949
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.0
- :DRILL_EASE: 3.204
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-02-23 Sun 01:48>
- :END:
+ (interactive "p")
+ (let ((beg (line-beginning-position))
+ (end (line-end-position (or arg 1))))
+ (when mark-active
+ (if (> (point) (mark))
+ (setq beg (save-excursion (goto-char (mark)) (line-beginning-position)))
+ (setq end (save-excursion (goto-char (mark)) (line-end-position)))))
+ (if (eq last-command 'copy-line)
+ (kill-append (buffer-substring beg end) (< end beg))
+ (kill-ring-save beg end)))
+ (kill-append "\n" nil)
+ ;; dun need cuz I have yank-better
+ ;;(beginning-of-line (or (and arg (1+ arg)) 2))
+ (if (and arg (not (= 1 arg))) (message "%d lines copied" arg)))
+
+(global-set-key (kbd "C-e") 'copy-line)
+#+end_src
+*** M-e
org-clock-in-last
- [
#+begin_src emacs-lisp
- (global-set-key (kbd "M-e") 'org-clock-in-last)
+(global-set-key (kbd "M-e") 'org-clock-in-last)
#+end_src
- ]
*** C-M-e
-:PROPERTIES:
-:CUSTOM_ID: 4a7a4324-e03d-43dc-8e9c-9622788519fb
-:END:
*** C-S-e
-:PROPERTIES:
-:CUSTOM_ID: e202e1d5-b7ac-4171-b86a-b77592344f30
-:END:
-*** [C-r] :drill:
-SCHEDULED: <2014-04-07 Mon>
- :PROPERTIES:
- isearch-backward
- :ID: 39bcde9c-2b49-401e-9e81-ee42941233bf
- :CUSTOM_ID: 5c55f461-f43f-493d-81eb-1ca747175ef1
- :DRILL_LAST_INTERVAL: 42.8284
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.5
- :DRILL_EASE: 4.122
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-23 Sun 01:51>
- :END:
+*** C-r
isearch-backward
- [
#+begin_src emacs-lisp
- (global-set-key (kbd "C-r") 'isearch-backward)
+(global-set-key (kbd "C-r") 'isearch-backward)
(add-hook 'comint-mode-hook
- (lambda ()
- (define-key comint-mode-map (kbd "C-r") 'comint-history-isearch-backward-regexp)))
-
-#+end_src
- ]
-*** [M-r] :drill:
-SCHEDULED: <2014-04-30 Wed>
- :PROPERTIES:
- org-clock-out
- :ID: dc2c7192-6cfb-4c06-bd17-ff2cef3b05a6
- :CUSTOM_ID: dd9575bd-e471-418e-9519-4fc2b874ddcd
- :DRILL_LAST_INTERVAL: 59.1432
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.25
- :DRILL_EASE: 3.59
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:10>
- :END:
+ (lambda ()
+ (define-key comint-mode-map (kbd "C-r") 'comint-history-isearch-backward-regexp)))
+#+end_src
+*** M-r
org-clock-out
- [
#+begin_src emacs-lisp
- (global-set-key (kbd "M-r") 'org-clock-out)
+(global-set-key (kbd "M-r") 'org-clock-out)
#+end_src
- ]
*** C-M-r
*** C-S-r
-:PROPERTIES:
-:CUSTOM_ID: 05e2290b-0d2c-407c-9bf0-adc7a008336b
-:END:
-*** [C-a] :drill:
-SCHEDULED: <2014-03-15 Sat>
- :PROPERTIES:
- copy-all
- :CUSTOM_ID: db4b76df-9420-4256-8242-dc44b56d55d7
- :ID: f6b2b504-b88d-418b-b6b0-5e0e582bd205
- :DRILL_LAST_INTERVAL: 24.4352
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.75
- :DRILL_EASE: 2.929
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:39>
- :END:
+*** C-a
copy buffer
- [
#+begin_src emacs-lisp
(defun copy-all ()
"Copy entire buffer to clipboard"
(clipboard-kill-ring-save (point-min) (point-max)))
(global-set-key (kbd "C-a") 'copy-all)
#+end_src
-]
-*** [M-a] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- kmacro-start-macro-or-in...
- :ID: 4019514b-abb1-464e-b4c9-d9ca39af2a82
- :CUSTOM_ID: e865a1e5-55bf-4a98-a0d0-cb05a88de352
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:40>
- :END:
+*** M-a
macro record
- [
-#+begin_src emacs-lisp
- (global-set-key (kbd "M-a") 'kmacro-start-macro-or-insert-counter)
-
-#+end_src
- ]
-*** [C-M-a] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- kmacro-end-or-call-macro
- :ID: 10cdc522-2bea-4601-acf9-ec81a52a34d8
- :CUSTOM_ID: c6278a5a-024f-4c80-a8d4-65f127fd24a8
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:35>
- :END:
+#+begin_src emacs-lisp
+(global-set-key (kbd "M-a") 'kmacro-start-macro-or-insert-counter)
+#+end_src
+*** C-M-a
macro end / call
- [
#+begin_src emacs-lisp
- (global-set-key (kbd "C-M-a") 'kmacro-end-or-call-macro)
- (add-hook 'perl-mode-hook (lambda () (define-key perl-mode-map (kbd "C-M-a") nil)))
+(global-set-key (kbd "C-M-a") 'kmacro-end-or-call-macro)
+(add-hook 'perl-mode-hook (lambda () (define-key perl-mode-map (kbd "C-M-a") nil)))
(add-hook 'LaTeX-mode-hook (lambda () (define-key LaTeX-mode-map (kbd "C-M-a") nil)))
+(add-hook 'c++-mode-hook
+ (lambda () (define-key c++-mode-map (kbd "C-M-a") nil)))
(add-hook 'c-mode-hook
(lambda () (define-key c-mode-map (kbd "C-M-a") nil)))
+
#+end_src
- ]
*** C-S-a
-:PROPERTIES:
-:CUSTOM_ID: 649a3fe7-3932-475a-b23c-28db9874de27
-:END:
*** C-s
- :PROPERTIES:
- C-x prefix
- :ID: e05a67d7-f7ee-4b23-afb1-0053d5eefb4c
- :CUSTOM_ID: 01da04da-cdba-493f-892b-c4c064cf937e
- :END:
c-x prefix
*** M-s
-:PROPERTIES:
-:CUSTOM_ID: 5e4bf939-90a1-4ace-a7bf-add95c8596d2
-:END:
-*** [C-M-s] :drill:
-SCHEDULED: <2014-03-18 Tue>
- :PROPERTIES:
- split-window-vertically
- :ID: 18a271e1-c1d2-45e6-aed3-6b81b4b6ea71
- :CUSTOM_ID: 4b33022d-27f0-4d21-9931-2e2e692790e8
- :DRILL_LAST_INTERVAL: 26.5334
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.75
- :DRILL_EASE: 2.929
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:46>
- :END:
+*** C-M-s
split-window-vertically
- [
#+begin_src emacs-lisp
- (global-set-key (kbd "C-M-s") 'split-window-vertically)
+(global-set-key (kbd "C-M-s") 'split-window-vertically)
#+end_src
- ]
*** C-S-s
-:PROPERTIES:
-:CUSTOM_ID: 901a2445-200c-42f2-91c6-4309d71b39dd
-:END:
*** C-d
-:PROPERTIES:
-:CUSTOM_ID: b699614a-9994-4fe7-b2c6-f0fe81b7ad2b
-:END:
C-c prefix
-*** [M-d] :drill:
-SCHEDULED: <2014-04-05 Sat>
- :PROPERTIES:
- whitespace-cleanup
- :ID: 58f5421a-9df0-44cd-acb9-d018ccdba58c
- :CUSTOM_ID: 06bcc5e2-f3a7-41c6-a793-ac6c9813fb6e
- :DRILL_LAST_INTERVAL: 27.3693
- :DRILL_REPEATS_SINCE_FAIL: 5
- :DRILL_TOTAL_REPEATS: 6
- :DRILL_FAILURE_COUNT: 2
- :DRILL_AVERAGE_QUALITY: 3.417
- :DRILL_EASE: 2.676
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:36>
- :END:
-whitespace-cleanup
- [
-#+begin_src emacs-lisp
- (global-set-key (kbd "M-d") 'whitespace-cleanup)
-#+end_src
- ]
-*** [C-M-d] :drill:
-SCHEDULED: <2014-03-19 Wed>
-:PROPERTIES:
-swap buffer
-:CUSTOM_ID: 8cf6053d-792b-4abd-a3a6-66efd7fbee68
-:ID: 747aabec-b164-4813-93c8-92d5c8778635
-:DRILL_LAST_INTERVAL: 9.5325
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 10
-:DRILL_FAILURE_COUNT: 8
-:DRILL_AVERAGE_QUALITY: 2.636
-:DRILL_EASE: 2.284
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:35>
-:END:
+*** M-d
+*** C-M-d
swap buffer across windows
-[
from http://www.emacswiki.org/emacs/TransposeWindows
#+begin_src emacs-lisp
- (setq swapping-buffer nil)
- (setq swapping-window nil)
- (defun swap-buffers-in-windows ()
- "Swap buffers between two windows"
- (interactive)
- (if (and swapping-window
- swapping-buffer)
- (let ((this-buffer (current-buffer))
- (this-window (selected-window)))
- (if (and (window-live-p swapping-window)
- (buffer-live-p swapping-buffer))
- (progn (switch-to-buffer swapping-buffer)
- (select-window swapping-window)
- (switch-to-buffer this-buffer)
- (select-window this-window)
- (message "Swapped buffers."))
- (message "Old buffer/window killed. Aborting."))
- (setq swapping-buffer nil)
- (setq swapping-window nil))
- (progn
- (setq swapping-buffer (current-buffer))
- (setq swapping-window (selected-window))
- (message "Buffer and window marked for swapping."))))
-
- (global-set-key (kbd "C-M-d") 'swap-buffers-in-windows)
-#+end_src
-]
+(setq swapping-buffer nil)
+(setq swapping-window nil)
+(defun swap-buffers-in-windows ()
+ "Swap buffers between two windows"
+ (interactive)
+ (if (and swapping-window
+ swapping-buffer)
+ (let ((this-buffer (current-buffer))
+ (this-window (selected-window)))
+ (if (and (window-live-p swapping-window)
+ (buffer-live-p swapping-buffer))
+ (progn (switch-to-buffer swapping-buffer)
+ (select-window swapping-window)
+ (switch-to-buffer this-buffer)
+ (select-window this-window)
+ (message "Swapped buffers."))
+ (message "Old buffer/window killed. Aborting."))
+ (setq swapping-buffer nil)
+ (setq swapping-window nil))
+ (progn
+ (setq swapping-buffer (current-buffer))
+ (setq swapping-window (selected-window))
+ (message "Buffer and window marked for swapping."))))
+
+(global-set-key (kbd "C-M-d") 'swap-buffers-in-windows)
+#+end_src
*** C-S-d
-:PROPERTIES:
-:CUSTOM_ID: d3166178-3d87-4caa-a937-9797fc2b6a39
-:END:
-*** [C-f]
-:PROPERTIES:
-:CUSTOM_ID: 2695ed8a-e0d3-4e84-8688-98e3c50723b0
-:END:
+*** C-f]
kill-whole-line
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-f") 'kill-whole-line-wrapper)
(defun kill-whole-line-wrapper (&optional arg)
(kill-whole-line -1)
(kill-whole-line arg)))
#+end_src
- ]
-*** M-f
-:PROPERTIES:
-:CUSTOM_ID: 869f0aec-c739-4fb7-8e3a-8b55ab637765
-:END:
-*** [C-M-f]
-:PROPERTIES:
-:CUSTOM_ID: e7e4dd0b-418f-48ee-b366-9e733e3bec61
-:END:
+*** M-f]
+print-var-at-point
+#+begin_src emacs-lisp
+(defun print-var-at-point ()
+ (interactive)
+ (let ((v (variable-at-point)))
+ (if (symbolp v)
+ (message "%s: %s" v (symbol-value v))
+ (message "no symbol found at point"))))
+(global-set-key (kbd "M-f") 'print-var-at-point)
+#+end_src
+
+*** C-M-f]
kill rest of line
- [
#+begin_src emacs-lisp
(add-hook 'org-mode-hook
(global-set-key (kbd "C-M-f") 'kill-line)
#+end_src
- ]
*** C-S-f
-:PROPERTIES:
-:CUSTOM_ID: a59eb2ca-9439-4836-81f9-384bc8c07739
-:END:
-*** [C-g]
-SCHEDULED: <2014-01-13 Mon>
- :PROPERTIES:
- other-window / cancel
- :ID: a4e9c495-02c1-432e-beba-12a9d4d61e8a
- :CUSTOM_ID: 4af40595-7010-4be6-8cfe-a43797ca6e33
- :DRILL_LAST_INTERVAL: 2.4849
- :DRILL_REPEATS_SINCE_FAIL: 1
- :DRILL_TOTAL_REPEATS: 1
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-01-11 Sat 01:41>
- :END:
+*** C-g]
cancel / other window
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-g") 'other-window)
#+end_src
- ]
-*** [M-g] :drill:
-SCHEDULED: <2014-03-13 Thu>
- :PROPERTIES:
- abort-recursive-edit
- :ID: 1e8e0c57-2885-4c0c-9b94-3ec0c02b706e
- :CUSTOM_ID: fb0b343f-fdff-463a-94f4-3152191e17c4
- :DRILL_LAST_INTERVAL: 22.1939
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.5
- :DRILL_EASE: 2.73
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:33>
- :END:
+*** M-g]
abort-recursive-edit
- [
#+begin_src emacs-lisp
(global-set-key (kbd "M-g") 'abort-recursive-edit)
#+end_src
- ]
-*** [C-M-g]
-:PROPERTIES:
-:CUSTOM_ID: 327e18af-30b7-47e5-aa53-5f678788b4c1
-:END:
+*** C-M-g]
gnus
-[
#+begin_src emacs-lisp
- (global-set-key (kbd "C-M-g") 'gnus)
+ (global-set-key (kbd "C-M-g") 'mu4e)
#+end_src
- ]
*** C-S-g
-:PROPERTIES:
-:CUSTOM_ID: 1d4edc55-7b30-4648-b869-b82f8f1d7b1a
-:END:
*** C-z
- :PROPERTIES:
- undo-tree-undo
- :ID: 42d7f2bf-3ba3-488b-b501-bd4680dbb8de
- :CUSTOM_ID: 707c4938-a790-4da9-8230-61855ea57d09
- :END:
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-z") 'undo-tree-undo)
#+end_src
- ]
*** M-z
-:PROPERTIES:
-:CUSTOM_ID: a01c110e-9970-4571-84ab-379eecc7dd31
-:END:
-*** [C-M-z]
+*** C-M-z]
*** C-S-z
-:PROPERTIES:
-:CUSTOM_ID: 3d56370d-11cd-4026-8e6b-3ae9b7b51714
-:END:
*** C-x
-:PROPERTIES:
-:CUSTOM_ID: ec1403d3-528e-41b1-a195-5563bc93e124
-:END:
kill-region
#+begin_src emacs-lisp
(global-set-key (kbd "C-s") 'kill-region)
#+end_src
-*** [M-x] :drill:
-SCHEDULED: <2014-03-31 Mon>
-:PROPERTIES:
-:CUSTOM_ID: bb7c95d5-dd97-439d-bf1f-cdac98d11543
-:ID: 909cf249-c2f2-4251-bf18-c990ca9c6ff9
-:DRILL_LAST_INTERVAL: 21.5453
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.25
-:DRILL_EASE: 2.58
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:33>
-:END:
-append-next-kill
-[
-#+begin_src emacs-lisp
-(global-set-key (kbd "M-x") 'append-next-kill)
-#+end_src
-]
-*** [C-M-x] :drill:
-SCHEDULED: <2014-03-17 Mon>
- :PROPERTIES:
- append-next-kill
- :ID: b2b60fb4-95a3-4311-8ccd-7132f03ac9a8
- :CUSTOM_ID: c988370e-602c-431c-80a9-608459583f8b
- :DRILL_LAST_INTERVAL: 26.0772
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 1
- :DRILL_AVERAGE_QUALITY: 3.5
- :DRILL_EASE: 2.73
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:49>
- :END:
+*** M-x]
+smex
+#+begin_src emacs-lisp
+(global-set-key (kbd "M-x") 'smex)
+#+end_src
+*** C-M-x]
cut-to-register
- [
#+begin_src emacs-lisp
;; same args as copy-to-register
(defun cut-to-register (register start end &optional delete-flag region)
(global-set-key (kbd "C-M-x") 'cut-to-register)
#+end_src
- ]
*** C-S-x
-:PROPERTIES:
-:CUSTOM_ID: 0ce7383c-0776-407e-9ac5-981d1476f541
-:END:
*** C-c
- :PROPERTIES:
- :ID: 5416e482-6f36-4d35-84c3-49bb184a53e9
- :CUSTOM_ID: 400f06e1-8e45-443c-8d7b-3d1bb1176aab
- :END:
copy
#+begin_src emacs-lisp
(global-set-key (kbd "C-d") 'kill-ring-save)
(define-key c-mode-base-map (kbd "<deletechar>") 'c-electric-delete-forward)))
#+end_src
-*** [M-c] :drill:
-SCHEDULED: <2014-03-24 Mon>
- :PROPERTIES:
- org-capture
- :ID: bf1cb358-ec72-425d-aebb-0c1f0ece7717
- :CUSTOM_ID: f4c3317a-a317-4d04-8cb7-e46d0716bf1d
- :DRILL_LAST_INTERVAL: 32.7466
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.0
- :DRILL_EASE: 3.204
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:53>
- :END:
+*** M-c]
org-capture
- [
#+begin_src emacs-lisp
(define-key global-map "\M-c" 'org-capture)
#+end_src
-]
-*** [C-M-c] :drill:
-SCHEDULED: <2014-03-24 Mon>
- :PROPERTIES:
- copy-to-register
- :ID: 956fd2ec-ad26-4842-b56c-f2165648c461
- :CUSTOM_ID: 0a151d99-47ae-4e8f-8407-82e77d24a3e7
- :DRILL_LAST_INTERVAL: 32.7466
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.0
- :DRILL_EASE: 3.204
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:51>
- :END:
+*** C-M-c]
copy-to-register
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-c") 'copy-to-register)
#+end_src
-]
*** C-S-c
-:PROPERTIES:
-:CUSTOM_ID: b78d717f-cfb3-477a-b951-63f523635f5c
-:END:
*** C-v
-:PROPERTIES:
-:CUSTOM_ID: 16411f68-7fe0-49e8-9a73-212471594f9e
-:END:
yank
#+begin_src emacs-lisp
(global-set-key (kbd "C-v") 'yank-better)
(put 'yank-better 'delete-selection 'yank)
#+end_src
-*** [M-v] :drill:
-SCHEDULED: <2014-03-11 Tue>
- :PROPERTIES:
- insert-register
- :ID: 7e21df8d-fdf7-47ed-8648-f9d182445145
- :CUSTOM_ID: d67f6371-a13f-4a75-8d8c-e4013ff4e131
- :DRILL_LAST_INTERVAL: 2.2172
- :DRILL_REPEATS_SINCE_FAIL: 1
- :DRILL_TOTAL_REPEATS: 5
- :DRILL_FAILURE_COUNT: 2
- :DRILL_AVERAGE_QUALITY: 2.84
- :DRILL_EASE: 2.381
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:38>
- :END:
+*** M-v]
insert-register
- [
#+begin_src emacs-lisp
(global-set-key (kbd "M-v") 'insert-register)
#+end_src
- ]
-*** [C-M-v] :drill:
-SCHEDULED: <2014-05-13 Tue>
- :PROPERTIES:
- yank pop
- :ID: e05d9d8f-1387-44b3-b348-a45cf6083bd2
- :CUSTOM_ID: 25f86658-9999-40f7-b3a4-615981751b93
- :DRILL_LAST_INTERVAL: 71.5839
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.75
- :DRILL_EASE: 4.85
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:10>
- :END:
+*** C-M-v]
yank-pop
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-v") 'yank-pop)
#+end_src
- ]
*** C-S-v
-:PROPERTIES:
-:CUSTOM_ID: 6732ed10-a473-445d-b14a-5f4c17c6a3ef
-:END:
-*** [C-b] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- delete-other-windows
- :ID: c9309da7-6801-4d94-a21e-140f4b258c28
- :CUSTOM_ID: e682305e-0110-4d2f-afbd-2c401bcb9313
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:34>
- :END:
+*** C-b]
delete-other-windows
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-b") 'delete-other-windows)
#+end_src
- ]
-*** [M-b] :drill:
-SCHEDULED: <2014-04-07 Mon>
- :PROPERTIES:
- isearch-backward-current-symbol
- :CUSTOM_ID: 05e3d0db-36dc-455f-8bed-f87886ca6004
- :ID: 0272efdb-eb85-485c-b24f-410ceabeb330
- :DRILL_LAST_INTERVAL: 28.6736
- :DRILL_REPEATS_SINCE_FAIL: 5
- :DRILL_TOTAL_REPEATS: 5
- :DRILL_FAILURE_COUNT: 1
- :DRILL_AVERAGE_QUALITY: 3.4
- :DRILL_EASE: 2.666
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:36>
- :END:
+*** M-b]
isearch-backward-current-symbol
- [
#+begin_src emacs-lisp
(global-set-key (kbd "M-b") 'isearch-backward-current-symbol)
#+end_src
-]
-*** [C-M-b] :drill:
-SCHEDULED: <2014-04-04 Fri>
- :PROPERTIES:
- isearch-current-symbol
- :ID: 235b96a8-e724-419d-8d07-8d0a021213eb
- :CUSTOM_ID: 6c63790c-28c1-4b73-96e2-ee859f57e734
- :DRILL_LAST_INTERVAL: 40.0706
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.75
- :DRILL_EASE: 2.929
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-02-23 Sun 02:26>
- :END:
+*** C-M-b]
isearch-current-symbol
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-b") 'isearch-current-symbol)
#+end_src
-]
*** C-S-b
-:PROPERTIES:
-:CUSTOM_ID: a220d7e0-12df-4d37-a57a-266785e7f3c5
-:END:
-*** [C-tab] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- yas-insert-snippet
- :CUSTOM_ID: edc45592-c69f-4439-8305-48f2c65696c3
- :ID: 92eac3e1-0675-4746-a130-7539f9bc213a
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:42>
- :END:
+*** C-tab]
---
-[
in terminal, it's just TAB, duplicate keybind.
-]
-*** [M-tab] :drill:
-SCHEDULED: <2014-03-14 Fri>
- :PROPERTIES:
- indent line
- :ID: 35b77d8a-9e69-4f8e-a2ac-c78fcf6dc1f5
- :CUSTOM_ID: 71264957-45fd-455a-a6d1-b08823c02d25
- :DRILL_LAST_INTERVAL: 23.0811
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 1
- :DRILL_AVERAGE_QUALITY: 3.75
- :DRILL_EASE: 2.929
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:35>
- :END:
+*** M-tab]
---
- [
in terminal it's duplicated of C-M-i
-]
*** C-M-tab
-:PROPERTIES:
-:CUSTOM_ID: 33b76824-317c-4657-8a5b-2b126b8f7fc9
-:END:
*** C-S-tab
-:PROPERTIES:
-:CUSTOM_ID: 89d1aeca-47ed-4e4a-89d2-ff70c06e08c8
-:END:
-*** [C-delete] :drill:
-SCHEDULED: <2014-05-13 Tue>
- :PROPERTIES:
- kill-symbol
- :ID: bb7ae41f-8fab-42ee-9338-33dd22d7f173
- :CUSTOM_ID: 2688b61d-9fdd-44af-b9bd-b126f0da00bd
- :DRILL_LAST_INTERVAL: 71.5839
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.75
- :DRILL_EASE: 4.85
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:12>
- :END:
+*** C-delete]
kill-symbol
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<C-delete>") 'kill-symbol)
(defun kill-symbol (arg)
(kill-region (point) (save-excursion (forward-symbol arg) (point))))
#+end_src
-]
*** M-delete
-:PROPERTIES:
-:CUSTOM_ID: 60747222-b0e5-4983-9bed-e6d44f65483a
-:END:
-*** [C-M-delete] :drill:
-SCHEDULED: <2014-03-24 Mon>
- :PROPERTIES:
- kill-sexp
- kill-sexp
- :CUSTOM_ID: 21876759-a8e6-4896-8a08-eda40d0eaff3
- :ID: 7f2797e1-dd39-4d0a-8b87-264e2757543b
- :DRILL_LAST_INTERVAL: 28.5089
- :DRILL_REPEATS_SINCE_FAIL: 5
- :DRILL_TOTAL_REPEATS: 5
- :DRILL_FAILURE_COUNT: 2
- :DRILL_AVERAGE_QUALITY: 3.6
- :DRILL_EASE: 2.802
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-23 Sun 02:27>
- :END:
+*** C-M-delete]
kill-sexp
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<C-M-delete>") 'kill-sexp)
#+end_src
- ]
*** C-S-delete
-:PROPERTIES:
-:CUSTOM_ID: 696e9e0f-f717-44cd-90e7-a73d76a58162
-:END:
-*** [C-left-arrow] :drill:
-SCHEDULED: <2014-03-15 Sat>
- :PROPERTIES:
- compile
- :ID: fbc09f29-fb89-479f-b509-255352e4e9d1
- :CUSTOM_ID: b15da91f-0786-49d1-b0b9-331b3b94f6ae
- :DRILL_LAST_INTERVAL: 24.2738
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 1
- :DRILL_AVERAGE_QUALITY: 4.0
- :DRILL_EASE: 3.204
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:24>
- :END:
+*** C-left-arrow]
compile / comint search
- [
#+begin_src emacs-lisp
(defun set-p (var)
(and (bound-and-true-p var)
(define-key comint-mode-map (kbd "C-(") 'isearch-backward)))
#+end_src
-]
*** M-left-arrow
-:PROPERTIES:
-:CUSTOM_ID: 73085b60-95f3-44bf-af71-70d6a7f9b9c6
-:END:
-*** [C-M-left-arrow] :drill:
-SCHEDULED: <2014-03-10 Mon>
-:PROPERTIES:
+*** C-M-left-arrow]
org-shiftup
-:CUSTOM_ID: 13faf5d4-34be-4363-948d-4ff04a9f570b
-:ID: 39390478-6d33-460e-ab47-0dc6ac4c5249
-:DRILL_LAST_INTERVAL: 7.6079
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 7
-:DRILL_FAILURE_COUNT: 6
-:DRILL_AVERAGE_QUALITY: 2.886
-:DRILL_EASE: 2.402
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:01>
-:END:
-org-shiftup
-[
#+begin_src emacs-lisp
(add-hook 'org-mode-hook
(lambda () (define-key org-mode-map (kbd "C-M-(") 'org-shiftup)))
#+end_src
-]
*** C-S-left-arrow
-:PROPERTIES:
-:CUSTOM_ID: 4e3a7ead-efb5-46d8-9465-1867d47e5ec2
-:END:
-*** [C-right-arrow] :drill:
-SCHEDULED: <2014-05-13 Tue>
-:PROPERTIES:
-paste selection
-:CUSTOM_ID: 3f3cac16-097d-451a-a14a-da7717d06730
-:ID: 1b0ac338-d87b-4a37-b192-bc4305a337cc
-:DRILL_LAST_INTERVAL: 71.5839
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.75
-:DRILL_EASE: 4.85
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:11>
-:END:
+*** C-right-arrow]
keyboard-yank-primary
-[
#+begin_src emacs-lisp
(defun keyboard-yank-primary ()
(interactive)
(let ((mouse-yank-at-point t))
(mouse-yank-primary nil)))
;; paste selection
-(global-set-key (kbd "C-)") 'keyboard-yank-primary)
+(global-set-key (kbd "C-)") 'keyboard-yank-primary) ;; kinesis binding
+(global-set-key (kbd "<S-right>") 'keyboard-yank-primary)
#+end_src
-]
*** M-right-arrow
-:PROPERTIES:
-:CUSTOM_ID: 97a4513f-6837-47c5-9e2b-354542d67d29
-:END:
*** C-M-right-arrow
-:PROPERTIES:
-org-shiftdown
-:CUSTOM_ID: 34e66314-1d97-4eeb-b704-fe0733849ae4
-:END:
-[
#+begin_src emacs-lisp
(add-hook 'org-mode-hook
(lambda () (define-key org-mode-map (kbd "C-M-)") 'org-shiftdown)))
#+end_src
-]
*** C-S-right-arrow
-:PROPERTIES:
-:CUSTOM_ID: f441e351-ccd7-4ac1-9a4d-a0a1dd17b73e
-:END:
-*** [C-backspace] :drill:
-SCHEDULED: <2014-05-13 Tue>
- :PROPERTIES:
- backward-kill-symbol
- :CUSTOM_ID: 85bb4701-42e6-4617-8de8-dfb1f03b0358
- :ID: 9c0e1f0a-7b45-4670-86a2-9df945142cbe
- :DRILL_LAST_INTERVAL: 71.5839
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.75
- :DRILL_EASE: 4.85
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:12>
- :END:
+*** C-backspace]
backward-kill-symbol
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<C-backspace>") 'backward-kill-symbol)
(add-hook 'comint-mode-hook
(interactive "p")
(kill-region (point) (save-excursion (backward-symbol arg) (point))))
#+end_src
-]
*** M-backspace
-:PROPERTIES:
-:CUSTOM_ID: d4b3e996-208a-4b6d-a747-076e56bd7da3
-:END:
-*** [C-M-backspace] :drill:
-SCHEDULED: <2014-03-18 Tue>
-:PROPERTIES:
-:ID: 1030c81d-2cc2-42ba-8aa5-fe98271a00f2
-:DRILL_LAST_INTERVAL: 26.5334
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.75
-:DRILL_EASE: 2.929
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:46>
-:CUSTOM_ID: 606b0991-7431-4a8a-a909-b872e104cc88
-:END:
+*** C-M-backspace]
backward-kill-sexp
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<C-M-backspace>") 'backward-kill-sexp)
#+end_src
- ]
*** C-S-backspace
-:PROPERTIES:
-:CUSTOM_ID: 9c826109-76fd-403e-b15e-ceee5f925f6c
-:END:
*** C-f7
-:PROPERTIES:
-:CUSTOM_ID: 8e4b9a2c-35ff-4300-91ff-65d19d6b2fde
-:END:
*** M-f7
-:PROPERTIES:
-:CUSTOM_ID: 390a5b78-f5fe-41b6-bb36-ea9c81806989
-:END:
*** C-M-f7
-:PROPERTIES:
-:CUSTOM_ID: a8e9d8e4-4f29-4da6-a7b8-3d136a3e1c18
-:END:
*** C-S-f7
-:PROPERTIES:
-:CUSTOM_ID: 60bb5cd8-aeb3-4014-81f2-4cee72e9547c
-:END:
** right primary
-*** [C-*] :drill:
-SCHEDULED: <2014-03-16 Sun>
- :PROPERTIES:
- split-window-horizontally
- :ID: c9f11b06-583f-48e5-8d0a-56107feb0010
- :CUSTOM_ID: f745b337-8b65-44cc-849a-5e0953c9ebd9
- :DRILL_LAST_INTERVAL: 13.9711
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 6
- :DRILL_FAILURE_COUNT: 3
- :DRILL_AVERAGE_QUALITY: 2.982
- :DRILL_EASE: 2.447
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:04>
- :END:
+*** C-*]
split-window-horizontally
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-*") 'split-window-horizontally)
#+end_src
- ]
*** M-*
-*** [C-M-*] :drill:
-SCHEDULED: <2014-03-17 Mon>
-:PROPERTIES:
+*** C-M-*]
calc-dispatch
-:CUSTOM_ID: 5dbe3437-7364-4802-b558-00b2d5faacf6
-:ID: 2cffe3fb-a21a-4a49-83f8-65218c7a45a2
-:DRILL_LAST_INTERVAL: 15.2345
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 7
-:DRILL_FAILURE_COUNT: 2
-:DRILL_AVERAGE_QUALITY: 2.893
-:DRILL_EASE: 2.405
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:09>
-:END:
-calc-dispatch
-[
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-*") 'calc-dispatch)
#+end_src
-]
*** C-S-*
-:PROPERTIES:
-:CUSTOM_ID: 8c414142-8a42-46df-9ab2-898f1be636c8
-:END:
-*** [C-9] :drill:
-SCHEDULED: <2014-03-27 Thu>
-:PROPERTIES:
-:ID: eda4444e-f1c4-4db7-918d-96789f6a0b2b
-:CUSTOM_ID: 43d14154-2722-4ba5-b547-1b78c6274ebf
-:DRILL_LAST_INTERVAL: 50.6823
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 5.0
-:DRILL_EASE: 5.815
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:40>
-:END:
+*** C-9]
delete-window-or-exit
-[
#+begin_src emacs-lisp
- (global-set-key (kbd "C-9") 'delete-window-or-exit)
+(global-set-key (kbd "C-9") 'delete-window-or-exit)
- (defun delete-window-or-exit ()
- "Delete window or exit emacs."
- (interactive)
- (if (condition-case nil (delete-window) (error t))
- (if (or (boundp 'server-process) (> (length (frame-list)) 1))
- (delete-frame)
- (save-buffers-kill-terminal t))))
-
-#+end_src
-]
-*** [M-9] :drill:
-SCHEDULED: <2014-03-12 Wed>
- :PROPERTIES:
- kill-buffer-and-window
- :CUSTOM_ID: 9dc95338-4321-4354-9de2-69409f383a10
- :ID: 24b7dd06-c5cc-4264-954f-d8190d44c1bf
- :DRILL_LAST_INTERVAL: 20.7344
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.75
- :DRILL_EASE: 2.928
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:33>
- :END:
+(defun delete-window-or-exit ()
+ "Delete window or exit emacs."
+ (interactive)
+ (if (condition-case nil (delete-window) (error t))
+ (if (or (boundp 'server-process) (> (length (frame-list)) 1))
+ (progn (basic-save-buffer) (delete-frame))
+ (save-buffers-kill-terminal t))))
+#+end_src
+*** M-9]
kill-buffer
- [
#+begin_src emacs-lisp
(defun kill-buffer-no-ido ()
"kill-buffer, avoid the ido remapping"
(kill-buffer))
(global-set-key (kbd "M-9") 'kill-buffer-no-ido)
#+end_src
-]
strangely, in simple mode, this is overridden.
I found this map to override, but it didn't work, so it seems its being bound some other way.
I did a grep of the emacs sources, but couldn't find anything.
(define-key universal-argument-map [?9] nil)
-*** [C-M-9] :drill:
-SCHEDULED: <2014-03-17 Mon>
- :PROPERTIES:
- kill client buffer
- :ID: 2046ac28-1c06-410b-bdd9-39eaeada50c0
- :CUSTOM_ID: ffe9f636-31e5-48ba-b8fe-7c158ace744c
- :DRILL_LAST_INTERVAL: 25.6978
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.0
- :DRILL_EASE: 3.204
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:41>
- :END:
+*** C-M-9]
end server edit
- ,save & kill buffer it was opened externally via emacsclient
+ ,save & kill buffer if it was opened externally via emacsclient
- [
#+begin_src emacs-lisp
- (defun server-edit-save ()
- (interactive)
- (save-buffer)
- (server-edit))
- (global-set-key (kbd "C-M-9") 'server-edit-save)
+(defun server-edit-save ()
+ (interactive)
+ (save-buffer)
+ (server-edit))
+(global-set-key (kbd "C-M-9") 'server-edit-save)
#+end_src
-]
*** C-S-9
-:PROPERTIES:
-:CUSTOM_ID: 56d86cb3-cb86-42d8-9516-d7f2e086d88a
-:END:
-*** [C-u] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- :ID: a254c137-8a33-440d-b71e-5fbf9a21e2f5
- :CUSTOM_ID: 327992c0-6eba-4935-aec1-49871c2a8619
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:45>
- :END:
+*** C-u]
universal-argument
*** M-u
-*** [C-M-u] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- search-keybind
- :ID: a2e31aed-143f-4aa2-841b-857729417993
- :CUSTOM_ID: 62735d64-b89a-46b7-b32e-2453b651039d
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:43>
- :END:
+*** C-M-u]
search-keybind
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-u") 'search-keybind)
(delete-windows-on "*Help*")
))
#+end_src
- ]
*** C-S-u
-:PROPERTIES:
-:CUSTOM_ID: 7f72dfa0-ba8e-4cd5-b25b-8ff6066464e6
-:END:
*** C-i
-:PROPERTIES:
-:CUSTOM_ID: 3124e200-1d6e-4ad2-9a36-0d03e1e7dc38
-:END:
-----
*** M-i
-:PROPERTIES:
-:CUSTOM_ID: 95ab2045-88bf-4656-b8b1-6cebc87b89e0
-:END:
-*** [C-M-i] :drill:
-SCHEDULED: <2014-03-17 Mon>
- :PROPERTIES:
- query-replace-regexp
- :CUSTOM_ID: a3260b61-7c51-4d97-9a91-3ed702c5ae29
- :ID: 93f569b8-4bc8-49e1-a38e-ced3d3198ce8
- :DRILL_LAST_INTERVAL: 26.3579
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 1
- :DRILL_AVERAGE_QUALITY: 4.0
- :DRILL_EASE: 3.204
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:45>
- :END:
+*** C-M-i]
query-replace-regexp
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-i") 'query-replace-regexp)
(add-hook 'flyspell-mode-hook
(lambda () (define-key text-mode-map (kbd "C-M-i") nil)))
#+end_src
- ]
*** C-S-i
-:PROPERTIES:
-:CUSTOM_ID: 076edcc2-040e-4371-9851-4e587766e1fe
-:END:
-*** [C-o] :drill:
-SCHEDULED: <2014-05-13 Tue>
- :PROPERTIES:
- occur
- :ID: a502687a-24b4-4b73-9abc-bc85b89ab235
- :CUSTOM_ID: 82215193-63b3-4d63-8f70-d11a328fe72d
- :DRILL_LAST_INTERVAL: 71.5839
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.75
- :DRILL_EASE: 4.85
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:10>
- :END:
+*** C-o]
occur
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-o") 'occur)
#+end_src
- ]
*** M-o
-:PROPERTIES:
-:CUSTOM_ID: 8c58b99d-b1e4-4270-8d4a-8ae72e2a6470
-:END:
-*** [C-M-o] :drill:
-SCHEDULED: <2014-03-12 Wed>
- :PROPERTIES:
- counsel-imenu
- :CUSTOM_ID: 05d1ef50-43ee-46d7-b1ad-dd952543ab45
- :ID: 6dfcaa31-d223-4a14-904e-2f2395b2cf75
- :DRILL_LAST_INTERVAL: 10.3122
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 9
- :DRILL_FAILURE_COUNT: 9
- :DRILL_AVERAGE_QUALITY: 2.994
- :DRILL_EASE: 2.453
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:09>
- :END:
+*** C-M-o]
counsel-imenu
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-o") 'counsel-imenu)
#+end_src
- ]
*** C-S-o
-:PROPERTIES:
-:CUSTOM_ID: 7eacf048-4da8-4b2b-8a51-a4772111e285
-:END:
-*** [C-p] :drill:
-SCHEDULED: <2014-03-15 Sat>
- :PROPERTIES:
- move-mouse-to-point
- :ID: 6b1abcf6-7f95-45c4-a87f-0e86c43c5af1
- :CUSTOM_ID: 9c2e2ba9-f34e-48fe-b4ff-b9826882c1cc
- :DRILL_LAST_INTERVAL: 23.5247
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.5
- :DRILL_EASE: 2.73
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:41>
- :END:
+*** C-p]
move-mouse-to-point
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-p") 'move-mouse-to-point)
#+end_src
-]
*** M-p
-*** [C-M-p] :drill:leech:
- :PROPERTIES:
- delete-horizontal-space
- :ID: e2972d5b-28e7-46aa-896f-66d68a6df0de
- :CUSTOM_ID: d55616d3-a3f6-4e83-8807-748578a7b726
- :DRILL_LAST_INTERVAL: 0.0
- :DRILL_REPEATS_SINCE_FAIL: 0
- :DRILL_TOTAL_REPEATS: 10
- :DRILL_FAILURE_COUNT: 16
- :DRILL_AVERAGE_QUALITY: 2.433
- :DRILL_EASE: 2.18
- :DRILL_LAST_QUALITY: 2
- :DRILL_LAST_REVIEWED: <2014-04-14 Mon 11:31>
- :END:
+*** C-M-p]
delete-horizontal-space
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-p") 'delete-horizontal-space)
#+end_src
- ]
*** C-S-p
-:PROPERTIES:
-:CUSTOM_ID: f0cffe8d-d2cb-4f5d-a3f2-fa900e093ef7
-:END:
-*** [C-j] :drill:
-SCHEDULED: <2014-03-15 Sat>
+*** C-j]
pop-to-mark
- [
#+begin_src emacs-lisp
(defun my-pop-to-mark-command ()
"Jump to mark, and pop a new position for mark off the ring.
(define-key lisp-interaction-mode-map (kbd "C-j") nil)))
#+end_src
-]
-*** [M-j] :drill:
-SCHEDULED: <2014-03-13 Thu>
- :PROPERTIES:
- previous-error
- :ID: cb5f0e6f-815d-488f-bfb2-5d31bd5dc215
- :CUSTOM_ID: 474a3e12-95ac-4f43-b83a-36716f3e6f76
- :DRILL_LAST_INTERVAL: 21.5453
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.25
- :DRILL_EASE: 2.58
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:39>
- :END:
+*** M-j]
previous-error
- [
#+begin_src emacs-lisp
(global-set-key (kbd "M-j") 'previous-error)
#+end_src
- ]
-*** [C-M-j]
+*** C-M-j]
register prefix
-[
- :PROPERTIES:
- :CUSTOM_ID: ebcf7c71-3c93-431b-af6b-7c5df7f2945e
- :ID: d2604f6e-341d-4d57-91c8-ec6f2cdeb901
- :DRILL_LAST_INTERVAL: 23.5247
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.5
- :DRILL_EASE: 2.73
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:45>
- :END:
#+begin_src emacs-lisp
(define-key global-map (kbd "C-M-j") ctl-x-r-map)
(define-key ctl-x-r-map "m" 'kmacro-to-register)
#+end_src
- ]
*** C-S-j
-:PROPERTIES:
-:CUSTOM_ID: 381a6c7c-e763-4d9a-86f5-55a5e0afcee1
-:END:
-*** [C-k] :drill:
-SCHEDULED: <2014-05-13 Tue>
- :PROPERTIES:
- jump to register
- :CUSTOM_ID: 25a7ba1c-ddf3-47f1-9516-914a552e7a36
- :ID: 095be13e-f98c-4f42-9353-08329fa47d06
- :DRILL_LAST_INTERVAL: 71.5839
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.75
- :DRILL_EASE: 4.85
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:10>
- :END:
+*** C-k]
jump-to-register
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-k") 'jump-to-register)
#+end_src
- ]
-*** [M-k] :drill:
-SCHEDULED: <2014-03-15 Sat>
- :PROPERTIES:
- next-error
- :ID: c9f19dcc-4c14-4bdd-b350-c426dff14189
- :CUSTOM_ID: a96691bb-9e4c-414b-a093-d9961d453e21
- :DRILL_LAST_INTERVAL: 24.4352
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.75
- :DRILL_EASE: 2.929
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:40>
- :END:
+*** M-k]
next-error
- [
#+begin_src emacs-lisp
(global-set-key (kbd "M-k") 'next-error)
#+end_src
- ]
-*** [C-M-k] :drill:
-SCHEDULED: <2014-03-21 Fri>
-:PROPERTIES:
+*** C-M-k]
man
-:CUSTOM_ID: f61ea4ea-4597-422e-b7e3-d3cfad82603d
-:ID: 4c874a82-22dd-4bc2-a0ac-24420c30b888
-:DRILL_LAST_INTERVAL: 29.8228
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.25
-:DRILL_EASE: 3.589
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:46>
-:END:
-man
-[
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-k") 'man)
#+end_src
-]
*** C-S-k
-:PROPERTIES:
-:CUSTOM_ID: da51b99a-1782-45ad-92be-f4c0a645bea8
-:END:
-*** [C-l] :drill:
-SCHEDULED: <2014-05-13 Tue>
- :PROPERTIES:
- ivy-switch-buffer
- :ID: 3c7fabd9-572d-4945-ab4b-d7a8dc2cd9c5
- :CUSTOM_ID: 8a7572bd-4b5e-4464-b937-3d35adb1783f
- :DRILL_LAST_INTERVAL: 71.5839
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.75
- :DRILL_EASE: 4.85
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:10>
- :END:
+*** C-l]
ivy-switch-buffer
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-l") 'ivy-switch-buffer)
#+end_src
- ]
*** M-l
-:PROPERTIES:
-:CUSTOM_ID: 27f47c6c-36ad-430e-b4b0-5e96b635bf36
-:END:
-*** [C-M-l] :drill:
-SCHEDULED: <2014-04-04 Fri>
- :PROPERTIES:
- move cursor top bottom mid
- :ID: 37a3ccad-9b61-44b0-bddb-219a024cd963
- :CUSTOM_ID: 24b660d4-3ec4-4416-8a6a-b8224ed1ee8b
- :DRILL_LAST_INTERVAL: 25.8141
- :DRILL_REPEATS_SINCE_FAIL: 5
- :DRILL_TOTAL_REPEATS: 5
- :DRILL_FAILURE_COUNT: 1
- :DRILL_AVERAGE_QUALITY: 3.0
- :DRILL_EASE: 2.456
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:36>
- :END:
+*** C-M-l]
move cursor top bottom mid, comint clear screen
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-l") 'move-to-window-line-top-bottom)
#+end_src
- ]
*** C-S-l
-:PROPERTIES:
-:CUSTOM_ID: c355178f-c9b4-4ae7-9627-b4117fef45b9
-:END:
-*** [C-;] :drill:
-SCHEDULED: <2014-03-19 Wed>
- :PROPERTIES:
- comment-dwim
- :CUSTOM_ID: 7e3710eb-5460-4460-8bf0-488302e4ce35
- :ID: 1c1b7a4a-484b-4faf-ae20-65d096ff2574
- :DRILL_LAST_INTERVAL: 27.9041
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.0
- :DRILL_EASE: 3.204
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:45>
- :END:
+*** C-;]
used in flyspell, not sure what for, otherwise unbound
*** M-;
-:PROPERTIES:
-:CUSTOM_ID: 211e76d9-d89a-4cc6-abce-69397d456fda
-:END:
comment-dwim
-*** [C-M-;] :drill:
-SCHEDULED: <2014-04-07 Mon>
- :PROPERTIES:
- comment-current-line-dwim
- :ID: 9ff312cc-f460-4f5d-9e4b-37f7ed538209
- :CUSTOM_ID: 28680a96-5223-4632-80b9-b1facdd541e7
- :DRILL_LAST_INTERVAL: 42.8284
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.5
- :DRILL_EASE: 4.122
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-23 Sun 01:51>
- :END:
+*** C-M-;]
comment-current-line-dwim
- [
#+begin_src emacs-lisp
(defun comment-current-line-dwim ()
"Comment or uncomment the current line."
(move-beginning-of-line 2))
(global-set-key (kbd "C-M-;") 'comment-current-line-dwim)
#+end_src
- ]
*** C-S-;
-:PROPERTIES:
-:CUSTOM_ID: c9f00d6c-f9d2-420f-a08e-21ea78023066
-:END:
-*** [C-m]
-:PROPERTIES:
-:CUSTOM_ID: deee53ba-dfa2-4910-894c-55ae98d11aa4
-:END:
+*** C-m]
*** M-m
-:PROPERTIES:
-:CUSTOM_ID: f7237459-96b6-4de9-937f-5fbfa9ca5b1e
-:END:
-*** [C-M-m] :drill:
-SCHEDULED: <2014-03-11 Tue>
- :PROPERTIES:
- recursive grep
- :CUSTOM_ID: f283f705-cba0-45db-b80f-5d20415b2eee
- :ID: b952fa90-b492-4f85-9d8e-5cd24c060b94
- :DRILL_LAST_INTERVAL: 9.1491
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 7
- :DRILL_FAILURE_COUNT: 3
- :DRILL_AVERAGE_QUALITY: 2.924
- :DRILL_EASE: 2.42
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:05>
- :END:
+*** C-M-m]
recursive grep
- [
#+begin_src emacs-lisp
(define-key global-map (kbd "C-M-m") 'rgrep)
#+end_src
-]
*** C-S-m
-:PROPERTIES:
-:CUSTOM_ID: dd3136a5-5383-4fc7-8c9f-fcbaba251a76
-:END:
-*** [C-,] :drill:
-SCHEDULED: <2014-05-13 Tue>
- :PROPERTIES:
- counsel-find-file
- :CUSTOM_ID: 6cbf3a85-f260-453a-920b-850ff5e986b1
- :ID: df0f3769-bcfc-4cb9-8943-bb86dafb2711
- :DRILL_LAST_INTERVAL: 71.5839
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.75
- :DRILL_EASE: 4.85
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:10>
- :END:
+*** C-,]
counsel-find-file
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-,") 'counsel-find-file)
(add-hook 'flyspell-mode-hook
(lambda () (define-key flyspell-mode-map (kbd "C-,") nil)))
#+end_src
- ]
*** M-,
-*** [C-M-,] :drill:
-SCHEDULED: <2014-03-19 Wed>
-:PROPERTIES:
+*** C-M-,]
find-file-in-project
-:ID: fca85295-0567-4443-ac74-a54b93a2e603
-:CUSTOM_ID: bfdf6111-029d-462b-bcca-50a3ed2162d5
-:DRILL_LAST_INTERVAL: 24.3844
-:DRILL_REPEATS_SINCE_FAIL: 5
-:DRILL_TOTAL_REPEATS: 5
-:DRILL_FAILURE_COUNT: 2
-:DRILL_AVERAGE_QUALITY: 3.0
-:DRILL_EASE: 2.456
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-02-23 Sun 01:51>
-:END:
-find-file-in-project
-[
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-,") 'find-file-in-project)
#+end_src
- ]
*** C-S-,
-:PROPERTIES:
-:CUSTOM_ID: 74a86b9e-9a56-4f5e-a6eb-9f2cd09da613
-:END:
-*** [C-.] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- recentf-ido-find-file
- :CUSTOM_ID: 0675c171-8677-44a8-882c-e7ed42715e31
- :ID: a600d171-1964-4a81-a39e-cfac4716f96d
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:41>
- :END:
+*** C-.]
find recent file
- [
Taken from starter kit.
#+begin_src emacs-lisp
(defun recentf-ido-find-file ()
(add-hook 'php-mode-hook
(lambda () (define-key php-mode-map (kbd "C-.") nil)))
#+end_src
-]
*** M-.
*** C-M-.
-:PROPERTIES:
-:CUSTOM_ID: 824d422c-67b6-4d68-af11-6a2135e528f5
-:END:
-
-[
#+begin_src emacs-lisp
(define-key dot-mode-map (kbd "C-M-.") nil)
;; (global-set-key (kbd "C-M-.") 'execute-extended-command)
#+end_src
- ]
*** C-S-.
-:PROPERTIES:
-:CUSTOM_ID: 346effe7-027b-4c4a-a236-3bc6ef541a0c
-:END:
-*** [C-/] :drill:
-:PROPERTIES:
-:CUSTOM_ID: 941a7fa8-84b9-434d-89a0-1487385ec479
-:ID: 1bf4af8d-58bb-4b58-af60-2ed87f32f4eb
-:END:
+*** C-/]
join lines
- [
#+begin_src emacs-lisp
(defun vim-style-join-line ()
(interactive)
(global-set-key (kbd "C-/") 'vim-style-join-line)
(define-key undo-tree-map (kbd "C-/") nil)
#+end_src
- ]
*** M-/
-:PROPERTIES:
-:CUSTOM_ID: f65acefa-7e11-438e-a59c-42a9c7c71607
-:END:
-*** [C-M-/] :drill:
-:PROPERTIES:
-:CUSTOM_ID: 37f67593-4f60-4d3b-9aad-6c9bc4882443
-:ID: c41dd5ab-619f-40fe-9471-9ba59d0fef46
-:END:
-copy-variable
-[
+*** C-M-/]
+copy-buffer-file-name
#+begin_src emacs-lisp
+;; haven't bound this atm, todo, maybe someday?
(defun copy-variable (variable)
(interactive
(let ((v (variable-at-point))
(list (if (equal val "")
v (intern val)))))
(kill-new (symbol-value variable)))
-(global-set-key (kbd "C-M-/") 'copy-variable)
+
+(defun copy-buffer-file-name ()
+ (interactive)
+ (let ((name (cond
+ ((derived-mode-p 'mu4e-view-mode) (mu4e-message-field-at-point :path))
+ (t buffer-file-name))
+ ))
+ (kill-new name)
+ (message name)))
+
+
+(global-set-key (kbd "C-M-/") 'copy-buffer-file-name)
+
#+end_src
-]
*** C-S-/
-:PROPERTIES:
-:CUSTOM_ID: ff612b05-8a3f-4599-a95b-f8af19b71b47
-:END:
-*** [C-8] :drill:
-SCHEDULED: <2014-03-13 Thu>
-:PROPERTIES:
-calc-embedded-word
-:CUSTOM_ID: 251c4a1a-a683-4804-a706-d0d3752e42fa
-:ID: 8084cd41-1833-4e16-ac01-60a5738d0bf3
-:DRILL_LAST_INTERVAL: 22.2211
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 1
-:DRILL_AVERAGE_QUALITY: 3.5
-:DRILL_EASE: 2.73
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:35>
-:END:
+*** C-8]
calc-embedded-word
-[
#+begin_src emacs-lisp
(global-set-key (kbd "C-8") 'calc-embedded-word)
#+end_src
-]
*** M-8
-:PROPERTIES:
-:CUSTOM_ID: 34f4f850-c3e4-4724-aabc-08eee19f034a
-:END:
*** C-M-8
-:PROPERTIES:
-:CUSTOM_ID: 52191c76-756e-4dcc-87a5-2b84c550db5f
-:END:
*** C-S-8
-:PROPERTIES:
-:CUSTOM_ID: 3f677c1a-7011-467e-ae4c-4b944807376b
-:END:
-*** [C-up-arrow] :drill:
-SCHEDULED: <2014-03-14 Fri>
- :PROPERTIES:
- back defun/headline
- :CUSTOM_ID: f47d312a-063d-42ed-a352-176298a2cb0c
- :ID: 93fe8dac-4206-4131-9264-3411e6467b01
- :DRILL_LAST_INTERVAL: 23.4066
- :DRILL_REPEATS_SINCE_FAIL: 5
- :DRILL_TOTAL_REPEATS: 5
- :DRILL_FAILURE_COUNT: 3
- :DRILL_AVERAGE_QUALITY: 3.2
- :DRILL_EASE: 2.554
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 18:04>
- :END:
+*** C-up-arrow]
org prev headline
- [
#+begin_src emacs-lisp
(define-key undo-tree-map "\C-_" nil)
;; disabled just because i don't want to accidentally hit it
#+end_src
-]
*** M-up-arrow
-:PROPERTIES:
-:CUSTOM_ID: 30f87801-2c2d-4722-9348-fb38ea6c09b0
-:END:
*** C-M-up-arrow
-*** C-S-up-arrow :drill:
+*** C-S-up-arrow
winner undo
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<C-S-_>") 'winner-undo)
#+end_src
- ]
-*** [C-down-arrow] :drill:
-SCHEDULED: <2014-03-13 Thu>
- :PROPERTIES:
- forward dfun/headline
- :CUSTOM_ID: 27435136-b3d7-4f25-aa85-2a7363a7f366
- :ID: da405d83-b0af-4778-9703-a3f109a1233d
- :DRILL_LAST_INTERVAL: 10.7692
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 6
- :DRILL_FAILURE_COUNT: 1
- :DRILL_AVERAGE_QUALITY: 3.167
- :DRILL_EASE: 2.537
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:09>
- :END:
+*** C-down-arrow]
org next headline
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<C-kp-enter>") 'end-of-defun)
#+end_src
- ]
*** M-down-arrow
-*** [C-M-down-arrow] :drill:
-SCHEDULED: <2014-03-20 Thu>
-:PROPERTIES:
-toggle-mark-activation
-:ID: c57f3bab-8ea1-423d-b759-e1ec2586753c
-:CUSTOM_ID: 3bcb35fd-6d54-4213-b94f-2739c0bc0041
-:DRILL_LAST_INTERVAL: 17.6506
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 7
-:DRILL_FAILURE_COUNT: 4
-:DRILL_AVERAGE_QUALITY: 3.661
-:DRILL_EASE: 2.851
-:DRILL_LAST_QUALITY: 5
-:DRILL_LAST_REVIEWED: <2014-03-02 Sun 21:10>
-:END:
+*** C-M-down-arrow]
toggle-mark-activation
-[
#+begin_src emacs-lisp
(defun toggle-mark-activation ()
(interactive)
(global-set-key (kbd "<C-M-kp-enter>") 'toggle-mark-activation)
#+end_src
-]
winner redo
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<C-S-kp-enter>") 'winner-redo)
#+end_src
- ]
-
-*** [C-S-down-arrow] :drill:
-SCHEDULED: <2014-03-19 Wed>
- :PROPERTIES:
- smex-major-mode-commands
- :CUSTOM_ID: 1434bdd0-c5a8-4c96-9b92-9474e88fd1c5
- :ID: 1e992e46-ec69-416c-b7d7-7c87da109b43
- :DRILL_LAST_INTERVAL: 24.3844
- :DRILL_REPEATS_SINCE_FAIL: 5
- :DRILL_TOTAL_REPEATS: 5
- :DRILL_FAILURE_COUNT: 2
- :DRILL_AVERAGE_QUALITY: 3.0
- :DRILL_EASE: 2.456
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-02-23 Sun 02:28>
- :END:
+
+*** C-S-down-arrow]
m-x for major mode
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<C-S-kp-enter>") 'smex-major-mode-commands)
#+end_src
-]
*** C-lbracket
-:PROPERTIES:
-:CUSTOM_ID: 9d9916dd-3280-47dd-aab1-cd28d5ebfe15
-:END:
----
*** M-lbracket
-*** [C-M-lbracket] :drill:
-SCHEDULED: <2014-03-15 Sat>
-:PROPERTIES:
+*** C-M-lbracket]
scroll-right
-:CUSTOM_ID: 7411b1a5-c8fa-4bcc-8788-798e5635dd62
-:ID: 0bf13532-1df9-4eb3-953c-10901f2a5da5
-:DRILL_LAST_INTERVAL: 23.5247
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.5
-:DRILL_EASE: 2.73
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:25>
-:END:
-scroll-right
-[
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-[") 'scroll-right)
#+end_src
-]
*** C-S-lbracket
-*** [C-rbracket]
-:PROPERTIES:
-:CUSTOM_ID: 21b38c6b-3a46-4a08-8eca-d44abb148287
-:END:
+*** C-rbracket]
fill-paragraph
#+begin_src emacs-lisp
(global-set-key (kbd "C-]") 'fill-paragraph)
#+end_src
*** M-rbracket
-*** [C-M-rbracket] :drill:
-SCHEDULED: <2014-03-15 Sat>
-:PROPERTIES:
-scroll-left
-:CUSTOM_ID: c9c18f48-d0ca-4a1b-a751-7165f40118a3
-:ID: ff008422-b6f5-4770-9e53-e6acdac90b45
-:DRILL_LAST_INTERVAL: 24.4352
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 3.75
-:DRILL_EASE: 2.929
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:44>
-:END:
+*** C-M-rbracket]
scroll-left
-[
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-]") 'scroll-left)
#+end_src
-]
*** C-S-rbracket
-:PROPERTIES:
-:CUSTOM_ID: d42245ca-3246-477b-bda9-8776cd668cd1
-:END:
-*** [C-return] :drill:
-SCHEDULED: <2014-03-12 Wed>
- :PROPERTIES:
- newline next line
- :ID: 20e450f0-6467-40f2-bd1b-b4038693e73f
- :CUSTOM_ID: baf7ea5a-d16d-4fee-a6ce-542cc11beb97
- :DRILL_LAST_INTERVAL: 20.7344
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.75
- :DRILL_EASE: 2.928
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:29>
- :END:
+*** C-return]
newline-anywhere
- [
#+begin_src emacs-lisp
(defun newline-anywhere ()
"Add a newline from anywhere in the line."
(global-set-key (kbd "<C-return>") 'newline-anywhere)
#+end_src
-]
-*** [M-return] :drill:
-SCHEDULED: <2014-03-11 Tue>
- :PROPERTIES:
- non-indented newline
- :ID: 4fc4d372-765e-4e2e-87f4-0a0e1fd93f34
- :CUSTOM_ID: e6895ad3-a2c8-46c8-abbc-1bba94a88596
- :DRILL_LAST_INTERVAL: 19.9622
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.5
- :DRILL_EASE: 2.73
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:30>
- :END:
+*** M-return]
plain newline
- [
#+begin_src emacs-lisp
(defun plain-newline ()
(interactive)
(insert "\n"))
(global-set-key (kbd "<M-return>") 'plain-newline)
#+end_src
-]
*** C-M-return
-:PROPERTIES:
-open newline on previous line
-:CUSTOM_ID: 2a8fc6ea-a550-4437-9e35-3b3f2776788a
-:END:
-[
#+begin_src emacs-lisp
(defun newline-anywhere-previous ()
"Add a newline from anywhere in the line."
(newline-and-indent))
(global-set-key (kbd "<C-M-return>") 'newline-anywhere-previous)
#+end_src
-]
*** C-S-return
-:PROPERTIES:
-:CUSTOM_ID: 787cc59e-ce0f-4291-a9d5-fd4e14b0b83b
-:END:
-*** [C-space] :drill:
-SCHEDULED: <2014-03-18 Tue>
-:PROPERTIES:
-org-edit-special
-:CUSTOM_ID: 132daa1a-8e5f-47f1-a28d-35bee873aeac
-:ID: 3204f2ca-10b2-469b-8b70-fb660e35478a
-:DRILL_LAST_INTERVAL: 41.7787
-:DRILL_REPEATS_SINCE_FAIL: 3
-:DRILL_TOTAL_REPEATS: 3
-:DRILL_FAILURE_COUNT: 0
-:DRILL_AVERAGE_QUALITY: 4.667
-:DRILL_EASE: 4.583
-:DRILL_LAST_QUALITY: 4
-:DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:44>
-:END:
+*** C-space]
org-edit-special
-[
#+begin_src emacs-lisp
+;; commented due to new keyboard needing ctrl-space for mark
;; (kbd "<C-space>") does not work, (kbd "C-SPC") should work
-(add-hook 'org-mode-hook
- (lambda ()
- (define-key org-mode-map (kbd "C-SPC") 'org-edit-special)
- ;; org-src-mode-map is broken in git version of emacs.
- ;; temporarily use this for exiting edit-special mode.
- (global-set-key (kbd "C-M--") 'org-edit-src-exit)
- (define-key org-src-mode-map (kbd "C-SPC") 'org-edit-src-exit)))
+;; (add-hook 'org-mode-hook
+;; (lambda ()
+;; (define-key org-mode-map (kbd "C-SPC") 'org-edit-special)
+;; ;; org-src-mode-map is broken in git version of emacs.
+;; ;; temporarily use this for exiting edit-special mode.
+;; (global-set-key (kbd "C-M--") 'org-edit-src-exit)
+;; (define-key org-src-mode-map (kbd "C-SPC") 'org-edit-src-exit)))
#+end_src
-]
*** M-space
-:PROPERTIES:
-:CUSTOM_ID: bbffb12e-03f2-4a26-a9e4-fd263ad6b518
-:END:
*** C-M-space
-:PROPERTIES:
-spell check word
-:CUSTOM_ID: 02359b66-bf6e-4f41-9f03-e83fcbe3e68c
-:END:
- [
before or under cursor
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-SPC") 'ispell-word)
#+end_src
- ]
*** C-S-space
-:PROPERTIES:
-:CUSTOM_ID: a28e904f-f2bd-48d3-9718-af3f541e611e
-:END:
** left secondary
*** C-=
-:PROPERTIES:
-:CUSTOM_ID: 6b01dcdd-d1c1-4e3f-9e28-9c3574682f95
-:END:
*** M-=
-:PROPERTIES:
-:CUSTOM_ID: 6a63486f-ea5b-4ece-a535-5277022e0cde
-:END:
*** C-M-=
-:PROPERTIES:
-:CUSTOM_ID: 1e245ef6-5bdb-4f99-b8e2-f5d45a7c0847
-:END:
*** C-S-=
-:PROPERTIES:
-:CUSTOM_ID: 0f9aa2b8-83c7-433c-80e0-f90ee802365f
-:END:
*** C-1
-:PROPERTIES:
-:CUSTOM_ID: 06374c1c-025b-47c2-90b2-82f37031093b
-:END:
*** M-1
-:PROPERTIES:
-:CUSTOM_ID: 51810ebd-52f3-4e68-9434-e2347a834787
-:END:
*** C-M-1
-:PROPERTIES:
-:CUSTOM_ID: 9207526f-a925-4ecc-bd30-98cbd580d67a
-:END:
*** C-S-1
-:PROPERTIES:
-:CUSTOM_ID: 58a7a929-50b5-4393-9b08-59ad2039b263
-:END:
*** C-4
-:PROPERTIES:
-:CUSTOM_ID: 24a0c3c4-bce7-4a94-8a31-e5259387c573
-:END:
*** M-4
-:PROPERTIES:
-:CUSTOM_ID: 2d4fa927-2140-424b-9990-e8f2c3424e57
-:END:
-*** C-M-4 :drill:
+*** C-M-4
widen
-[
-:PROPERTIES:
-:CUSTOM_ID: 3ff50f5f-f286-4a73-962b-58dbcf3b09b1
-:ID: addc832b-5547-4d45-a1f5-3e9283920612
-:END:
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-4") 'widen)
#+end_src
-]
*** C-S-4
-:PROPERTIES:
-:CUSTOM_ID: ba9ed568-7ba1-4283-b4c7-57fcb9a5a477
-:END:
*** C-5
-:PROPERTIES:
-:CUSTOM_ID: 83bc2d8a-a225-4b6f-ab98-f47aa6d1e73f
-:END:
*** M-5
-:PROPERTIES:
-:CUSTOM_ID: 1b8f04c3-91b5-43cd-8a1a-94c8105eff24
-:END:
*** C-M-5
-:PROPERTIES:
-:CUSTOM_ID: fab28de6-7fe4-45d7-a856-5d29a9085f5d
-:END:
*** C-S-5
-:PROPERTIES:
-:CUSTOM_ID: b22cdf04-bc77-493b-a65c-5992befc1a62
-:END:
-*** [C-tab-key] :drill:
-SCHEDULED: <2014-03-12 Wed>
-:PROPERTIES:
-query-replace
-:CUSTOM_ID: 68313551-90cd-47a6-8170-1745348add17
-:ID: 5b315ca6-c623-4b23-bef3-31b325591d01
-:DRILL_LAST_INTERVAL: 20.9905
-:DRILL_REPEATS_SINCE_FAIL: 4
-:DRILL_TOTAL_REPEATS: 4
-:DRILL_FAILURE_COUNT: 2
-:DRILL_AVERAGE_QUALITY: 3.5
-:DRILL_EASE: 2.73
-:DRILL_LAST_QUALITY: 3
-:DRILL_LAST_REVIEWED: <2014-02-19 Wed 16:32>
-:END:
+*** C-tab-key]
query-replace
-[
#+begin_src emacs-lisp
(global-set-key (kbd "<C-kp-add>") 'query-replace)
#+end_src
-]
*** M-tab-key
*** C-M-tab-key
*** C-S-tab-key
-*** [C-t] :drill:
-SCHEDULED: <2014-03-24 Mon>
- :PROPERTIES:
- org change todo state
- :ID: b9a6ec32-9b64-403f-be09-73769f778d1f
- :CUSTOM_ID: aaac3048-9125-4fd5-b8f2-21bafcc1ff1c
- :DRILL_LAST_INTERVAL: 32.7466
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.0
- :DRILL_EASE: 3.204
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:53>
- :END:
+*** C-t]
org cycle todo / toggle comint motion
- [
#+begin_src emacs-lisp
(add-hook 'org-mode-hook
(lambda ()
(define-key map (kbd "<down>") 'my-comint-next-input)
(goto-char (point-max)))))
-(defun ian-sign-email ()
- (interactive)
- (insert "Ian Kelling
-https://iankelling.org"))
-
(eval-after-load "message"
- '(define-key message-mode-map (kbd "C-t") 'ian-sign-email))
+ '(define-key message-mode-map (kbd "C-t") 'mail-signature))
#+end_src
Thanks for the update. I will be enjoying it.
#+RESULTS:
: comint-toggle-arrow-keys
- ]
*** M-t
-:PROPERTIES:
-:CUSTOM_ID: 4542dc3a-d876-4726-8c8e-61c7c9cecd64
-:END:
-*** [C-M-t] :drill:
-SCHEDULED: <2014-03-15 Sat>
- :PROPERTIES:
- org insert timestamp
- :ID: ed43d561-cf73-4123-8cf2-12e184f99e0f
- :CUSTOM_ID: 5bc609b1-9428-4b82-a55d-811fefe65331
- :DRILL_LAST_INTERVAL: 23.5247
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 3.5
- :DRILL_EASE: 2.73
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-02-19 Wed 17:41>
- :END:
+*** C-M-t]
org timestamp
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-t") 'org-time-stamp-with-time)
#+end_src
-]
*** C-S-t
-:PROPERTIES:
-:CUSTOM_ID: 6a6fcd06-5822-4a3d-8e2e-1fc0f64357b2
-:END:
*** C-home
-:PROPERTIES:
-:CUSTOM_ID: 1919659a-b466-4519-9276-8bf06a916066
-:END:
start of buffer
*** M-home
-:PROPERTIES:
-:CUSTOM_ID: 29a3b536-201d-4499-b131-afe58e6f45b4
-:END:
*** C-M-home
-:PROPERTIES:
-:CUSTOM_ID: d9df9b43-357a-43e1-bb1c-47d61f095738
-:END:
*** C-S-home
-:PROPERTIES:
-:CUSTOM_ID: a91ee772-a59c-4083-a65c-6f9b294b517c
-:END:
*** C-end
-:PROPERTIES:
-:CUSTOM_ID: 0a7bd629-cbcc-4761-8fe2-cc9370b985a4
-:END:
end of buffer
*** M-end
-:PROPERTIES:
-:CUSTOM_ID: 1c215db5-a50c-4718-868a-871d69acf117
-:END:
*** C-M-end
-:PROPERTIES:
-:CUSTOM_ID: cf2df317-a0b1-41e6-9919-67e77bb796f8
-:END:
*** C-S-end
-:PROPERTIES:
-:CUSTOM_ID: a4721bb0-9cbc-4f3c-b292-645d5121c839
-:END:
*** C-f9
-:PROPERTIES:
-:CUSTOM_ID: 014536d9-68e3-46f5-9594-e74fe64f4d9e
-:END:
*** M-f9
-:PROPERTIES:
-:CUSTOM_ID: 6dee0f1b-3680-4a72-8a80-e31b9c7c219d
-:END:
*** C-M-f9
-:PROPERTIES:
-:CUSTOM_ID: f5e835dd-e2b8-42eb-b7f1-9ec76c7dfcb8
-:END:
*** C-S-f9
-:PROPERTIES:
-:CUSTOM_ID: c3aba493-9e85-40b7-989d-7e17ba2b55a7
-:END:
** right secondary
*** C-6
-:PROPERTIES:
-:CUSTOM_ID: e44e584b-d925-4036-9ad5-a90d02e74bef
-:END:
save-buffers-kill-emacs
-[
#+begin_src emacs-lisp
(global-set-key (kbd "C-6") 'save-buffers-kill-emacs)
#+end_src
-]
*** M-6
-*** [C-M-6] :drill:
-:PROPERTIES:
-:CUSTOM_ID: da73de75-0914-4f48-81d5-9b408433b14b
-:ID: bcf78e2e-810e-4a6d-9056-bd488aaa373b
-:END:
+*** C-M-6]
insert-small-copyright
-[
#+begin_src emacs-lisp
(defun insert-small-copyright ()
(interactive)
(beginning-of-line)
(let ((beg (point)))
- (insert "Copyright (C) 2016 Ian Kelling\nThis program is under GPL v. 3 or later, see <http://www.gnu.org/licenses/>")
+ (insert "Copyright (C) 2017 Ian Kelling\nThis program is under GPL v. 3 or later, see <http://www.gnu.org/licenses/>")
(comment-region beg (point))))
(global-set-key (kbd "C-M-6") 'insert-small-copyright)
#+end_src
-]
*** C-S-6
*** C-7
*** M-7
-*** [C-M-7] :drill:
-:PROPERTIES:
-:CUSTOM_ID: a68c6b8e-9911-475e-ab35-e239771fe881
-:ID: ae9704b8-1492-4dc0-806a-dd3407526733
-:END:
+*** C-M-7]
insert-full-copyright
-[
#+begin_src emacs-lisp
(defun insert-full-copyright ()
(interactive)
(beginning-of-line)
(let ((beg (point)))
- (insert "Copyright (C) 2016 Ian Kelling\n")
+ (insert "Copyright (C) 2017 Ian Kelling\n")
(insert "\n")
(insert "This program is free software: you can redistribute it and/or modify\n")
(insert "it under the terms of the GNU General Public License as published by\n")
(global-set-key (kbd "C-M-7") 'insert-full-copyright)
#+end_src
-]
*** C-S-7
-:PROPERTIES:
-:CUSTOM_ID: 05f5737b-a320-403c-a8f1-fa0a02f679e1
-:END:
*** C-0
-:PROPERTIES:
-:CUSTOM_ID: 96ae2fcc-3a0c-40c4-aef8-06aff3fd42be
-:END:
text-scale-reset
-[
#+begin_src emacs-lisp
(defun text-scale-reset ()
(interactive)
(text-scale-set 0))
(global-set-key (kbd "C-0") 'text-scale-reset)
#+end_src
-]
*** M-0
-:PROPERTIES:
-:CUSTOM_ID: c5735fdf-d0d9-468c-917c-3936e409a2bc
-:END:
*** C-M-0
-:PROPERTIES:
-:CUSTOM_ID: 0e7f83a5-600e-4016-af98-95904300c016
-:END:
insert-apache
-[
#+begin_src emacs-lisp
(defun insert-apache ()
(interactive)
(beginning-of-line)
(let ((beg (point)))
- (insert "Copyright (C) 2016 Ian Kelling\n")
+ (insert "Copyright (C) 2017 Ian Kelling\n")
(insert "\n")
(insert "Licensed under the Apache License, Version 2.0 (the \"License\");\n")
(insert "you may not use this file except in compliance with the License.\n")
(comment-region beg (point))))
(global-set-key (kbd "C-M-0") 'insert-apache)
#+end_src
-]
*** C-S-0
-:PROPERTIES:
-:CUSTOM_ID: d1706bc7-7cf0-4b49-87d0-15bf76eaca5f
-:END:
*** C--
-:PROPERTIES:
-:CUSTOM_ID: 3713b701-b31a-4612-b663-f232005b4122
-:END:
*** M--
-:PROPERTIES:
-:CUSTOM_ID: ca833b78-b279-4d1f-b1c9-6c70fdf20f57
-:END:
*** C-M--
-:PROPERTIES:
-:CUSTOM_ID: 6febc7ea-9cc7-488c-af34-538b8e69633b
-:END:
org-edit-src-exit
*** C-S--
-:PROPERTIES:
-:CUSTOM_ID: c73af1d7-61f2-4c1b-935e-43f077d8d915
-:END:
-*** [C-y] :drill:
-SCHEDULED: <2014-03-27 Thu>
- :PROPERTIES:
- :ID: 4c0f74f8-04ed-40d8-8ec3-6e2bed03c2b9
- :CUSTOM_ID: 97aee7f1-3647-4602-a65a-45e8a3aa3a7c
- :DRILL_LAST_INTERVAL: 50.6823
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 3
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 5.0
- :DRILL_EASE: 5.815
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-04 Tue 11:45>
- :END:
+*** C-y]
undo-tree-redo
- [
#+begin_src emacs-lisp
- (global-set-key (kbd "C-y") 'undo-tree-redo)
+(global-set-key (kbd "C-y") 'undo-tree-redo)
+(add-hook 'org-mode-hook
+ (lambda () (define-key org-mode-map (kbd "C-y") nil)))
#+end_src
- ]
*** M-y
-:PROPERTIES:
-:CUSTOM_ID: 35072ca8-7fd6-4a64-bc7a-2636de575bd1
-:END:
*** C-M-y
*** C-S-y
-:PROPERTIES:
-:CUSTOM_ID: 964fa784-37e3-48c6-af4b-c7e91f67a93a
-:END:
*** C-\
- :PROPERTIES:
- sr-speedbar-toggle
- :CUSTOM_ID: b8ad3ee9-7bf6-4069-a300-49cd298008a7
- :END:
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-\\") 'sr-speedbar-toggle)
#+end_src
- ]
*** M-\
-:PROPERTIES:
-:CUSTOM_ID: c1d53d84-b8a9-49cb-bfd6-4420931c8873
-:END:
-*** [C-M-\] :drill:
-SCHEDULED: <2014-03-21 Fri>
- :PROPERTIES:
- mark-defun
- :ID: d45bce17-45bc-41f0-8994-aa7bc3b2fa92
- :CUSTOM_ID: 6a583354-48f8-4503-bf87-b8ba56411435
- :DRILL_LAST_INTERVAL: 11.7003
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 9
- :DRILL_FAILURE_COUNT: 6
- :DRILL_AVERAGE_QUALITY: 2.815
- :DRILL_EASE: 2.369
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:36>
- :END:
+*** C-M-\]
mark-defun
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-\\") 'mark-defun)
#+end_src
- ]
*** C-S-\
-:PROPERTIES:
-:CUSTOM_ID: 30edfb48-852f-4f2c-ba38-2635927d4950
-:END:
*** C-h
-:PROPERTIES:
-:CUSTOM_ID: 3c5f241f-fc62-459d-ab85-6b7c1fb04801
-:END:
help-prefix
*** M-h
-:PROPERTIES:
-:CUSTOM_ID: 6df13b90-490b-4cca-a49d-4f2e3ce5bea3
-:END:
*** C-M-h
-:PROPERTIES:
-:CUSTOM_ID: 47f0d1f3-78ea-49d7-a6d7-06627ca745bd
-:END:
*** C-S-h
-:PROPERTIES:
-:CUSTOM_ID: 3be3db5c-9905-474b-b773-1aee515625f5
-:END:
*** C-'
-:PROPERTIES:
-:CUSTOM_ID: 9f252721-a2d5-46c6-b268-8ed597256229
-:END:
eval-expression
-[
#+begin_src emacs-lisp
(global-set-key (kbd "C-'") 'eval-expression)
#+end_src
-]
*** M-'
-:PROPERTIES:
-:CUSTOM_ID: f00b9c88-68bb-4831-872f-afb5ff82c104
-:END:
*** C-M-'
-:PROPERTIES:
-:CUSTOM_ID: 0d39d36c-115a-4570-b4b1-818718409a49
-:END:
*** C-S-'
-:PROPERTIES:
-:CUSTOM_ID: 230f50ef-48fd-4f13-aa62-e4a492c4515d
-:END:
-*** [C-n] :drill:
-SCHEDULED: <2014-04-07 Mon>
- :PROPERTIES:
- unpop-to-mark-command
- :CUSTOM_ID: 52ebb720-589b-485c-89dc-0dfb78e6dad4
- :ID: 32f1c87d-ee1f-4117-8059-32fd8facbeff
- :DRILL_LAST_INTERVAL: 42.8284
- :DRILL_REPEATS_SINCE_FAIL: 4
- :DRILL_TOTAL_REPEATS: 4
- :DRILL_FAILURE_COUNT: 0
- :DRILL_AVERAGE_QUALITY: 4.5
- :DRILL_EASE: 4.122
- :DRILL_LAST_QUALITY: 5
- :DRILL_LAST_REVIEWED: <2014-02-23 Sun 01:51>
- :END:
+*** C-n]
unpop to mark
- [
#+begin_src emacs-lisp
(defun unpop-to-mark-command ()
"Unpop off mark ring. Does nothing if mark ring is empty."
(global-set-key (kbd "C-n") 'unpop-to-mark-command)
#+end_src
-]
*** M-n
-:PROPERTIES:
-:CUSTOM_ID: 00c2ab64-696d-4492-8236-f7ebc12e4a93
-:END:
-*** [C-M-n] :drill:
-SCHEDULED: <2014-03-17 Mon>
- :PROPERTIES:
- narrow-to-region
- :ID: 59e48dcc-434b-4c96-bdb3-c083c41ae8b3
- :CUSTOM_ID: 43997316-8d3f-4750-873b-ade09628fdd5
- :DRILL_LAST_INTERVAL: 7.6409
- :DRILL_REPEATS_SINCE_FAIL: 3
- :DRILL_TOTAL_REPEATS: 8
- :DRILL_FAILURE_COUNT: 4
- :DRILL_AVERAGE_QUALITY: 2.59
- :DRILL_EASE: 2.261
- :DRILL_LAST_QUALITY: 3
- :DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:34>
- :END:
+*** C-M-n]
narrow-to-region
- [
#+begin_src emacs-lisp
(global-set-key (kbd "C-M-n") 'narrow-to-region)
#+end_src
-]
*** C-S-n
-:PROPERTIES:
-:CUSTOM_ID: f01c2c61-f606-49ea-885a-63a831eaae3d
-:END:
*** C-rshift
*** M-rshift
*** C-M-rshift
*** C-S-rshift
-*** [C-escape] :drill:
-SCHEDULED: <2014-04-05 Sat>
- :PROPERTIES:
+*** C-escape]
find-tag
:ID: a6dd7e4c-1831-4493-bbfd-557dc2f9c856
:CUSTOM_ID: 6901fa1b-c827-4525-b24b-bdb8fe5f638b
- :DRILL_LAST_INTERVAL: 27.3693
- :DRILL_REPEATS_SINCE_FAIL: 5
- :DRILL_TOTAL_REPEATS: 6
- :DRILL_FAILURE_COUNT: 2
- :DRILL_AVERAGE_QUALITY: 3.417
- :DRILL_EASE: 2.676
- :DRILL_LAST_QUALITY: 4
- :DRILL_LAST_REVIEWED: <2014-03-09 Sun 18:37>
+
+
+
+
+
+
+
+
:END:
find-tag
- [
#+begin_src emacs-lisp
(global-set-key (kbd "<C-escape>") 'find-tag)
#+end_src
- ]
*** M-escape
- :PROPERTIES:
- :ID: 7224837b-addc-4c82-8313-467c6dcb7a52
- :CUSTOM_ID: f505f1b9-82f6-4139-9e3e-78df548175ec
- :END:
*** C-M-escape
-:PROPERTIES:
-:CUSTOM_ID: d77136c5-4aec-4f02-8b4b-e417249fbac1
-:END:
*** C-S-escape
-:PROPERTIES:
-:CUSTOM_ID: d61ae40a-3f2d-4ef6-a515-8864a7d7c8ea
-:END:
* keybind table src
- :PROPERTIES:
- :CUSTOM_ID: ff8f3092-187a-4b2c-940f-01743f7a51b6
- :END:
not necessary to have at the end, but its convenient to have it next
to its output.
#+NAME: keybind-table-generator
#+BEGIN_SRC emacs-lisp :results silent
- (defun org-custom-id-get (&optional pom create prefix)
- "Get the CUSTOM_ID property of the entry at point-or-marker POM.
+(defun org-custom-id-get (&optional pom create prefix)
+ "Get the CUSTOM_ID property of the entry at point-or-marker POM.
If POM is nil, refer to the entry at point.
If the entry does not have a CUSTOM_ID, the function returns nil.
However, when CREATE is non nil, create an ID if none is present already.
PREFIX will be passed through to `org-id-new'.
In any case, the CUSTOM_ID of the entry is returned."
- (org-with-point-at pom
- (let ((id (org-entry-get nil "CUSTOM_ID")))
- (cond
- ((and id (stringp id) (string-match "\\S-" id))
- id)
- (create
- (setq id (org-id-new prefix))
- (org-entry-put pom "CUSTOM_ID" id)
- (org-id-add-location id (buffer-file-name (buffer-base-buffer)))
- id)))))
-
- (defun get-title()
- (interactive)
- (let ((title (plist-get (cadr (org-element-at-point)) ':title)))
- ;; remove brackets from [title]
- (string-match "[^[ ][^]]*" title)
- (setq title (match-string 0 title))
- (print title)
- title))
-
-
- (defun org-dblock-write:keybind-dblock (arg)
- (let (output)
- (save-excursion
- (goto-char (org-find-entry-with-id "beginning-of-keybind-table-data"))
- (let* ((table-level (org-current-level))
- (keybind-level (1+ table-level))
- (prefixes (list "C-M-S-" "C-M-" "C-S-" "M-S-" "M-" "C-" "S-"))
- table-title
- previous-prefixes
- )
- (while (>= (org-current-level) table-level)
- (setq table-title (get-title))
- (outline-next-heading)
- (let (found-prefixes
- found-all-prefixes)
- ;; go through the first few elements of the table to find out what column headings aka prefixes it should have
- (save-excursion
- (while (not found-all-prefixes)
- (let ((prefixes-copy prefixes)
- current-prefix
- found-prefix)
- (while (and prefixes-copy (not found-prefix))
- (setq current-prefix (car prefixes-copy))
- (when (and (> (length (get-title)) (length current-prefix))
- (string= (substring (get-title) 0 (length current-prefix)) current-prefix))
- (setq found-prefix t))
- (setq prefixes-copy (cdr prefixes-copy)))
- (unless found-prefix
- (setq current-prefix ""))
- (if (and found-prefixes (string= (car (last found-prefixes)) current-prefix))
- (setq found-all-prefixes t)
- (push current-prefix found-prefixes)))
- (outline-next-heading)))
- (setq found-prefixes (reverse found-prefixes))
-
- ;; start a new table or repeat the prefixes in the current table
-
- (if (or (not previous-prefixes) (equal previous-prefixes found-prefixes))
- (setq output (concat output "|-|\n| "))
- (setq output (concat output "|-|\n\n|-|\n| ")))
- (setq output (concat output table-title " | "))
- (setq previous-prefixes found-prefixes)
-
- ;; add the prefixes
- (dolist (prefix found-prefixes)
- (setq output (concat output prefix "|")))
- (setq output (concat output "\n|-|\n"))
-
-
- (let (subtree-end)
- (while (>= (org-current-level) keybind-level)
- (dotimes (i (length found-prefixes))
- ;; add keybind name
- (when (= i 0)
- (setq output (concat output "| " (substring (get-title) (length (car found-prefixes))) " | ")))
- ;; add keybinds by searching for regex [keybind] to the start of the next heading
- (save-excursion
- (outline-next-heading)
- (setq subtree-end (point)))
-;; skip over scheduled line
- (re-search-forward "^SCHEDULED:" subtree-end t)
-
- ;; see comment after source block to understand this regex
- (re-search-forward "^\\s-*\\([^*: ].*?$\\)" subtree-end t)
- (let ((m (match-string 1)))
- (when m
- (setq output (concat output "[[#" (org-custom-id-get (point) 'create) "][" m "]]")))
- (setq output (concat output " | ")))
- ;; advance to next keybind
- (outline-next-heading))
- (setq output (concat output "\n"))
- ))))))
- (setq output (concat output "|-|"))
- (insert output))
- (org-table-map-tables 'org-table-align 'quietly))
+ (org-with-point-at pom
+ (let ((id (org-entry-get nil "CUSTOM_ID")))
+ (cond
+ ((and id (stringp id) (string-match "\\S-" id))
+ id)
+ (create
+ (setq id (org-id-new prefix))
+ (org-entry-put pom "CUSTOM_ID" id)
+ (org-id-add-location id (buffer-file-name (buffer-base-buffer)))
+ id)))))
+
+(defun get-title()
+ (interactive)
+ (let ((title (plist-get (cadr (org-element-at-point)) ':title)))
+ ;; remove brackets from [title]
+ ;; I was at one point using org-drill for spaces repitition,
+ ;; and enclosed question and answer by 2 sets of brackets.
+ (string-match "[^[ ][^]]*" title)
+ (setq title (match-string 0 title))
+ (print title)
+ title))
+
+
+(defun org-dblock-write:keybind-dblock (arg)
+ (let (output)
+ (save-excursion
+ (goto-char (org-find-entry-with-id "beginning-of-keybind-table-data"))
+ (let* ((table-level (org-current-level))
+ (keybind-level (1+ table-level))
+ (prefixes (list "C-M-S-" "C-M-" "C-S-" "M-S-" "M-" "C-" "S-"))
+ table-title
+ previous-prefixes
+ )
+ (while (>= (org-current-level) table-level)
+ (setq table-title (get-title))
+ (outline-next-heading)
+ (let (found-prefixes
+ found-all-prefixes)
+ ;; go through the first few elements of the table to find out what column headings aka prefixes it should have
+ (save-excursion
+ (while (not found-all-prefixes)
+ (let ((prefixes-copy prefixes)
+ current-prefix
+ found-prefix)
+ (while (and prefixes-copy (not found-prefix))
+ (setq current-prefix (car prefixes-copy))
+ (when (and (> (length (get-title)) (length current-prefix))
+ (string= (substring (get-title) 0 (length current-prefix)) current-prefix))
+ (setq found-prefix t))
+ (setq prefixes-copy (cdr prefixes-copy)))
+ (unless found-prefix
+ (setq current-prefix ""))
+ (if (and found-prefixes (string= (car (last found-prefixes)) current-prefix))
+ (setq found-all-prefixes t)
+ (push current-prefix found-prefixes)))
+ (outline-next-heading)))
+ (setq found-prefixes (reverse found-prefixes))
+
+ ;; start a new table or repeat the prefixes in the current table
+
+ (if (or (not previous-prefixes) (equal previous-prefixes found-prefixes))
+ (setq output (concat output "|-|\n| "))
+ (setq output (concat output "|-|\n\n|-|\n| ")))
+ (setq output (concat output table-title " | "))
+ (setq previous-prefixes found-prefixes)
+
+ ;; add the prefixes
+ (dolist (prefix found-prefixes)
+ (setq output (concat output prefix "|")))
+ (setq output (concat output "\n|-|\n"))
+
+
+ (let (subtree-end)
+ (while (>= (org-current-level) keybind-level)
+ (dotimes (i (length found-prefixes))
+ ;; add keybind name
+ (when (= i 0)
+ (setq output (concat output "| " (substring (get-title) (length (car found-prefixes))) " | ")))
+ ;; add keybinds by searching for regex [keybind] to the start of the next heading
+ (save-excursion
+ (outline-next-heading)
+ (setq subtree-end (point)))
+ ;; skip over scheduled line
+
+ ;; see comment after source block to understand this regex
+ (re-search-forward "^\\s-*\\([^*: ].*?$\\)" subtree-end t)
+ (let ((m (match-string 1)))
+ (when m
+ (setq output (concat output "[[#" (org-custom-id-get (point) 'create) "][" m "]]")))
+ (setq output (concat output " | ")))
+ ;; advance to next keybind
+ (outline-next-heading))
+ (setq output (concat output "\n"))
+ ))))))
+ (setq output (concat output "|-|"))
+ (insert output))
+ (org-table-map-tables 'org-table-align 'quietly))
#+END_SRC
:END:
dunno why but it takes doing ctrl-c twice to update this
#+BEGIN: keybind-dblock
-|---------------------+------------------------|
-| single/special keys | |
-|---------------------+------------------------|
-| tab key | [[#6c10a716-1d8e-4ce4-8e26-64468f19c17a][isearch]] |
-| tab | [[#51ece189-1840-41a1-8ca0-19f9a0481895][isearch-forward]] |
-| end | [[#00d589b7-2b8e-494c-b761-3afefebe6ec6][move-end-of-line]] |
-| home | [[#7800e455-c3f6-4a8f-8907-b2292449ab67][back-to-indentation]] |
-| s-tab | [[#3072901e-5cf3-4d6e-9ac8-3ef64a5f6ad2][indent-buffer]] |
-| s-delete | [[#e53728b6-054d-4443-a03e-6cf02d13724d][send-shell]] |
-| s-left arrow | [[#d8c473ac-5507-4a6b-9e5a-46558c17b09f][shell]] |
-| s-right arrow | [[#2365f5a7-b89a-4a97-b272-ac8ae9c2cc66][previous-buffer]] |
-| esc | |
-| return | [[#fab6adea-ed20-45ab-a0a3-776c68d5c3a5][new line]] |
-| s-return | [[#819cfb55-3a2f-4f20-8591-f819d1a6869a][auto-correct-prev-word]] |
-| down arrow | [[#7a868484-9c63-4a73-abda-7751cb2c02be][mark]] |
-| s-down arrow | [[#097b97e0-8ad8-40f7-8388-c4ace1706b38][extended command]] |
-| s-up arrow | |
-|---------------------+------------------------|
-
-|-------------------+----------------------------+---------------------------------+--------------------+---------------+-------------------+-------------|
-| mouse | | C- | M- | S- | C-M- | C-S- |
-|-------------------+----------------------------+---------------------------------+--------------------+---------------+-------------------+-------------|
-| mouse-2 mode line | [[#69aaa631-6fb5-4beb-b2d8-c0f3d92c0a98][mouse-delete-other-windows]] | [[#501479ab-e1e2-497e-bd86-071f8afa3378][mouse-split-window-horizontally]] | | | | |
-| mouse-3 mode line | [[#917a1844-8c38-4f31-8616-50fc81334f2c][mouse-delete-window]] | | | | | |
-| mouse-1 | [[#4e60e2e4-8c2f-4450-8060-2d793ede530c][set cursor/mark]] | [[#b661f84f-57df-4095-9dc1-d1a876a53ee5][buffer list context menu]] | | | | |
-| mouse-2 | [[#086b0b50-054f-462d-92fa-b27852f887b0][paste]] | | | | | |
-| mouse-3 | [[#0481632e-9c50-4328-9365-c4b5bf967b66][set-mark]] | [[#9623c78f-7705-4cbe-a990-c24eb1067377][global menu]] | | | | |
-| mouse-9 | [[#efaec161-b279-4129-86fd-b410430926e4][move-mouse-to-point]] | | | | | |
-| mouse-8 | | | | | | |
-| 1/kp-end | | | | | | |
-| 2/kp-down | | | | | | |
-| 3/kp-next | | | | | | |
-| 4/kp-left | [[#c44d0f65-9502-4cc6-9642-96d907f6b093][indent-region]] | | | | | |
-| 5/kp-begin | [[#2458c6bc-7113-4d4b-bbdf-206e1cb842a7][mark-defun]] | | | | | |
-| 6/kp-right | [[#3b79bc58-6067-43bd-9471-9d592744a25a][ibuffer]] | | | | | |
-| 7/kp-home | | | | | | |
-| 8/kp-up | | | | | | |
-| 9/kp-prior | [[#a3b51adb-4405-4d9f-9b88-a8faa479fbe7][delete-horizontal-space]] | | | | | |
-| 10/kp-insert | | | | | | |
-| 11/kp-subtract | | | | | | |
-| 12/kp-add | | | | | | |
-| scroll | [[#33433f0f-5b0e-46ba-8452-d2a51e54769b][up/dn / scroll]] | [[#16506ba5-e8f2-4aec-bc1b-d2854d4e504c][cycle recent buffers]] | [[#e1e2e253-450d-4620-af9e-78d378f49ad5][forward/back s-exp]] | [[#74b2196a-345d-453a-b7be-1915360eb201][expand region]] | [[#bd2ca117-408c-49fc-a5ac-a938be21dfc0][scroll]] | [[#a69254a4-cf2d-450f-b477-2694b44a7e0d][zoom]] |
-| left-scroll | [[#d2d5c5c7-f0de-4e08-953b-d41d3e282ba7][left/right]] | [[#7bb95aa5-381e-454a-a6c6-aaeec728db08][back / forward word]] | [[#49db3764-b154-4cfc-8d0d-f0e0451815e3][winner undo redo]] | [[#ca5cdcd4-b3da-4d7b-86ab-4c7c0ac2caf7][---]] | [[#32c00bb2-3e5a-4670-8849-04d23b9f8364][forward/back sexp]] | [[#7b4f1f49-6d93-4210-a30c-8278d6e63655][unreachable]] |
-|-------------------+----------------------------+---------------------------------+--------------------+---------------+-------------------+-------------|
-
-|-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
-| left primary | C- | M- | C-M- | C-S- |
-|-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
-| 2 | [[#4f29b011-3844-4a4a-b75d-cdf8f49e9adb][narrow-to-defun/subtree]] | | [[#33c4996d-92bc-4df0-b005-11553677be13][---]] | |
-| 3 | [[#7851a05e-7177-4a8f-af5a-3325a8f116fe][dot-mode-execute]] | | [[#9a00e17f-a1c9-48fc-b03b-c6a1a3cbda1c][recenter-top-bottom]] | |
-| q | [[#679fd3cd-c43b-409c-be36-4175a5f27cd3][org-cycle, comint previous arg]] | [[#72bada0e-5d62-4a8f-ae62-4972778ff1bc][org-archive-to-archive-sibling]] | [[#1f5e9b63-7ce0-445c-a426-b41839585d38][quoted-insert]] | |
-| w | [[#20005b6d-9a9d-4b58-882c-7ce860c7a395][goto-t.org]] | [[#331da6e5-7936-4663-8f58-9d8601b5915c][org-clock-in]] | | |
-| e | [[#24e34f4b-d1e8-4380-933f-ab1f78ebc782][copy-line]] | [[#0a771449-0cd5-4dc9-82ca-bcac5f7abd17][org-clock-in-last]] | | |
-| r | [[#5c55f461-f43f-493d-81eb-1ca747175ef1][isearch-backward]] | [[#dd9575bd-e471-418e-9519-4fc2b874ddcd][org-clock-out]] | | |
-| a | [[#db4b76df-9420-4256-8242-dc44b56d55d7][copy-all]] | [[#e865a1e5-55bf-4a98-a0d0-cb05a88de352][kmacro-start-macro-or-in...]] | [[#c6278a5a-024f-4c80-a8d4-65f127fd24a8][kmacro-end-or-call-macro]] | |
-| s | [[#01da04da-cdba-493f-892b-c4c064cf937e][C-x prefix]] | | [[#4b33022d-27f0-4d21-9931-2e2e692790e8][split-window-vertically]] | |
-| d | [[#b699614a-9994-4fe7-b2c6-f0fe81b7ad2b][C-c prefix]] | [[#06bcc5e2-f3a7-41c6-a793-ac6c9813fb6e][whitespace-cleanup]] | [[#8cf6053d-792b-4abd-a3a6-66efd7fbee68][swap buffer]] | |
-| f | [[#2695ed8a-e0d3-4e84-8688-98e3c50723b0][kill-whole-line]] | | [[#e7e4dd0b-418f-48ee-b366-9e733e3bec61][kill rest of line]] | |
-| g | [[#4af40595-7010-4be6-8cfe-a43797ca6e33][other-window / cancel]] | [[#fb0b343f-fdff-463a-94f4-3152191e17c4][abort-recursive-edit]] | [[#327e18af-30b7-47e5-aa53-5f678788b4c1][gnus]] | |
-| z | [[#707c4938-a790-4da9-8230-61855ea57d09][undo-tree-undo]] | | | |
-| x | [[#ec1403d3-528e-41b1-a195-5563bc93e124][kill-region]] | [[#bb7c95d5-dd97-439d-bf1f-cdac98d11543][append-next-kill]] | [[#c988370e-602c-431c-80a9-608459583f8b][append-next-kill]] | |
-| c | [[#400f06e1-8e45-443c-8d7b-3d1bb1176aab][copy]] | [[#f4c3317a-a317-4d04-8cb7-e46d0716bf1d][org-capture]] | [[#0a151d99-47ae-4e8f-8407-82e77d24a3e7][copy-to-register]] | |
-| v | [[#16411f68-7fe0-49e8-9a73-212471594f9e][yank]] | [[#d67f6371-a13f-4a75-8d8c-e4013ff4e131][insert-register]] | [[#25f86658-9999-40f7-b3a4-615981751b93][yank pop]] | |
-| b | [[#e682305e-0110-4d2f-afbd-2c401bcb9313][delete-other-windows]] | [[#05e3d0db-36dc-455f-8bed-f87886ca6004][isearch-backward-current-symbol]] | [[#6c63790c-28c1-4b73-96e2-ee859f57e734][isearch-current-symbol]] | |
-| tab | [[#edc45592-c69f-4439-8305-48f2c65696c3][yas-insert-snippet]] | [[#71264957-45fd-455a-a6d1-b08823c02d25][indent line]] | | |
-| delete | [[#2688b61d-9fdd-44af-b9bd-b126f0da00bd][kill-symbol]] | | [[#21876759-a8e6-4896-8a08-eda40d0eaff3][kill-sexp]] | |
-| left-arrow | [[#b15da91f-0786-49d1-b0b9-331b3b94f6ae][compile]] | | [[#13faf5d4-34be-4363-948d-4ff04a9f570b][org-shiftup]] | |
-| right-arrow | [[#3f3cac16-097d-451a-a14a-da7717d06730][paste selection]] | | [[#34e66314-1d97-4eeb-b704-fe0733849ae4][org-shiftdown]] | |
-| backspace | [[#85bb4701-42e6-4617-8de8-dfb1f03b0358][backward-kill-symbol]] | | [[#606b0991-7431-4a8a-a909-b872e104cc88][backward-kill-sexp]] | |
-| f7 | | | | |
-|-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
-| right primary | C- | M- | C-M- | C-S- |
-|-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
-| * | [[#f745b337-8b65-44cc-849a-5e0953c9ebd9][split-window-horizontally]] | | [[#5dbe3437-7364-4802-b558-00b2d5faacf6][calc-dispatch]] | |
-| 9 | [[#43d14154-2722-4ba5-b547-1b78c6274ebf][delete-window-or-exit]] | [[#9dc95338-4321-4354-9de2-69409f383a10][kill-buffer-and-window]] | [[#ffe9f636-31e5-48ba-b8fe-7c158ace744c][kill client buffer]] | |
-| u | [[#327992c0-6eba-4935-aec1-49871c2a8619][universal-argument]] | | [[#62735d64-b89a-46b7-b32e-2453b651039d][search-keybind]] | |
-| i | [[#3124e200-1d6e-4ad2-9a36-0d03e1e7dc38][-----]] | | [[#a3260b61-7c51-4d97-9a91-3ed702c5ae29][query-replace-regexp]] | |
-| o | [[#82215193-63b3-4d63-8f70-d11a328fe72d][occur]] | | [[#05d1ef50-43ee-46d7-b1ad-dd952543ab45][ido-goto-symbol]] | |
-| p | [[#9c2e2ba9-f34e-48fe-b4ff-b9826882c1cc][move-mouse-to-point]] | | [[#d55616d3-a3f6-4e83-8807-748578a7b726][delete-horizontal-space]] | |
-| j | [[#ebcf7c71-3c93-431b-af6b-7c5df7f2945e][register prefix]] | [[#474a3e12-95ac-4f43-b83a-36716f3e6f76][previous-error]] | | |
-| k | [[#25a7ba1c-ddf3-47f1-9516-914a552e7a36][jump to register]] | [[#a96691bb-9e4c-414b-a093-d9961d453e21][next-error]] | [[#f61ea4ea-4597-422e-b7e3-d3cfad82603d][man]] | |
-| l | [[#8a7572bd-4b5e-4464-b937-3d35adb1783f][ivy-switch-buffer]] | | [[#24b660d4-3ec4-4416-8a6a-b8224ed1ee8b][move cursor top bottom mid]] | |
-| ; | [[#7e3710eb-5460-4460-8bf0-488302e4ce35][comment-dwim]] | | [[#28680a96-5223-4632-80b9-b1facdd541e7][comment-current-line-dwim]] | |
-| m | [[#deee53ba-dfa2-4910-894c-55ae98d11aa4][pop-to-mark]] | | [[#f283f705-cba0-45db-b80f-5d20415b2eee][recursive grep]] | |
-| , | [[#6cbf3a85-f260-453a-920b-850ff5e986b1][counsel-find-file]] | | [[#bfdf6111-029d-462b-bcca-50a3ed2162d5][find-file-in-project]] | |
-| . | [[#0675c171-8677-44a8-882c-e7ed42715e31][recentf-ido-find-file]] | | [[#824d422c-67b6-4d68-af11-6a2135e528f5][-]] | |
-| / | [[#941a7fa8-84b9-434d-89a0-1487385ec479][join lines]] | | [[#37f67593-4f60-4d3b-9aad-6c9bc4882443][copy-variable]] | |
-| 8 | [[#251c4a1a-a683-4804-a706-d0d3752e42fa][calc-embedded-word]] | | | |
-| up-arrow | [[#f47d312a-063d-42ed-a352-176298a2cb0c][back defun/headline]] | | | |
-| down-arrow | [[#27435136-b3d7-4f25-aa85-2a7363a7f366][forward dfun/headline]] | | [[#3bcb35fd-6d54-4213-b94f-2739c0bc0041][toggle-mark-activation]] | [[#1434bdd0-c5a8-4c96-9b92-9474e88fd1c5][smex-major-mode-commands]] |
-| lbracket | [[#9d9916dd-3280-47dd-aab1-cd28d5ebfe15][----]] | | [[#7411b1a5-c8fa-4bcc-8788-798e5635dd62][scroll-right]] | |
-| rbracket | [[#21b38c6b-3a46-4a08-8eca-d44abb148287][fill-paragraph]] | | [[#c9c18f48-d0ca-4a1b-a751-7165f40118a3][scroll-left]] | |
-| return | [[#baf7ea5a-d16d-4fee-a6ce-542cc11beb97][newline next line]] | [[#e6895ad3-a2c8-46c8-abbc-1bba94a88596][non-indented newline]] | [[#2a8fc6ea-a550-4437-9e35-3b3f2776788a][open newline on previous line]] | |
-| space | [[#132daa1a-8e5f-47f1-a28d-35bee873aeac][org-edit-special]] | | [[#02359b66-bf6e-4f41-9f03-e83fcbe3e68c][spell check word]] | |
-|-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
-| left secondary | C- | M- | C-M- | C-S- |
-|-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
-| = | | | | |
-| 1 | | | | |
-| 4 | | | [[#3ff50f5f-f286-4a73-962b-58dbcf3b09b1][widen]] | |
-| 5 | | | | |
-| tab-key | [[#68313551-90cd-47a6-8170-1745348add17][query-replace]] | | | |
-| t | [[#aaac3048-9125-4fd5-b8f2-21bafcc1ff1c][org change todo state]] | | [[#5bc609b1-9428-4b82-a55d-811fefe65331][org insert timestamp]] | |
-| home | [[#1919659a-b466-4519-9276-8bf06a916066][start of buffer]] | | | |
-| end | [[#0a7bd629-cbcc-4761-8fe2-cc9370b985a4][end of buffer]] | | | |
-| f9 | | | | |
-|-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
-| right secondary | C- | M- | C-M- | C-S- |
-|-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
-| 6 | [[#e44e584b-d925-4036-9ad5-a90d02e74bef][save-buffers-kill-emacs]] | | [[#da73de75-0914-4f48-81d5-9b408433b14b][insert-small-copyright]] | |
-| 7 | | | [[#a68c6b8e-9911-475e-ab35-e239771fe881][insert-full-copyright]] | |
-| 0 | | | | |
-| - | | | | |
-| y | [[#97aee7f1-3647-4602-a65a-45e8a3aa3a7c][undo-tree-redo]] | | | |
-| \ | [[#b8ad3ee9-7bf6-4069-a300-49cd298008a7][sr-speedbar-toggle]] | | [[#6a583354-48f8-4503-bf87-b8ba56411435][mark-defun]] | |
-| h | [[#3c5f241f-fc62-459d-ab85-6b7c1fb04801][help-prefix]] | | | |
-| ' | [[#9f252721-a2d5-46c6-b268-8ed597256229][eval-expression]] | | | |
-| n | [[#52ebb720-589b-485c-89dc-0dfb78e6dad4][unpop-to-mark-command]] | | [[#43997316-8d3f-4750-873b-ade09628fdd5][narrow-to-region]] | |
-| rshift | | | | |
-| escape | [[#6901fa1b-c827-4525-b24b-bdb8fe5f638b][find-tag]] | | | |
-|-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
+ |---------------------+------------------------|
+ | single/special keys | |
+ |---------------------+------------------------|
+ | tab key | [[#6c10a716-1d8e-4ce4-8e26-64468f19c17a][isearch]] |
+ | tab | [[#51ece189-1840-41a1-8ca0-19f9a0481895][isearch-forward]] |
+ | end | [[#00d589b7-2b8e-494c-b761-3afefebe6ec6][move-end-of-line]] |
+ | home | [[#7800e455-c3f6-4a8f-8907-b2292449ab67][back-to-indentation]] |
+ | s-tab | [[#3072901e-5cf3-4d6e-9ac8-3ef64a5f6ad2][indent-buffer]] |
+ | s-delete | [[#e53728b6-054d-4443-a03e-6cf02d13724d][send-shell]] |
+ | s-left arrow | [[#d8c473ac-5507-4a6b-9e5a-46558c17b09f][shell]] |
+ | s-right arrow | [[#cbae2b27-ff95-4b12-88e0-e1a0f7705db6][previous-buffer]] |
+ | esc | |
+ | return | [[#fab6adea-ed20-45ab-a0a3-776c68d5c3a5][new line]] |
+ | s-return | [[#c433c837-24fa-45e1-8991-a4d380550ea0][auto-correct-prev-word]] |
+ | down arrow | [[#7a868484-9c63-4a73-abda-7751cb2c02be][mark]] |
+ | s-down arrow | [[#097b97e0-8ad8-40f7-8388-c4ace1706b38][extended command]] |
+ | s-up arrow | |
+ |---------------------+------------------------|
+
+ |-------------------+----------------------------+---------------------------------+--------------------+---------------+-------------+-------------|
+ | mouse | | C- | M- | S- | C-M- | C-S- |
+ |-------------------+----------------------------+---------------------------------+--------------------+---------------+-------------+-------------|
+ | mouse-2 mode line | [[#69aaa631-6fb5-4beb-b2d8-c0f3d92c0a98][mouse-delete-other-windows]] | [[#501479ab-e1e2-497e-bd86-071f8afa3378][mouse-split-window-horizontally]] | | | | |
+ | mouse-3 mode line | [[#917a1844-8c38-4f31-8616-50fc81334f2c][mouse-delete-window]] | | | | | |
+ | mouse-1 | [[#4e60e2e4-8c2f-4450-8060-2d793ede530c][set cursor/mark]] | [[#b661f84f-57df-4095-9dc1-d1a876a53ee5][buffer list context menu]] | | | | |
+ | mouse-2 | [[#086b0b50-054f-462d-92fa-b27852f887b0][paste]] | | | | | |
+ | mouse-3 | [[#0481632e-9c50-4328-9365-c4b5bf967b66][set-mark]] | [[#9623c78f-7705-4cbe-a990-c24eb1067377][global menu]] | | | | |
+ | mouse-9 | [[#efaec161-b279-4129-86fd-b410430926e4][move-mouse-to-point]] | | | | | |
+ | mouse-8 | | | | | | |
+ | 1/kp-end | | | | | | |
+ | 2/kp-down | | | [[#50db5a06-452e-491f-875b-3de936a4d04a][smex]] | | | |
+ | 3/kp-next | | | | | | |
+ | 4/kp-left | [[#c44d0f65-9502-4cc6-9642-96d907f6b093][indent-region]] | | | | | |
+ | 5/kp-begin | [[#2458c6bc-7113-4d4b-bbdf-206e1cb842a7][mark-defun]] | | | | | |
+ | 6/kp-right | [[#3b79bc58-6067-43bd-9471-9d592744a25a][ibuffer]] | | | | | |
+ | 7/kp-home | | | | | | |
+ | 8/kp-up | | | | | | |
+ | 9/kp-prior | [[#a3b51adb-4405-4d9f-9b88-a8faa479fbe7][delete-horizontal-space]] | | | | | |
+ | 10/kp-insert | | | | | | |
+ | 11/kp-subtract | | | | | | |
+ | 12/kp-add | | | | | | |
+ | scroll | [[#33433f0f-5b0e-46ba-8452-d2a51e54769b][up/dn / scroll]] | [[#38c594ca-1d13-441b-833c-ad47b27e7073][cycle recent buffers]] | [[#e1e2e253-450d-4620-af9e-78d378f49ad5][forward/back s-exp]] | [[#945cbcda-9a5a-4a9f-ad5c-4ede9a43656e][expand region]] | [[#10bc56d0-a6fe-4e2e-a287-1d280358ad1c][scroll]] | [[#fc79fff3-259e-416a-a62a-c237b30ade28][zoom]] |
+ | left-scroll | [[#d2d5c5c7-f0de-4e08-953b-d41d3e282ba7][left/right]] | [[#7bb95aa5-381e-454a-a6c6-aaeec728db08][back / forward word]] | [[#3aeb5be7-6026-42f6-a65b-b00799e44642][winner undo redo]] | [[#ca5cdcd4-b3da-4d7b-86ab-4c7c0ac2caf7][---]] | [[#7f7103f5-2488-46a6-8530-6d8a558e6eff][unreachable]] | [[#7b4f1f49-6d93-4210-a30c-8278d6e63655][unreachable]] |
+ |-------------------+----------------------------+---------------------------------+--------------------+---------------+-------------+-------------|
+
+ |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
+ | left primary | C- | M- | C-M- | C-S- |
+ |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
+ | 2 | [[#b7db9f5c-f31d-45fb-ac70-eb3ef9369d3d][copy-symbol]] | [[#53ecfda2-d9f6-4882-b7a2-9b3c859e3bcb][shell-cd-to-file]] | [[#33c4996d-92bc-4df0-b005-11553677be13][---]] | |
+ | 3 | [[#401f56ff-6aba-4156-b128-f449b18c27af][dot-mode-execute]] | | [[#eb0cc3a8-b62e-4a24-9f84-cc8e854f91dd][recenter-top-bottom]] | |
+ | q | [[#679fd3cd-c43b-409c-be36-4175a5f27cd3][org-cycle, comint previous arg]] | [[#9a186632-7b04-4af7-b7de-eaec87daf315][org-archive-to-archive-sibling]] | [[#1f5e9b63-7ce0-445c-a426-b41839585d38][quoted-insert]] | |
+ | w | [[#20005b6d-9a9d-4b58-882c-7ce860c7a395][goto-t.org]] | [[#9531a0da-269f-4359-9124-e83fbf61a92f][org-clock-in]] | | |
+ | e | [[#11e8f541-f0a0-4058-883a-98bd1e7b8c4d][copy-line]] | [[#74d0ed51-ddb5-488e-bf55-0f033916e319][org-clock-in-last]] | | |
+ | r | [[#5088a8b2-a772-4660-a3b6-b8cca7099da6][isearch-backward]] | [[#8fe64424-1f11-4086-84b3-07c2af210c1c][org-clock-out]] | | |
+ | a | [[#d57dd0ac-2251-44af-b232-30f8a2b0b198][copy-all]] | [[#77987ef8-6a18-4123-8ede-77bc766aa2aa][kmacro-start-macro-or-in...]] | [[#dd2c225e-2d18-4b95-bc30-765163a5e368][kmacro-end-or-call-macro]] | |
+ | s | [[#f26dd0f5-0655-485f-8c76-e6dfc6abd947][C-x prefix]] | | [[#290ea04a-be99-416a-a95f-458045a91c93][split-window-vertically]] | |
+ | d | [[#b699614a-9994-4fe7-b2c6-f0fe81b7ad2b][C-c prefix]] | | [[#d9f48fbe-0a32-4133-93fb-f43ff6ab0037][swap buffer]] | |
+ | f | [[#2695ed8a-e0d3-4e84-8688-98e3c50723b0][kill-whole-line]] | [[#869f0aec-c739-4fb7-8e3a-8b55ab637765][print-var-at-point]] | [[#e7e4dd0b-418f-48ee-b366-9e733e3bec61][kill rest of line]] | |
+ | g | [[#a58a1eda-43ed-437e-b483-5c312e0754a7][other-window / cancel]] | [[#a287d720-4419-4546-8262-1f377bb158d2][abort-recursive-edit]] | [[#327e18af-30b7-47e5-aa53-5f678788b4c1][gnus]] | |
+ | z | [[#5c30ce7e-8bc6-45bf-b9b1-5c75334a3e27][undo-tree-undo]] | | | |
+ | x | [[#ec1403d3-528e-41b1-a195-5563bc93e124][kill-region]] | [[#bb7c95d5-dd97-439d-bf1f-cdac98d11543][append-next-kill]] | [[#47cc90e3-335f-4c44-9f39-b732e5440664][append-next-kill]] | |
+ | c | [[#400f06e1-8e45-443c-8d7b-3d1bb1176aab][copy]] | [[#7a265014-1e9c-4639-ad1d-26b3416379a8][org-capture]] | [[#503e0beb-6fda-4e94-9678-d58bd3cbbc8e][copy-to-register]] | |
+ | v | [[#16411f68-7fe0-49e8-9a73-212471594f9e][yank]] | [[#fe04fffa-6f85-483a-b329-938531109c35][insert-register]] | [[#c559e9ea-1218-4ccb-9c3a-74cbac4be220][yank pop]] | |
+ | b | [[#3090fb11-9a11-47e5-bc98-080ebd250d37][delete-other-windows]] | [[#c18b9197-3d52-45a6-9d20-50d18fe1e7a7][isearch-backward-current-symbol]] | [[#e9dd549f-d031-418a-a0d5-30cf85e91c37][isearch-current-symbol]] | |
+ | tab | [[#928505cb-707c-47ba-af54-5ae1df2ee07d][yas-insert-snippet]] | [[#64f91d86-afa9-4500-8d7d-ce8b2668726b][indent line]] | | |
+ | delete | [[#e3d8653e-2282-4e3a-a4f5-29211ba2e647][kill-symbol]] | | [[#d9664937-d61c-4cc8-89c6-7f2182655c20][kill-sexp]] | |
+ | left-arrow | [[#601c8172-f9b7-4e36-88ab-c66c2911b4d7][compile]] | | [[#91ddc121-db27-4f1c-a9ec-a4d29b96a7d2][org-shiftup]] | |
+ | right-arrow | [[#5f66f60b-adcd-45dc-86b2-5d1225e2455c][paste selection]] | | [[#fc2147b4-a19a-4fde-bb53-e7ac28f0bfa1][org-shiftdown]] | |
+ | backspace | [[#96f90a00-2260-4340-ae03-f4a86bd65502][backward-kill-symbol]] | | [[#606b0991-7431-4a8a-a909-b872e104cc88][backward-kill-sexp]] | |
+ | f7 | | | | |
+ |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
+ | right primary | C- | M- | C-M- | C-S- |
+ |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
+ | * | [[#045c374c-b03e-42cb-b274-0f30c81fe3f3][split-window-horizontally]] | | [[#05cf6230-9263-4fd4-9812-4f32009eed46][calc-dispatch]] | |
+ | 9 | [[#43d14154-2722-4ba5-b547-1b78c6274ebf][delete-window-or-exit]] | [[#ed93f5b8-2c7f-46f8-8d84-2e10d9bc8f87][kill-buffer-and-window]] | [[#37ef629b-fdbc-4d0b-bfa0-335eb1d408ee][kill client buffer]] | |
+ | u | [[#327992c0-6eba-4935-aec1-49871c2a8619][universal-argument]] | | [[#7af825b1-92d8-4d5d-aaa1-8b4b466ea2e0][search-keybind]] | |
+ | i | [[#3124e200-1d6e-4ad2-9a36-0d03e1e7dc38][-----]] | | [[#b2cc7cdd-c177-4ef2-af43-28ca7a338fda][query-replace-regexp]] | |
+ | o | [[#b87a2c8a-7eb3-4661-9b28-589d14206c41][occur]] | | [[#d30ac3cd-1963-4bd0-8052-98e12b6524b0][counsel-imenu]] | |
+ | p | [[#d84de055-e92e-478d-bb39-bc39acfa1586][move-mouse-to-point]] | | [[#08e65732-2fb1-4a78-9d18-cee87eb867a7][delete-horizontal-space]] | |
+ | j | [[#ca1ce86b-dcea-45c1-9a8e-dd4f306776e8][pop-to-mark]] | [[#b92414e2-0d5b-4576-8fa5-5e7f1e32819a][previous-error]] | [[#8fe7cac2-ab1a-4b39-aced-10c5e0157e68][register prefix]] | |
+ | k | [[#eb1c2360-bfd4-4d5c-b789-11b5ca5ba475][jump to register]] | [[#9061b192-735a-4273-ae36-993e6fad9205][next-error]] | [[#e1d768be-6b9b-4322-931f-3e570376ae15][man]] | |
+ | l | [[#137995db-ee30-4738-90e2-54dcd5cadcf2][ivy-switch-buffer]] | | [[#56fcff3b-ffd9-4280-a226-4b58558906b8][move cursor top bottom mid]] | |
+ | ; | [[#150bef9a-3faa-4c72-a176-88c3be56f612][comment-dwim]] | [[#211e76d9-d89a-4cc6-abce-69397d456fda][comment-dwim]] | [[#17035e1e-bbe6-44a6-ad54-6a39b04feac3][comment-current-line-dwim]] | |
+ | m | | | [[#9a6a1998-4ed6-485e-9b2d-c36a42d7ec1a][recursive grep]] | |
+ | , | [[#e4f617b2-d3f1-47e4-ae7f-2d64c4fd47b9][counsel-find-file]] | | [[#e0691924-11e1-48d2-abee-27945a409676][find-file-in-project]] | |
+ | . | [[#6e97b7f1-c5cf-48bb-9c09-db1950dc1eae][recentf-ido-find-file]] | | [[#824d422c-67b6-4d68-af11-6a2135e528f5][-]] | |
+ | / | [[#941a7fa8-84b9-434d-89a0-1487385ec479][join lines]] | | [[#37f67593-4f60-4d3b-9aad-6c9bc4882443][copy-variable]] | |
+ | 8 | [[#45644cfa-d408-4a69-a97a-545ef46ba656][calc-embedded-word]] | | | |
+ | up-arrow | [[#2dade04a-8ac7-483c-8675-5268af6eca2b][back defun/headline]] | | | [[#572d6618-471a-43c7-8a50-3f5e56f45cd7][winner undo]] |
+ | down-arrow | [[#a1f25c12-3523-45bd-9bf5-62bf3cd5ca43][forward dfun/headline]] | | [[#57a09286-94c6-4b9f-953a-7368743f95ec][toggle-mark-activation]] | [[#9c87093b-7e30-44fb-83c9-c1b176074a5d][smex-major-mode-commands]] |
+ | lbracket | [[#9d9916dd-3280-47dd-aab1-cd28d5ebfe15][----]] | | [[#c10b53e9-657c-48f4-8afb-cad0e709bcd6][scroll-right]] | |
+ | rbracket | [[#21b38c6b-3a46-4a08-8eca-d44abb148287][fill-paragraph]] | | [[#095c3d97-bc49-419a-a8c0-c7a21d46d980][scroll-left]] | |
+ | return | [[#db6e4c41-c048-4bef-b0c9-e129464c056d][newline next line]] | [[#10b2591a-5628-46ee-b395-682e91efcb83][non-indented newline]] | [[#1fc4f025-719f-4866-a9ab-23b30e4581b1][open newline on previous line]] | |
+ | space | [[#b7d5a893-3045-4968-a150-cb813fddfe9e][org-edit-special]] | | [[#47b5912e-edc7-42ec-841b-f0e202b7f593][spell check word]] | |
+ |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
+ | left secondary | C- | M- | C-M- | C-S- |
+ |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
+ | = | | | | |
+ | 1 | | | | |
+ | 4 | | | [[#2d4de3c9-9e0c-4ab4-89e3-e41bfed3c9a7][widen]] | |
+ | 5 | | | | |
+ | tab-key | [[#2f527321-7f78-421b-b0c4-6fc810da0246][query-replace]] | | | |
+ | t | [[#3bcdf4a3-f33c-4dad-ba94-e4fd3775eca6][org change todo state]] | | [[#47c64b9c-346d-45ad-8c38-865fe22d31a6][org insert timestamp]] | |
+ | home | [[#1919659a-b466-4519-9276-8bf06a916066][start of buffer]] | | | |
+ | end | [[#0a7bd629-cbcc-4761-8fe2-cc9370b985a4][end of buffer]] | | | |
+ | f9 | | | | |
+ |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
+ | right secondary | C- | M- | C-M- | C-S- |
+ |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
+ | 6 | [[#e44e584b-d925-4036-9ad5-a90d02e74bef][save-buffers-kill-emacs]] | | [[#da73de75-0914-4f48-81d5-9b408433b14b][insert-small-copyright]] | |
+ | 7 | | | [[#a68c6b8e-9911-475e-ab35-e239771fe881][insert-full-copyright]] | |
+ | 0 | [[#96ae2fcc-3a0c-40c4-aef8-06aff3fd42be][text-scale-reset]] | | [[#0e7f83a5-600e-4016-af98-95904300c016][insert-apache]] | |
+ | - | | | [[#6febc7ea-9cc7-488c-af34-538b8e69633b][org-edit-src-exit]] | |
+ | y | [[#97aee7f1-3647-4602-a65a-45e8a3aa3a7c][undo-tree-redo]] | | | |
+ | \ | [[#69005926-08ab-4adc-a163-44fed609cc95][sr-speedbar-toggle]] | | [[#27045e96-59a3-45b4-b0ff-6247aa5ed47e][mark-defun]] | |
+ | h | [[#3c5f241f-fc62-459d-ab85-6b7c1fb04801][help-prefix]] | | | |
+ | ' | [[#9f252721-a2d5-46c6-b268-8ed597256229][eval-expression]] | | | |
+ | n | [[#65ac9206-1a67-48dc-8b72-26d763d7bf2b][unpop-to-mark-command]] | | [[#34fb8fbd-42dc-46b0-8c3c-c7e51edc9687][narrow-to-region]] | |
+ | rshift | | | | |
+ | escape | [[#da8bae21-a7be-45de-8027-1b26e6285e40][find-tag]] | | | |
+ |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------|
#+END:
-* persistent registers
-This needs to be at the end, because I visit a file, thus setting a
-mode, and the mode hook needs to be setup before that.
-
-I'm using persistent registers instead of bookmarks. I dun use them
-much, so the added hassle of having to set it within this file is
-worth the benefit of only having one concept in my mind.
-#+begin_src emacs-lisp
- (dolist
- (r `(
- (?i (file . ,"~/.emacs.d/my-init.org"))
- (?t (file . ,"/a/x.txt"))
- ))
- (set-register (car r) (cadr r)))
-#+end_src
* keybind notes
common keys, which would be better off doing swaps than rebinds:
command to make more accessible, ...
-* misc useful functions I'd rather have in a list than burried
-#+begin_src emacs-lisp :tangle no
-;; these are usefull with (goto-char)
-;; find named entity, other than headline
-(org-find-entry-with-id "string-number-or-symbol")
-
-(org-find-exact-headline-in-buffer "heading" nil t)
-
-(byte-recompile-file (expand-file-name "~/.emacs.d/my-init.el") t 0)
-(byte-recompile-directory (expand-file-name "~/.emacs.d") 0)
-(byte-recompile-directory (expand-file-name "~/.emacs.d/src/haskell-mode") 0)
-
-;; remove any indent level which is throughout the buffer
-(org-do-remove-indentation)
-
-#+end_src
-
* TESTING / DEVELOPMENT AREA
-:PROPERTIES:
-:header-args: :tangle no
-:END:
-** new
-#+begin_src emacs-lisp
-
-
-#+end_src
-
-** key logging
-this article convinced me that trying to experiment with modal editing is a waste.
-http://chrisdone.com/posts/speculations-on-exclusive-editing
-I want to record my emacs commands simply to find optimiaztions, like if I often do some M-x command and should bind it
-to a key.
-
-
-#+begin_src emacs-lisp :tangle no
-
-(setq keylog-list nil)
-(setq keylog-mode nil)
-
-(defun keylog-save ()
-
- ;; Check that the lock file does not exist
- (when (keyfreq-file-is-unlocked)
- ;; Lock the file
- (keyfreq-file-claim-lock)
-
- ;; Check that we have the lock
- (if (eq (keyfreq-file-owner) (emacs-pid))
-(unwind-protect
-(progn
-;; Load values and merge them with the current keyfreq-table
-(keyfreq-table-load table)
-
-;; Write the new frequencies
-(with-temp-file keyfreq-file
-(prin1 (cdr (keyfreq-list table 'no-sort)) (current-buffer))))
-
-;; Release the lock and reset the hash table.
-(keyfreq-file-release-lock)
-(clrhash table))
- )))
-
-(defun my-keylogger-function ()
- (setq keylog-list (cons (list (current-time) current-prefix-arg this-command) keylog-list)))
-(add-hook 'pre-command-hook 'my-keylogger-function)
-
-#+end_src
-
-in a lisp expression, ; \\[ throws off forward-sexp
-when not in emacs lisp mode,
-even with (with-syntax-table emacs-lisp-mode-syntax-table
-forward-sexp)
-which is found in preceding-sexp
-potentially a bug, either in with-syntax-table, or
-in scan-lists, which is implemented in C
-
-
-
-
-why did it go to the init file?
-change EDITOR to emacsclient
-xserver-xorg-core=2:1.14.3-3ubuntu2
-(setq-default header-line-format nil) ; Copy mode-line
-(setq-default mode-line-format nil) ;
-
-
-#+RESULTS:
-: set-food-completions
-
-
-
-useless gnus group keys:
-a
-c
-
-
-(add-to-list 'load-path "~/.emacs.d/emacs/site-lisp/org")
-
-#+begin_src emacs-lisp
- (add-hook 'org-mode-hook
- (lambda () (define-key org-mode-map (kbd "C-y") nil)))
-
-#+end_src
-
-
-
-
(defun comint-send-string (process string)
"Like `process-send-string', but also does extra bookkeeping for Comint mode."
(if process
(process-send-string process string))
-* python
-todo: get smart-operator to work
-todo, checkout https://github.com/python-rope/ropemacs refactoring python,
-todo, try py-autopep8, autoformatter
-todo, check out some python linting stuff. pychecker is one, others are in *packages*
-todo, finish reading through python-mode.el functions
-;; todo, figure out multi-line input in shell mode
-
-
-usefull m-x commands:
-m-x py-describe-mode: doc for mode which is extensive
-m-x py-sort-imports
-m-x py-guess-indent-offset: setup indent for code i didn't write
-
-possibly usefull commands:
-found via looking through python-mode.el, quit like 1/4 through, cuz its tedious, last spot was at:
-(defun py-comment-region (beg end &optional arg)
-after finding py-describe-mode, it seemed to do a good job of documenting all the most important stuff
-
-py-switch-to-python
-python-shell-completion-complete-or-indent may be usefull to get completion working in the shell
-py-insert-default-shebang
-py-electric-*
-py-indent-line-outmost
-py-newline-and-close-block
-py-indent-and-forward (indent line, move to next)
-py-fill-*
-py-which-function (for showing in the modeline)
-py-help-at-point
-py-execute-import-or-reload
-py-execute-def-or-class
-various pdb functions
-
-
-installing jedi
-#+begin_src sh :tangle no
-pi python-pip
-s pip install jedi virtualenv
-#+end_src
-then do m-x jedi:install-server
-
-
-
-disabled because it takes 152 ms to load,
-and I don't know how to do it conditioally
-#+begin_src emacs-lisp :tangle no
-
-;; change from default python3 to be compatibile with Pywikibot
-(setq py-shell-name "/usr/bin/python")
-(require 'python-mode)
-
-(setq py-autopep8-options '("--max-line-length=110"))
-
-(defun py-execute-block-or-clause-create-shell ()
- (interactive)
- (cond ((get-buffer "*Python*")
- (py--execute-prepare "block-or-clause")
- (py-execute-block-or-clause)
- (call-interactively 'next-line))
- (t
- (py-shell)
- ;; py-shell starts the shell but not display the buffer on the first run
- ;; subsequent runs, it does. I grabbed this command from inside to
- ;; do just the relevant part from the second run, as a hack.
- ;; todo: report a bug on this
- (py--shell-manage-windows py-buffer-name))))
-(setq py-tab-shifts-region-p t)
-(setq py-tab-indents-region-p t)
-
-(defun py-run ()
- "default action to run the current buffer"
- (basic-save-buffer)
- (py-execute-buffer))
-
-
-(add-hook 'python-mode-hook
- (lambda ()
- (setq run-fun 'py-run)
- (define-key python-mode-map (kbd "C-M-a") nil)
- (define-key python-mode-map (kbd "C-M-d") nil)
- (define-key python-mode-map (kbd "C-M-e") nil)
- (define-key python-mode-map (kbd "C-M-h") nil)
- (define-key python-mode-map (kbd "C-M-i") nil)
- (define-key python-mode-map (kbd "C-M-u") nil)
- (define-key python-mode-map (kbd "C-M-x") nil)
- (define-key python-mode-map (kbd "<tab>") 'indent-for-tab-command)
- (define-key python-mode-map (kbd "C-j") nil)
- (define-key python-mode-map (kbd "<C-backspace>") nil)
- ;;(define-key python-mode-map (kbd "C-(") (lambda () (interactive) (basic-save-buffer) (py-execute-buffer)))
- ;; fix default return bindings
- (define-key python-mode-map (kbd "C-j") nil)
- (define-key python-mode-map (kbd "RET") nil)
- (define-key python-mode-map (kbd "<return>") 'py-newline-and-indent)
- (define-key python-mode-map (kbd "<M-tab>") 'py-indent-line)
- (define-key python-mode-map (kbd "C-M-(") 'py-shift-left)
- (define-key python-mode-map (kbd "C-M-)") 'py-shift-right)
- (define-key python-mode-map (kbd "<home>") 'py-beginning-of-line)
- (define-key python-mode-map (kbd "<end>") 'py-end-of-line)
- (define-key python-mode-map (kbd "C-t") 'py-execute-block-or-clause-create-shell)
- (define-key python-mode-map (kbd "<S-delete>") 'py-ian-execute-line-or-region)
- ;; python mode adds these to this list, which is normally empty.
- ;; it makes my send-python function not reuse an existing python shell window
- ;; there are other ways to override this, but I don't know of any other value of
- ;; having this set.
- (setq same-window-buffer-names (delete "*Python*" same-window-buffer-names))
- (setq same-window-buffer-names (delete "*IPython*" same-window-buffer-names))))
-
-;; i dunno, why, but this didn't work:
-;; and we can't eval-after-load cuz it is part of the greater python mode file
-(add-hook 'py-shell-hook
- (lambda ()
- (define-key py-shell-map "\r" nil)
- (define-key py-shell-map (kbd "<return>") 'comint-send-input)
- (define-key py-shell-map (kbd "C-t") 'py-shell-toggle-arrow-keys)
- (define-key py-shell-map "\C-d" nil)
- (define-key py-shell-map (kbd "<up>") 'my-comint-previous-input)
- (define-key py-shell-map (kbd "<down>") 'my-comint-next-input)))
-
-
-(defun py-ian-execute-line-or-region ()
- (interactive)
- (cond ((get-buffer "*Python*")
- (if mark-active
- (py-execute-region)
- (py-execute-statement))
- (call-interactively 'next-line))
- (t (py-shell))))
-
-;; http://tkf.github.io/emacs-jedi/latest/
-(add-hook 'python-mode-hook 'jedi:setup)
-(setq jedi:complete-on-dot t)
-
-(defun py-shell-toggle-arrow-keys ()
- (interactive)
- (toggle-arrow-keys py-shell-map))
-
-#+end_src
-
-
-;; py-shell window stuff
-;; it splits the window if the shell is in a different frame
-;; which seems to be a bug, but it can be fixed with this option
-;; (setq py-keep-windows-configuration 'force)
-;; however, with py-execute-block-or-clause, if the shell is in a different frame,
-;; you get errors "buffer is read only", when the point is near the beginning of a command
-;; todo: test with emacs -Q and file a bug
-;; if you execute py-execute-... without a python shell open,
-;; it starts one, doesn't display it, and subsequent py-execute commands
-;; give error "buffer is read only"
-;; these functions fix / improve these problems
-
-
-** initial python-mode setup
-
-python-mode seems to be the most canonical package, based on
-https://docs.python.org/devguide/emacs.html
-much more feature rich than the emacs built in one.
-
-getting it, it wants you to setup an account on launchpad by default,
-there is some way to get anonymous bzr access, but google didn't answer it right away,
-so fuck it, ill go the happy path.
-
-based on error messages,
-add public ssh key to https://launchpad.net/people/+me
-bzr launchpad-login iank
-cd ~/.emacs.d/src/
-bzr branch lp:python-mode
-
-add lines from INSTALL to init
-
-
-** background on packages
-jedi appears most popular based on github stats
-pysmell appears dead
-ac-python appears dead
-https://github.com/proofit404/anaconda-mode seems to be kicking along
-
-
-** misc notes:
-
-python-mode has a TON of functions that are just aliases or verbatim wrappers of other functions.
-also has undocumented/unused vars all around. it is quite annoying.
-
-the dedicated argument to py-shell does nothing,
-and py-dedicated-shell just sets that, so it is a waste
-
-
-** background on sending to python shell
-
-using the builtin python execute shell functions, sending one line doesn't really work well.
-The bulit in functions don't wait for further input if a block is not closed.
-And doing a copy/paste thing gets messed up because of indents.
-With some hacking, I could probably do copy/paste and remove indents, only to a
-certain level if we have entered a block and are waiting to finish it.
-But just doing the builtin execute block is a decent work around.
-
-
-Here is the scrapped function for single line built in sending to shell.
-
-
-(setq w32-enable-num-lock nil)
-(global-set-key (kbd "<num_lock>") 'left-char)
-
-
-(defun sqlup-find-correct-keywords ()
- "If emacs is handling the logic for syntax highlighting of SQL keywords, then we piggyback on top of that logic. If not, we use an sql-mode function to create a list of regular expressions and use that."
- (mapcar 'car (sql-add-product-keywords sql-product '())))
-
-
-largest subarray sum, array of pos and neg ints.