From 153c091bfaa1726263ff11c9f9745bb09558e9b8 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 19 Jan 2017 10:29:17 -0800 Subject: [PATCH] formatting mostly --- my-init.org | 141 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 93 insertions(+), 48 deletions(-) diff --git a/my-init.org b/my-init.org index e716e33..65808da 100644 --- a/my-init.org +++ b/my-init.org @@ -1,7 +1,7 @@ #+TITLE: My Personal Init Customization #+OPTIONS: toc:nil num:nil ^:nil * copyright -# Copyright (C) 2016 Ian Kelling +# Copyright (C) 2017 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 @@ -161,6 +161,47 @@ If it is different, emacs will give a message about recovering it when you open +* TODO keybinds to remember + +keys worth memorizing + +c-2 +c-m-3 + +s-return + +in isearch, C-o +isearch-occur + +org, C-c / t +make just todo items visible + +C-mouse-1 +buffer list menu + +C-up/down +move up/down fast + +M-right-scroll +forward/back sexp + +C-M-right-scroll +scroll + +C-S-scroll +change text size + +how to control+left scroll on kinesis +right shift = control + +C-left-scroll +forward/backward word + +C-M-d +swap buffers across windows + + + * TODO learn some more ivy mode stuff * TODO declarative package installations, with documentation. @@ -725,53 +766,58 @@ 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))) - +(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) - (override-theme 'leuven) ;; org mode features, with monitor darkened. part of org-mode i think +(defun toggle-night () + (interactive) + (cond ((equal (car custom-enabled-themes) 'naquadah) + ;; background off white to be better on the eyes. took this + ;; color from gitweb. + (custom-set-faces `(default ((t (:background "#F6F6F0"))))) + (override-theme 'leuven)) + (t + ;; revert previous background change + (custom-set-faces `(default ((t (:background nil))))) + (override-theme 'naquadah)))) +(custom-set-faces `(default ((t (:background "#F6F6F0"))))) +(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)) +;; disable color thing with this: +;;(disable-theme (car custom-enabled-themes)) - ;; decent dark themes +;; decent dark themes - ;;(override-theme 'tangotango) - ;;(override-theme 'deeper-blue) - ;;(override-theme 'tango-dark) - ;;(override-theme 'tsdh-dark) +;;(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 +;;(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 +;; 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 +;;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. +;;color-theme is deprecated in emacs 24. ;; theme packages i tried then removed: ;; ignored ones that didn't use the new theme engine @@ -4914,16 +4960,15 @@ calc-dispatch *** C-9] delete-window-or-exit #+begin_src emacs-lisp - (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)))) +(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)) + (progn (basic-save-buffer) (delete-frame)) + (save-buffers-kill-terminal t)))) #+end_src *** M-9] kill-buffer @@ -4941,7 +4986,7 @@ I did a grep of the emacs sources, but couldn't find anything. *** 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 () @@ -5438,7 +5483,7 @@ save-buffers-kill-emacs (interactive) (beginning-of-line) (let ((beg (point))) - (insert "Copyright (C) 2016 Ian Kelling\nThis program is under GPL v. 3 or later, see ") + (insert "Copyright (C) 2017 Ian Kelling\nThis program is under GPL v. 3 or later, see ") (comment-region beg (point)))) (global-set-key (kbd "C-M-6") 'insert-small-copyright) @@ -5453,7 +5498,7 @@ 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") @@ -5489,7 +5534,7 @@ 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") -- 2.30.2