dotfiles/index.html

6597 lines
586 KiB
HTML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2016-10-19 Wed 18:08 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title></title>
<meta name="generator" content="Org-mode" />
<meta name="author" content="Ivan Malison" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
pre.src-sh:before { content: 'sh'; }
pre.src-bash:before { content: 'sh'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-R:before { content: 'R'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-java:before { content: 'Java'; }
pre.src-sql:before { content: 'SQL'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
/*]]>*/-->
</style>
<link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/htmlize.css"/>
<link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/readtheorg.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.js"></script>
<script type="text/javascript" src="http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"></script>
<style type="text/css">
pre.src {background-color: #263238; color: #ffffff;}</style>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
</head>
<body>
<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgheadline1">1. About</a></li>
<li><a href="#orgheadline17">2. Early</a>
<ul>
<li><a href="#orgheadline2">2.1. Lexical Binding</a></li>
<li><a href="#orgheadline3">2.2. Setup auto-compile</a></li>
<li><a href="#orgheadline4">2.3. Prefer Newer Versions</a></li>
<li><a href="#orgheadline5">2.4. Custom Files</a></li>
<li><a href="#orgheadline7">2.5. emit</a>
<ul>
<li><a href="#orgheadline6">2.5.1. <span class="todo TODO">TODO</span> this needs to be done better, but it works for now</a></li>
</ul>
</li>
<li><a href="#orgheadline8">2.6. Benchmarking</a></li>
<li><a href="#orgheadline9">2.7. GUI Disables</a></li>
<li><a href="#orgheadline10">2.8. Byte-Compiler</a></li>
<li><a href="#orgheadline11">2.9. exec-path-from-shell</a></li>
<li><a href="#orgheadline12">2.10. Non-Forking Shell Command To String</a></li>
<li><a href="#orgheadline13">2.11. Security</a></li>
<li><a href="#orgheadline14">2.12. ELPA Archive Setup</a></li>
<li><a href="#orgheadline15">2.13. Bootstrap Package Loading</a></li>
<li><a href="#orgheadline16">2.14. Set EMACS environment variable</a></li>
</ul>
</li>
<li><a href="#orgheadline67">3. Functions</a>
<ul>
<li><a href="#orgheadline18">3.1. Join Paths</a></li>
<li><a href="#orgheadline19">3.2. Variables</a></li>
<li><a href="#orgheadline20">3.3. Use Package Wrapper With Local Load Path Support</a></li>
<li><a href="#orgheadline29">3.4. Required Packages</a>
<ul>
<li><a href="#orgheadline21">3.4.1. s</a></li>
<li><a href="#orgheadline22">3.4.2. dash</a></li>
<li><a href="#orgheadline23">3.4.3. gh</a></li>
<li><a href="#orgheadline24">3.4.4. shut-up</a></li>
<li><a href="#orgheadline25">3.4.5. pcache</a></li>
<li><a href="#orgheadline26">3.4.6. parse-csv</a></li>
<li><a href="#orgheadline27">3.4.7. emit</a></li>
<li><a href="#orgheadline28">3.4.8. request</a></li>
</ul>
</li>
<li><a href="#orgheadline43">3.5. Macros</a>
<ul>
<li><a href="#orgheadline30">3.5.1. Named Build</a></li>
<li><a href="#orgheadline31">3.5.2. Emacs Version Predicate</a></li>
<li><a href="#orgheadline35">3.5.3. Compose Functions</a></li>
<li><a href="#orgheadline36">3.5.4. Make Interactive</a></li>
<li><a href="#orgheadline38">3.5.5. Advice Add Around Builder</a></li>
<li><a href="#orgheadline39">3.5.6. Let Around</a></li>
<li><a href="#orgheadline40">3.5.7. Let Around Advice</a></li>
<li><a href="#orgheadline41">3.5.8. Compose Around Builder</a></li>
<li><a href="#orgheadline42">3.5.9. Measure Time</a></li>
</ul>
</li>
<li><a href="#orgheadline44">3.6. Add Files to <code>org-agenda-files</code></a></li>
<li><a href="#orgheadline45">3.7. Get String From File</a></li>
<li><a href="#orgheadline46">3.8. Get Current Location</a></li>
<li><a href="#orgheadline47">3.9. Haversine distance</a></li>
<li><a href="#orgheadline48">3.10. Font Size</a></li>
<li><a href="#orgheadline49">3.11. Message Result Builder</a></li>
<li><a href="#orgheadline50">3.12. Custom <code>shell-command-on-region</code></a></li>
<li><a href="#orgheadline53">3.13. Copy String Functions</a>
<ul>
<li><a href="#orgheadline51">3.13.1. Copy portions of the buffer file name</a></li>
<li><a href="#orgheadline52">3.13.2. Copy the current branch using magit</a></li>
</ul>
</li>
<li><a href="#orgheadline54">3.14. Named Compile</a></li>
<li><a href="#orgheadline55">3.15. Replace Escape Sequences</a></li>
<li><a href="#orgheadline56">3.16. Download a File Into a Buffer</a></li>
<li><a href="#orgheadline57">3.17. Concat With Symbols</a></li>
<li><a href="#orgheadline58">3.18. Edit a script on PATH</a></li>
<li><a href="#orgheadline59">3.19. Toggle lexical binding in the current buffer</a></li>
<li><a href="#orgheadline60">3.20. Sync kill ring with copyq</a></li>
<li><a href="#orgheadline61">3.21. Other</a></li>
<li><a href="#orgheadline66">3.22. Keyboard Macros</a>
<ul>
<li><a href="#orgheadline65">3.22.1. For editing literate config</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orgheadline108">4. General</a>
<ul>
<li><a href="#orgheadline68">4.1. User Info</a></li>
<li><a href="#orgheadline69">4.2. Sane Defaults</a></li>
<li><a href="#orgheadline70">4.3. Line Numbers</a></li>
<li><a href="#orgheadline73">4.4. Backups</a>
<ul>
<li><a href="#orgheadline71">4.4.1. Put them all in one directory</a></li>
<li><a href="#orgheadline72">4.4.2. Completely disable backups</a></li>
</ul>
</li>
<li><a href="#orgheadline77">4.5. Prompts</a>
<ul>
<li><a href="#orgheadline74">4.5.1. No popup frames</a></li>
<li><a href="#orgheadline75">4.5.2. boolean (yes-or-no)</a></li>
<li><a href="#orgheadline76">4.5.3. No dialog boxes</a></li>
</ul>
</li>
<li><a href="#orgheadline78">4.6. Splitting</a></li>
<li><a href="#orgheadline79">4.7. Fill Setup</a></li>
<li><a href="#orgheadline80">4.8. Encoding</a></li>
<li><a href="#orgheadline81">4.9. Visible Bell</a></li>
<li><a href="#orgheadline82">4.10. Configure <code>vc</code></a></li>
<li><a href="#orgheadline83">4.11. Time in Mode Line</a></li>
<li><a href="#orgheadline84">4.12. Kill Ring</a></li>
<li><a href="#orgheadline85">4.13. Subword</a></li>
<li><a href="#orgheadline86">4.14. Scratch Buffer</a></li>
<li><a href="#orgheadline87">4.15. Don't prompt about local variables</a></li>
<li><a href="#orgheadline88">4.16. proced</a></li>
<li><a href="#orgheadline89">4.17. Set default browser</a></li>
<li><a href="#orgheadline90">4.18. Set epa program</a></li>
<li><a href="#orgheadline91">4.19. Make files executable</a></li>
<li><a href="#orgheadline92">4.20. Misc</a></li>
<li><a href="#orgheadline93">4.21. paradox</a></li>
<li><a href="#orgheadline94">4.22. diminish</a></li>
<li><a href="#orgheadline95">4.23. edit-server</a></li>
<li><a href="#orgheadline96">4.24. load-dir</a></li>
<li><a href="#orgheadline97">4.25. server</a></li>
<li><a href="#orgheadline98">4.26. list-environment</a></li>
<li><a href="#orgheadline99">4.27. bug-hunter</a></li>
<li><a href="#orgheadline100">4.28. shackle</a></li>
<li><a href="#orgheadline101">4.29. beacon</a></li>
<li><a href="#orgheadline102">4.30. discover-my-major</a></li>
<li><a href="#orgheadline103">4.31. refine</a></li>
<li><a href="#orgheadline104">4.32. winner</a></li>
<li><a href="#orgheadline105">4.33. eyebrowse</a></li>
<li><a href="#orgheadline106">4.34. fill-column-indicator</a></li>
<li><a href="#orgheadline107">4.35. overseer</a></li>
</ul>
</li>
<li><a href="#orgheadline120">5. Keybindings</a>
<ul>
<li><a href="#orgheadline109">5.1. bind-key</a></li>
<li><a href="#orgheadline110">5.2. which-key</a></li>
<li><a href="#orgheadline111">5.3. hydra</a></li>
<li><a href="#orgheadline112">5.4. kill-emacs</a></li>
<li><a href="#orgheadline113">5.5. imenu</a></li>
<li><a href="#orgheadline114">5.6. undo</a></li>
<li><a href="#orgheadline115">5.7. other-window</a></li>
<li><a href="#orgheadline116">5.8. Mark ring</a></li>
<li><a href="#orgheadline117">5.9. Other bindings</a></li>
<li><a href="#orgheadline118">5.10. global-set-key-to-use-package</a></li>
<li><a href="#orgheadline119">5.11. OSX</a></li>
</ul>
</li>
<li><a href="#orgheadline133">6. Navigation</a>
<ul>
<li><a href="#orgheadline121">6.1. zop-to-char</a></li>
<li><a href="#orgheadline122">6.2. helm</a></li>
<li><a href="#orgheadline123">6.3. helm-projectile</a></li>
<li><a href="#orgheadline124">6.4. projectile</a></li>
<li><a href="#orgheadline125">6.5. ido</a></li>
<li><a href="#orgheadline126">6.6. avy</a></li>
<li><a href="#orgheadline127">6.7. ace-window</a></li>
<li><a href="#orgheadline128">6.8. neotree</a></li>
<li><a href="#orgheadline130">6.9. jump-char</a>
<ul>
<li><a href="#orgheadline129">6.9.1. helm-zsh-history</a></li>
</ul>
</li>
<li><a href="#orgheadline131">6.10. flimenu</a></li>
<li><a href="#orgheadline132">6.11. swiper</a></li>
</ul>
</li>
<li><a href="#orgheadline137">7. Completion</a>
<ul>
<li><a href="#orgheadline135">7.1. company</a>
<ul>
<li><a href="#orgheadline134">7.1.1. company-flx</a></li>
</ul>
</li>
<li><a href="#orgheadline136">7.2. auto-complete</a></li>
</ul>
</li>
<li><a href="#orgheadline148">8. Text Manipulation</a>
<ul>
<li><a href="#orgheadline138">8.1. smartparens</a></li>
<li><a href="#orgheadline139">8.2. multiple-cursors</a></li>
<li><a href="#orgheadline140">8.3. expand-region</a></li>
<li><a href="#orgheadline141">8.4. multi-line</a></li>
<li><a href="#orgheadline142">8.5. comment-dwim-2</a></li>
<li><a href="#orgheadline143">8.6. unfill</a></li>
<li><a href="#orgheadline144">8.7. cliphist</a></li>
<li><a href="#orgheadline145">8.8. electric-operator-mode</a></li>
<li><a href="#orgheadline146">8.9. string-inflection</a></li>
<li><a href="#orgheadline147">8.10. yasnippet</a></li>
</ul>
</li>
<li><a href="#orgheadline165">9. Source Control</a>
<ul>
<li><a href="#orgheadline150">9.1. magit</a>
<ul>
<li><a href="#orgheadline149">9.1.1. magithub</a></li>
</ul>
</li>
<li><a href="#orgheadline151">9.2. git-link</a></li>
<li><a href="#orgheadline152">9.3. magit-gitflow</a></li>
<li><a href="#orgheadline153">9.4. git-timemachine</a></li>
<li><a href="#orgheadline154">9.5. git-gutter</a></li>
<li><a href="#orgheadline155">9.6. gitolite-clone</a></li>
<li><a href="#orgheadline156">9.7. gitconfig-mode</a></li>
<li><a href="#orgheadline157">9.8. gitignore-mode</a></li>
<li><a href="#orgheadline164">9.9. github</a>
<ul>
<li><a href="#orgheadline158">9.9.1. github-search</a></li>
<li><a href="#orgheadline159">9.9.2. github-clone</a></li>
<li><a href="#orgheadline160">9.9.3. github-notifier</a></li>
<li><a href="#orgheadline161">9.9.4. github-browse-file</a></li>
<li><a href="#orgheadline162">9.9.5. magit-gh-pulls</a></li>
<li><a href="#orgheadline163">9.9.6. gist</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orgheadline220">10. Major Modes</a>
<ul>
<li><a href="#orgheadline196">10.1. Programming</a>
<ul>
<li><a href="#orgheadline168">10.1.1. python</a></li>
<li><a href="#orgheadline170">10.1.2. go</a></li>
<li><a href="#orgheadline181">10.1.3. emacs-lisp</a></li>
<li><a href="#orgheadline184">10.1.4. clojure</a></li>
<li><a href="#orgheadline185">10.1.5. scala</a></li>
<li><a href="#orgheadline186">10.1.6. js</a></li>
<li><a href="#orgheadline187">10.1.7. rust</a></li>
<li><a href="#orgheadline192">10.1.8. haskell</a></li>
<li><a href="#orgheadline193">10.1.9. C/C++</a></li>
<li><a href="#orgheadline194">10.1.10. C#</a></li>
<li><a href="#orgheadline195">10.1.11. racket</a></li>
</ul>
</li>
<li><a href="#orgheadline202">10.2. Data/Config/Protocol</a>
<ul>
<li><a href="#orgheadline197">10.2.1. thrift</a></li>
<li><a href="#orgheadline198">10.2.2. protobuf</a></li>
<li><a href="#orgheadline199">10.2.3. json-mode</a></li>
<li><a href="#orgheadline200">10.2.4. yaml-mode</a></li>
<li><a href="#orgheadline201">10.2.5. es-mode</a></li>
</ul>
</li>
<li><a href="#orgheadline216">10.3. Document</a>
<ul>
<li><a href="#orgheadline208">10.3.1. org</a></li>
<li><a href="#orgheadline212">10.3.2. TeX</a></li>
<li><a href="#orgheadline213">10.3.3. markdown-mode</a></li>
<li><a href="#orgheadline214">10.3.4. plantuml-mode</a></li>
<li><a href="#orgheadline215">10.3.5. wsd-mode</a></li>
</ul>
</li>
<li><a href="#orgheadline219">10.4. Utility</a>
<ul>
<li><a href="#orgheadline217">10.4.1. restclient</a></li>
<li><a href="#orgheadline218">10.4.2. jq-mode</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orgheadline224">11. Programming</a>
<ul>
<li><a href="#orgheadline221">11.1. realgud</a></li>
<li><a href="#orgheadline222">11.2. emr</a></li>
<li><a href="#orgheadline223">11.3. semantic</a></li>
</ul>
</li>
<li><a href="#orgheadline229">12. Utility</a>
<ul>
<li><a href="#orgheadline225">12.1. term</a></li>
<li><a href="#orgheadline226">12.2. term-manager</a></li>
<li><a href="#orgheadline227">12.3. term-projectile</a></li>
<li><a href="#orgheadline228">12.4. crux</a></li>
</ul>
</li>
<li><a href="#orgheadline233">13. Chat</a>
<ul>
<li><a href="#orgheadline230">13.1. erc</a></li>
<li><a href="#orgheadline231">13.2. bitlbee</a></li>
<li><a href="#orgheadline232">13.3. slack</a></li>
</ul>
</li>
<li><a href="#orgheadline237">14. Cooperation</a>
<ul>
<li><a href="#orgheadline234">14.1. togetherly</a></li>
<li><a href="#orgheadline235">14.2. floobits</a></li>
<li><a href="#orgheadline236">14.3. rudel</a></li>
</ul>
</li>
<li><a href="#orgheadline289">15. Other</a>
<ul>
<li><a href="#orgheadline238">15.1. anzu</a></li>
<li><a href="#orgheadline239">15.2. fontawesome</a></li>
<li><a href="#orgheadline240">15.3. shell-history</a></li>
<li><a href="#orgheadline241">15.4. iedit</a></li>
<li><a href="#orgheadline242">15.5. tramp</a></li>
<li><a href="#orgheadline243">15.6. flycheck</a></li>
<li><a href="#orgheadline244">15.7. narrow-indirect</a></li>
<li><a href="#orgheadline245">15.8. editorconfig</a></li>
<li><a href="#orgheadline246">15.9. dtrt-indent</a></li>
<li><a href="#orgheadline247">15.10. indent-guide</a></li>
<li><a href="#orgheadline248">15.11. rainbow-delimiters</a></li>
<li><a href="#orgheadline249">15.12. undo-tree</a></li>
<li><a href="#orgheadline250">15.13. recentf</a></li>
<li><a href="#orgheadline251">15.14. key-chord</a></li>
<li><a href="#orgheadline252">15.15. nodejs-repl</a></li>
<li><a href="#orgheadline253">15.16. calc-mode</a></li>
<li><a href="#orgheadline254">15.17. helm-spotify</a></li>
<li><a href="#orgheadline255">15.18. jabber</a></li>
<li><a href="#orgheadline256">15.19. htmlize</a></li>
<li><a href="#orgheadline257">15.20. calfw</a></li>
<li><a href="#orgheadline258">15.21. clocker</a></li>
<li><a href="#orgheadline259">15.22. deft</a></li>
<li><a href="#orgheadline260">15.23. epg</a></li>
<li><a href="#orgheadline261">15.24. pinentry</a></li>
<li><a href="#orgheadline262">15.25. twittering-mode</a></li>
<li><a href="#orgheadline263">15.26. matrix-client</a></li>
<li><a href="#orgheadline264">15.27. mu4e</a></li>
<li><a href="#orgheadline265">15.28. gmail-message-mode</a></li>
<li><a href="#orgheadline266">15.29. ham-mode</a></li>
<li><a href="#orgheadline267">15.30. alert</a></li>
<li><a href="#orgheadline268">15.31. sauron</a></li>
<li><a href="#orgheadline269">15.32. screenshot</a></li>
<li><a href="#orgheadline270">15.33. libmpdee</a></li>
<li><a href="#orgheadline271">15.34. flyspell</a></li>
<li><a href="#orgheadline272">15.35. web-mode</a></li>
<li><a href="#orgheadline273">15.36. helm-themes</a></li>
<li><a href="#orgheadline274">15.37. helm-swoop</a></li>
<li><a href="#orgheadline275">15.38. perspective</a></li>
<li><a href="#orgheadline276">15.39. smex</a></li>
<li><a href="#orgheadline277">15.40. java</a></li>
<li><a href="#orgheadline278">15.41. android-mode</a></li>
<li><a href="#orgheadline279">15.42. gradle-mode</a></li>
<li><a href="#orgheadline280">15.43. jsx-mode</a></li>
<li><a href="#orgheadline281">15.44. css</a></li>
<li><a href="#orgheadline282">15.45. robe</a></li>
<li><a href="#orgheadline283">15.46. rinari</a></li>
<li><a href="#orgheadline284">15.47. helm-gtags</a></li>
<li><a href="#orgheadline285">15.48. sgml-mode</a></li>
<li><a href="#orgheadline286">15.49. evil</a></li>
<li><a href="#orgheadline288">15.50. hackernews</a></li>
</ul>
</li>
<li><a href="#orgheadline304">16. Appearance</a>
<ul>
<li><a href="#orgheadline290">16.1. Basic Config</a></li>
<li><a href="#orgheadline291">16.2. Themes</a></li>
<li><a href="#orgheadline292">16.3. all-the-icons</a></li>
<li><a href="#orgheadline295">16.4. spaceline</a>
<ul>
<li><a href="#orgheadline293">16.4.1. Disable sRGB colorspace to make powerline separators work</a></li>
<li><a href="#orgheadline294">16.4.2. config</a></li>
</ul>
</li>
<li><a href="#orgheadline296">16.5. helm-themes</a></li>
<li><a href="#orgheadline297">16.6. window-number</a></li>
<li><a href="#orgheadline298">16.7. Whitespace Setup</a></li>
<li><a href="#orgheadline299">16.8. Colorize Compliation Buffers</a></li>
<li><a href="#orgheadline300">16.9. Automatic Theme Changer</a></li>
<li><a href="#orgheadline301">16.10. Fix <code>ansi-term</code> Colors</a></li>
<li><a href="#orgheadline302">16.11. After <code>load-theme</code> hook</a></li>
<li><a href="#orgheadline303">16.12. Frame Initialization</a></li>
</ul>
</li>
<li><a href="#orgheadline305">17. Post Init Custom</a></li>
</ul>
</div>
</div>
<div id="outline-container-orgheadline1" class="outline-2">
<h2 id="orgheadline1"><span class="section-number-2">1</span> About</h2>
<div class="outline-text-2" id="text-1">
<p>
This is my emacs configuration in literate form. It aspires to be like the
incredibly well commented literate configurations of <a href="http://pages.sachachua.com/.emacs.d/Sacha.html">Sacha Chua</a> and <a href="http://doc.rix.si/cce/cce.html">Ryan Rix</a>,
but I haven't quite gotten around to polishing it to the point where nearly
every section has commentary explaining why it is there, as those two have.
</p>
<p>
Still, there are definitely a few sections of which I am quite proud, and that
others may find to be useful.
</p>
</div>
</div>
<div id="outline-container-orgheadline17" class="outline-2">
<h2 id="orgheadline17"><span class="section-number-2">2</span> Early</h2>
<div class="outline-text-2" id="text-2">
<p>
The configurations in this section need to occur early in emacs startup for some reason or another.
</p>
</div>
<div id="outline-container-orgheadline2" class="outline-3">
<h3 id="orgheadline2"><span class="section-number-3">2.1</span> Lexical Binding</h3>
<div class="outline-text-3" id="text-2-1">
<p>
This makes it so that the file that is produced from tangling this
file uses lexical scoping.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #b0bec5;">;;; </span><span style="color: #b0bec5;">-*- lexical-binding: t -*-</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq-default</span> lexical-binding t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline3" class="outline-3">
<h3 id="orgheadline3"><span class="section-number-3">2.2</span> Setup auto-compile</h3>
<div class="outline-text-3" id="text-2-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>boundp 'use-package<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">auto-compile</span>
<span style="color: #ff8A65;">:ensure</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #B388FF;">(</span>auto-compile-on-load-mode<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>auto-compile-on-save-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline4" class="outline-3">
<h3 id="orgheadline4"><span class="section-number-3">2.3</span> Prefer Newer Versions</h3>
<div class="outline-text-3" id="text-2-3">
<p>
To reduce the risk of loading outdated byte code files, we set
load-prefer-newer and enable auto-compile-on-load-mode as early as
possible.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> load-prefer-newer t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline5" class="outline-3">
<h3 id="orgheadline5"><span class="section-number-3">2.4</span> Custom Files</h3>
<div class="outline-text-3" id="text-2-4">
<p>
The default value of <code>custom-file</code> is just the current user's <code>.emacs.d/init.el</code>
file. Emacs will add content to <code>custom-file</code> whenever a variable is customized
or marked as safe. When init.el is version controlled, it is quite annoying to
have random machine-generated variable settings amended to it because those
changes are often not worth keeping permanently, so we set a different custom
file here to avoid this situation.
</p>
<p>
custom-before.el is loaded before the rest of init.el, while custom-after.el is
loaded afterwards. this-machine.el has customizations that should only apply to
the current machine. custom-before and custom-after are not version controlled
in the dotfiles repo but they are shared across machines elsewhere.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">machine-custom</span> <span style="color: #9ccc65;">"~/.emacs.d/this-machine.el"</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">custom-after-file</span> <span style="color: #9ccc65;">"~/.emacs.d/custom-after.el"</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> custom-file <span style="color: #9ccc65;">"~/.emacs.d/custom-before.el"</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>file-exists-p custom-file<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span>load custom-file<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline7" class="outline-3">
<h3 id="orgheadline7"><span class="section-number-3">2.5</span> emit</h3>
<div class="outline-text-3" id="text-2-5">
</div><div id="outline-container-orgheadline6" class="outline-4">
<h4 id="orgheadline6"><span class="section-number-4">2.5.1</span> <span class="todo TODO">TODO</span> this needs to be done better, but it works for now</h4>
<div class="outline-text-4" id="text-2-5-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>file-exists-p <span style="color: #9ccc65;">"~/.emacs.d/load.d/emit.el"</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>load <span style="color: #9ccc65;">"~/.emacs.d/load.d/emit.el"</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline8" class="outline-3">
<h3 id="orgheadline8"><span class="section-number-3">2.6</span> Benchmarking</h3>
<div class="outline-text-3" id="text-2-6">
<p>
This appears here so that it can accurately benchmark as much of
startup as possible.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"> <span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:do-benchmark</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">and</span> <span style="color: #EF6C00;">(</span>boundp 'use-package<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">bound-and-true-p</span> imalison:do-benchmark<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">benchmark-init</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline9" class="outline-3">
<h3 id="orgheadline9"><span class="section-number-3">2.7</span> GUI Disables</h3>
<div class="outline-text-3" id="text-2-7">
<p>
Death to any gui elements in emacs! Do this EARLY so that emacs
doesn't redisplay in a way that is visually unpleasant on startup a
bunch of times.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>fboundp 'menu-bar-mode<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span>menu-bar-mode -1<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>fboundp 'tool-bar-mode<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span>tool-bar-mode -1<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>fboundp 'scroll-bar-mode<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span>scroll-bar-mode -1<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
Tooltips are annoying:
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">if</span> <span style="color: #2196F3;">(</span>fboundp 'tooltip-mode<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span>tooltip-mode -1<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> tooltip-use-echo-area t<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>'
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline10" class="outline-3">
<h3 id="orgheadline10"><span class="section-number-3">2.8</span> Byte-Compiler</h3>
<div class="outline-text-3" id="text-2-8">
<p>
These definitions silence the byte-compiler.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">grep-find-ignored-directories</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">grep-find-ignored-files</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">ido-context-switch-command</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">ido-cur-item</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">ido-cur-list</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">ido-default-item</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">inherit-input-method</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">oauth--token-data</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">tls-checktrust</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">tls-program</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">url-callback-arguments</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">url-callback-function</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">url-http-extra-headers</span> nil<span style="color: #e91e63;">)</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">This variable doesn't exist in old versions of org-mode</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">org-show-context-detail</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline11" class="outline-3">
<h3 id="orgheadline11"><span class="section-number-3">2.9</span> exec-path-from-shell</h3>
<div class="outline-text-3" id="text-2-9">
<p>
Sets environment variables by starting a shell.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">TODO: this does not seem to actually install exec-path-from-shell</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">eval-and-compile</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">when</span> <span style="color: #EF6C00;">(</span>fboundp 'use-package<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">exec-path-from-shell</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">For debugging</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">when</span> nil
<span style="color: #26A69A;">(</span>message <span style="color: #9ccc65;">"path: %s, setup: %s"</span> <span style="color: #FFCDD2;">(</span>getenv <span style="color: #9ccc65;">"PATH"</span><span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>getenv <span style="color: #9ccc65;">"ENVIRONMENT_SETUP_DONE"</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">setq</span> exec-path-from-shell-debug t<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> exec-path-from-shell-arguments <span style="color: #26A69A;">(</span>list <span style="color: #9ccc65;">"-l"</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> exec-path-from-shell-check-startup-files nil<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>add-to-list 'exec-path-from-shell-variables <span style="color: #9ccc65;">"SHELL"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>add-to-list 'exec-path-from-shell-variables <span style="color: #9ccc65;">"GOPATH"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>add-to-list 'exec-path-from-shell-variables <span style="color: #9ccc65;">"ENVIRONMENT_SETUP_DONE"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>add-to-list 'exec-path-from-shell-variables <span style="color: #9ccc65;">"PYTHONPATH"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>exec-path-from-shell-initialize<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline12" class="outline-3">
<h3 id="orgheadline12"><span class="section-number-3">2.10</span> Non-Forking Shell Command To String</h3>
<div class="outline-text-3" id="text-2-10">
<p>
Emacs' built in <code>shell-command-to-string</code> function has the downside that it
forks a new shell process every time it is executed. This means that any shell
startup cost is incurred when this function is called.
</p>
<p>
The following implementation uses eshell's <code>executable-find</code> to find the
binary (which is the only reason <code>shell-comand-to-string</code> is typically used
anyway), but it avoids incurring any shell-startup cost.
</p>
<p>
This was originally inspired by <a href="https://github.com/bbatsov/projectile/issues/1044">this issue</a>.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:call-process-to-string</span> <span style="color: #2196F3;">(</span>program <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">with-temp-buffer</span>
<span style="color: #EF6C00;">(</span>apply 'call-process program nil <span style="color: #B388FF;">(</span>current-buffer<span style="color: #B388FF;">)</span> nil args<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>buffer-string<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:get-call-process-args-from-shell-command</span> <span style="color: #2196F3;">(</span>command<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">cl-destructuring-bind</span>
<span style="color: #EF6C00;">(</span>the-command . args<span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span>split-string command <span style="color: #9ccc65;">" "</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">let</span> <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>binary-path <span style="color: #26A69A;">(</span>executable-find the-command<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> binary-path
<span style="color: #76ff03;">(</span>cons binary-path args<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:shell-command-to-string</span> <span style="color: #2196F3;">(</span>command<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>call-process-args
<span style="color: #76ff03;">(</span>imalison:get-call-process-args-from-shell-command command<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">if</span> call-process-args
<span style="color: #B388FF;">(</span>apply 'imalison:call-process-to-string call-process-args<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>shell-command-to-string command<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
This makes it so that we always try to call-process instead of shell-command-to-sting. It may cause undesireable behavior.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:try-call-process</span> <span style="color: #2196F3;">(</span>command<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>call-process-args
<span style="color: #76ff03;">(</span>imalison:get-call-process-args-from-shell-command command<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">if</span> call-process-args
<span style="color: #B388FF;">(</span>apply 'imalison:call-process-to-string call-process-args<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>advice-add 'shell-command-to-string <span style="color: #ff8A65;">:before-until</span> 'imalison:try-call-process<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline13" class="outline-3">
<h3 id="orgheadline13"><span class="section-number-3">2.11</span> Security</h3>
<div class="outline-text-3" id="text-2-11">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:secure</span> t<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:use-https-and-tls</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> tls-checktrust t<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>trustfile
<span style="color: #76ff03;">(</span>replace-regexp-in-string
<span style="color: #9ccc65;">"\\\\"</span> <span style="color: #9ccc65;">"/"</span>
<span style="color: #26A69A;">(</span>replace-regexp-in-string
<span style="color: #9ccc65;">"\n"</span> <span style="color: #9ccc65;">""</span>
<span style="color: #FFCDD2;">(</span>shell-command-to-string <span style="color: #9ccc65;">"python -m certifi"</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> tls-program
<span style="color: #B388FF;">(</span>list
<span style="color: #76ff03;">(</span>format <span style="color: #9ccc65;">"gnutls-cli%s --x509cafile %s -p %%p %%h"</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">if</span> <span style="color: #FFCDD2;">(</span>eq window-system 'w32<span style="color: #FFCDD2;">)</span> <span style="color: #9ccc65;">".exe"</span> <span style="color: #9ccc65;">""</span><span style="color: #26A69A;">)</span> trustfile<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:test-security</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>bad-hosts
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">loop</span> for bad
in `<span style="color: #26A69A;">(</span><span style="color: #9ccc65;">"https://wrong.host.badssl.com/"</span>
<span style="color: #9ccc65;">"https://self-signed.badssl.com/"</span><span style="color: #26A69A;">)</span>
if <span style="color: #26A69A;">(</span><span style="color: #fff59d;">condition-case</span> _e
<span style="color: #FFCDD2;">(</span>url-retrieve
bad <span style="color: #795548;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #DCE775;">(</span>_retrieved<span style="color: #DCE775;">)</span> t<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span><span style="color: #f36c60; font-weight: bold;">error</span> nil<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
collect bad<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">if</span> bad-hosts
<span style="color: #B388FF;">(</span><span style="color: #f36c60; font-weight: bold;">error</span> <span style="color: #76ff03;">(</span>format <span style="color: #9ccc65;">"tls misconfigured; retrieved %s ok"</span>
bad-hosts<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>url-retrieve <span style="color: #9ccc65;">"https://badssl.com"</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #26A69A;">(</span>_retrieved<span style="color: #26A69A;">)</span> t<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> imalison:secure <span style="color: #2196F3;">(</span>imalison:use-https-and-tls<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline14" class="outline-3">
<h3 id="orgheadline14"><span class="section-number-3">2.12</span> ELPA Archive Setup</h3>
<div class="outline-text-3" id="text-2-12">
<p>
The org archive does not support https, so we set http as the protocol explicitly.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span class="linenr"> 1: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">package</span><span style="color: #e91e63;">)</span>
<span class="linenr"> 2: </span>
<span class="linenr"> 3: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:build-archive-uri</span> <span style="color: #2196F3;">(</span>uri protocol<span style="color: #2196F3;">)</span>
<span class="linenr"> 4: </span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">unless</span> protocol <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> protocol <span style="color: #B388FF;">(</span><span style="color: #fff59d;">if</span> imalison:secure <span style="color: #9ccc65;">"https"</span> <span style="color: #9ccc65;">"http"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span class="linenr"> 5: </span> <span style="color: #2196F3;">(</span>format <span style="color: #9ccc65;">"%s://%s"</span> protocol uri<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span class="linenr"> 6: </span>
<span class="linenr"> 7: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:melpa-uri</span> nil<span style="color: #e91e63;">)</span>
<span class="linenr"> 8: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:package-archive-triples</span>
<span class="linenr"> 9: </span> `<span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"elpa"</span> <span style="color: #9ccc65;">"tromey.com/elpa/"</span> <span style="color: #9ccc65;">"http"</span><span style="color: #EF6C00;">)</span>
<span class="linenr">10: </span> <span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"org"</span> <span style="color: #9ccc65;">"orgmode.org/elpa/"</span> <span style="color: #9ccc65;">"http"</span><span style="color: #EF6C00;">)</span>
<span class="linenr">11: </span> <span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"melpa"</span> ,<span style="color: #B388FF;">(</span><span style="color: #fff59d;">or</span> imalison:melpa-uri <span style="color: #9ccc65;">"melpa.org/packages/"</span><span style="color: #B388FF;">)</span> nil<span style="color: #EF6C00;">)</span>
<span class="linenr">12: </span> <span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"melpa-stable"</span> <span style="color: #9ccc65;">"stable.melpa.org/packages/"</span> nil<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span class="linenr">13: </span>
<span class="linenr">14: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:add-package-archive</span> <span style="color: #2196F3;">(</span>archive-name archive-uri<span style="color: #2196F3;">)</span>
<span class="linenr">15: </span> <span style="color: #2196F3;">(</span>add-to-list 'package-archives
<span class="linenr">16: </span> `<span style="color: #EF6C00;">(</span>,archive-name . ,archive-uri<span style="color: #EF6C00;">)</span> t<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span class="linenr">17: </span>
<span class="linenr">18: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">cl-loop</span> for package-triple in imalison:package-archive-triples
<span class="linenr">19: </span> do <span style="color: #2196F3;">(</span><span style="color: #fff59d;">cl-destructuring-bind</span> <span style="color: #EF6C00;">(</span>archive-name archive-uri protocol<span style="color: #EF6C00;">)</span> package-triple
<span class="linenr">20: </span> <span style="color: #EF6C00;">(</span>imalison:add-package-archive
<span class="linenr">21: </span> archive-name <span style="color: #B388FF;">(</span>imalison:build-archive-uri archive-uri protocol<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline15" class="outline-3">
<h3 id="orgheadline15"><span class="section-number-3">2.13</span> Bootstrap Package Loading</h3>
<div class="outline-text-3" id="text-2-13">
<p>
Its a shame that everyone has to have some version of this function in
their init.el. I use use-package's own mechanism for ensuring packages
are installed so my version of <code>ensure-packages-installed</code> is really
only used to download use-package itself.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">ensure-packages-installed</span> <span style="color: #2196F3;">(</span>packages<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">unless</span> package-archive-contents
<span style="color: #EF6C00;">(</span>package-refresh-contents<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>mapcar
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #B388FF;">(</span>package<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">if</span> <span style="color: #76ff03;">(</span>package-installed-p package<span style="color: #76ff03;">)</span>
package
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #26A69A;">(</span>message <span style="color: #FFCDD2;">(</span>format <span style="color: #9ccc65;">"Installing package %s."</span> package<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>package-install package<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
packages<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
Ensure that use-package is installed.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>package-initialize t<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>ensure-packages-installed '<span style="color: #2196F3;">(</span><span style="color: #fff59d;">use-package</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
use-package is only needed at compile time.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">eval-when-compile</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">use-package</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
Ensure by default since most of the package for which I use use-package need to be downloaded. ensure can be disabled explicitly with a <code>:ensure nil</code>.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> use-package-always-ensure t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline16" class="outline-3">
<h3 id="orgheadline16"><span class="section-number-3">2.14</span> Set EMACS environment variable</h3>
<div class="outline-text-3" id="text-2-14">
<p>
Emacs cask seems to depend on the EMACS environment variable being set to the
binary path of emacs. I found the method for getting the path to the emacs
executable <a href="http://emacs.stackexchange.com/questions/6010/can-emacs-detect-the-path-of-its-executable">here</a>.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>setenv <span style="color: #9ccc65;">"EMACS"</span>
<span style="color: #2196F3;">(</span>file-truename <span style="color: #EF6C00;">(</span>expand-file-name invocation-name invocation-directory<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
Update: It turns out that it is term-exec-1 that is causing this environment
variable to be set to something strange. When I tried to disable it, it seemed
to cause issues. Oh well&#x2026;
</p>
</div>
</div>
</div>
<div id="outline-container-orgheadline67" class="outline-2">
<h2 id="orgheadline67"><span class="section-number-2">3</span> Functions</h2>
<div class="outline-text-2" id="text-3">
</div><div id="outline-container-orgheadline18" class="outline-3">
<h3 id="orgheadline18"><span class="section-number-3">3.1</span> Join Paths</h3>
<div class="outline-text-3" id="text-3-1">
<p>
Works in the same way as os.path.join in python
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:join-paths</span> <span style="color: #2196F3;">(</span>root <span style="color: #84ffff;">&amp;rest</span> dirs<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>result root<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cl-loop</span> for dir in dirs do
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> result <span style="color: #76ff03;">(</span>concat <span style="color: #26A69A;">(</span>file-name-as-directory result<span style="color: #26A69A;">)</span> dir<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
result<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline19" class="outline-3">
<h3 id="orgheadline19"><span class="section-number-3">3.2</span> Variables</h3>
<div class="outline-text-3" id="text-3-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:projects-directory</span>
<span style="color: #2196F3;">(</span>imalison:join-paths <span style="color: #EF6C00;">(</span>substitute-in-file-name <span style="color: #9ccc65;">"$HOME"</span><span style="color: #EF6C00;">)</span> <span style="color: #9ccc65;">"Projects"</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:gpg-key</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline20" class="outline-3">
<h3 id="orgheadline20"><span class="section-number-3">3.3</span> Use Package Wrapper With Local Load Path Support</h3>
<div class="outline-text-3" id="text-3-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>put 'imalison:use-package 'lisp-indent-function 'defun<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>put 'imalison:use-package* 'lisp-indent-function 'defun<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:use-package*</span> <span style="color: #2196F3;">(</span>package target-directory <span style="color: #84ffff;">&amp;rest</span> forms<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>actual-target <span style="color: #76ff03;">(</span><span style="color: #fff59d;">if</span> <span style="color: #26A69A;">(</span>file-exists-p target-directory<span style="color: #26A69A;">)</span>
target-directory
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">let</span> <span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span>in-projects <span style="color: #DCE775;">(</span>imalison:join-paths imalison:projects-directory
target-directory<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">when</span> <span style="color: #795548;">(</span>file-exists-p in-projects<span style="color: #795548;">)</span>
in-projects<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>additional-forms
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">when</span> actual-target
<span style="color: #26A69A;">(</span>list
<span style="color: #ff8A65;">:load-path</span> actual-target
<span style="color: #ff8A65;">:ensure</span> nil<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
`<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> ,package
,@additional-forms ,@forms<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:use-package</span> <span style="color: #2196F3;">(</span>package <span style="color: #84ffff;">&amp;rest</span> forms<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">imalison:use-package*</span> ,package ,<span style="color: #EF6C00;">(</span>symbol-name package<span style="color: #EF6C00;">)</span> ,@forms<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline29" class="outline-3">
<h3 id="orgheadline29"><span class="section-number-3">3.4</span> Required Packages</h3>
<div class="outline-text-3" id="text-3-4">
<p>
The packages in this section provide no functionality on their own,
but provide support for writing custom elisp.
</p>
</div>
<div id="outline-container-orgheadline21" class="outline-4">
<h4 id="orgheadline21"><span class="section-number-4">3.4.1</span> s</h4>
<div class="outline-text-4" id="text-3-4-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">s</span> <span style="color: #ff8A65;">:demand</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline22" class="outline-4">
<h4 id="orgheadline22"><span class="section-number-4">3.4.2</span> dash</h4>
<div class="outline-text-4" id="text-3-4-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">dash</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>dash-enable-font-lock<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline23" class="outline-4">
<h4 id="orgheadline23"><span class="section-number-4">3.4.3</span> gh</h4>
<div class="outline-text-4" id="text-3-4-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:use-package*</span> gh <span style="color: #9ccc65;">"gh.el"</span>
<span style="color: #ff8A65;">:demand</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline24" class="outline-4">
<h4 id="orgheadline24"><span class="section-number-4">3.4.4</span> shut-up</h4>
<div class="outline-text-4" id="text-3-4-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">shut-up</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:shut-up-around</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">function</span> <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">shut-up</span> <span style="color: #B388FF;">(</span>apply function args<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline25" class="outline-4">
<h4 id="orgheadline25"><span class="section-number-4">3.4.5</span> pcache</h4>
<div class="outline-text-4" id="text-3-4-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">pcache</span>
<span style="color: #ff8A65;">:demand</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline26" class="outline-4">
<h4 id="orgheadline26"><span class="section-number-4">3.4.6</span> parse-csv</h4>
<div class="outline-text-4" id="text-3-4-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">parse-csv</span>
<span style="color: #ff8A65;">:demand</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline27" class="outline-4">
<h4 id="orgheadline27"><span class="section-number-4">3.4.7</span> emit</h4>
<div class="outline-text-4" id="text-3-4-7">
<p>
This is disabled for now until I figure out what to do with emit.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:use-package</span> emit
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:demand</span> t<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">emit</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline28" class="outline-4">
<h4 id="orgheadline28"><span class="section-number-4">3.4.8</span> request</h4>
<div class="outline-text-4" id="text-3-4-8">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">request</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline43" class="outline-3">
<h3 id="orgheadline43"><span class="section-number-3">3.5</span> Macros</h3>
<div class="outline-text-3" id="text-3-5">
</div><div id="outline-container-orgheadline30" class="outline-4">
<h4 id="orgheadline30"><span class="section-number-4">3.5.1</span> Named Build</h4>
<div class="outline-text-4" id="text-3-5-1">
<p>
imalison:named-build provides a way to invoke a macro in such a way
that the lambda that it produces is given a name.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:named-build</span> <span style="color: #2196F3;">(</span>name builder <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">defalias</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">quote</span> ,name<span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span>,builder ,@args<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>put 'imalison:named-build 'lisp-indent-function 1<span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
<code>imalison:named-builder-builder</code> builds a macro from another macro
that builds lambda functions. The arguments to the macro that results
are exactly the same as those of the original macro, except that the
first argument of the new macro is used to name the lambda produced by
the original macro (which is passed as the second argument to
<code>imalison:named-builder-builder</code>).
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:named-builder-builder</span> <span style="color: #2196F3;">(</span>named-builder-name builder-name<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defmacro</span> ,named-builder-name <span style="color: #B388FF;">(</span>function-name <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>cons 'imalison:named-build
<span style="color: #76ff03;">(</span>cons function-name
<span style="color: #26A69A;">(</span>cons <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">quote</span> ,builder-name<span style="color: #FFCDD2;">)</span> args<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>put <span style="color: #B388FF;">(</span><span style="color: #fff59d;">quote</span> ,named-builder-name<span style="color: #B388FF;">)</span> 'lisp-indent-function 1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
<code>imalison:named-builder</code> runs <code>imalison:named-builder-builder</code> with the
convention that original macro to modify is the concatenation of the
new macro name and the -fn suffix.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:named-builder</span> <span style="color: #2196F3;">(</span>name<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">imalison:named-builder-builder</span>
,name ,<span style="color: #EF6C00;">(</span>intern <span style="color: #B388FF;">(</span>concat <span style="color: #76ff03;">(</span>symbol-name name<span style="color: #76ff03;">)</span> <span style="color: #9ccc65;">"-fn"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline31" class="outline-4">
<h4 id="orgheadline31"><span class="section-number-4">3.5.2</span> Emacs Version Predicate</h4>
<div class="outline-text-4" id="text-3-5-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:emacs-version-predicate-fn</span> <span style="color: #2196F3;">(</span>major-version minor-version<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">()</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">or</span> <span style="color: #B388FF;">(</span>&gt; emacs-major-version ,major-version<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">and</span> <span style="color: #76ff03;">(</span>&gt;= emacs-major-version ,major-version<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>&gt;= emacs-minor-version ,minor-version<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:check-emacs-version</span> <span style="color: #2196F3;">(</span>major-version minor-version<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>funcall <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:emacs-version-predicate-fn</span> major-version minor-version<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:named-builder</span> imalison:emacs-version-predicate<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline35" class="outline-4">
<h4 id="orgheadline35"><span class="section-number-4">3.5.3</span> Compose Functions</h4>
<div class="outline-text-4" id="text-3-5-3">
</div><ol class="org-ol"><li><a id="orgheadline32"></a>A version supporting macros<br /><div class="outline-text-5" id="text-3-5-3-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:help-function-arglist</span> <span style="color: #2196F3;">(</span>fn<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>result <span style="color: #76ff03;">(</span>help-function-arglist fn<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">if</span> <span style="color: #B388FF;">(</span>eq result t<span style="color: #B388FF;">)</span> '<span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #B388FF;">)</span> result<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:compose-fn</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> funcs<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>last-function <span style="color: #76ff03;">(</span>car <span style="color: #26A69A;">(</span>last funcs<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>arguments <span style="color: #76ff03;">(</span>imalison:help-function-arglist last-function<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>call-arguments <span style="color: #76ff03;">(</span>delq '<span style="color: #84ffff;">&amp;optional</span> arguments<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">When we have an &amp;rest arguments there is no point in taking any</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">of the arguments by name, so we simply pass them all as an</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">argument list. See the comment below to understand how this</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">impacts the evaluation of the last function.</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">when</span> <span style="color: #B388FF;">(</span>memq '<span style="color: #84ffff;">&amp;rest</span> arguments<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> arguments '<span style="color: #76ff03;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> call-arguments '<span style="color: #76ff03;">(</span>args<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
`<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:compose-argspec</span> ,arguments ,call-arguments ,@funcs<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:compose-argspec</span> <span style="color: #2196F3;">(</span>arguments call-arguments <span style="color: #84ffff;">&amp;rest</span> funcs<span style="color: #2196F3;">)</span>
<span style="color: #ffe4b5;">"Build a new function with NAME that is the composition of FUNCS."</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> ,arguments
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:compose-helper</span> ,funcs ,call-arguments<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:compose-helper</span> <span style="color: #2196F3;">(</span>funcs arguments<span style="color: #2196F3;">)</span>
<span style="color: #ffe4b5;">"Builds funcalls of FUNCS applied to the arg."</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>equal <span style="color: #B388FF;">(</span>length funcs<span style="color: #B388FF;">)</span> 1<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">let</span> <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>last-function <span style="color: #26A69A;">(</span>car funcs<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">This hideous clause is here because it is the only way to</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">handle functions that take &amp;rest args.</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> <span style="color: #76ff03;">(</span>memq '<span style="color: #84ffff;">&amp;rest</span> <span style="color: #26A69A;">(</span>imalison:help-function-arglist last-function<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> last-function <span style="color: #26A69A;">(</span>apply-partially 'apply last-function<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
`<span style="color: #B388FF;">(</span>,last-function ,@arguments<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
`<span style="color: #EF6C00;">(</span>,<span style="color: #B388FF;">(</span>car funcs<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">imalison:compose-helper</span> ,<span style="color: #76ff03;">(</span>cdr funcs<span style="color: #76ff03;">)</span> ,arguments<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:compose-macro-fn</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span>cons 'macro <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:compose-fn</span> ,@args<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:named-builder</span> imalison:compose<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:named-builder</span> imalison:compose-macro<span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline33"></a>Arbitrary arguments at every step<br /><div class="outline-text-5" id="text-3-5-3-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:make-list</span> <span style="color: #2196F3;">(</span>thing<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>listp thing<span style="color: #EF6C00;">)</span>
thing
<span style="color: #EF6C00;">(</span>list thing<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:compose-with-apply</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> funcs<span style="color: #2196F3;">)</span>
<span style="color: #ffe4b5;">"Build a new function with NAME that is the composition of FUNCS."</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:compose-with-apply-helper</span> ,funcs<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:compose-with-apply-helper</span> <span style="color: #2196F3;">(</span>funcs<span style="color: #2196F3;">)</span>
<span style="color: #ffe4b5;">"Builds funcalls of FUNCS applied to the arg."</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>equal <span style="color: #B388FF;">(</span>length funcs<span style="color: #B388FF;">)</span> 0<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">quote</span> args<span style="color: #EF6C00;">)</span>
`<span style="color: #EF6C00;">(</span>apply ,<span style="color: #B388FF;">(</span>car funcs<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>imalison:make-list <span style="color: #76ff03;">(</span><span style="color: #fff59d;">imalison:compose-with-apply-helper</span> ,<span style="color: #26A69A;">(</span>cdr funcs<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline34"></a>Simpler unary version<br /><div class="outline-text-5" id="text-3-5-3-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:compose-unary</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> funcs<span style="color: #2196F3;">)</span>
<span style="color: #ffe4b5;">"Build a new function with NAME that is the composition of FUNCS."</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">(</span>arg<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:compose-helper-unary</span> ,funcs<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:compose-helper-unary</span> <span style="color: #2196F3;">(</span>funcs<span style="color: #2196F3;">)</span>
<span style="color: #ffe4b5;">"Builds funcalls of FUNCS applied to the arg."</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>equal <span style="color: #B388FF;">(</span>length funcs<span style="color: #B388FF;">)</span> 0<span style="color: #EF6C00;">)</span>
'arg
`<span style="color: #EF6C00;">(</span>funcall ,<span style="color: #B388FF;">(</span>car funcs<span style="color: #B388FF;">)</span> <span style="color: #B388FF;">(</span><span style="color: #fff59d;">imalison:compose-helper-unary</span> ,<span style="color: #76ff03;">(</span>cdr funcs<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
<div id="outline-container-orgheadline36" class="outline-4">
<h4 id="orgheadline36"><span class="section-number-4">3.5.4</span> Make Interactive</h4>
<div class="outline-text-4" id="text-3-5-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:make-interactive-fn</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">function</span><span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>apply ,function args<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:named-builder</span> imalison:make-interactive<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline38" class="outline-4">
<h4 id="orgheadline38"><span class="section-number-4">3.5.5</span> Advice Add Around Builder</h4>
<div class="outline-text-4" id="text-3-5-5">
<p>
For composing functions with an apply so that they can be used with
the <code>:around</code> keyword of advice-add.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:advice-add-around-builder-fn</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> functions<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">imalison:compose-argspec</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">function</span> <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">function</span> args<span style="color: #EF6C00;">)</span> ,@functions apply<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:named-builder</span> imalison:advice-add-around-builder<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<ol class="org-ol"><li><a id="orgheadline37"></a>Kill New<br /><div class="outline-text-5" id="text-3-5-5-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:advice-add-around-builder</span> imalison:kill-new-around kill-new<span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
<div id="outline-container-orgheadline39" class="outline-4">
<h4 id="orgheadline39"><span class="section-number-4">3.5.6</span> Let Around</h4>
<div class="outline-text-4" id="text-3-5-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:let-around-fn</span> <span style="color: #2196F3;">(</span>orig-func <span style="color: #84ffff;">&amp;rest</span> forms<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>orig-interactive-form <span style="color: #76ff03;">(</span>interactive-form orig-func<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>docstring-form <span style="color: #76ff03;">(</span>format <span style="color: #9ccc65;">"Call `</span><span style="color: #8bc34a;">%s</span><span style="color: #9ccc65;">' with bindings: %s."</span> orig-func forms<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>additional-forms <span style="color: #76ff03;">(</span>list docstring-form<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">when</span> orig-interactive-form
<span style="color: #B388FF;">(</span>nconc additional-forms <span style="color: #76ff03;">(</span>list orig-interactive-form<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
`<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #B388FF;">)</span>
,@additional-forms
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> ,forms
<span style="color: #76ff03;">(</span>apply <span style="color: #26A69A;">(</span><span style="color: #fff59d;">quote</span> ,orig-func<span style="color: #26A69A;">)</span> args<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:named-builder</span> imalison:let-around<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline40" class="outline-4">
<h4 id="orgheadline40"><span class="section-number-4">3.5.7</span> Let Around Advice</h4>
<div class="outline-text-4" id="text-3-5-7">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:let-advise-around-fn</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> forms<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">(</span>orig-func <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">let</span> ,forms
<span style="color: #B388FF;">(</span>apply orig-func args<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:named-builder</span> imalison:let-advise-around<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline41" class="outline-4">
<h4 id="orgheadline41"><span class="section-number-4">3.5.8</span> Compose Around Builder</h4>
<div class="outline-text-4" id="text-3-5-8">
<p>
For composing functions with an apply so that they can be used with the <code>:around</code> keyword of advice-add.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">TODO/XXX: Isn't this just apply? why doesn't apply work here</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:around-identity</span> <span style="color: #2196F3;">(</span>fn <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>apply fn args<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:compose-around-builder-fn</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> functions<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">imalison:compose-fn</span> ,@functions imalison:around-identity<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:named-builder</span> imalison:compose-around-builder<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline42" class="outline-4">
<h4 id="orgheadline42"><span class="section-number-4">3.5.9</span> Measure Time</h4>
<div class="outline-text-4" id="text-3-5-9">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:measure-time</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> body<span style="color: #2196F3;">)</span>
<span style="color: #ffe4b5;">"Measure and return the running time of the code block."</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">declare</span> <span style="color: #EF6C00;">(</span>indent defun<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>start <span style="color: #76ff03;">(</span>make-symbol <span style="color: #9ccc65;">"start"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
`<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">let</span> <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>,start <span style="color: #26A69A;">(</span>float-time<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
,@body
<span style="color: #B388FF;">(</span>- <span style="color: #76ff03;">(</span>float-time<span style="color: #76ff03;">)</span> ,start<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline44" class="outline-3">
<h3 id="orgheadline44"><span class="section-number-3">3.6</span> Add Files to <code>org-agenda-files</code></h3>
<div class="outline-text-3" id="text-3-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:add-to-org-agenda-files</span> <span style="color: #2196F3;">(</span>incoming-files<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> org-agenda-files
<span style="color: #EF6C00;">(</span>delete-dups
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">cl-loop</span> for filepath in <span style="color: #76ff03;">(</span>append org-agenda-files incoming-files<span style="color: #76ff03;">)</span>
when <span style="color: #76ff03;">(</span><span style="color: #fff59d;">and</span> filepath <span style="color: #26A69A;">(</span>file-exists-p <span style="color: #FFCDD2;">(</span>file-truename filepath<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
collect <span style="color: #76ff03;">(</span>file-truename filepath<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline45" class="outline-3">
<h3 id="orgheadline45"><span class="section-number-3">3.7</span> Get String From File</h3>
<div class="outline-text-3" id="text-3-7">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:get-string-from-file</span> <span style="color: #2196F3;">(</span>file-path<span style="color: #2196F3;">)</span>
<span style="color: #ffe4b5;">"Return file-path's file content."</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">with-temp-buffer</span>
<span style="color: #EF6C00;">(</span>insert-file-contents file-path<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>buffer-string<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline46" class="outline-3">
<h3 id="orgheadline46"><span class="section-number-3">3.8</span> Get Current Location</h3>
<div class="outline-text-3" id="text-3-8">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:get-lat-long</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">condition-case</span> _ex
<span style="color: #EF6C00;">(</span>mapcar 'string-to-number <span style="color: #B388FF;">(</span>s-split <span style="color: #9ccc65;">","</span> <span style="color: #76ff03;">(</span>s-trim <span style="color: #26A69A;">(</span>shell-command-to-string
<span style="color: #9ccc65;">"whereami"</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #f36c60; font-weight: bold;">error</span> <span style="color: #B388FF;">(</span>list 37.7879312624533 -122.402388853402<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline47" class="outline-3">
<h3 id="orgheadline47"><span class="section-number-3">3.9</span> Haversine distance</h3>
<div class="outline-text-3" id="text-3-9">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:sin2</span> <span style="color: #2196F3;">(</span>p<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>sin-p <span style="color: #76ff03;">(</span>sin p<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>* sin-p sin-p<span style="color: #EF6C00;">)</span> <span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:haversine-distance</span>
<span style="color: #2196F3;">(</span>left-lat-long right-lat-long <span style="color: #84ffff;">&amp;optional</span> radius<span style="color: #2196F3;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Default to earth radius in km</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">unless</span> radius <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> radius 6378.1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">cl-destructuring-bind</span> <span style="color: #EF6C00;">(</span>left-lat left-long<span style="color: #EF6C00;">)</span> left-lat-long
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cl-destructuring-bind</span> <span style="color: #B388FF;">(</span>right-lat right-long<span style="color: #B388FF;">)</span> right-lat-long
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>l1 <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">degrees-to-radians</span> left-lat<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>f1 <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">degrees-to-radians</span> left-long<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>l2 <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">degrees-to-radians</span> right-lat<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>f2 <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">degrees-to-radians</span> right-long<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span> <span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>* 2 radius
<span style="color: #26A69A;">(</span>asin
<span style="color: #FFCDD2;">(</span>sqrt
<span style="color: #795548;">(</span>+ <span style="color: #DCE775;">(</span>imalison:sin2 <span style="color: #e91e63;">(</span>/ <span style="color: #2196F3;">(</span>- f2 f1<span style="color: #2196F3;">)</span> 2<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>* <span style="color: #e91e63;">(</span>cos f2<span style="color: #e91e63;">)</span> <span style="color: #e91e63;">(</span>cos f1<span style="color: #e91e63;">)</span> <span style="color: #e91e63;">(</span>imalison:sin2 <span style="color: #2196F3;">(</span>/ <span style="color: #EF6C00;">(</span>- l2 l1<span style="color: #EF6C00;">)</span> 2<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span> <span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline48" class="outline-3">
<h3 id="orgheadline48"><span class="section-number-3">3.10</span> Font Size</h3>
<div class="outline-text-3" id="text-3-10">
<p>
This was taken from <a href="http://emacs.stackexchange.com/questions/7583/transiently-adjust-text-size-in-mode-line-and-minibuffer">here</a> but it has diverged significantly from the original.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:default-font-size-pt</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">cond</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>eq system-type 'darwin<span style="color: #B388FF;">)</span> 120<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>eq system-type 'gnu/linux<span style="color: #B388FF;">)</span> 105<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:huge-font-size</span> 280<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:current-font-size</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span>plist-get <span style="color: #EF6C00;">(</span>custom-face-attributes-get 'default nil<span style="color: #EF6C00;">)</span> <span style="color: #ff8A65;">:height</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:set-font-size</span> <span style="color: #2196F3;">(</span>size<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #EF6C00;">(</span>list <span style="color: #B388FF;">(</span>string-to-number <span style="color: #76ff03;">(</span>read-string <span style="color: #9ccc65;">"Enter a font size: "</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>set-face-attribute 'default nil <span style="color: #ff8A65;">:height</span> size<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:set-huge-font-size</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>imalison:set-font-size imalison:huge-font-size<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">cl-defun</span> <span style="color: #84ffff;">imalison:modify-font-size</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;optional</span> <span style="color: #EF6C00;">(</span>arg 10<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #9ccc65;">"p"</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>imalison:set-font-size <span style="color: #EF6C00;">(</span>+ <span style="color: #B388FF;">(</span>imalison:current-font-size<span style="color: #B388FF;">)</span> arg<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:font-size-incr</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>imalison:modify-font-size +10<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:font-size-decr</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>imalison:modify-font-size -10<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:font-size-reset</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>imalison:set-font-size imalison:default-font-size-pt<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline49" class="outline-3">
<h3 id="orgheadline49"><span class="section-number-3">3.11</span> Message Result Builder</h3>
<div class="outline-text-3" id="text-3-11">
<p>
This macro is useful when writing emacs-lisp. It creates a new interactive command that shows you the result of evaluating a function, with optionally provided arguments.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:message-result-builder</span> <span style="color: #2196F3;">(</span>new-function-name function-to-call <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">defun</span> ,new-function-name <span style="color: #EF6C00;">()</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>message <span style="color: #9ccc65;">"%s"</span> <span style="color: #B388FF;">(</span>apply <span style="color: #76ff03;">(</span><span style="color: #fff59d;">quote</span> ,function-to-call<span style="color: #76ff03;">)</span> <span style="color: #76ff03;">(</span>list ,@args<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
This interactive functions allows the user the select a function to invoke using a freshly minted imalison:message-result-builder
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:message-result-builder-runtime</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">function</span> <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">()</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>message <span style="color: #9ccc65;">"%s"</span> <span style="color: #B388FF;">(</span>apply function-to-call args<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:message-function-result</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">function</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #EF6C00;">(</span>find-function-read<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>message <span style="color: #9ccc65;">"%s"</span> <span style="color: #EF6C00;">(</span>funcall function<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline50" class="outline-3">
<h3 id="orgheadline50"><span class="section-number-3">3.12</span> Custom <code>shell-command-on-region</code></h3>
<div class="outline-text-3" id="text-3-12">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:copy-shell-command-on-region</span> <span style="color: #2196F3;">(</span>start end command<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #EF6C00;">(</span>list <span style="color: #B388FF;">(</span>region-beginning<span style="color: #B388FF;">)</span> <span style="color: #B388FF;">(</span>region-end<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>read-shell-command <span style="color: #9ccc65;">"Shell command on region: "</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>original-buffer <span style="color: #76ff03;">(</span>current-buffer<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">with-temp-buffer</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>temp-buffer <span style="color: #FFCDD2;">(</span>current-buffer<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">with-current-buffer</span> original-buffer
<span style="color: #26A69A;">(</span>shell-command-on-region start end command temp-buffer<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">let</span> <span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>min <span style="color: #795548;">(</span>point-min<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>max <span style="color: #795548;">(</span>point-max<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>kill-ring-save min max<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>buffer-substring min max<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:shell-command-on-region-replace</span> <span style="color: #2196F3;">(</span>start end command<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #EF6C00;">(</span>list <span style="color: #B388FF;">(</span>region-beginning<span style="color: #B388FF;">)</span> <span style="color: #B388FF;">(</span>region-end<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>read-shell-command <span style="color: #9ccc65;">"Shell command on region: "</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>shell-command-on-region start end command nil t<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:shell-command-on-region
imalison:copy-shell-command-on-region
imalison:shell-command-on-region-replace<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline53" class="outline-3">
<h3 id="orgheadline53"><span class="section-number-3">3.13</span> Copy String Functions</h3>
<div class="outline-text-3" id="text-3-13">
<p>
A macro for composing functions together to build an interactive command to copy a string to the kill ring.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:compose-copy-builder-fn</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> funcs<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">imalison:make-interactive-fn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:compose-fn</span> kill-new ,@funcs<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:named-builder</span> imalison:compose-copy-builder<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<div id="outline-container-orgheadline51" class="outline-4">
<h4 id="orgheadline51"><span class="section-number-4">3.13.1</span> Copy portions of the buffer file name</h4>
<div class="outline-text-4" id="text-3-13-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:copy-buffer-file-path-builder</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">imalison:compose-copy-builder</span> ,@args buffer-file-name<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:copy-buffer-file-path-builder</span> imalison:copy-buffer-file-path-full<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:copy-buffer-file-path-builder</span> imalison:copy-buffer-file-name
file-name-nondirectory<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:copy-buffer-file-path-builder</span> imalison:copy-buffer-file-path
car
projectile-make-relative-to-root
list<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline52" class="outline-4">
<h4 id="orgheadline52"><span class="section-number-4">3.13.2</span> Copy the current branch using magit</h4>
<div class="outline-text-4" id="text-3-13-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:compose-copy-builder</span> imalison:copy-current-git-branch
magit-get-current-branch<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline54" class="outline-3">
<h3 id="orgheadline54"><span class="section-number-3">3.14</span> Named Compile</h3>
<div class="outline-text-3" id="text-3-14">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:named-compile</span> <span style="color: #2196F3;">(</span>command<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span>
<span style="color: #EF6C00;">(</span>list
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>command <span style="color: #FFCDD2;">(</span>eval compile-command<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">if</span> <span style="color: #26A69A;">(</span><span style="color: #fff59d;">or</span> compilation-read-command current-prefix-arg<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>compilation-read-command command<span style="color: #26A69A;">)</span>
command<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>compilation-start command nil <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>format <span style="color: #9ccc65;">"*compilation %s*"</span> command<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline55" class="outline-3">
<h3 id="orgheadline55"><span class="section-number-3">3.15</span> Replace Escape Sequences</h3>
<div class="outline-text-3" id="text-3-15">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:replace-escape-sequences</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">shut-up</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>delimited <span style="color: #26A69A;">(</span><span style="color: #fff59d;">and</span> transient-mark-mode mark-active<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>beg <span style="color: #26A69A;">(</span><span style="color: #fff59d;">when</span> delimited <span style="color: #FFCDD2;">(</span>region-beginning<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>end <span style="color: #26A69A;">(</span><span style="color: #fff59d;">when</span> delimited <span style="color: #FFCDD2;">(</span>region-end<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">save-excursion</span>
<span style="color: #76ff03;">(</span>perform-replace <span style="color: #9ccc65;">"\\t"</span> <span style="color: #9ccc65;">" "</span> nil nil delimited nil nil beg end nil<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">save-excursion</span>
<span style="color: #76ff03;">(</span>perform-replace <span style="color: #9ccc65;">"\\n"</span> <span style="color: #9ccc65;">"\n"</span> nil nil delimited nil nil beg end nil<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline56" class="outline-3">
<h3 id="orgheadline56"><span class="section-number-3">3.16</span> Download a File Into a Buffer</h3>
<div class="outline-text-3" id="text-3-16">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:download-to-buffer</span> <span style="color: #2196F3;">(</span>uri<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #EF6C00;">(</span>list <span style="color: #B388FF;">(</span>read-string <span style="color: #9ccc65;">"Enter uri: "</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>request uri
<span style="color: #ff8A65;">:parser</span> 'buffer-string
<span style="color: #ff8A65;">:success</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cl-function</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #76ff03;">(</span><span style="color: #84ffff;">&amp;key</span> data <span style="color: #84ffff;">&amp;allow-other-keys</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">let</span> <span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>created-buffer <span style="color: #795548;">(</span>get-buffer-create uri<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">with-current-buffer</span> created-buffer
<span style="color: #FFCDD2;">(</span>insert data<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>switch-to-buffer created-buffer<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline57" class="outline-3">
<h3 id="orgheadline57"><span class="section-number-3">3.17</span> Concat With Symbols</h3>
<div class="outline-text-3" id="text-3-17">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:maybe-symbol-name</span> <span style="color: #2196F3;">(</span>arg<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>symbolp arg<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>symbol-name arg<span style="color: #EF6C00;">)</span>
arg<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:concat-symbols</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>intern <span style="color: #EF6C00;">(</span>mapconcat 'imalison:maybe-symbol-name args <span style="color: #9ccc65;">""</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline58" class="outline-3">
<h3 id="orgheadline58"><span class="section-number-3">3.18</span> Edit a script on PATH</h3>
<div class="outline-text-3" id="text-3-18">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:get-executables-at-path</span> <span style="color: #2196F3;">(</span>filepath<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">when</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">and</span> <span style="color: #B388FF;">(</span>file-exists-p filepath<span style="color: #B388FF;">)</span> <span style="color: #B388FF;">(</span>f-directory? filepath<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">--filter</span> <span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>fullpath <span style="color: #FFCDD2;">(</span>imalison:join-paths filepath <span style="color: #ffcc80;">it</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">and</span> <span style="color: #26A69A;">(</span>file-executable-p fullpath<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>not <span style="color: #FFCDD2;">(</span>f-directory? fullpath<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>directory-files filepath<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:get-executables-on-path</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span>mapcan 'imalison:get-executables-at-path <span style="color: #EF6C00;">(</span>eshell-parse-colon-path <span style="color: #B388FF;">(</span>getenv <span style="color: #9ccc65;">"PATH"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:edit-script</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>find-file <span style="color: #EF6C00;">(</span>executable-find
<span style="color: #B388FF;">(</span>ido-completing-read <span style="color: #9ccc65;">"Select a script to edit: "</span>
<span style="color: #76ff03;">(</span>imalison:get-executables-on-path<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline59" class="outline-3">
<h3 id="orgheadline59"><span class="section-number-3">3.19</span> Toggle lexical binding in the current buffer</h3>
<div class="outline-text-3" id="text-3-19">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:toggle-lexical-binding</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>new-binding <span style="color: #76ff03;">(</span>not lexical-binding<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>message <span style="color: #9ccc65;">"Setting lexical-binding to: %s"</span> new-binding<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> lexical-binding new-binding<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline60" class="outline-3">
<h3 id="orgheadline60"><span class="section-number-3">3.20</span> Sync kill ring with copyq</h3>
<div class="outline-text-3" id="text-3-20">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:copyq-get</span> <span style="color: #2196F3;">(</span>i<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>imalison:shell-command-to-string <span style="color: #EF6C00;">(</span>format <span style="color: #9ccc65;">"copyq eval read(%s)"</span> i<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:copyq-sync</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>missing-items <span style="color: #76ff03;">(</span><span style="color: #fff59d;">cl-loop</span> for i from 0 to <span style="color: #26A69A;">(</span>string-to-number
<span style="color: #FFCDD2;">(</span>imalison:shell-command-to-string <span style="color: #9ccc65;">"copyq eval size()"</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
for item = <span style="color: #26A69A;">(</span>imalison:copyq-get i<span style="color: #26A69A;">)</span>
when <span style="color: #26A69A;">(</span>not <span style="color: #FFCDD2;">(</span>member item kill-ring<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
collect item<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> kill-ring <span style="color: #B388FF;">(</span>nconc kill-ring missing-items<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>executable-find <span style="color: #9ccc65;">"copyq"</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>run-with-idle-timer 10 nil 'imalison:copyq-sync<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline61" class="outline-3">
<h3 id="orgheadline61"><span class="section-number-3">3.21</span> Other</h3>
<div class="outline-text-3" id="text-3-21">
<p>
The stuff in this section is pretty crusty. I don't think its used anywhere, but
I keep it around just in case I need it.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">random-choice</span> <span style="color: #2196F3;">(</span>choices<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>nth <span style="color: #EF6C00;">(</span>random <span style="color: #B388FF;">(</span>length choices<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span> choices<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">display-prefix</span> <span style="color: #2196F3;">(</span>arg<span style="color: #2196F3;">)</span>
<span style="color: #ffe4b5;">"Display the value of the raw prefix arg."</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #9ccc65;">"p"</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>message <span style="color: #9ccc65;">"%s"</span> arg<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:uuid</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>s-replace <span style="color: #9ccc65;">"\n"</span> <span style="color: #9ccc65;">""</span> <span style="color: #EF6C00;">(</span>shell-command-to-string <span style="color: #9ccc65;">"uuid"</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:disable-linum-mode</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span>linum-mode 0<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:disable-smartparens-mode</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span>smartparens-mode 0<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:insert-uuid</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>insert <span style="color: #EF6C00;">(</span>imalison:uuid<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:compare-int-list</span> <span style="color: #2196F3;">(</span>a b<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">when</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">and</span> a b<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cond</span> <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>&gt; <span style="color: #26A69A;">(</span>car a<span style="color: #26A69A;">)</span> <span style="color: #26A69A;">(</span>car b<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span> 1<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>&lt; <span style="color: #26A69A;">(</span>car a<span style="color: #26A69A;">)</span> <span style="color: #26A69A;">(</span>car b<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span> -1<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>t <span style="color: #76ff03;">(</span>imalison:compare-int-list <span style="color: #26A69A;">(</span>cdr a<span style="color: #26A69A;">)</span> <span style="color: #26A69A;">(</span>cdr b<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">get-date-created-from-agenda-entry</span> <span style="color: #2196F3;">(</span>agenda-entry<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>org-time-string-to-time
<span style="color: #EF6C00;">(</span>org-entry-get <span style="color: #B388FF;">(</span>get-text-property 1 'org-marker agenda-entry<span style="color: #B388FF;">)</span> <span style="color: #9ccc65;">"CREATED"</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">defvar-setq</span> <span style="color: #2196F3;">(</span>name value<span style="color: #2196F3;">)</span>
`<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>boundp <span style="color: #B388FF;">(</span><span style="color: #fff59d;">quote</span> ,name<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> ,name ,value<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar</span> ,name ,value<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">eval-region-or-last-sexp</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>region-active-p<span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span>call-interactively 'eval-region<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>call-interactively 'eval-last-sexp<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">undo-redo</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;optional</span> arg<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #9ccc65;">"P"</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> arg <span style="color: #EF6C00;">(</span>undo-tree-redo<span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span>undo-tree-undo<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">up-list-region</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>up-list<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span>set-mark-command nil<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span>backward-sexp<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">up-list-back</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>up-list<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span>backward-sexp<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">frame-exists</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span>cl-find-if
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #B388FF;">(</span>frame<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>assoc 'display <span style="color: #76ff03;">(</span>frame-parameters frame<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span> <span style="color: #EF6C00; font-weight: bold;">(</span><span style="color: #f36c60; font-weight: bold;">frame-list</span><span style="color: #EF6C00; font-weight: bold;">)</span><span style="color: #2196F3; font-weight: bold;">)</span><span style="color: #e91e63; font-weight: bold;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">make-frame-if-none-exists</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>existing-frame <span style="color: #76ff03;">(</span>frame-exists<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">if</span> existing-frame
existing-frame
<span style="color: #B388FF;">(</span>make-frame-on-display <span style="color: #76ff03;">(</span>getenv <span style="color: #9ccc65;">"DISPLAY"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">make-frame-if-none-exists-and-focus</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span>make-frame-visible <span style="color: #EF6C00;">(</span>select-frame <span style="color: #B388FF;">(</span>make-frame-if-none-exists<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">notification-center</span> <span style="color: #2196F3;">(</span>title message<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">cl-flet</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>encfn <span style="color: #76ff03;">(</span>s<span style="color: #76ff03;">)</span> <span style="color: #76ff03;">(</span>encode-coding-string s <span style="color: #26A69A;">(</span>keyboard-coding-system<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>shell-command
<span style="color: #B388FF;">(</span>format <span style="color: #9ccc65;">"osascript -e 'display notification \"%s\" with title \"%s\"'"</span>
<span style="color: #76ff03;">(</span>encfn message<span style="color: #76ff03;">)</span> <span style="color: #76ff03;">(</span>encfn title<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">growl-notify</span> <span style="color: #2196F3;">(</span>title message<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>shell-command <span style="color: #EF6C00;">(</span>format <span style="color: #9ccc65;">"grownotify -t %s -m %s"</span> title message<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">notify-send</span> <span style="color: #2196F3;">(</span>title message<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>shell-command <span style="color: #EF6C00;">(</span>format <span style="color: #9ccc65;">"notify-send -u critical %s %s"</span> title message<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">notify-function</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">cond</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>eq system-type 'darwin<span style="color: #B388FF;">)</span> 'notification-center<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>eq system-type 'gnu/linux<span style="color: #B388FF;">)</span> 'notify-send<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:mark-ring
helm-mark-ring
helm-global-mark-ring<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline66" class="outline-3">
<h3 id="orgheadline66"><span class="section-number-3">3.22</span> Keyboard Macros</h3>
<div class="outline-text-3" id="text-3-22">
</div><div id="outline-container-orgheadline65" class="outline-4">
<h4 id="orgheadline65"><span class="section-number-4">3.22.1</span> For editing literate config</h4>
<div class="outline-text-4" id="text-3-22-1">
</div><ol class="org-ol"><li><a id="orgheadline62"></a>extract-current-sexp-to-src-block<br /><div class="outline-text-5" id="text-3-22-1-1">
<p>
This keyboard macro extracts the current sexp to an emacs-lisp source block of its own
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>fset 'extract-current-sexp-to-src-block
<span style="color: #2196F3;">[</span>?\C-a return ?\C-p ?# ?+ ?E ?N ?D ?_ ?S ?R ?C return ?# ?+ ?B ?E ?G ?I ?N ?_ ?S ?R ?C ? ?e ?m ?a ?c ?s ?- ?l ?i ?s ?p ?\C-a ?\C-p ?\C- ?\C-n ?\C-e ?\M-w ?\C-n ?\C-a ?\C-\M-f return ?\C-y<span style="color: #2196F3;">]</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline63"></a>name-source-block-for-use-package-name<br /><div class="outline-text-5" id="text-3-22-1-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>fset 'name-source-block-for-use-package-name
<span style="color: #2196F3;">[</span>?\C-c ?\' ?\M-&lt; ?\C-s ?u ?s ?e ?- ?p ?a ?c ?k return ?\C-\M-f ?\C-f ?\C- ?\C-\M-f ?\M-w ?\C-c ?\' ?\C-r ?B ?E ?G ?I ?N return ?\C-a ?\C-p ?\C-e return ?* ? ?\C-y<span style="color: #2196F3;">]</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline64"></a>extract-and-name-use-package-block<br /><div class="outline-text-5" id="text-3-22-1-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>fset 'extract-and-name-use-package-block
<span style="color: #2196F3;">[</span>?\C-a return ?\C-p ?# ?+ ?E ?N ?D ?_ ?S ?R ?C return ?# ?+ ?B ?E ?G ?I ?N ?_ ?S ?R ?C ? ?e ?m ?a ?c ?s ?- ?l ?i ?s ?p ?\C-a ?\C-p ?\C- ?\C-n ?\C-e ?\M-w ?\C-n ?\C-a ?\C-\M-f return ?\C-y ?\C-p ?\C-p ?\C-c ?\' ?\M-&lt; ?\C-s ?u ?s ?e ?- ?p ?a ?c ?k return ?\C-\M-f ?\C-f ?\C- ?\C-\M-f ?\M-w ?\C-c ?\' ?\C-r ?B ?E ?G ?I ?N return ?\C-a ?\C-p ?\C-e return ?* ? ?\C-y<span style="color: #2196F3;">]</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
</div>
</div>
<div id="outline-container-orgheadline108" class="outline-2">
<h2 id="orgheadline108"><span class="section-number-2">4</span> General</h2>
<div class="outline-text-2" id="text-4">
</div><div id="outline-container-orgheadline68" class="outline-3">
<h3 id="orgheadline68"><span class="section-number-3">4.1</span> User Info</h3>
<div class="outline-text-3" id="text-4-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> user-full-name
<span style="color: #2196F3;">(</span>replace-regexp-in-string <span style="color: #9ccc65;">"\n$"</span> <span style="color: #9ccc65;">""</span> <span style="color: #EF6C00;">(</span>shell-command-to-string
<span style="color: #9ccc65;">"git config --get user.name"</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> user-mail-address
<span style="color: #2196F3;">(</span>replace-regexp-in-string <span style="color: #9ccc65;">"\n$"</span> <span style="color: #9ccc65;">""</span> <span style="color: #EF6C00;">(</span>shell-command-to-string
<span style="color: #9ccc65;">"git config --get user.email"</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline69" class="outline-3">
<h3 id="orgheadline69"><span class="section-number-3">4.2</span> Sane Defaults</h3>
<div class="outline-text-3" id="text-4-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span class="linenr">1: </span><span style="color: #e91e63;">(</span>global-auto-revert-mode<span style="color: #e91e63;">)</span>
<span class="linenr">2: </span><span style="color: #e91e63;">(</span>show-paren-mode 1<span style="color: #e91e63;">)</span>
<span class="linenr">3: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> reb-re-syntax 'string<span style="color: #e91e63;">)</span>
<span id="coderef-ad-redefinition-action" class="coderef-off"><span class="linenr">4: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> ad-redefinition-action 'accept<span style="color: #e91e63;">)</span></span>
<span class="linenr">5: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq-default</span> find-file-visit-truename t<span style="color: #e91e63;">)</span>
<span class="linenr">6: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> large-file-warning-threshold <span style="color: #2196F3;">(</span>* 25 1024 1024<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span class="linenr">7: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> line-move-visual t<span style="color: #e91e63;">)</span>
<span class="linenr">8: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> require-final-newline t<span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
<a href="#coderef-ad-redefinition-action"class="coderef" onmouseover="CodeHighlightOn(this, 'coderef-ad-redefinition-action');" onmouseout="CodeHighlightOff(this, 'coderef-ad-redefinition-action');">This</a> is set because <a href="#coderef-y-or-n-p-only"class="coderef" onmouseover="CodeHighlightOn(this, 'coderef-y-or-n-p-only');" onmouseout="CodeHighlightOff(this, 'coderef-y-or-n-p-only');">this alias</a> causes annoying messaging at startup.
</p>
</div>
</div>
<div id="outline-container-orgheadline70" class="outline-3">
<h3 id="orgheadline70"><span class="section-number-3">4.3</span> Line Numbers</h3>
<div class="outline-text-3" id="text-4-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>line-number-mode t<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>column-number-mode t<span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
Linum can be really slow on large files so it does not make sense to
have it on by default. Its probably safe to turn it on when in a
programming mode.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>global-linum-mode -1<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'prog-mode-hook <span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">()</span> <span style="color: #EF6C00;">(</span>linum-mode t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline73" class="outline-3">
<h3 id="orgheadline73"><span class="section-number-3">4.4</span> Backups</h3>
<div class="outline-text-3" id="text-4-4">
</div><div id="outline-container-orgheadline71" class="outline-4">
<h4 id="orgheadline71"><span class="section-number-4">4.4.1</span> Put them all in one directory</h4>
<div class="outline-text-4" id="text-4-4-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defconst</span> <span style="color: #ffcc80;">emacs-tmp-dir</span>
<span style="color: #2196F3;">(</span>format <span style="color: #9ccc65;">"%s/%s%s/"</span> temporary-file-directory <span style="color: #9ccc65;">"emacs"</span> <span style="color: #EF6C00;">(</span>user-uid<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> backup-directory-alist `<span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">".*"</span> . ,emacs-tmp-dir<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> auto-save-file-name-transforms `<span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">".*"</span> ,emacs-tmp-dir t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> auto-save-list-file-prefix emacs-tmp-dir<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline72" class="outline-4">
<h4 id="orgheadline72"><span class="section-number-4">4.4.2</span> Completely disable backups</h4>
<div class="outline-text-4" id="text-4-4-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> backup-inhibited t<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> make-backup-files nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> auto-save-default nil<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline77" class="outline-3">
<h3 id="orgheadline77"><span class="section-number-3">4.5</span> Prompts</h3>
<div class="outline-text-3" id="text-4-5">
</div><div id="outline-container-orgheadline74" class="outline-4">
<h4 id="orgheadline74"><span class="section-number-4">4.5.1</span> No popup frames</h4>
<div class="outline-text-4" id="text-4-5-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> ns-pop-up-frames nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> pop-up-frames nil<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline75" class="outline-4">
<h4 id="orgheadline75"><span class="section-number-4">4.5.2</span> boolean (yes-or-no)</h4>
<div class="outline-text-4" id="text-4-5-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span class="linenr"> 1: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defadvice</span> <span style="color: #84ffff;">yes-or-no-p</span> <span style="color: #2196F3;">(</span>around prevent-dialog activate<span style="color: #2196F3;">)</span>
<span class="linenr"> 2: </span> <span style="color: #ffe4b5;">"Prevent yes-or-no-p from activating a dialog"</span>
<span class="linenr"> 3: </span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>use-dialog-box nil<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span class="linenr"> 4: </span> ad-do-it<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span class="linenr"> 5: </span>
<span class="linenr"> 6: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defadvice</span> <span style="color: #84ffff;">y-or-n-p</span> <span style="color: #2196F3;">(</span>around prevent-dialog-yorn activate<span style="color: #2196F3;">)</span>
<span class="linenr"> 7: </span> <span style="color: #ffe4b5;">"Prevent y-or-n-p from activating a dialog"</span>
<span class="linenr"> 8: </span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>use-dialog-box nil<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span class="linenr"> 9: </span> ad-do-it<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span class="linenr">10: </span>
<span id="coderef-y-or-n-p-only" class="coderef-off"><span class="linenr">11: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defalias</span> '<span style="color: #84ffff;">yes-or-no-p</span> 'y-or-n-p<span style="color: #e91e63;">)</span></span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline76" class="outline-4">
<h4 id="orgheadline76"><span class="section-number-4">4.5.3</span> No dialog boxes</h4>
<div class="outline-text-4" id="text-4-5-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> use-dialog-box nil<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline78" class="outline-3">
<h3 id="orgheadline78"><span class="section-number-3">4.6</span> Splitting</h3>
<div class="outline-text-3" id="text-4-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">split-horizontally-for-temp-buffers</span> <span style="color: #2196F3;">()</span> <span style="color: #2196F3;">(</span>split-window-horizontally<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'temp-buffer-setup-hook 'split-horizontally-for-temp-buffers<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> split-height-threshold nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> split-width-threshold 160<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline79" class="outline-3">
<h3 id="orgheadline79"><span class="section-number-3">4.7</span> Fill Setup</h3>
<div class="outline-text-3" id="text-4-7">
<p>
Get rid of nags about requiring setences to end with two spaces.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> sentence-end-double-space nil<span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
Set the default fill-column
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq-default</span> fill-column 80<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline80" class="outline-3">
<h3 id="orgheadline80"><span class="section-number-3">4.8</span> Encoding</h3>
<div class="outline-text-3" id="text-4-8">
<p>
UTF-8 everywhere
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:set-coding-systems</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>set-language-environment <span style="color: #9ccc65;">"Latin-1"</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>set-default-coding-systems 'utf-8<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">unless</span> <span style="color: #EF6C00;">(</span>eq system-type 'windows-nt<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>set-selection-coding-system 'utf-8<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>set-terminal-coding-system 'utf-8<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> locale-coding-system 'utf-8<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>prefer-coding-system 'utf-8<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>imalison:set-coding-systems<span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
Disable CJK coding/encoding (Chinese/Japanese/Korean characters)
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> utf-translate-cjk-mode nil<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline81" class="outline-3">
<h3 id="orgheadline81"><span class="section-number-3">4.9</span> Visible Bell</h3>
<div class="outline-text-3" id="text-4-9">
<p>
This is set to true to disable the annoying audible bell that plays
whenever there is an error.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> visible-bell t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline82" class="outline-3">
<h3 id="orgheadline82"><span class="section-number-3">4.10</span> Configure <code>vc</code></h3>
<div class="outline-text-3" id="text-4-10">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> vc-follow-symlinks t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline83" class="outline-3">
<h3 id="orgheadline83"><span class="section-number-3">4.11</span> Time in Mode Line</h3>
<div class="outline-text-3" id="text-4-11">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> display-time-default-load-average nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> display-time-interval 1<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> display-time-format <span style="color: #9ccc65;">"%a|%m-%d|%r"</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>display-time-mode 1<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline84" class="outline-3">
<h3 id="orgheadline84"><span class="section-number-3">4.12</span> Kill Ring</h3>
<div class="outline-text-3" id="text-4-12">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> kill-ring-max 1000<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline85" class="outline-3">
<h3 id="orgheadline85"><span class="section-number-3">4.13</span> Subword</h3>
<div class="outline-text-3" id="text-4-13">
<p>
This makes <code>forward-word</code> and <code>backward-word</code> understand snake and camel case.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> c-subword-mode t<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>global-subword-mode<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline86" class="outline-3">
<h3 id="orgheadline86"><span class="section-number-3">4.14</span> Scratch Buffer</h3>
<div class="outline-text-3" id="text-4-14">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> initial-scratch-message <span style="color: #9ccc65;">""</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline87" class="outline-3">
<h3 id="orgheadline87"><span class="section-number-3">4.15</span> Don't prompt about local variables</h3>
<div class="outline-text-3" id="text-4-15">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">risky-local-variable-p</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #2196F3;">)</span>
nil<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline88" class="outline-3">
<h3 id="orgheadline88"><span class="section-number-3">4.16</span> proced</h3>
<div class="outline-text-3" id="text-4-16">
<p>
proced is an top like utility that runs inside of emacs. The following sets auto updating automatically and makes the update interval faster.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">proced</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> proced-auto-update-interval 1<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'proced-mode-hook <span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">()</span> <span style="color: #EF6C00;">(</span>proced-toggle-auto-update +1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline89" class="outline-3">
<h3 id="orgheadline89"><span class="section-number-3">4.17</span> Set default browser</h3>
<div class="outline-text-3" id="text-4-17">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>equal system-type 'gnu/linux<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> browse-url-browser-function 'browse-url-generic
browse-url-generic-program <span style="color: #9ccc65;">"google-chrome-stable"</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline90" class="outline-3">
<h3 id="orgheadline90"><span class="section-number-3">4.18</span> Set epa program</h3>
<div class="outline-text-3" id="text-4-18">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> epg-gpg-program <span style="color: #9ccc65;">"gpg"</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline91" class="outline-3">
<h3 id="orgheadline91"><span class="section-number-3">4.19</span> Make files executable</h3>
<div class="outline-text-3" id="text-4-19">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline92" class="outline-3">
<h3 id="orgheadline92"><span class="section-number-3">4.20</span> Misc</h3>
<div class="outline-text-3" id="text-4-20">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">iedit-toggle-key-default</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>put 'set-goal-column 'disabled nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>auto-fill-mode -1<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> indent-tabs-mode nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> confirm-nonexistent-file-or-buffer nil<span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">No prompt for killing a buffer with processes attached.</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> kill-buffer-query-functions
<span style="color: #2196F3;">(</span>remq 'process-kill-buffer-query-function
kill-buffer-query-functions<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> inhibit-startup-message t
inhibit-startup-echo-area-message t<span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">This makes it so that emacs --daemon puts its files in ~/.emacs.d/server</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(setq server-use-tcp t)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Make buffer names unique.</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> uniquify-buffer-name-style 'forward<span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Don't disable commands...</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> disabled-command-function nil<span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Make forward word understand camel and snake case.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Preserve pastes from OS when saving a new item to the kill</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">ring. Why wouldn't this be enabled by default?</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq-default</span> cursor-type 'box<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq-default</span> cursor-in-non-selected-windows 'bar<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> nil <span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Causing too many annoying issues</span>
<span style="color: #2196F3;">(</span>add-hook 'after-init-hook '<span style="color: #EF6C00;">(</span>lambda <span style="color: #B388FF;">()</span> <span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> debug-on-error t<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Make mouse scrolling less jumpy.</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> mouse-wheel-scroll-amount '<span style="color: #2196F3;">(</span>1 <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>shift<span style="color: #B388FF;">)</span> . 1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> ediff-split-window-function 'split-window-horizontally<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> ediff-window-setup-function 'ediff-setup-windows-plain<span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Disable this per major mode or maybe using file size if it causes</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">performance issues?</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> imenu-auto-rescan t<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> imenu-max-item-length 300<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>put 'narrow-to-region 'disabled nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>put 'narrow-to-page 'disabled nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> echo-keystrokes 0.25<span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">text mode stuff:</span>
<span style="color: #e91e63;">(</span>remove-hook 'text-mode-hook #'turn-on-auto-fill<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'text-mode-hook 'turn-on-visual-line-mode<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> sentence-end-double-space nil<span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">y and n instead of yes and no</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq-default</span> c-basic-offset 4
tab-width 4
indent-tabs-mode t<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'prog-mode-hook <span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">()</span> <span style="color: #EF6C00;">(</span>auto-fill-mode -1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(add-hook 'prog-mode-hook 'flyspell-prog-mode)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(add-hook 'prog-mode-hook (lambda () (highlight-lines-matching-regexp</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">".\\{81\\}" 'hi-blue)))</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline93" class="outline-3">
<h3 id="orgheadline93"><span class="section-number-3">4.21</span> paradox</h3>
<div class="outline-text-3" id="text-4-21">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">paradox</span>
<span style="color: #ff8A65;">:defer</span> 10
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>paradox-upgrade-packages paradox-list-packages<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">gh</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> paradox-execute-asynchronously t
paradox-github-token <span style="color: #B388FF;">(</span>gh-auth-get-oauth-token<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline94" class="outline-3">
<h3 id="orgheadline94"><span class="section-number-3">4.22</span> diminish</h3>
<div class="outline-text-3" id="text-4-22">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">diminish</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:packages-to-diminish</span>
'<span style="color: #EF6C00;">(</span>auto-revert-mode smartparens-mode eldoc-mode tern-mode js2-refactor-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cl-loop</span> for package in imalison:packages-to-diminish
do <span style="color: #B388FF;">(</span>diminish package<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>eval-after-load 'subword '<span style="color: #B388FF;">(</span>diminish 'subword-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>eval-after-load 'simple '<span style="color: #B388FF;">(</span>diminish 'visual-line-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline95" class="outline-3">
<h3 id="orgheadline95"><span class="section-number-3">4.23</span> edit-server</h3>
<div class="outline-text-3" id="text-4-23">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">edit-server</span>
<span style="color: #ff8A65;">:commands</span> edit-server-start
<span style="color: #ff8A65;">:defer</span> 1
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>edit-server-start<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> edit-server-new-frame nil<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline96" class="outline-3">
<h3 id="orgheadline96"><span class="section-number-3">4.24</span> load-dir</h3>
<div class="outline-text-3" id="text-4-24">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">load-dir</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> load-dir-debug nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'load-dirs <span style="color: #9ccc65;">"~/.emacs.d/load.d"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">site-lisp</span> <span style="color: #9ccc65;">"/usr/share/emacs24/site-lisp/"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">when</span> <span style="color: #B388FF;">(</span>file-exists-p site-lisp<span style="color: #B388FF;">)</span> <span style="color: #B388FF;">(</span>add-to-list 'load-dirs site-lisp<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline97" class="outline-3">
<h3 id="orgheadline97"><span class="section-number-3">4.25</span> server</h3>
<div class="outline-text-3" id="text-4-25">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">server</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unless</span> <span style="color: #B388FF;">(</span>server-running-p<span style="color: #B388FF;">)</span> <span style="color: #B388FF;">(</span>server-start<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline98" class="outline-3">
<h3 id="orgheadline98"><span class="section-number-3">4.26</span> list-environment</h3>
<div class="outline-text-3" id="text-4-26">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">list-environment</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline99" class="outline-3">
<h3 id="orgheadline99"><span class="section-number-3">4.27</span> bug-hunter</h3>
<div class="outline-text-3" id="text-4-27">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">bug-hunter</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline100" class="outline-3">
<h3 id="orgheadline100"><span class="section-number-3">4.28</span> shackle</h3>
<div class="outline-text-3" id="text-4-28">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">shackle</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>diminish 'shackle-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">when</span> nil <span style="color: #b0bec5;">; </span><span style="color: #b0bec5;">disabled for now</span>
<span style="color: #B388FF;">(</span>shackle-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> shackle-inhibit-window-quit-on-same-windows t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> shackle-default-rule '<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:same</span> t<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline101" class="outline-3">
<h3 id="orgheadline101"><span class="section-number-3">4.29</span> beacon</h3>
<div class="outline-text-3" id="text-4-29">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">beacon</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"C-c b"</span> . beacon-blink<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span>beacon-mode 1<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline102" class="outline-3">
<h3 id="orgheadline102"><span class="section-number-3">4.30</span> discover-my-major</h3>
<div class="outline-text-3" id="text-4-30">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">discover-my-major</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline103" class="outline-3">
<h3 id="orgheadline103"><span class="section-number-3">4.31</span> refine</h3>
<div class="outline-text-3" id="text-4-31">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">refine</span>
<span style="color: #ff8A65;">:disabled</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline104" class="outline-3">
<h3 id="orgheadline104"><span class="section-number-3">4.32</span> winner</h3>
<div class="outline-text-3" id="text-4-32">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">winner</span>
<span style="color: #ff8A65;">:after</span> hydra
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>winner-undo winner-redo<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">bind-key</span>
<span style="color: #9ccc65;">"C-c q"</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">defhydra</span> imalison:winner-hydra <span style="color: #76ff03;">()</span>
<span style="color: #9ccc65;">"Winner"</span>
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"p"</span> winner-undo <span style="color: #9ccc65;">"back"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"n"</span> winner-redo <span style="color: #9ccc65;">"forward"</span> <span style="color: #ff8A65;">:exit</span> t<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>winner-mode 1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline105" class="outline-3">
<h3 id="orgheadline105"><span class="section-number-3">4.33</span> eyebrowse</h3>
<div class="outline-text-3" id="text-4-33">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">eyebrowse</span>
<span style="color: #ff8A65;">:defer</span> 1
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #EF6C00;">(</span>eyebrowse-mode +1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline106" class="outline-3">
<h3 id="orgheadline106"><span class="section-number-3">4.34</span> fill-column-indicator</h3>
<div class="outline-text-3" id="text-4-34">
<p>
This interferes with too many other packages. See
<a href="https://github.com/alpaker/Fill-Column-Indicator/issues/21">https://github.com/alpaker/Fill-Column-Indicator/issues/21</a> for more details
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">fill-column-indicator</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">fci-on-off-fci-before-company</span> <span style="color: #B388FF;">(</span>command<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> <span style="color: #76ff03;">(</span>string= <span style="color: #9ccc65;">"show"</span> command<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>turn-off-fci-mode<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> <span style="color: #76ff03;">(</span>string= <span style="color: #9ccc65;">"hide"</span> command<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>turn-on-fci-mode<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>advice-add 'company-call-frontends <span style="color: #ff8A65;">:before</span> #'fci-on-off-fci-before-company<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'prog-mode-hook 'fci-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline107" class="outline-3">
<h3 id="orgheadline107"><span class="section-number-3">4.35</span> overseer</h3>
<div class="outline-text-3" id="text-4-35">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">overseer</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline120" class="outline-2">
<h2 id="orgheadline120"><span class="section-number-2">5</span> Keybindings</h2>
<div class="outline-text-2" id="text-5">
</div><div id="outline-container-orgheadline109" class="outline-3">
<h3 id="orgheadline109"><span class="section-number-3">5.1</span> bind-key</h3>
<div class="outline-text-3" id="text-5-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">bind-key</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline110" class="outline-3">
<h3 id="orgheadline110"><span class="section-number-3">5.2</span> which-key</h3>
<div class="outline-text-3" id="text-5-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">which-key</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> which-key-idle-delay .50<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>diminish 'which-key-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>which-key-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline111" class="outline-3">
<h3 id="orgheadline111"><span class="section-number-3">5.3</span> hydra</h3>
<div class="outline-text-3" id="text-5-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">hydra</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c f"</span> . imalison:hydra-font-resize/body<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c y"</span> . imalison:hydra-yank/body<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c 6"</span> . imalison:compile/body<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defhydra</span> imalison:hydra-font-resize
nil
<span style="color: #9ccc65;">"Resize Font"</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"-"</span> imalison:font-size-decr <span style="color: #9ccc65;">"Decrease"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"d"</span> imalison:font-size-decr <span style="color: #9ccc65;">"Decrease"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"="</span> imalison:font-size-incr <span style="color: #9ccc65;">"Increase"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"+"</span> imalison:font-size-incr <span style="color: #9ccc65;">"Increase"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"i"</span> imalison:font-size-incr <span style="color: #9ccc65;">"Increase"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"h"</span> imalison:set-huge-font-size <span style="color: #9ccc65;">"Huge"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"f"</span> set-frame-font <span style="color: #9ccc65;">"Set Frame Font"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"0"</span> imalison:font-size-reset <span style="color: #9ccc65;">"Reset to default size"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defhydra</span> imalison:hydra-yank
nil
<span style="color: #9ccc65;">"Yank text"</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"p"</span> imalison:copy-buffer-file-path <span style="color: #9ccc65;">"Projectile path"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"f"</span> imalison:copy-buffer-file-path-full <span style="color: #9ccc65;">"Full path"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"n"</span> imalison:copy-buffer-file-name <span style="color: #9ccc65;">"File name"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"b"</span> imalison:copy-current-git-branch <span style="color: #9ccc65;">"Git Branch"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:make-test</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>default-directory <span style="color: #FFCDD2;">(</span>projectile-project-root<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>imalison:named-compile <span style="color: #9ccc65;">"make test"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:glide-up</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>imalison:named-compile <span style="color: #9ccc65;">"glide up"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defhydra</span> imalison:compile nil <span style="color: #9ccc65;">"Compile"</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"s"</span> helm-command-from-zsh <span style="color: #9ccc65;">"Select a command from shell history"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"c"</span> imalison:named-compile <span style="color: #9ccc65;">"Enter Custom Command"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"t"</span> imalison:make-test <span style="color: #9ccc65;">"Test"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"u"</span> imalison:glide-up <span style="color: #9ccc65;">"Update Dependencies"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline112" class="outline-3">
<h3 id="orgheadline112"><span class="section-number-3">5.4</span> kill-emacs</h3>
<div class="outline-text-3" id="text-5-4">
<p>
This ensures that C-x C-c will always kill emacs, even if we are running in server mode.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C-x C-c"</span> 'kill-emacs<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline113" class="outline-3">
<h3 id="orgheadline113"><span class="section-number-3">5.5</span> imenu</h3>
<div class="outline-text-3" id="text-5-5">
<p>
imenu is the best. This should be a default binding.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C-x C-i"</span> 'imenu<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline114" class="outline-3">
<h3 id="orgheadline114"><span class="section-number-3">5.6</span> undo</h3>
<div class="outline-text-3" id="text-5-6">
<p>
I can't shake the habit of using this keybinding for undo. I should really use the default of C-/.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C--"</span> 'undo<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline115" class="outline-3">
<h3 id="orgheadline115"><span class="section-number-3">5.7</span> other-window</h3>
<div class="outline-text-3" id="text-5-7">
<p>
Go the other way when you use capital O.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C-x O"</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">()</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span>other-window -1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline116" class="outline-3">
<h3 id="orgheadline116"><span class="section-number-3">5.8</span> Mark ring</h3>
<div class="outline-text-3" id="text-5-8">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C-c SPC"</span> 'imalison:mark-ring<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline117" class="outline-3">
<h3 id="orgheadline117"><span class="section-number-3">5.9</span> Other bindings</h3>
<div class="outline-text-3" id="text-5-9">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C-x p"</span> 'pop-to-mark-command<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> set-mark-command-repeat-pop t<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C-x C-b"</span> 'buffer-menu<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C-x C-r"</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">()</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span>revert-buffer t t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C-x w"</span> 'whitespace-mode<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"M-n"</span> 'forward-paragraph<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"M-p"</span> 'backward-paragraph<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C-M-&lt;backspace&gt;"</span> 'backward-kill-sexp<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"s-&lt;return&gt;"</span> 'toggle-frame-fullscreen<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"M-|"</span> 'imalison:shell-command-on-region<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"C-x 9"</span> 'previous-buffer<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"s-v"</span> 'clipboard-yank<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline118" class="outline-3">
<h3 id="orgheadline118"><span class="section-number-3">5.10</span> global-set-key-to-use-package</h3>
<div class="outline-text-3" id="text-5-10">
<p>
This might be useless, but I believe that it is a macro that converts between
bind-key and global-set-key forms.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>fset 'global-set-key-to-use-package
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">(</span><span style="color: #84ffff;">&amp;optional</span> arg<span style="color: #EF6C00;">)</span> <span style="color: #ffe4b5;">"Keyboard macro."</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #9ccc65;">"p"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>kmacro-exec-ring-item
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">quote</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">[</span>1 67108896 19 100 6 23 40 19 41 return
backspace 32 46 6 4<span style="color: #26A69A;">]</span> 0 <span style="color: #9ccc65;">"%d"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span> arg<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline119" class="outline-3">
<h3 id="orgheadline119"><span class="section-number-3">5.11</span> OSX</h3>
<div class="outline-text-3" id="text-5-11">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>equal system-type 'darwin<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> mac-option-modifier 'meta<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> mac-command-modifier 'super<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline133" class="outline-2">
<h2 id="orgheadline133"><span class="section-number-2">6</span> Navigation</h2>
<div class="outline-text-2" id="text-6">
</div><div id="outline-container-orgheadline121" class="outline-3">
<h3 id="orgheadline121"><span class="section-number-3">6.1</span> zop-to-char</h3>
<div class="outline-text-3" id="text-6-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">zop-to-char</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"M-z"</span> . zop-to-char<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> zop-to-char-kill-keys '<span style="color: #B388FF;">(</span>?\C-k<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> zop-to-char-quit-at-point-keys '<span style="color: #B388FF;">(</span>?\r<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline122" class="outline-3">
<h3 id="orgheadline122"><span class="section-number-3">6.2</span> helm</h3>
<div class="outline-text-3" id="text-6-2">
<p>
I use helm for almost all emacs completion
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span class="linenr"> 1: </span><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">helm-config</span>
<span class="linenr"> 2: </span> <span style="color: #ff8A65;">:ensure</span> helm
<span class="linenr"> 3: </span> <span style="color: #ff8A65;">:demand</span> t
<span class="linenr"> 4: </span> <span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-y"</span> . helm-show-kill-ring<span style="color: #EF6C00;">)</span>
<span class="linenr"> 5: </span> <span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-x"</span> . helm-M-x<span style="color: #EF6C00;">)</span>
<span class="linenr"> 6: </span> <span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-x C-i"</span> . helm-imenu<span style="color: #EF6C00;">)</span>
<span class="linenr"> 7: </span> <span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-h a"</span> . helm-apropos<span style="color: #EF6C00;">)</span>
<span class="linenr"> 8: </span> <span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c C-h"</span> . helm-org-agenda-files-headings<span style="color: #EF6C00;">)</span>
<span class="linenr"> 9: </span> <span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c ;"</span> . helm-recentf<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span class="linenr">10: </span> <span style="color: #ff8A65;">:diminish</span> helm-mode
<span class="linenr">11: </span> <span style="color: #ff8A65;">:config</span>
<span class="linenr">12: </span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span class="linenr">13: </span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">helm-org</span><span style="color: #EF6C00;">)</span>
<span id="coderef-helm split window" class="coderef-off"><span class="linenr">14: </span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> helm-split-window-default-side 'same<span style="color: #EF6C00;">)</span></span>
<span class="linenr">15: </span>
<span class="linenr">16: </span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cl-defun</span> <span style="color: #84ffff;">helm-org-headings-in-buffer</span> <span style="color: #B388FF;">()</span>
<span class="linenr">17: </span> <span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span class="linenr">18: </span> <span style="color: #B388FF;">(</span>helm <span style="color: #ff8A65;">:sources</span> <span style="color: #76ff03;">(</span>helm-source-org-headings-for-files
<span class="linenr">19: </span> <span style="color: #26A69A;">(</span>list <span style="color: #FFCDD2;">(</span>projectile-completing-read
<span class="linenr">20: </span> <span style="color: #9ccc65;">"File to look at headings from: "</span>
<span class="linenr">21: </span> <span style="color: #795548;">(</span>projectile-all-project-files<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span class="linenr">22: </span> <span style="color: #ff8A65;">:candidate-number-limit</span> 99999
<span class="linenr">23: </span> <span style="color: #ff8A65;">:buffer</span> <span style="color: #9ccc65;">"*helm org inbuffer*"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span class="linenr">24: </span>
<span class="linenr">25: </span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">helm-descbinds</span>
<span class="linenr">26: </span> <span style="color: #ff8A65;">:demand</span> t
<span class="linenr">27: </span> <span style="color: #ff8A65;">:config</span> <span style="color: #B388FF;">(</span>helm-descbinds-mode 1<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span class="linenr">28: </span>
<span class="linenr">29: </span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">helm-ag</span>
<span class="linenr">30: </span> <span style="color: #ff8A65;">:bind</span> <span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"C-c p 1"</span> . imalison:set-helm-ag-extra-options<span style="color: #B388FF;">)</span>
<span class="linenr">31: </span> <span style="color: #ff8A65;">:preface</span>
<span class="linenr">32: </span> <span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span class="linenr">33: </span> <span style="color: #76ff03;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:set-helm-ag-extra-options</span> <span style="color: #26A69A;">()</span>
<span class="linenr">34: </span> <span style="color: #26A69A;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #26A69A;">)</span>
<span class="linenr">35: </span> <span style="color: #26A69A;">(</span><span style="color: #fff59d;">let</span> <span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span>option <span style="color: #DCE775;">(</span>read-string <span style="color: #9ccc65;">"Extra options: "</span> <span style="color: #e91e63;">(</span><span style="color: #fff59d;">or</span> helm-ag--extra-options <span style="color: #9ccc65;">""</span><span style="color: #e91e63;">)</span>
<span class="linenr">36: </span> 'helm-ag--extra-options-history<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span>
<span class="linenr">37: </span> <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">setq</span> helm-ag--extra-options option<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span class="linenr">38: </span> <span style="color: #ff8A65;">:config</span>
<span class="linenr">39: </span> <span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span class="linenr">40: </span> <span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> helm-ag-always-set-extra-option nil<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span class="linenr">41: </span> <span style="color: #EF6C00;">(</span>helm-mode 1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
<a href="#coderef-helm split window"class="coderef" onmouseover="CodeHighlightOn(this, 'coderef-helm split window');" onmouseout="CodeHighlightOff(this, 'coderef-helm split window');">Ensure that helm buffers are started in the window that currently holds the focus</a>
</p>
</div>
</div>
<div id="outline-container-orgheadline123" class="outline-3">
<h3 id="orgheadline123"><span class="section-number-3">6.3</span> helm-projectile</h3>
<div class="outline-text-3" id="text-6-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">helm-projectile</span>
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>helm-projectile-on<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #ff8A65;">:map</span> helm-projectile-projects-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-s"</span> . imalison:switch-to-project-and-search<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-t"</span> . imalison:helm-term-projectile<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:invalidate-cache-and-open-file</span> <span style="color: #B388FF;">(</span>_dir<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>projectile-invalidate-cache nil<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>projectile-find-file<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:switch-to-project-and-search</span> <span style="color: #B388FF;">(</span>dir<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>default-directory dir<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>projectile-require-project-root nil<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>helm-action-buffer <span style="color: #9ccc65;">"this-buffer-should-not-exist"</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>helm-projectile-ag<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:helm-term-projectile</span> <span style="color: #B388FF;">(</span>dir<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>default-directory dir<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>projectile-require-project-root nil<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>helm-action-buffer <span style="color: #9ccc65;">"this-buffer-should-not-exist"</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>term-projectile-forward<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>helm-delete-action-from-source <span style="color: #9ccc65;">"Search in Project"</span>
helm-source-projectile-projects<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>helm-delete-action-from-source <span style="color: #9ccc65;">"Open term for project"</span>
helm-source-projectile-projects<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>helm-add-action-to-source <span style="color: #9ccc65;">"Search in Project"</span>
'imalison:switch-to-project-and-search
helm-source-projectile-projects<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>helm-add-action-to-source <span style="color: #9ccc65;">"Open term for project"</span>
'imalison:helm-term-projectile
helm-source-projectile-projects<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>helm-add-action-to-source <span style="color: #9ccc65;">"Invalidate Cache and Open File"</span>
'imalison:invalidate-cache-and-open-file
helm-source-projectile-projects<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline124" class="outline-3">
<h3 id="orgheadline124"><span class="section-number-3">6.4</span> projectile</h3>
<div class="outline-text-3" id="text-6-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">projectile</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-x f"</span> . projectile-find-file-in-known-projects<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c p f"</span> . imalison:projectile-find-file<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:do-ag-default-directory</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>helm-do-ag default-directory <span style="color: #76ff03;">(</span>car <span style="color: #26A69A;">(</span>projectile-parse-dirconfig-file<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:do-ag
helm-projectile-ag
imalison:do-ag-default-directory
helm-do-ag<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:projectile-find-file
projectile-find-file
projectile-find-file-other-window<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:let-around</span> imalison:set-options-do-ag
imalison:do-ag
<span style="color: #B388FF;">(</span>helm-ag-always-set-extra-option t<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:projectile-make-all-subdirs-projects</span> <span style="color: #B388FF;">(</span>directory<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">cl-loop</span> for file-info in <span style="color: #76ff03;">(</span>directory-files-and-attributes directory<span style="color: #76ff03;">)</span>
do <span style="color: #76ff03;">(</span><span style="color: #fff59d;">when</span> <span style="color: #26A69A;">(</span>nth 1 file-info<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>write-region <span style="color: #9ccc65;">""</span> nil
<span style="color: #FFCDD2;">(</span>expand-file-name
<span style="color: #795548;">(</span>concat directory <span style="color: #9ccc65;">"/"</span>
<span style="color: #DCE775;">(</span>nth 0 file-info<span style="color: #DCE775;">)</span> <span style="color: #9ccc65;">"/.projectile"</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">persp-projectile</span>
<span style="color: #ff8A65;">:commands</span> projectile-persp-switch-project<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>projectile-global-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> projectile-require-project-root nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> projectile-enable-caching nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> projectile-completion-system 'helm<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'projectile-globally-ignored-files <span style="color: #9ccc65;">"Godeps"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">shut-up</span> <span style="color: #B388FF;">(</span>helm-projectile-on<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>diminish 'projectile-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">bind-key*</span> <span style="color: #9ccc65;">"C-c p s"</span> 'imalison:do-ag<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">bind-key*</span> <span style="color: #9ccc65;">"C-c p S"</span> 'imalison:set-options-do-ag<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">bind-key*</span> <span style="color: #9ccc65;">"C-c p f"</span> 'imalison:projectile-find-file<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline125" class="outline-3">
<h3 id="orgheadline125"><span class="section-number-3">6.5</span> ido</h3>
<div class="outline-text-3" id="text-6-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">ido</span>
<span style="color: #ff8A65;">:commands</span> ido-mode
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>ido-mode 1<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> ido-auto-merge-work-directories-length -1<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> ido-use-virtual-buffers t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> ido-use-filename-at-point nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> ido-create-new-buffer 'always<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>ido-everywhere 1<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> ido-enable-flex-matching t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">flx</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">flx-ido</span>
<span style="color: #ff8A65;">:commands</span> flx-ido-mode
<span style="color: #ff8A65;">:init</span> <span style="color: #B388FF;">(</span>flx-ido-mode 1<span style="color: #B388FF;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">disable ido faces to see flx highlights.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">This makes flx-ido much faster.</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> gc-cons-threshold 20000000<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> ido-use-faces nil<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">ido-ubiquitous</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:commands</span> <span style="color: #B388FF;">(</span>ido-ubiquitous-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">ido-vertical-mode</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span>ido-vertical-mode 1<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> ido-vertical-define-keys 'C-n-C-p-up-and-down<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">flx-ido</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline126" class="outline-3">
<h3 id="orgheadline126"><span class="section-number-3">6.6</span> avy</h3>
<div class="outline-text-3" id="text-6-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">avy</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:avy
avy-goto-word-1
avy-goto-char<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-j"</span> . imalison:avy<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-g l"</span> . avy-goto-line<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-'"</span> . avy-goto-char-2<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline127" class="outline-3">
<h3 id="orgheadline127"><span class="section-number-3">6.7</span> ace-window</h3>
<div class="outline-text-3" id="text-6-7">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">ace-window</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:ace-window
ace-select-window
ace-swap-window<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> aw-keys '<span style="color: #EF6C00;">(</span>?a ?s ?d ?f ?g ?h ?j ?k ?l<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"C-c w"</span> . imalison:ace-window<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline128" class="outline-3">
<h3 id="orgheadline128"><span class="section-number-3">6.8</span> neotree</h3>
<div class="outline-text-3" id="text-6-8">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">neotree</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline130" class="outline-3">
<h3 id="orgheadline130"><span class="section-number-3">6.9</span> jump-char</h3>
<div class="outline-text-3" id="text-6-9">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">jump-char</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-;"</span> . jump-char-forward<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<div id="outline-container-orgheadline129" class="outline-4">
<h4 id="orgheadline129"><span class="section-number-4">6.9.1</span> helm-zsh-history</h4>
<div class="outline-text-4" id="text-6-9-1">
<p>
This was stolen from <a href="https://github.com/jwiegley/dot-emacs">https://github.com/jwiegley/dot-emacs</a>
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">helm-c-source-zsh-history</span>
'<span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span>name . <span style="color: #9ccc65;">"Zsh History"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>candidates . helm-c-zsh-history-set-candidates<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>action . <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"Execute Command"</span> . helm-c-zsh-history-action<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>volatile<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>requires-pattern . 3<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>delayed<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">helm-c-zsh-history-set-candidates</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;optional</span> request-prefix<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>pattern <span style="color: #76ff03;">(</span>replace-regexp-in-string
<span style="color: #9ccc65;">" "</span> <span style="color: #9ccc65;">".*"</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">or</span> <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">and</span> request-prefix
<span style="color: #795548;">(</span>concat request-prefix
<span style="color: #9ccc65;">" "</span> helm-pattern<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span>
helm-pattern<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">with-current-buffer</span> <span style="color: #B388FF;">(</span>find-file-noselect <span style="color: #9ccc65;">"~/.zsh_history"</span> t t<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>auto-revert-mode -1<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>goto-char <span style="color: #76ff03;">(</span>point-max<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">loop</span> for pos = <span style="color: #76ff03;">(</span>re-search-backward pattern nil t<span style="color: #76ff03;">)</span>
while pos
collect <span style="color: #76ff03;">(</span>replace-regexp-in-string
<span style="color: #9ccc65;">"\\`:.+?;"</span> <span style="color: #9ccc65;">""</span>
<span style="color: #26A69A;">(</span>buffer-substring <span style="color: #FFCDD2;">(</span>line-beginning-position<span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>line-end-position<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">helm-c-zsh-history-action</span> <span style="color: #2196F3;">(</span>candidate<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>imalison:named-compile candidate<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">helm-command-from-zsh</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">helm</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>helm-other-buffer 'helm-c-source-zsh-history <span style="color: #9ccc65;">"*helm zsh history*"</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline131" class="outline-3">
<h3 id="orgheadline131"><span class="section-number-3">6.10</span> flimenu</h3>
<div class="outline-text-3" id="text-6-10">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:use-package</span> flimenu
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>flimenu-global-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline132" class="outline-3">
<h3 id="orgheadline132"><span class="section-number-3">6.11</span> swiper</h3>
<div class="outline-text-3" id="text-6-11">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">swiper</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"C-s"</span> . swiper<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline137" class="outline-2">
<h2 id="orgheadline137"><span class="section-number-2">7</span> Completion</h2>
<div class="outline-text-2" id="text-7">
</div><div id="outline-container-orgheadline135" class="outline-3">
<h3 id="orgheadline135"><span class="section-number-3">7.1</span> company</h3>
<div class="outline-text-3" id="text-7-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">company</span>
<span style="color: #ff8A65;">:commands</span> company-mode imalison:company
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-\\"</span> . imalison:company<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:company
company-complete
company-yasnippet<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> company-idle-delay .25<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>global-company-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>diminish 'company-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span>add-hook 'prog-mode-hook <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #B388FF;">()</span> <span style="color: #B388FF;">(</span>company-mode t<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<div id="outline-container-orgheadline134" class="outline-4">
<h4 id="orgheadline134"><span class="section-number-4">7.1.1</span> company-flx</h4>
<div class="outline-text-4" id="text-7-1-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">company-flx</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:after</span> company
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span>company-flx-mode +1<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline136" class="outline-3">
<h3 id="orgheadline136"><span class="section-number-3">7.2</span> auto-complete</h3>
<div class="outline-text-3" id="text-7-2">
<p>
I don't use auto-complete at all, so I have set up a hook to automatically disable it whenever it is enabled to avoid creating conflicting popups when company is activated.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">auto-complete</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:auto-complete-hook</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span>debug<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #f36c60; font-weight: bold;">warn</span> <span style="color: #9ccc65;">"auto-complete-mode was activated, but is being automatically disabled."</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>auto-complete-mode-hook nil<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>auto-complete-mode -1<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-hook 'auto-complete-mode-hook 'imalison:auto-complete-hook<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline148" class="outline-2">
<h2 id="orgheadline148"><span class="section-number-2">8</span> Text Manipulation</h2>
<div class="outline-text-2" id="text-8">
</div><div id="outline-container-orgheadline138" class="outline-3">
<h3 id="orgheadline138"><span class="section-number-3">8.1</span> smartparens</h3>
<div class="outline-text-3" id="text-8-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">smartparens</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:diminish</span> smartparens-mode
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #ff8A65;">:map</span> smartparens-mode-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-)"</span> . sp-forward-slurp-sexp<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-}"</span> . sp-forward-barf-sexp<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-("</span> . sp-backward-slurp-sexp<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-{"</span> . sp-backward-barf-sexp<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">smartparens-config</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>smartparens-global-mode 1<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>sp-use-smartparens-bindings<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-M-&lt;backspace&gt;"</span> smartparens-mode-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-&lt;backspace&gt;"</span> smartparens-mode-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"M-&lt;backspace&gt;"</span> smartparens-mode-map<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline139" class="outline-3">
<h3 id="orgheadline139"><span class="section-number-3">8.2</span> multiple-cursors</h3>
<div class="outline-text-3" id="text-8-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">multiple-cursors</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">phi-search-mc</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span>phi-search-mc/setup-keys<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">mc-extras</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span>define-key mc/keymap <span style="color: #76ff03;">(</span>kbd <span style="color: #9ccc65;">"C-. ="</span><span style="color: #76ff03;">)</span> 'mc/compare-chars<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span>
<span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c m a"</span> . mc/mark-all-like-this<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c m m"</span> . mc/mark-all-like-this-dwim<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c m l"</span> . mc/edit-lines<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c m n"</span> . mc/mark-next-like-this<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c m p"</span> . mc/mark-previous-like-this<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c m s"</span> . mc/mark-sgml-tag-pair<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c m d"</span> . mc/mark-all-like-this-in-defun<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline140" class="outline-3">
<h3 id="orgheadline140"><span class="section-number-3">8.3</span> expand-region</h3>
<div class="outline-text-3" id="text-8-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">expand-region</span>
<span style="color: #ff8A65;">:commands</span> er/expand-region
<span style="color: #ff8A65;">:config</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> expand-region-contract-fast-key <span style="color: #9ccc65;">"j"</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c k"</span> . er/expand-region<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline141" class="outline-3">
<h3 id="orgheadline141"><span class="section-number-3">8.4</span> multi-line</h3>
<div class="outline-text-3" id="text-8-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:use-package</span> multi-line
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"C-c d"</span> . multi-line<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline142" class="outline-3">
<h3 id="orgheadline142"><span class="section-number-3">8.5</span> comment-dwim-2</h3>
<div class="outline-text-3" id="text-8-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">comment-dwim-2</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"M-;"</span> . comment-dwim-2<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline143" class="outline-3">
<h3 id="orgheadline143"><span class="section-number-3">8.6</span> unfill</h3>
<div class="outline-text-3" id="text-8-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">unfill</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"M-q"</span> . unfill-toggle<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline144" class="outline-3">
<h3 id="orgheadline144"><span class="section-number-3">8.7</span> cliphist</h3>
<div class="outline-text-3" id="text-8-7">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">cliphist</span>
<span style="color: #ff8A65;">:config</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> cliphist-use-ivy t<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline145" class="outline-3">
<h3 id="orgheadline145"><span class="section-number-3">8.8</span> electric-operator-mode</h3>
<div class="outline-text-3" id="text-8-8">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">electric-operator</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span>add-hook 'python-mode-hook #'electric-operator-mode<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline146" class="outline-3">
<h3 id="orgheadline146"><span class="section-number-3">8.9</span> string-inflection</h3>
<div class="outline-text-3" id="text-8-9">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">string-inflection</span>
<span style="color: #ff8A65;">:commands</span> string-inflection-toggle
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"C-c l"</span> . string-inflection-toggle<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline147" class="outline-3">
<h3 id="orgheadline147"><span class="section-number-3">8.10</span> yasnippet</h3>
<div class="outline-text-3" id="text-8-10">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">yasnippet</span>
<span style="color: #ff8A65;">:defer</span> 5
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>yas-global-mode<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>yas-global-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>diminish 'yas-minor-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'term-mode-hook <span style="color: #B388FF;">(</span><span style="color: #fff59d;">lambda</span><span style="color: #76ff03;">()</span> <span style="color: #76ff03;">(</span>yas-minor-mode -1<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> yas-prompt-functions
<span style="color: #B388FF;">(</span>cons 'yas-ido-prompt
<span style="color: #76ff03;">(</span>cl-delete 'yas-ido-prompt yas-prompt-functions<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline165" class="outline-2">
<h2 id="orgheadline165"><span class="section-number-2">9</span> Source Control</h2>
<div class="outline-text-2" id="text-9">
</div><div id="outline-container-orgheadline150" class="outline-3">
<h3 id="orgheadline150"><span class="section-number-3">9.1</span> magit</h3>
<div class="outline-text-3" id="text-9-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">magit</span>
<span style="color: #ff8A65;">:commands</span> magit-status
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-x g"</span> . magit-status<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:after-magit-visit-file</span> <span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> <span style="color: #76ff03;">(</span>derived-mode-p 'org-mode<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>org-show-context 'magit-goto<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-j"</span> magit-status-mode-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-j"</span> magit-hunk-section-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-j"</span> magit-file-section-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> magit-last-seen-setup-instructions <span style="color: #9ccc65;">"1.4.0"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>magit-auto-revert-mode<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">TODO: Is this necessary now that signing is a git default</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">when</span> <span style="color: #B388FF;">(</span><span style="color: #fff59d;">bound-and-true-p</span> imalison:gpg-key<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>add-to-list 'magit-commit-arguments
<span style="color: #76ff03;">(</span>format <span style="color: #9ccc65;">"--gpg-sign=%s"</span> imalison:gpg-key<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-show-context-detail '<span style="color: #B388FF;">(</span>magit-goto . lineage<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>advice-add 'magit-diff-visit-file <span style="color: #ff8A65;">:after</span> 'imalison:after-magit-visit-file<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">magit-filenotify</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Seems like OSX does not support filenotify.</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:if</span> <span style="color: #B388FF;">(</span>funcall <span style="color: #76ff03;">(</span>emacs-version-predicate 24 4<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #ff8A65;">:init</span> <span style="color: #B388FF;">(</span>add-hook 'magit-status-mode-hook 'magit-filenotify-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<div id="outline-container-orgheadline149" class="outline-4">
<h4 id="orgheadline149"><span class="section-number-4">9.1.1</span> magithub</h4>
<div class="outline-text-4" id="text-9-1-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">magithub</span>
<span style="color: #ff8A65;">:if</span> <span style="color: #2196F3;">(</span>executable-find <span style="color: #9ccc65;">"hub"</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:after</span> magit
<span style="color: #ff8A65;">:disabled</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline151" class="outline-3">
<h3 id="orgheadline151"><span class="section-number-3">9.2</span> git-link</h3>
<div class="outline-text-3" id="text-9-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">git-link</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> git-link-use-commit t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline152" class="outline-3">
<h3 id="orgheadline152"><span class="section-number-3">9.3</span> magit-gitflow</h3>
<div class="outline-text-3" id="text-9-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">magit-gitflow</span>
<span style="color: #ff8A65;">:diminish</span> magit-gitflow-mode
<span style="color: #ff8A65;">:after</span> magit
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> magit-gitflow-popup-key <span style="color: #9ccc65;">"C-k"</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-hook 'magit-mode-hook 'turn-on-magit-gitflow<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline153" class="outline-3">
<h3 id="orgheadline153"><span class="section-number-3">9.4</span> git-timemachine</h3>
<div class="outline-text-3" id="text-9-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">git-timemachine</span>
<span style="color: #ff8A65;">:commands</span> git-timemachine<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline154" class="outline-3">
<h3 id="orgheadline154"><span class="section-number-3">9.5</span> git-gutter</h3>
<div class="outline-text-3" id="text-9-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">git-gutter</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>global-git-gutter-mode -1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline155" class="outline-3">
<h3 id="orgheadline155"><span class="section-number-3">9.6</span> gitolite-clone</h3>
<div class="outline-text-3" id="text-9-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">gitolite-clone</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">gitolite-clone-force-refresh</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>gitolite-clone-get-projects nil nil t<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline156" class="outline-3">
<h3 id="orgheadline156"><span class="section-number-3">9.7</span> gitconfig-mode</h3>
<div class="outline-text-3" id="text-9-7">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">gitconfig-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #9ccc65;">"\\.?gitconfig.?.*\\'"</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline157" class="outline-3">
<h3 id="orgheadline157"><span class="section-number-3">9.8</span> gitignore-mode</h3>
<div class="outline-text-3" id="text-9-8">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">gitignore-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #9ccc65;">"\\.?gitignore.?.*\\'"</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline164" class="outline-3">
<h3 id="orgheadline164"><span class="section-number-3">9.9</span> github</h3>
<div class="outline-text-3" id="text-9-9">
</div><div id="outline-container-orgheadline158" class="outline-4">
<h4 id="orgheadline158"><span class="section-number-4">9.9.1</span> github-search</h4>
<div class="outline-text-4" id="text-9-9-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:use-package</span> github-search
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>github-search-clone-repo github-search-user-clone-repo<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:get-appropriate-path-from-gh-repo-for-go</span> <span style="color: #B388FF;">(</span>repo<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">go-mode</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">imalison:get-go-src</span> <span style="color: #9ccc65;">"github.com"</span> <span style="color: #76ff03;">(</span><span style="color: #fff59d;">oref</span> <span style="color: #26A69A;">(</span><span style="color: #fff59d;">oref</span> repo <span style="color: #ff8A65;">:owner</span><span style="color: #26A69A;">)</span> <span style="color: #ff8A65;">:login</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">oref</span> repo <span style="color: #ff8A65;">:name</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:get-projects-directory-target-from-repo</span> <span style="color: #B388FF;">(</span>repo<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>prospective-path
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">if</span> <span style="color: #795548;">(</span>equal <span style="color: #DCE775;">(</span><span style="color: #fff59d;">oref</span> repo language<span style="color: #DCE775;">)</span> <span style="color: #9ccc65;">"Go"</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>imalison:get-appropriate-path-from-gh-repo-for-go repo<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>imalison:join-paths imalison:projects-directory <span style="color: #DCE775;">(</span><span style="color: #fff59d;">oref</span> repo <span style="color: #ff8A65;">:name</span><span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">if</span> <span style="color: #26A69A;">(</span>file-exists-p prospective-path<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>funcall 'github-search-prompt-for-target-directory repo<span style="color: #26A69A;">)</span>
prospective-path<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> github-search-get-target-directory-for-repo-function
'imalison:get-projects-directory-target-from-repo<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline159" class="outline-4">
<h4 id="orgheadline159"><span class="section-number-4">9.9.2</span> github-clone</h4>
<div class="outline-text-4" id="text-9-9-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:use-package*</span> github-clone <span style="color: #9ccc65;">"~/Projects/github-clone.el"</span>
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>github-clone-add-parent-remote
github-clone-add-source-remote
github-clone-fork-remote
github-clone-add-existing-remote
github-clone<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline160" class="outline-4">
<h4 id="orgheadline160"><span class="section-number-4">9.9.3</span> github-notifier</h4>
<div class="outline-text-4" id="text-9-9-3">
<p>
This is disabled because it was causing too many issues with my
modeline and with excessive http requests to github.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">github-notifier</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>advice-add 'github-notifier-update <span style="color: #ff8A65;">:around</span> 'imalison:shut-up-around<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>github-notifier-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline161" class="outline-4">
<h4 id="orgheadline161"><span class="section-number-4">9.9.4</span> github-browse-file</h4>
<div class="outline-text-4" id="text-9-9-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">github-browse-file</span>
<span style="color: #ff8A65;">:commands</span> github-browse-file<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline162" class="outline-4">
<h4 id="orgheadline162"><span class="section-number-4">9.9.5</span> magit-gh-pulls</h4>
<div class="outline-text-4" id="text-9-9-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">magit-gh-pulls</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:diminish</span> magit-gh-pulls-mode
<span style="color: #ff8A65;">:after</span> magit
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline163" class="outline-4">
<h4 id="orgheadline163"><span class="section-number-4">9.9.6</span> gist</h4>
<div class="outline-text-4" id="text-9-9-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">gist</span>
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>gist-region gist-region-private gist-buffer gist-buffer-private
gist-region-or-buffer gist-region-or-buffer-private
gist-list-user gist-list gist-fetch gist-star
gist-unstar gist-list-starred gist-fork<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline220" class="outline-2">
<h2 id="orgheadline220"><span class="section-number-2">10</span> Major Modes</h2>
<div class="outline-text-2" id="text-10">
</div><div id="outline-container-orgheadline196" class="outline-3">
<h3 id="orgheadline196"><span class="section-number-3">10.1</span> Programming</h3>
<div class="outline-text-3" id="text-10-1">
</div><div id="outline-container-orgheadline168" class="outline-4">
<h4 id="orgheadline168"><span class="section-number-4">10.1.1</span> python</h4>
<div class="outline-text-4" id="text-10-1-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">python</span>
<span style="color: #ff8A65;">:commands</span> python-mode
<span style="color: #ff8A65;">:mode</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"\\.py\\'"</span> . python-mode<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:python-mode</span> <span style="color: #EF6C00;">()</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> show-trailing-whitespace t<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">TODO: This was likely fixed and can probably be removed</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Somehow this is sometimes set to jedi:ac-setup which we</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">don't want. This binding avoids starting auto-complete mode.</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">let</span> <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>jedi:setup-function nil<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>jedi:setup<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">XXX: This has become pretty annoying</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(add-hook 'before-save-hook 'pyimport-remove-unused t t)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Ensure company is active</span>
<span style="color: #EF6C00;">(</span>company-mode +1<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Only use company-jedi for completion</span>
<span style="color: #EF6C00;">(</span>set <span style="color: #B388FF;">(</span>make-local-variable 'company-backends<span style="color: #B388FF;">)</span> '<span style="color: #B388FF;">(</span>company-jedi<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Remove default python completion, as we are going to rely on</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">company-jedi.</span>
<span style="color: #EF6C00;">(</span>remove-hook 'completion-at-point-functions
'python-completion-complete-at-point 'local<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">sphinx-doc</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-j"</span> python-mode-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'python-mode-hook #'imalison:python-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<ol class="org-ol"><li><a id="orgheadline166"></a>pyimport<br /><div class="outline-text-5" id="text-10-1-1-1">
<p>
Pyimport is disabled because it may be causing a performance problem.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">pyimport</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #ff8A65;">:map</span> python-mode-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c C-i"</span> . pyimport-insert-missing<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:commands</span> pyimport-remove-unused<span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline167"></a>jedi<br /><div class="outline-text-5" id="text-10-1-1-2">
<p>
The accepted way to use jedi if you prefer company to auto-complete is
simply to require the company jedi package, which is why we make no
reference to the jedi-core package.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">company-jedi</span>
<span style="color: #ff8A65;">:after</span> python
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>jedi:goto-definition jedi-mode company-jedi<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #ff8A65;">:map</span> python-mode-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-."</span> . jedi:goto-definition<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-,"</span> . jedi:goto-definition-pop-marker<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> jedi:complete-on-dot t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> jedi:imenu-create-index-function 'jedi:create-flat-imenu-index<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
<div id="outline-container-orgheadline170" class="outline-4">
<h4 id="orgheadline170"><span class="section-number-4">10.1.2</span> go</h4>
<div class="outline-text-4" id="text-10-1-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">go-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"\\.go\\'"</span> . go-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:glide-novendor</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">projectile-with-default-dir</span> <span style="color: #76ff03;">(</span>projectile-project-root<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>shell-command-to-string <span style="color: #9ccc65;">"glide novendor"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:go-mode-create-imenu-index</span> <span style="color: #B388FF;">()</span>
<span style="color: #ffe4b5;">"Create and return an imenu index alist. Unlike the default</span>
<span style="color: #ffe4b5;"> alist created by go-mode, this method creates an alist where</span>
<span style="color: #ffe4b5;"> items follow a style that is consistent with other prog-modes."</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>patterns '<span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span><span style="color: #9ccc65;">"type"</span> <span style="color: #9ccc65;">"^type *</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">(</span><span style="color: #9ccc65;">[</span><span style="color: #4dd0e1;">^</span><span style="color: #9ccc65;"> \t\n\r\f]*</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">)</span><span style="color: #9ccc65;">"</span> 1<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>type-index <span style="color: #FFCDD2;">(</span>imenu--generic-function patterns<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>func-index<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">save-excursion</span>
<span style="color: #26A69A;">(</span>goto-char <span style="color: #FFCDD2;">(</span>point-min<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">while</span> <span style="color: #FFCDD2;">(</span>re-search-forward go-func-meth-regexp <span style="color: #795548;">(</span>point-max<span style="color: #795548;">)</span> t<span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #795548;">(</span><span style="color: #DCE775;">(</span>var <span style="color: #e91e63;">(</span>match-string-no-properties 1<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>func <span style="color: #e91e63;">(</span>match-string-no-properties 2<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>name <span style="color: #e91e63;">(</span><span style="color: #fff59d;">if</span> var
<span style="color: #2196F3;">(</span>concat <span style="color: #EF6C00;">(</span>substring var 0 -1<span style="color: #EF6C00;">)</span> <span style="color: #9ccc65;">"."</span> func<span style="color: #2196F3;">)</span>
func<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>beg <span style="color: #e91e63;">(</span>match-beginning 0<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>marker <span style="color: #e91e63;">(</span>copy-marker beg<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>item <span style="color: #e91e63;">(</span>cons name marker<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span><span style="color: #fff59d;">setq</span> func-index <span style="color: #DCE775;">(</span>cons item func-index<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>nconc type-index <span style="color: #26A69A;">(</span>list <span style="color: #FFCDD2;">(</span>cons <span style="color: #9ccc65;">"func"</span> func-index<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:go-workspace-path</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span>file-relative-name <span style="color: #76ff03;">(</span>projectile-project-root<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>concat <span style="color: #26A69A;">(</span>file-name-as-directory
<span style="color: #FFCDD2;">(</span>imalison:get-go-path<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span> <span style="color: #9ccc65;">"src"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:install-current-go-project</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>start-process
<span style="color: #9ccc65;">"go install"</span> <span style="color: #9ccc65;">"go install log"</span> <span style="color: #9ccc65;">"go"</span> <span style="color: #9ccc65;">"install"</span>
<span style="color: #76ff03;">(</span>concat <span style="color: #26A69A;">(</span>file-name-as-directory <span style="color: #FFCDD2;">(</span>imalison:go-workspace-path<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span> <span style="color: #9ccc65;">"..."</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:get-go-path</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>environment-go-path <span style="color: #FFCDD2;">(</span>getenv <span style="color: #9ccc65;">"GOPATH"</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">if</span> environment-go-path
<span style="color: #26A69A;">(</span>file-name-as-directory <span style="color: #FFCDD2;">(</span>car <span style="color: #795548;">(</span>s-split <span style="color: #9ccc65;">":"</span> environment-go-path<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #9ccc65;">"~/go"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defmacro</span> <span style="color: #84ffff;">imalison:get-go-src</span> <span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;rest</span> paths<span style="color: #B388FF;">)</span>
`<span style="color: #B388FF;">(</span>imalison:join-paths <span style="color: #76ff03;">(</span>imalison:get-go-path<span style="color: #76ff03;">)</span> <span style="color: #9ccc65;">"src"</span> ,@paths<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:let-advise-around</span> imalison:advise-normal-go-command
<span style="color: #B388FF;">(</span>go-command <span style="color: #9ccc65;">"go"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:go-mode-hook</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span>go-eldoc-setup<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>set <span style="color: #76ff03;">(</span>make-local-variable 'company-backends<span style="color: #76ff03;">)</span> '<span style="color: #76ff03;">(</span>company-go<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>make-local-variable 'projectile-globally-ignored-files<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>add-hook 'after-save-hook 'imalison:install-current-go-project nil
'yes-do-local<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>add-to-list 'projectile-globally-ignored-files
<span style="color: #9ccc65;">"vendor"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:use-package*</span>
gotest <span style="color: #9ccc65;">"~/Projects/gotest.el"</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:bind</span> <span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:map</span> go-mode-map
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"C-c t"</span> . imalison:gotest<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:gotest
go-test-current-test
go-test-current-file<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:add-expected-test-name-for-suite</span> <span style="color: #26A69A;">(</span>suite-name test-name<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">if</span> <span style="color: #FFCDD2;">(</span>&gt; <span style="color: #795548;">(</span>length suite-name<span style="color: #795548;">)</span> 0<span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>concat <span style="color: #9ccc65;">" -run Test"</span> suite-name<span style="color: #FFCDD2;">)</span>
<span style="color: #9ccc65;">""</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> go-test-verbose t
go-test-additional-arguments-function
'imalison:add-expected-test-name-for-suite<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">company-go</span>
<span style="color: #ff8A65;">:config</span> <span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> company-go-show-annotation t<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">go-projectile</span> <span style="color: #ff8A65;">:demand</span> t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">go-eldoc</span> <span style="color: #ff8A65;">:demand</span> t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">go-guru</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:bind</span> <span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:map</span> go-mode-map
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"M-."</span> . go-guru-definition<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"M-,"</span> . pop-tag-mark<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:set-go-guru-scope</span> <span style="color: #26A69A;">()</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">setq</span> go-guru-scope <span style="color: #FFCDD2;">(</span>go-mode-parse-glide-novendor<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">go-mode-parse-glide-novendor</span> <span style="color: #26A69A;">()</span>
<span style="color: #26A69A;">(</span>s-join <span style="color: #9ccc65;">","</span>
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">cl-loop</span> for path in <span style="color: #795548;">(</span>s-split <span style="color: #9ccc65;">"\n"</span> <span style="color: #DCE775;">(</span>imalison:glide-novendor<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
collect <span style="color: #795548;">(</span><span style="color: #fff59d;">if</span> <span style="color: #DCE775;">(</span>string-equal path <span style="color: #9ccc65;">"."</span><span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>imalison:go-workspace-path<span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>s-replace <span style="color: #9ccc65;">"\./"</span> <span style="color: #e91e63;">(</span>imalison:go-workspace-path<span style="color: #e91e63;">)</span> path<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span>advice-add 'go-guru--set-scope-if-empty <span style="color: #ff8A65;">:before</span> 'imalison:set-go-guru-scope<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>advice-add 'go-guru-start <span style="color: #ff8A65;">:before</span> 'imalison:set-go-guru-scope<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>advice-add 'go-guru-definition <span style="color: #ff8A65;">:around</span> 'imalison:advise-normal-go-command<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>advice-add 'go-guru-definition <span style="color: #ff8A65;">:before</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #FFCDD2;">()</span>
<span style="color: #FFCDD2;">(</span>with-no-warnings
<span style="color: #795548;">(</span>ring-insert find-tag-marker-ring <span style="color: #DCE775;">(</span>point-marker<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>advice-add 'go-import-add <span style="color: #ff8A65;">:around</span> 'imalison:advise-normal-go-command<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> gofmt-command <span style="color: #9ccc65;">"goimports"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'go-mode-hook 'imalison:go-mode-hook<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'before-save-hook 'gofmt-before-save t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<ol class="org-ol"><li><a id="orgheadline169"></a>Show diffs of testify output<br /><div class="outline-text-5" id="text-10-1-2-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:testify-ediff-buffers</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:purge-ediff-buffers</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">cl-loop</span> for buffer in imalison:testify-ediff-buffers
do <span style="color: #EF6C00;">(</span>kill-buffer buffer<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> imalison:testify-ediff-buffers nil<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'ediff-cleanup-hook 'imalison:purge-ediff-buffers<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:go-testify-show-ediff</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>buffer <span style="color: #76ff03;">(</span>get-buffer-create <span style="color: #9ccc65;">"*Testify JSON*"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
json-result<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>shell-command-on-region <span style="color: #B388FF;">(</span>point-min<span style="color: #B388FF;">)</span> <span style="color: #B388FF;">(</span>point-max<span style="color: #B388FF;">)</span> <span style="color: #9ccc65;">"parse_go_testify_for_emacs.py"</span> buffer<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">with-current-buffer</span> buffer
<span style="color: #B388FF;">(</span>goto-char <span style="color: #76ff03;">(</span>point-min<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> json-result <span style="color: #76ff03;">(</span>json-read<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">let</span> <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>actual-buffer <span style="color: #26A69A;">(</span>generate-new-buffer <span style="color: #9ccc65;">"*Testify Actual*"</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>expected-buffer <span style="color: #26A69A;">(</span>generate-new-buffer <span style="color: #9ccc65;">"*Testify Expected*"</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>add-to-list 'imalison:testify-ediff-buffers actual-buffer<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>add-to-list 'imalison:testify-ediff-buffers expected-buffer<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">with-current-buffer</span> actual-buffer
<span style="color: #76ff03;">(</span>insert <span style="color: #26A69A;">(</span>cdr <span style="color: #FFCDD2;">(</span>assoc 'actual json-result<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">with-current-buffer</span> expected-buffer
<span style="color: #26A69A;">(</span>insert <span style="color: #FFCDD2;">(</span>cdr <span style="color: #795548;">(</span>assoc 'expected json-result<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>ediff-buffers actual-buffer expected-buffer<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:go-testify-show-icdiff</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">let</span> <span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span>buffer <span style="color: #76ff03;">(</span>get-buffer-create <span style="color: #9ccc65;">"*Testify Comparison*"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>shell-command-on-region <span style="color: #B388FF;">(</span>point-min<span style="color: #B388FF;">)</span> <span style="color: #B388FF;">(</span>point-max<span style="color: #B388FF;">)</span> <span style="color: #9ccc65;">"parse_go_testify_not_equal.py"</span> buffer<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">with-current-buffer</span> buffer
<span style="color: #B388FF;">(</span>fundamental-ansi-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>switch-to-buffer buffer<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
<div id="outline-container-orgheadline181" class="outline-4">
<h4 id="orgheadline181"><span class="section-number-4">10.1.3</span> emacs-lisp</h4>
<div class="outline-text-4" id="text-10-1-3">
</div><ol class="org-ol"><li><a id="orgheadline171"></a>elisp-slime-nav<br /><div class="outline-text-5" id="text-10-1-3-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">elisp-slime-nav</span>
<span style="color: #ff8A65;">:commands</span> elisp-slime-nav-mode
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span>diminish 'elisp-slime-nav-mode<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:elisp-slime-nav
elisp-slime-nav-find-elisp-thing-at-point
elisp-slime-nav-describe-elisp-thing-at-point<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #ff8A65;">:map</span> elisp-slime-nav-mode-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-."</span> . imalison:elisp-slime-nav<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline172"></a>macrostep<br /><div class="outline-text-5" id="text-10-1-3-2">
<p>
Macrostep is an indespensible tool for writing emacs lisp macros. It lets you see pretty printed versions of the result of macro evaluation as the macro is evaluated
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">macrostep</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #ff8A65;">:map</span> lisp-mode-shared-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c e"</span> . macrostep-expand<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline173"></a>emr<br /><div class="outline-text-5" id="text-10-1-3-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">emr</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"M-RET"</span> . emr-show-refactor-menu<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-hook 'prog-mode-hook 'emr-initialize<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline174"></a>Editing configuration<br /><div class="outline-text-5" id="text-10-1-3-4">
<p>
Reduce indentation for some functions
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>put 'use-package 'lisp-indent-function 1<span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline175"></a>Checkdoc<br /><div class="outline-text-5" id="text-10-1-3-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> checkdoc-force-docstrings-flag nil
checkdoc-arguments-in-order-flag nil<span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline176"></a>edebug<br /><div class="outline-text-5" id="text-10-1-3-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">edebug</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> edebug-trace t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline177"></a>Misc<br /><div class="outline-text-5" id="text-10-1-3-7">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imenu-elisp-sections</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> imenu-prev-index-position-function nil<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> imenu-space-replacement nil<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>add-to-list 'imenu-generic-expression
`<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"Package"</span>
,<span style="color: #9ccc65;">"(use-package </span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">(</span><span style="color: #9ccc65;">.+</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">)</span><span style="color: #9ccc65;">$"</span> 1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>add-to-list 'imenu-generic-expression
`<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"Section"</span>
,<span style="color: #B388FF;">(</span>concat <span style="color: #9ccc65;">";\\{1,4\\} =\\{10,80\\}\n;\\{1,4\\} \\{10,80\\}"</span>
<span style="color: #9ccc65;">"</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">(</span><span style="color: #9ccc65;">.+</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">)</span><span style="color: #9ccc65;">$"</span><span style="color: #B388FF;">)</span> <span style="color: #f36c60; font-weight: bold;">1</span><span style="color: #EF6C00; font-weight: bold;">)</span><span style="color: #f36c60; font-weight: bold;"> t</span><span style="color: #2196F3; font-weight: bold;">)</span><span style="color: #e91e63; font-weight: bold;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:maybe-remove-flycheck-checkdoc-checker</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">when</span> <span style="color: #EF6C00;">(</span>s-starts-with? <span style="color: #9ccc65;">"*"</span> <span style="color: #B388FF;">(</span>buffer-name<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>flycheck-disable-checker 'emacs-lisp-checkdoc<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'emacs-lisp-mode-hook 'imenu-elisp-sections<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'emacs-lisp-mode-hook <span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">()</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> indent-tabs-mode nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> show-trailing-whitespace t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'flycheck-mode-hook 'imalison:maybe-remove-flycheck-checkdoc-checker<span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline178"></a>Show result of eval-last-sexp inline<br /><div class="outline-text-5" id="text-10-1-3-8">
<p>
Taken from <a href="http://endlessparentheses.com/eval-result-overlays-in-emacs-lisp.html">http://endlessparentheses.com/eval-result-overlays-in-emacs-lisp.html</a>
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>autoload 'cider--make-result-overlay <span style="color: #9ccc65;">"cider-overlays"</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:eval-overlay</span> <span style="color: #2196F3;">(</span>value point<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>cider--make-result-overlay <span style="color: #EF6C00;">(</span>format <span style="color: #9ccc65;">"%S"</span> value<span style="color: #EF6C00;">)</span>
<span style="color: #ff8A65;">:where</span> point
<span style="color: #ff8A65;">:duration</span> 'command<span style="color: #2196F3;">)</span>
value<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>advice-add 'eval-region <span style="color: #ff8A65;">:around</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">(</span>f beg end <span style="color: #84ffff;">&amp;rest</span> r<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>imalison:eval-overlay
<span style="color: #B388FF;">(</span>apply f beg end r<span style="color: #B388FF;">)</span>
end<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>advice-add 'eval-last-sexp <span style="color: #ff8A65;">:filter-return</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">(</span>r<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>imalison:eval-overlay r <span style="color: #B388FF;">(</span>point<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>advice-add 'eval-defun <span style="color: #ff8A65;">:filter-return</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">(</span>r<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>imalison:eval-overlay
r
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">save-excursion</span>
<span style="color: #76ff03;">(</span>end-of-defun<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>point<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline179"></a>Init hook<br /><div class="outline-text-5" id="text-10-1-3-9">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:check-parens</span> nil<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:maybe-check-parens</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> imalison:check-parens
<span style="color: #EF6C00;">(</span>check-parens<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:emacs-lisp-hook</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span>elisp-slime-nav-mode t<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>add-hook 'write-file-functions 'imalison:maybe-check-parens nil t<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'emacs-lisp-mode-hook 'imalison:emacs-lisp-hook<span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline180"></a>Keybinds<br /><div class="outline-text-5" id="text-10-1-3-10">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">emit-compose</span> imalison:copy-eval-last-sexp
kill-new prin1-to-string eval-last-sexp<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:eval-last-sexp
eval-region-or-last-sexp
imalison:copy-eval-last-sexp<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>define-key lisp-mode-shared-map <span style="color: #2196F3;">(</span>kbd <span style="color: #9ccc65;">"C-c C-c"</span><span style="color: #2196F3;">)</span> 'eval-defun<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>define-key lisp-mode-shared-map <span style="color: #2196F3;">(</span>kbd <span style="color: #9ccc65;">"C-c o r"</span><span style="color: #2196F3;">)</span> 'up-list-region<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>define-key lisp-mode-shared-map <span style="color: #2196F3;">(</span>kbd <span style="color: #9ccc65;">"C-c o o"</span><span style="color: #2196F3;">)</span> 'up-list-back<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>define-key lisp-mode-shared-map <span style="color: #2196F3;">(</span>kbd <span style="color: #9ccc65;">"C-x C-e"</span><span style="color: #2196F3;">)</span> 'imalison:eval-last-sexp<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-j"</span> lisp-interaction-mode-map<span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
<div id="outline-container-orgheadline184" class="outline-4">
<h4 id="orgheadline184"><span class="section-number-4">10.1.4</span> clojure</h4>
<div class="outline-text-4" id="text-10-1-4">
<p>
The following is taken from <a href="https://github.com/syl20bnr/spacemacs/blob/a650877bea582fed72bbca0dc1f80fcb2ec0e6d5/layers/+lang/clojure/funcs.el#L30">spacemacs</a>. It adds fancification to a clojure mode.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:clojure-fancify-symbols</span> <span style="color: #2196F3;">(</span>mode<span style="color: #2196F3;">)</span>
<span style="color: #ffe4b5;">"Pretty symbols for Clojure's anonymous functions and sets,</span>
<span style="color: #ffe4b5;"> like (&#955; [a] (+ a 5)), &#402;(+ % 5), and &#8712;{2 4 6}."</span>
<span style="color: #2196F3;">(</span>font-lock-add-keywords mode
`<span style="color: #EF6C00;">(</span><span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"(</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">(</span><span style="color: #9ccc65;">fn</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">)</span><span style="color: #9ccc65;">[\n\[[:space:]]"</span>
<span style="color: #76ff03;">(</span>0 <span style="color: #26A69A;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #FFCDD2;">(</span>compose-region <span style="color: #795548;">(</span>match-beginning 1<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>match-end 1<span style="color: #795548;">)</span> <span style="color: #9ccc65;">"&#955;"</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"(</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">(</span><span style="color: #9ccc65;">partial</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">)</span><span style="color: #9ccc65;">[\[[:space:]]"</span>
<span style="color: #76ff03;">(</span>0 <span style="color: #26A69A;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #FFCDD2;">(</span>compose-region <span style="color: #795548;">(</span>match-beginning 1<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>match-end 1<span style="color: #795548;">)</span> <span style="color: #9ccc65;">"&#420;"</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"(</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">(</span><span style="color: #9ccc65;">comp</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">)</span><span style="color: #9ccc65;">[\n\[[:space:]]"</span>
<span style="color: #76ff03;">(</span>0 <span style="color: #26A69A;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #FFCDD2;">(</span>compose-region <span style="color: #795548;">(</span>match-beginning 1<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>match-end 1<span style="color: #795548;">)</span> <span style="color: #9ccc65;">"&#8728;"</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">(</span><span style="color: #9ccc65;">#</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">)</span><span style="color: #9ccc65;">("</span>
<span style="color: #76ff03;">(</span>0 <span style="color: #26A69A;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #FFCDD2;">(</span>compose-region <span style="color: #795548;">(</span>match-beginning 1<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>match-end 1<span style="color: #795548;">)</span> <span style="color: #9ccc65;">"&#402;"</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">(</span><span style="color: #9ccc65;">#</span><span style="color: #fff59d;">\\</span><span style="color: #b39ddb;">)</span><span style="color: #9ccc65;">{"</span>
<span style="color: #76ff03;">(</span>0 <span style="color: #26A69A;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #FFCDD2;">(</span>compose-region <span style="color: #795548;">(</span>match-beginning 1<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>match-end 1<span style="color: #795548;">)</span> <span style="color: #9ccc65;">"&#8712;"</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">clojure-mode</span>
<span style="color: #ff8A65;">:commands</span> clojure-mode
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-to-list 'magic-mode-alist '<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"#!.*boot\\s-*$"</span> . clojure-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'auto-mode-alist '<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"\\.boot\\'"</span> . clojure-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:clojure-mode-hook</span> <span style="color: #B388FF;">()</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(cljr-add-keybindings-with-prefix "C-c C-m")</span>
<span style="color: #B388FF;">(</span>clj-refactor-mode 1<span style="color: #B388FF;">)</span>
<span style="color: #b0bec5;">;;</span><span style="color: #b0bec5;">for adding require/use/import statements</span>
<span style="color: #B388FF;">(</span>yas-minor-mode 1<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:clojure-level-1-symobls</span>
'<span style="color: #B388FF;">(</span>describe <span style="color: #ffcc80;">it</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cl-loop</span> for symbol in imalison:clojure-level-1-symobls
do <span style="color: #B388FF;">(</span>put-clojure-indent symbol 1<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'clojure-mode-hook 'imalison:clojure-mode-hook<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">dolist</span> <span style="color: #B388FF;">(</span>m '<span style="color: #76ff03;">(</span>clojure-mode clojurescript-mode clojurec-mode clojurex-mode<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>imalison:clojure-fancify-symbols m<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<ol class="org-ol"><li><a id="orgheadline182"></a>cider<br /><div class="outline-text-5" id="text-10-1-4-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">cider</span>
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>cider-jack-in<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> cider-stacktrace-default-filters '<span style="color: #B388FF;">(</span>tooling dup<span style="color: #B388FF;">)</span>
cider-repl-pop-to-buffer-on-connect nil
cider-prompt-save-file-on-load nil
cider-repl-use-clojure-font-lock t
cider-prompt-for-symbol nil
cider-preferred-build-tool <span style="color: #9ccc65;">"boot"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'clojure-mode-hook 'cider-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline183"></a>clj-refactor<br /><div class="outline-text-5" id="text-10-1-4-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">clj-refactor</span>
<span style="color: #ff8A65;">:commands</span> clj-refactor-mode<span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
<div id="outline-container-orgheadline185" class="outline-4">
<h4 id="orgheadline185"><span class="section-number-4">10.1.5</span> scala</h4>
<div class="outline-text-4" id="text-10-1-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">scala-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"\\.scala\\'"</span> . scala-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"\\.sc\\'"</span> . scala-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">ensime</span>
<span style="color: #ff8A65;">:pin</span> melpa-stable
<span style="color: #ff8A65;">:bind</span> <span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:map</span> ensime-mode-map
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"M-,"</span> . ensime-pop-find-definition-stack<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #ff8A65;">:commands</span> ensime-mode
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> ensime-startup-snapshot-notification nil<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'scala-mode-hook 'ensime-scala-mode-hook<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> scala-indent:align-parameters t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline186" class="outline-4">
<h4 id="orgheadline186"><span class="section-number-4">10.1.6</span> js</h4>
<div class="outline-text-4" id="text-10-1-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">tape-onlyify</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">save-excursion</span>
<span style="color: #EF6C00;">(</span>move-end-of-line nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>re-search-backward <span style="color: #9ccc65;">"^test"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>forward-sexp<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">if</span> <span style="color: #B388FF;">(</span>looking-at <span style="color: #9ccc65;">".only"</span><span style="color: #B388FF;">)</span> <span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #76ff03;">(</span>zap-to-char 1 <span style="color: #26A69A;">(</span>string-to-char <span style="color: #9ccc65;">"("</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span> <span style="color: #76ff03;">(</span>insert <span style="color: #9ccc65;">"("</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>insert <span style="color: #9ccc65;">".only"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">js2-mode</span>
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>js2-mode<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #9ccc65;">"\\.js\\'"</span>
<span style="color: #ff8A65;">:bind</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(("C-c b" . web-beautify-js)) TODO: to make this mode specific</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">and change binding</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> imalison:identifier-count 0<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:console-log-unique</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>identifier-string <span style="color: #FFCDD2;">(</span>int-to-string imalison:identifier-count<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>uuid <span style="color: #FFCDD2;">(</span>imalison:uuid<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>insert <span style="color: #26A69A;">(</span>format <span style="color: #9ccc65;">"console.log('%s//////////%s//////////');"</span> identifier-string uuid<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> imalison:identifier-count <span style="color: #26A69A;">(</span>+ imalison:identifier-count 1<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:js2-mode-hook</span> <span style="color: #B388FF;">()</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Sensible defaults</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> js2-bounce-indent-p nil
js2-indent-level 4
js2-basic-offset 4
js2-highlight-level 3
js2-include-node-externs t
js2-mode-show-parse-errors nil
js2-mode-show-strict-warnings nil
indent-tabs-mode nil
js2-indent-switch-body t<span style="color: #B388FF;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(edconf-find-file-hook) ;; Make sure that editorconfig takes precedence</span>
<span style="color: #B388FF;">(</span>tern-mode t<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> nil <span style="color: #76ff03;">(</span>skewer-mode<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span> <span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">TODO: reenable</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> imenu-create-index-function
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #26A69A;">()</span>
<span style="color: #26A69A;">(</span>imalison:flatten-imenu-index
<span style="color: #FFCDD2;">(</span>js2-mode-create-imenu-index<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-hook 'js2-mode-hook 'imalison:js2-mode-hook<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'js2-mode-hook 'js2-imenu-extras-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">js2-refactor</span>
<span style="color: #ff8A65;">:after</span> js2-mode
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>js2r-add-keybindings-with-prefix <span style="color: #9ccc65;">"C-c C-m"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'js2-mode-hook #'js2-refactor-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">skewer-mode</span>
<span style="color: #ff8A65;">:commands</span> skewer-mode
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-hook 'css-mode-hook #'skewer-css-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'html-mode-hook #'skewer-html-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">tern</span>
<span style="color: #ff8A65;">:commands</span> tern-mode
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">company-tern</span>
<span style="color: #ff8A65;">:config</span> <span style="color: #EF6C00;">(</span>add-to-list 'company-backends 'company-tern<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">delete-tern-process</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>delete-process <span style="color: #9ccc65;">"tern"</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline187" class="outline-4">
<h4 id="orgheadline187"><span class="section-number-4">10.1.7</span> rust</h4>
<div class="outline-text-4" id="text-10-1-7">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">rust-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"\\.rs\\'"</span> . rust-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:rust-mode-hook</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span>racer-mode 1<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">flycheck-rust</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span>add-hook 'flycheck-mode-hook #'flycheck-rust-setup<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">racer</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> racer-cmd <span style="color: #9ccc65;">"~/.cargo/bin/racer"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> racer-rust-src-path <span style="color: #9ccc65;">"~/Projects/rust/src"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">cargo</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span>add-hook 'rust-mode-hook 'cargo-minor-mode<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'rust-mode-hook 'imalison:rust-mode-hook<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline192" class="outline-4">
<h4 id="orgheadline192"><span class="section-number-4">10.1.8</span> haskell</h4>
<div class="outline-text-4" id="text-10-1-8">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">haskell-mode</span>
<span style="color: #ff8A65;">:commands</span> haskell-mode
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #ff8A65;">:map</span> haskell-mode-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c h"</span> . haskell-hoogle<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> haskell-hoogle-command <span style="color: #9ccc65;">"hoogle"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">flycheck</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>delq 'haskell-stack-ghc flycheck-checkers<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'haskell-mode-hook 'turn-on-haskell-indent<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> haskell-tags-on-save t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<ol class="org-ol"><li><a id="orgheadline188"></a>intero<br /><div class="outline-text-5" id="text-10-1-8-1">
<p>
Intero seems to be causing hangs, so it has been disabled
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">intero</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:after</span> haskell-mode
<span style="color: #ff8A65;">:config</span> <span style="color: #2196F3;">(</span>add-hook 'haskell-mode-hook 'intero-mode<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline189"></a>hindent<br /><div class="outline-text-5" id="text-10-1-8-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">hindent</span>
<span style="color: #ff8A65;">:after</span> haskell-mode
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span>add-hook 'haskell-mode-hook 'hindent-mode<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline190"></a>ghc-mod<br /><div class="outline-text-5" id="text-10-1-8-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">ghc</span>
<span style="color: #ff8A65;">:after</span> haskell-mode
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span>add-hook 'haskell-mode-hook 'ghc-init<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline191"></a>company-ghc<br /><div class="outline-text-5" id="text-10-1-8-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">company-ghc</span>
<span style="color: #ff8A65;">:after</span> ghc
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span>add-to-list 'company-backend 'company-ghc<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
<div id="outline-container-orgheadline193" class="outline-4">
<h4 id="orgheadline193"><span class="section-number-4">10.1.9</span> C/C++</h4>
<div class="outline-text-4" id="text-10-1-9">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">cc-mode</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:cc-mode-hook</span> <span style="color: #EF6C00;">()</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">when</span> <span style="color: #B388FF;">(</span>derived-mode-p 'c-mode 'c++-mode 'java-mode 'asm-mode<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>ggtags-mode 1<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">ggtags</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:bind</span> <span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:map</span> ggtags-mode-map
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"C-c g s"</span> . ggtags-find-other-symbol<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"C-c g h"</span> . ggtags-view-tag-history<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"C-c g r"</span> . ggtags-find-reference<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"C-c g f"</span> . ggtags-find-file<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"C-c g c"</span> . ggtags-create-tags<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"C-c g u"</span> . ggtags-update-tags<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"M-,"</span> . pop-tag-mark<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'c-mode-common-hook 'imalison:cc-mode-hook<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline194" class="outline-4">
<h4 id="orgheadline194"><span class="section-number-4">10.1.10</span> C#</h4>
<div class="outline-text-4" id="text-10-1-10">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">csharp-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #9ccc65;">"\\.cs\\'"</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline195" class="outline-4">
<h4 id="orgheadline195"><span class="section-number-4">10.1.11</span> racket</h4>
<div class="outline-text-4" id="text-10-1-11">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">racket-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #9ccc65;">"\\.rkt\\'"</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline202" class="outline-3">
<h3 id="orgheadline202"><span class="section-number-3">10.2</span> Data/Config/Protocol</h3>
<div class="outline-text-3" id="text-10-2">
</div><div id="outline-container-orgheadline197" class="outline-4">
<h4 id="orgheadline197"><span class="section-number-4">10.2.1</span> thrift</h4>
<div class="outline-text-4" id="text-10-2-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">thrift</span>
<span style="color: #ff8A65;">:commands</span> thrift-mode
<span style="color: #ff8A65;">:mode</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"\\.thrift\\'"</span> . thrift-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline198" class="outline-4">
<h4 id="orgheadline198"><span class="section-number-4">10.2.2</span> protobuf</h4>
<div class="outline-text-4" id="text-10-2-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">protobuf-mode</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline199" class="outline-4">
<h4 id="orgheadline199"><span class="section-number-4">10.2.3</span> json-mode</h4>
<div class="outline-text-4" id="text-10-2-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">json-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #9ccc65;">"\\.json\\'"</span>
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span>add-hook 'json-mode-hook
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> indent-tabs-mode nil<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> js-indent-level 4<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline200" class="outline-4">
<h4 id="orgheadline200"><span class="section-number-4">10.2.4</span> yaml-mode</h4>
<div class="outline-text-4" id="text-10-2-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">yaml-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"\\.yaml\\'"</span> . yaml-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"\\.yml\\'"</span> . yaml-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline201" class="outline-4">
<h4 id="orgheadline201"><span class="section-number-4">10.2.5</span> es-mode</h4>
<div class="outline-text-4" id="text-10-2-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">es-mode</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline216" class="outline-3">
<h3 id="orgheadline216"><span class="section-number-3">10.3</span> Document</h3>
<div class="outline-text-3" id="text-10-3">
</div><div id="outline-container-orgheadline208" class="outline-4">
<h4 id="orgheadline208"><span class="section-number-4">10.3.1</span> org</h4>
<div class="outline-text-4" id="text-10-3-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">org</span>
<span style="color: #ff8A65;">:ensure</span> org-plus-contrib
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">XXX: These should probably be moved to config, right?</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> org-startup-indented nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> org-startup-folded t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> org-edit-src-content-indentation 0<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> org-src-preserve-indentation t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> org-directory <span style="color: #9ccc65;">"~/Dropbox/org"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> org-mobile-inbox-for-pull <span style="color: #9ccc65;">"~/Dropbox/org/flagged.org"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> org-mobile-directory <span style="color: #9ccc65;">"~/Dropbox/Apps/MobileOrg"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-goto-interface 'outline-path-completion
org-goto-max-level 10<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'org-mode-hook 'imalison:disable-linum-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'org-mode-hook <span style="color: #B388FF;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #76ff03;">()</span> <span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> org-todo-key-trigger t<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'org-agenda-mode-hook 'imalison:disable-linum-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">org-archive-if</span> <span style="color: #B388FF;">(</span>condition-function<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">if</span> <span style="color: #76ff03;">(</span>funcall condition-function<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">let</span> <span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>next-point-marker
<span style="color: #795548;">(</span><span style="color: #fff59d;">save-excursion</span> <span style="color: #DCE775;">(</span>org-forward-heading-same-level 1<span style="color: #DCE775;">)</span> <span style="color: #DCE775;">(</span>point-marker<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>org-archive-subtree<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">setq</span> org-map-continue-from <span style="color: #FFCDD2;">(</span>marker-position next-point-marker<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">org-archive-if-completed</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>org-archive-if 'org-entry-is-done-p<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">org-archive-completed-in-buffer</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>org-map-entries 'org-archive-if-completed<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cl-defun</span> <span style="color: #84ffff;">imalison:make-org-template</span> <span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;key</span> <span style="color: #76ff03;">(</span>content <span style="color: #9ccc65;">"%?"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">with-temp-buffer</span>
<span style="color: #76ff03;">(</span>org-mode<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>insert content<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>org-set-property <span style="color: #9ccc65;">"CREATED"</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">with-temp-buffer</span>
<span style="color: #FFCDD2;">(</span>org-insert-time-stamp
<span style="color: #795548;">(</span>org-current-effective-time<span style="color: #795548;">)</span> t t<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>buffer-substring-no-properties <span style="color: #26A69A;">(</span>point-min<span style="color: #26A69A;">)</span> <span style="color: #26A69A;">(</span>point-max<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:make-org-template-from-file</span> <span style="color: #B388FF;">(</span>filename<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>imalison:make-org-template <span style="color: #76ff03;">(</span>imalison:get-string-from-file filename<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cl-defun</span> <span style="color: #84ffff;">imalison:make-org-todo-template</span>
<span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;key</span> <span style="color: #76ff03;">(</span>content <span style="color: #9ccc65;">"%?"</span><span style="color: #76ff03;">)</span> <span style="color: #76ff03;">(</span>creation-state <span style="color: #9ccc65;">"TODO"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">with-temp-buffer</span>
<span style="color: #76ff03;">(</span>org-mode<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>org-insert-heading<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>insert content<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>org-todo creation-state<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>org-set-property <span style="color: #9ccc65;">"CREATED"</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">with-temp-buffer</span>
<span style="color: #FFCDD2;">(</span>org-insert-time-stamp
<span style="color: #795548;">(</span>org-current-effective-time<span style="color: #795548;">)</span> t t<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>remove-hook 'post-command-hook 'org-add-log-note<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">let</span> <span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>org-log-note-purpose 'state<span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>org-log-note-return-to <span style="color: #795548;">(</span>point-marker<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>org-log-note-marker <span style="color: #795548;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #DCE775;">(</span>goto-char <span style="color: #e91e63;">(</span>org-log-beginning t<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>point-marker<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>org-log-note-state creation-state<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>org-add-log-note<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>buffer-substring-no-properties <span style="color: #26A69A;">(</span>point-min<span style="color: #26A69A;">)</span> <span style="color: #26A69A;">(</span>point-max<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">org-todo-force-notes</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>org-todo-log-states
<span style="color: #FFCDD2;">(</span>mapcar <span style="color: #795548;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #DCE775;">(</span>state<span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>list state 'note 'time<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>apply 'append org-todo-sets<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">cond</span> <span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>eq major-mode 'org-mode<span style="color: #FFCDD2;">)</span> <span style="color: #FFCDD2;">(</span>org-todo<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>eq major-mode 'org-agenda-mode<span style="color: #FFCDD2;">)</span> <span style="color: #FFCDD2;">(</span>org-agenda-todo<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">org-make-habit</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>org-set-property <span style="color: #9ccc65;">"STYLE"</span> <span style="color: #9ccc65;">"habit"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">org-insert-habit</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>org-insert-todo-heading nil<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>org-make-habit<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">org-todo-at-date</span> <span style="color: #B388FF;">(</span>date<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #76ff03;">(</span>list <span style="color: #26A69A;">(</span>org-time-string-to-time <span style="color: #FFCDD2;">(</span>org-read-date<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">cl-flet</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>org-current-effective-time <span style="color: #FFCDD2;">(</span><span style="color: #84ffff;">&amp;rest</span> r<span style="color: #FFCDD2;">)</span> date<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>org-today <span style="color: #FFCDD2;">(</span><span style="color: #84ffff;">&amp;rest</span> r<span style="color: #FFCDD2;">)</span> <span style="color: #FFCDD2;">(</span>time-to-days date<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">cond</span> <span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>eq major-mode 'org-mode<span style="color: #FFCDD2;">)</span> <span style="color: #FFCDD2;">(</span>org-todo<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>eq major-mode 'org-agenda-mode<span style="color: #FFCDD2;">)</span> <span style="color: #FFCDD2;">(</span>org-agenda-todo<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:make-org-linked-todo-template</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span>imalison:make-org-todo-template <span style="color: #9ccc65;">"%? %A"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">org-cmp-creation-times</span> <span style="color: #B388FF;">(</span>a b<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>a-created <span style="color: #FFCDD2;">(</span>get-date-created-from-agenda-entry a<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>b-created <span style="color: #FFCDD2;">(</span>get-date-created-from-agenda-entry b<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>imalison:compare-int-list a-created b-created<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">org-agenda-done</span> <span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;optional</span> arg<span style="color: #B388FF;">)</span>
<span style="color: #ffe4b5;">"Mark current TODO as done.</span>
<span style="color: #ffe4b5;"> This changes the line at point, all other lines in the agenda referring to</span>
<span style="color: #ffe4b5;"> the same tree node, and the headline of the tree node in the Org-mode file."</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #9ccc65;">"P"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>org-agenda-todo <span style="color: #9ccc65;">"DONE"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>org-mode org org-mobile-push org-mobile-pull org-agenda<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"\\.org\\'"</span> . org-mode<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c a"</span> . org-agenda<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c c"</span> . org-capture<span style="color: #EF6C00;">)</span>
<span style="color: #ff8A65;">:map</span> org-mode-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c n t"</span> . org-insert-todo-heading<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c n s"</span> . org-insert-todo-subheading<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c n h"</span> . org-insert-habit<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c n m"</span> . org-make-habit<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c n l"</span> . org-store-link<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c n i"</span> . org-insert-link<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c C-t"</span> . org-todo<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c C-S-t"</span> . org-todo-force-notes<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-."</span> . elisp-slime-nav-find-elisp-thing-at-point<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-global-properties
'<span style="color: #B388FF;">(</span><span style="color: #fff59d;">quote</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span><span style="color: #9ccc65;">"Effort_ALL"</span> . <span style="color: #9ccc65;">"0:15 0:30 0:45 1:00 2:00 3:00 4:00 5:00 6:00 0:00"</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #9ccc65;">"STYLE_ALL"</span> . <span style="color: #9ccc65;">"habit"</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Record changes to todo states</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-todo-keywords
'<span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>sequence <span style="color: #9ccc65;">"IDEA(i!)"</span> <span style="color: #9ccc65;">"RESEARCH(r!)"</span> <span style="color: #9ccc65;">"TODO(t!)"</span> <span style="color: #9ccc65;">"NEXT(n!)"</span>
<span style="color: #9ccc65;">"STARTED(s!)"</span> <span style="color: #9ccc65;">"WAIT(w!)"</span> <span style="color: #9ccc65;">"BACKLOG(b!)"</span> <span style="color: #9ccc65;">"|"</span>
<span style="color: #9ccc65;">"DONE(d!)"</span> <span style="color: #9ccc65;">"HANDLED(h!)"</span> <span style="color: #9ccc65;">"EXPIRED(e!)"</span> <span style="color: #9ccc65;">"CANCELED(c!)"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> helm-org-headings-fontify t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-todo-repeat-to-state <span style="color: #9ccc65;">"TODO"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-agenda-span 10<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-agenda-start-day <span style="color: #9ccc65;">"-2d"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-columns-default-format
<span style="color: #9ccc65;">"%80ITEM(Task) %10Effort(Effort){:} %10CLOCKSUM"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-show-context-detail '<span style="color: #B388FF;">(</span>org-goto . lineage<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>sp-local-pair 'org-mode <span style="color: #9ccc65;">"~"</span> <span style="color: #9ccc65;">"~"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list
'org-src-lang-modes '<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"plantuml"</span> . plantuml<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-babel-do-load-languages
'org-babel-load-languages
'<span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>sh . t<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>python . t<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>ruby . t<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>octave . t<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>sqlite . t<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>plantuml . t<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-log-into-drawer t
org-log-reschedule t
org-log-redeadline t
org-treat-insert-todo-heading-as-state-change t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">when</span> nil
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Enable appointment notifications.</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">defadvice</span> <span style="color: #84ffff;">org-agenda-to-appt</span> <span style="color: #76ff03;">(</span>before wickedcool activate<span style="color: #76ff03;">)</span>
<span style="color: #ffe4b5;">"Clear the appt-time-msg-list."</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> appt-time-msg-list nil<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>appt-activate<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">org-agenda-to-appt-no-message</span> <span style="color: #76ff03;">()</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">shut-up</span> <span style="color: #26A69A;">(</span>org-agenda-to-appt<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>run-at-time <span style="color: #9ccc65;">"00:00"</span> 60 'org-agenda-to-appt-no-message<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Override the key definition for org-exit</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">TODO why does this cause an error</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(define-key org-agenda-mode-map "x" #'org-agenda-done)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">org-mode add-ons</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">org-present</span>
<span style="color: #ff8A65;">:commands</span> org-present<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">org-pomodoro</span>
<span style="color: #ff8A65;">:disabled</span> t<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">variable configuration</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-modules 'org-habit<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-modules 'org-expiry<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-modules 'org-notify<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-src-fontify-natively t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-habit-graph-column 50<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-habit-show-habits-only-for-today t<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">My priority system:</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">A - Absolutely MUST, at all costs, be completed by the provided</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">due date. TODO: implement some type of extreme nagging</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">system that alerts in an intrusive way for overdue A</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">priority tasks.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">B - Should be given immediate attention if the due date is any</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">time in the next two days. Failure to meet due date would</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">be bad but not catastrophic.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">C - The highest priority to which tasks for which failure to</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">complete on time would not have considerable significant</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">consequences. There is still significant reason to prefer</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">the completion of these tasks sooner rather than later.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">D - Failure to complete within a few days (or ever) of any</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">deadline would be completely okay. As such, any deadline</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">present on such a task is necessarily self imposed. Still</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">probably worth doing</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">E - Potentially not even worth doing at all, but worth taking a</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">note about in case it comes up again, or becomes more</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">interesting later.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">F - Almost certainly not worth attempting in the immediate future.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Just brain dump.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Priorities are somewhat contextual within each category. Things</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">in the gtd or work categories are generally regarded as much</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">more important than things with the same priority from the</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">dotfiles category.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Items without deadlines or scheduled times of a given priority</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">can be regarded as less important than items that DO have</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">deadlines of that same priority.</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-lowest-priority 69<span style="color: #EF6C00;">)</span> <span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">The character E</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-completion-use-ido t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-enforce-todo-dependencies t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-deadline-warning-days 0<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-default-priority ?D<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-agenda-skip-scheduled-if-done t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-agenda-skip-deadline-if-done t<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;;</span><span style="color: #b0bec5;">(add-to-list org-agenda-tag-filter-preset "+PRIORITY&lt;\"C\"")</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-imenu-depth 10<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Stop starting agenda from deleting frame setup!</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-agenda-window-setup 'other-window<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>define-key mode-specific-map <span style="color: #B388FF;">[</span>?a<span style="color: #B388FF;">]</span> 'org-agenda<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-j"</span> org-mode-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">org-bullets</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span>add-hook 'org-mode-hook <span style="color: #26A69A;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #FFCDD2;">()</span> <span style="color: #FFCDD2;">(</span>org-bullets-mode 1<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">org-ehtml</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> org-ehtml-docroot <span style="color: #26A69A;">(</span>expand-file-name <span style="color: #9ccc65;">"~/Dropbox/org"</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> org-ehtml-allow-agenda t<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> org-ehtml-editable-headlines t<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">setq</span> org-ehtml-everything-editable t<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Agenda setup.</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:org-gtd-file</span> <span style="color: #9ccc65;">"~/org/gtd.org"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:org-habits-file</span> <span style="color: #9ccc65;">"~/org/habits.org"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:org-calendar-file</span> <span style="color: #9ccc65;">"~/org/calendar.org"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:org-inbox-file</span> <span style="color: #9ccc65;">"~/org/inbox.org"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unless</span> <span style="color: #B388FF;">(</span>boundp 'org-capture-templates<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">org-capture-templates</span> nil<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>imalison:add-to-org-agenda-files
<span style="color: #B388FF;">(</span>list imalison:org-gtd-file imalison:org-habits-file
imalison:org-calendar-file imalison:org-inbox-file<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-capture-templates
`<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"t"</span> <span style="color: #9ccc65;">"GTD Todo (Linked)"</span> entry <span style="color: #76ff03;">(</span>file ,imalison:org-gtd-file<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">function</span> imalison:make-org-linked-todo-template<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-capture-templates
`<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"g"</span> <span style="color: #9ccc65;">"GTD Todo"</span> entry <span style="color: #76ff03;">(</span>file ,imalison:org-gtd-file<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">function</span> imalison:make-org-todo-template<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-capture-templates
`<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"y"</span> <span style="color: #9ccc65;">"Calendar entry (Linked)"</span> entry
<span style="color: #76ff03;">(</span>file ,imalison:org-calendar-file<span style="color: #76ff03;">)</span>
<span style="color: #9ccc65;">"* %? %A</span>
<span style="color: #9ccc65;"> :PROPERTIES:</span>
<span style="color: #9ccc65;"> :CREATED: %U</span>
<span style="color: #9ccc65;"> :END:</span>
<span style="color: #9ccc65;">%^T"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-capture-templates
`<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"c"</span> <span style="color: #9ccc65;">"Calendar entry"</span> entry
<span style="color: #76ff03;">(</span>file ,imalison:org-calendar-file<span style="color: #76ff03;">)</span>
<span style="color: #9ccc65;">"* %?</span>
<span style="color: #9ccc65;"> :PROPERTIES:</span>
<span style="color: #9ccc65;"> :CREATED: %U</span>
<span style="color: #9ccc65;"> :END:</span>
<span style="color: #9ccc65;">%^T"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-capture-templates
`<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"h"</span> <span style="color: #9ccc65;">"Habit"</span> entry <span style="color: #76ff03;">(</span>file ,imalison:org-habits-file<span style="color: #76ff03;">)</span>
<span style="color: #9ccc65;">"* TODO</span>
<span style="color: #9ccc65;"> SCHEDULED: %^t</span>
<span style="color: #9ccc65;"> :PROPERTIES:</span>
<span style="color: #9ccc65;"> :CREATED: %U</span>
<span style="color: #9ccc65;"> :STYLE: habit</span>
<span style="color: #9ccc65;"> :END:"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">let</span> <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>this-week-high-priority
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">The &lt; in the following line works has behavior that is opposite</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">to what one might expect.</span>
'<span style="color: #26A69A;">(</span>tags-todo <span style="color: #9ccc65;">"+PRIORITY&lt;\"C\"+DEADLINE&lt;\"&lt;+1w&gt;\"DEADLINE&gt;\"&lt;+0d&gt;\""</span>
<span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span>org-agenda-overriding-header
<span style="color: #9ccc65;">"Upcoming high priority tasks:"</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>due-today '<span style="color: #26A69A;">(</span>tags-todo
<span style="color: #9ccc65;">"+DEADLINE=&lt;\"&lt;+0d&gt;\""</span>
<span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span>org-agenda-overriding-header
<span style="color: #9ccc65;">"Due today:"</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>recently-created '<span style="color: #26A69A;">(</span>tags-todo
<span style="color: #9ccc65;">"+CREATED=&gt;\"&lt;-3d&gt;\""</span>
<span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span>org-agenda-overriding-header <span style="color: #9ccc65;">"Recently created:"</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>org-agenda-cmp-user-defined 'org-cmp-creation-times<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>org-agenda-sorting-strategy '<span style="color: #DCE775;">(</span>user-defined-down<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>next '<span style="color: #26A69A;">(</span>todo <span style="color: #9ccc65;">"NEXT"</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>started '<span style="color: #26A69A;">(</span>todo <span style="color: #9ccc65;">"STARTED"</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>missing-deadline
'<span style="color: #26A69A;">(</span>tags-todo <span style="color: #9ccc65;">"-DEADLINE={.}/!"</span>
<span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span>org-agenda-overriding-header
<span style="color: #9ccc65;">"These don't have deadlines:"</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>missing-priority
'<span style="color: #26A69A;">(</span>tags-todo <span style="color: #9ccc65;">"-PRIORITY={.}/!"</span>
<span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span>org-agenda-overriding-header
<span style="color: #9ccc65;">"These don't have priorities:"</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> org-agenda-custom-commands
`<span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span><span style="color: #9ccc65;">"M"</span> <span style="color: #9ccc65;">"Main agenda view"</span>
<span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span>agenda <span style="color: #9ccc65;">""</span>
<span style="color: #DCE775;">(</span><span style="color: #e91e63;">(</span>org-agenda-overriding-header <span style="color: #9ccc65;">"Agenda:"</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>org-agenda-ndays 5<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>org-deadline-warning-days 0<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
,due-today
,next
,started
,this-week-high-priority
,recently-created<span style="color: #FFCDD2;">)</span>
nil nil<span style="color: #26A69A;">)</span>
,<span style="color: #26A69A;">(</span>cons <span style="color: #9ccc65;">"A"</span> <span style="color: #FFCDD2;">(</span>cons <span style="color: #9ccc65;">"High priority upcoming"</span> this-week-high-priority<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
,<span style="color: #26A69A;">(</span>cons <span style="color: #9ccc65;">"d"</span> <span style="color: #FFCDD2;">(</span>cons <span style="color: #9ccc65;">"Overdue tasks and due today"</span> due-today<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
,<span style="color: #26A69A;">(</span>cons <span style="color: #9ccc65;">"r"</span> <span style="color: #FFCDD2;">(</span>cons <span style="color: #9ccc65;">"Recently created"</span> recently-created<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #9ccc65;">"h"</span> <span style="color: #9ccc65;">"A, B priority:"</span> tags-todo <span style="color: #9ccc65;">"+PRIORITY&lt;\"C\""</span>
<span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span>org-agenda-overriding-header
<span style="color: #9ccc65;">"High Priority:"</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #9ccc65;">"c"</span> <span style="color: #9ccc65;">"At least priority C:"</span> tags-todo <span style="color: #9ccc65;">"+PRIORITY&lt;\"D\""</span>
<span style="color: #FFCDD2;">(</span><span style="color: #795548;">(</span>org-agenda-overriding-header
<span style="color: #9ccc65;">"At least priority C:"</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">What follows is a description of the significance of each of</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">the values available in `</span><span style="color: #8bc34a;">org-todo-keywords</span><span style="color: #b0bec5;">'. All headings with</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">one of these keywords deal with the concept of the completion</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">of some task or collection of tasks to bring about a particular</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">state of affairs. In some cases, the actual tasks involved may</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">not be known at the time of task creation.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Incomplete States:</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">IDEA - This TODO exists in only the most abstract sense: it is</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">an imagined state of affairs that requires tasks that are</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">either not yet known, or have not thoroughly been considered.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">RESEARCH - This TODO needs to be investigated further before</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">action can be taken to achieve the desired outcome. It is not</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">known how much time and effort will be consumed in the actual</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">completion of the task.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">TODO - The scope and work involved in this TODO are well</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">understood, but for some reason or another, it is not something</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">that should be attempted in the immediate future. Typically</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">this is because the task is not considered a top priority, but</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">it may also be for some other reason.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">NEXT - This TODO is immediately actionable and should be</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">started in the immediate future.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">STARTED - Work on this TODO has already started, further work</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">is immediately actionable.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">WAIT - The work involved in this TODO is well understood, but</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">it is blocked for the time being.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">BACKLOG - While technically actionable, this task is not only</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">not worth pursuing in the immediate future, but the foreseable</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">future. It exists as a task mostly as a note/reminder, in case</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">it becomes higher priority in the future.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Complete States:</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">DONE - This TODO has been completed exactly as imagined.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">HANDLED - This TODO was completed in spirit, though not by the</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">means that were originally imagined/outlined in the TODO.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">EXPIRED - The owner of this TODO failed to take action on it</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">within the appropriate time period, and there is now no point in</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">attempting it.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">CANCELED - For whatever reason, this TODO should no longer be</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">attempted. This TODO is typically used in contrast to the</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">EXPIRED TODO to indicate that the owner is not necessarily to</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">blame.</span>
<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<ol class="org-ol"><li><a id="orgheadline203"></a>Correct BG color for org-export<br /><div class="outline-text-5" id="text-10-3-1-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">org</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:org-inline-css-hook</span> <span style="color: #B388FF;">(</span>exporter<span style="color: #B388FF;">)</span>
<span style="color: #ffe4b5;">"Insert custom inline css to automatically set the</span>
<span style="color: #ffe4b5;">background of code to whatever theme I'm using's background"</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> <span style="color: #76ff03;">(</span>eq exporter 'html<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>my-pre-bg <span style="color: #795548;">(</span>face-background 'default<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>my-pre-fg <span style="color: #795548;">(</span>face-foreground 'default<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">setq</span>
org-html-head-extra
<span style="color: #FFCDD2;">(</span>concat
org-html-head-extra
<span style="color: #795548;">(</span>format <span style="color: #9ccc65;">"&lt;style type=\"text/css\"&gt;\n pre.src {background-color: %s; color: %s;}&lt;/style&gt;\n"</span>
my-pre-bg my-pre-fg<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'org-export-before-processing-hook 'imalison:org-inline-css-hook<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline204"></a>org-projectile<br /><div class="outline-text-5" id="text-10-3-1-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:use-package</span> org-projectile
<span style="color: #ff8A65;">:after</span> helm
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c n p"</span> . imalison:helm-org-todo<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>org-projectile:prompt<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-capture-templates
<span style="color: #B388FF;">(</span>org-projectile:project-todo-entry
<span style="color: #9ccc65;">"l"</span> <span style="color: #9ccc65;">"* TODO %? %a\n"</span> <span style="color: #9ccc65;">"Linked Project TODO"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'org-capture-templates <span style="color: #B388FF;">(</span>org-projectile:project-todo-entry <span style="color: #9ccc65;">"p"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-confirm-elisp-link-function nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>imalison:add-to-org-agenda-files <span style="color: #B388FF;">(</span>org-projectile:todo-files<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">helm-source</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">helm-org</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:helm-org-todo</span> <span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;optional</span> arg<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #9ccc65;">"P"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>helm <span style="color: #ff8A65;">:sources</span> <span style="color: #76ff03;">(</span>list <span style="color: #26A69A;">(</span>helm-source-org-capture-templates<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>org-projectile:helm-source
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">if</span> arg <span style="color: #795548;">(</span>imalison:make-org-linked-todo-template<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>imalison:make-org-todo-template<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #ff8A65;">:candidate-number-limit</span> 99999
<span style="color: #ff8A65;">:buffer</span> <span style="color: #9ccc65;">"*helm org capture templates*"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline205"></a>org-notify<br /><div class="outline-text-5" id="text-10-3-1-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">org-notify</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:after</span> org
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:org-notify-notification-handler</span> <span style="color: #B388FF;">(</span>plist<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>sauron-add-event 'org-notify 4 <span style="color: #76ff03;">(</span>format <span style="color: #9ccc65;">"%s, %s.\n"</span> <span style="color: #26A69A;">(</span>plist-get plist <span style="color: #ff8A65;">:heading</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>org-notify-body-text plist<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-show-notification-handler 'imalison:org-notify-notification-handler<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-notify-add 'default '<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"1h"</span> <span style="color: #ff8A65;">:actions</span> imalison:org-notify-notification-handler
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"2m"</span> <span style="color: #ff8A65;">:duration</span> 60<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-notify-add 'default '<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"100m"</span> <span style="color: #ff8A65;">:actions</span> imalison:org-notify-notification-handler
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"2m"</span> <span style="color: #ff8A65;">:duration</span> 60<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-notify-add 'urgent-second '<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"3m"</span> <span style="color: #ff8A65;">:actions</span> <span style="color: #76ff03;">(</span>-notify/window -ding<span style="color: #76ff03;">)</span>
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"15s"</span> <span style="color: #ff8A65;">:duration</span> 10<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-notify-add 'minute '<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"5m"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"100s"</span> <span style="color: #ff8A65;">:duration</span> 70<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-notify-add '12hours
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"3m"</span> <span style="color: #ff8A65;">:actions</span> <span style="color: #76ff03;">(</span>-notify/window -ding<span style="color: #76ff03;">)</span>
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"15s"</span> <span style="color: #ff8A65;">:duration</span> 10<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"100m"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"2m"</span> <span style="color: #ff8A65;">:duration</span> 60<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"12h"</span> <span style="color: #ff8A65;">:actions</span> -notify/window <span style="color: #ff8A65;">:audible</span> nil
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"10m"</span> <span style="color: #ff8A65;">:duration</span> 200<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-notify-add '5days
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"100m"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"2m"</span> <span style="color: #ff8A65;">:duration</span> 60<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"2d"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"15m"</span> <span style="color: #ff8A65;">:duration</span> 100<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"5d"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"2h"</span> <span style="color: #ff8A65;">:duration</span> 200<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-notify-add 'long-20days
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"2d"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"15m"</span> <span style="color: #ff8A65;">:duration</span> 60<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"5d"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"2h"</span> <span style="color: #ff8A65;">:duration</span> 60<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"20d"</span> <span style="color: #ff8A65;">:actions</span> -email <span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"2d"</span> <span style="color: #ff8A65;">:audible</span> nil<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-notify-add 'long-50days
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"4d"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"30m"</span> <span style="color: #ff8A65;">:duration</span> 100<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"10d"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"4h"</span> <span style="color: #ff8A65;">:duration</span> 200<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"50d"</span> <span style="color: #ff8A65;">:actions</span> -email <span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"3d"</span> <span style="color: #ff8A65;">:audible</span> nil<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-notify-add 'long-100days
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"2d"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"1h"</span> <span style="color: #ff8A65;">:duration</span> 200<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"10d"</span> <span style="color: #ff8A65;">:actions</span> -notify/window
<span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"10h"</span> <span style="color: #ff8A65;">:duration</span> 300<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"50d"</span> <span style="color: #ff8A65;">:actions</span> -email <span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"3d"</span> <span style="color: #ff8A65;">:audible</span> nil<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:time</span> <span style="color: #9ccc65;">"100d"</span> <span style="color: #ff8A65;">:actions</span> -email <span style="color: #ff8A65;">:period</span> <span style="color: #9ccc65;">"5d"</span> <span style="color: #ff8A65;">:audible</span> nil<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>org-notify-start 10<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline206"></a>org-reveal<br /><div class="outline-text-5" id="text-10-3-1-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">ox-reveal</span>
<span style="color: #ff8A65;">:after</span> org
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> org-reveal-root
<span style="color: #EF6C00;">(</span>imalison:join-paths <span style="color: #9ccc65;">"file://"</span> imalison:projects-directory <span style="color: #9ccc65;">"reveal.js"</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline207"></a>org-caldav<br /><div class="outline-text-5" id="text-10-3-1-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">org-caldav</span>
<span style="color: #ff8A65;">:defer</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> org-caldav-url <span style="color: #9ccc65;">"https://www.google.com/calendar/dav"</span>
org-caldav-inbox imalison:org-inbox-file
org-caldav-files <span style="color: #B388FF;">(</span>list imalison:org-calendar-file<span style="color: #B388FF;">)</span>
org-icalendar-timezone <span style="color: #9ccc65;">"America/Los_Angeles"</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
<div id="outline-container-orgheadline212" class="outline-4">
<h4 id="orgheadline212"><span class="section-number-4">10.3.2</span> TeX</h4>
<div class="outline-text-4" id="text-10-3-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">tex</span>
<span style="color: #ff8A65;">:ensure</span> auctex
<span style="color: #ff8A65;">:commands</span> TeX-mode
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:TeX-mode-hook</span> <span style="color: #B388FF;">()</span>
<span style="color: #B388FF;">(</span>turn-on-reftex<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>TeX-source-correlate-mode +1<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>TeX-PDF-mode +1<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-j"</span> TeX-mode-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>TeX-global-PDF-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> TeX-auto-save t
TeX-parse-self t
TeX-save-query nil
TeX-PDF-mode t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>TeX-global-PDF-mode t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'TeX-mode-hook 'imalison:TeX-mode-hook<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<ol class="org-ol"><li><a id="orgheadline209"></a>latex<br /><div class="outline-text-5" id="text-10-3-2-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">latex</span>
<span style="color: #ff8A65;">:ensure</span> auctex
<span style="color: #ff8A65;">:after</span> tex
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-j"</span> LaTeX-mode-map<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline210"></a>auctex-latexmk<br /><div class="outline-text-5" id="text-10-3-2-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">auctex-latexmk</span>
<span style="color: #ff8A65;">:after</span> tex
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> auctex-latexmk-inherit-TeX-PDF-mode t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>auctex-latexmk-setup<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li>
<li><a id="orgheadline211"></a>company-auctex<br /><div class="outline-text-5" id="text-10-3-2-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">company-auctex</span>
<span style="color: #ff8A65;">:after</span> tex
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span>company-auctex-init<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
<div id="outline-container-orgheadline213" class="outline-4">
<h4 id="orgheadline213"><span class="section-number-4">10.3.3</span> markdown-mode</h4>
<div class="outline-text-4" id="text-10-3-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">markdown-mode</span>
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-hook 'markdown-mode-hook 'imalison:disable-linum-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline214" class="outline-4">
<h4 id="orgheadline214"><span class="section-number-4">10.3.4</span> plantuml-mode</h4>
<div class="outline-text-4" id="text-10-3-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">plantuml-mode</span>
<span style="color: #ff8A65;">:commands</span> plantuml-mode
<span style="color: #ff8A65;">:mode</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"\\.puml\\'"</span> <span style="color: #9ccc65;">"\\.plantuml\\'"</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cond</span> <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>equal system-type 'darwin<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>plantuml-dir
<span style="color: #795548;">(</span>s-trim <span style="color: #DCE775;">(</span>shell-command-to-string <span style="color: #9ccc65;">"brew --prefix plantuml"</span><span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>filename
<span style="color: #795548;">(</span><span style="color: #fff59d;">when</span> <span style="color: #DCE775;">(</span>file-exists-p plantuml-dir<span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span><span style="color: #fff59d;">--first</span> <span style="color: #e91e63;">(</span>s-ends-with? <span style="color: #9ccc65;">".jar"</span> <span style="color: #ffcc80;">it</span><span style="color: #e91e63;">)</span> <span style="color: #e91e63;">(</span>directory-files plantuml-dir<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>filepath <span style="color: #795548;">(</span><span style="color: #fff59d;">when</span> filename
<span style="color: #DCE775;">(</span>imalison:join-paths plantuml-dir filename<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">setq</span> plantuml-jar-path filepath
org-plantuml-jar-path filepath<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>equal system-type 'gnu/linux<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">let</span> <span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>filepath <span style="color: #9ccc65;">"/opt/plantuml/plantuml.jar"</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">setq</span> plantuml-jar-path filepath
org-plantuml-jar-path filepath<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list
'org-src-lang-modes '<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"plantuml"</span> . plantuml<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline215" class="outline-4">
<h4 id="orgheadline215"><span class="section-number-4">10.3.5</span> wsd-mode</h4>
<div class="outline-text-4" id="text-10-3-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">wsd-mode</span>
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>wsd-mode<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline219" class="outline-3">
<h3 id="orgheadline219"><span class="section-number-3">10.4</span> Utility</h3>
<div class="outline-text-3" id="text-10-4">
</div><div id="outline-container-orgheadline217" class="outline-4">
<h4 id="orgheadline217"><span class="section-number-4">10.4.1</span> restclient</h4>
<div class="outline-text-4" id="text-10-4-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">restclient</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"\\.restclient\\'"</span> . restclient-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">company-restclient</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline218" class="outline-4">
<h4 id="orgheadline218"><span class="section-number-4">10.4.2</span> jq-mode</h4>
<div class="outline-text-4" id="text-10-4-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">jq-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #9ccc65;">"\\.jq\\'"</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline224" class="outline-2">
<h2 id="orgheadline224"><span class="section-number-2">11</span> Programming</h2>
<div class="outline-text-2" id="text-11">
</div><div id="outline-container-orgheadline221" class="outline-3">
<h3 id="orgheadline221"><span class="section-number-3">11.1</span> realgud</h3>
<div class="outline-text-3" id="text-11-1">
<p>
realgud provides debugging support with many external debuggers in emacs
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">realgud</span>
<span style="color: #ff8A65;">:defer</span> 10<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline222" class="outline-3">
<h3 id="orgheadline222"><span class="section-number-3">11.2</span> emr</h3>
<div class="outline-text-3" id="text-11-2">
<p>
emr (emacs refactor) provides support for refactoring in many programming languages
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">emr</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #ff8A65;">:map</span> prog-mode-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-RET"</span> . emr-show-refactor-menu<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span> <span style="color: #2196F3;">(</span>emr-initialize<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline223" class="outline-3">
<h3 id="orgheadline223"><span class="section-number-3">11.3</span> semantic</h3>
<div class="outline-text-3" id="text-11-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">semantic</span>
<span style="color: #ff8A65;">:commands</span> semantic-mode
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-hook 'prog-mode-hook 'semantic-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline229" class="outline-2">
<h2 id="orgheadline229"><span class="section-number-2">12</span> Utility</h2>
<div class="outline-text-2" id="text-12">
</div><div id="outline-container-orgheadline225" class="outline-3">
<h3 id="orgheadline225"><span class="section-number-3">12.1</span> term</h3>
<div class="outline-text-3" id="text-12-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">term</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #ff8A65;">:map</span> term-raw-escape-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-x"</span> . helm-M-x<span style="color: #EF6C00;">)</span>
<span style="color: #ff8A65;">:map</span> term-raw-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-x"</span> . helm-M-x<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>define-key term-raw-map <span style="color: #B388FF;">(</span>kbd <span style="color: #9ccc65;">"C-h"</span><span style="color: #B388FF;">)</span> help-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'term-mode-hook 'imalison:disable-linum-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> term-buffer-maximum-size 0<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline226" class="outline-3">
<h3 id="orgheadline226"><span class="section-number-3">12.2</span> term-manager</h3>
<div class="outline-text-3" id="text-12-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:use-package</span> term-manager
<span style="color: #ff8A65;">:defer</span> t
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:set-escape-char</span> <span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;rest</span> _args<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span>term-escape-char<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>term-set-escape-char ?\C-x<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>advice-add
'term-manager-default-build-term <span style="color: #ff8A65;">:after</span> 'imalison:set-escape-char<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline227" class="outline-3">
<h3 id="orgheadline227"><span class="section-number-3">12.3</span> term-projectile</h3>
<div class="outline-text-3" id="text-12-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">imalison:use-package*</span> term-projectile <span style="color: #9ccc65;">"term-manager"</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"C-c 7"</span> . imalison:term-hydra-global/body<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>term-projectile-forward term-projectile-backward
term-projectile-default-directory-forward
term-projectile-default-directory-backward
term-projectile-create-new
term-projectile-create-new-default-directory<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">emit-prefix-selector</span> imalison:term
term-projectile-forward
term-projectile-create-new<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:term-hydra-original-default-directory</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defhydra</span> imalison:term-hydra-default-directory
<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:body-pre</span>
<span style="color: #76ff03;">(</span>term-projectile-default-directory-forward-restored<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #9ccc65;">"term - default-directory"</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"s"</span> term-projectile-switch-to<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"f"</span> term-projectile-default-directory-forward-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"b"</span> term-projectile-default-directory-backward-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"c"</span> term-projectile-default-directory-create-new-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"d"</span> term-projectile-default-directory-forward-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"g"</span> imalison:term-hydra-global/body-restored <span style="color: #ff8A65;">:exit</span> t<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"p"</span> imalison:term-hydra-projectile/body-restored <span style="color: #ff8A65;">:exit</span> t<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defhydra</span> imalison:term-hydra-projectile
<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:body-pre</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #26A69A;">(</span>term-projectile-forward-restored<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #9ccc65;">"term - projectile"</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"s"</span> term-projectile-switch-to<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"f"</span> term-projectile-forward-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"b"</span> term-projectile-backward-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"c"</span> term-projectile-create-new-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"d"</span> imalison:term-hydra-default-directory/body-restored <span style="color: #ff8A65;">:exit</span> t<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"g"</span> imalison:term-hydra-global/body-restored <span style="color: #ff8A65;">:exit</span> t<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"p"</span> term-projectile-forward-restored<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defhydra</span> imalison:term-hydra-global
<span style="color: #B388FF;">(</span><span style="color: #ff8A65;">:body-pre</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #26A69A;">(</span><span style="color: #fff59d;">setq</span> imalison:term-hydra-original-default-directory
default-directory<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #9ccc65;">"term - global"</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"s"</span> term-projectile-switch-to<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"f"</span> term-projectile-global-forward-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"b"</span> term-projectile-global-backward-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"c"</span> term-projectile-global-create-new-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"d"</span> imalison:term-hydra-default-directory/body-restored <span style="color: #ff8A65;">:exit</span> t<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"g"</span> term-projectile-global-forward-restored<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"p"</span> imalison:term-hydra-projectile/body-restored <span style="color: #ff8A65;">:exit</span> t<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>mapcar <span style="color: #B388FF;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #76ff03;">(</span>term-projectile-function<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">defalias</span> <span style="color: #26A69A;">(</span>imalison:concat-symbols term-projectile-function '-restored<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #FFCDD2;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">let</span> <span style="color: #795548;">(</span><span style="color: #DCE775;">(</span>default-directory imalison:term-hydra-original-default-directory<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>apply term-projectile-function args<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span>term-projectile-default-directory-forward
term-projectile-default-directory-backward
term-projectile-default-directory-create-new
term-projectile-forward
term-projectile-backward
term-projectile-create-new
term-projectile-global-forward
term-projectile-global-backward
term-projectile-global-create-new
imalison:term-hydra-global/body
imalison:term-hydra-projectile/body
imalison:term-hydra-default-directory/body<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline228" class="outline-3">
<h3 id="orgheadline228"><span class="section-number-3">12.4</span> crux</h3>
<div class="outline-text-3" id="text-12-4">
<p>
crux-reopen-as-root-mode makes it so that any file owned by root will automatically be opened as the root user.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">crux</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c C-s"</span> . crux-sudo-edit<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c C-r"</span> . crux-eval-and-replace<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c o"</span> . crux-open-with<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>crux-reopen-as-root-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline233" class="outline-2">
<h2 id="orgheadline233"><span class="section-number-2">13</span> Chat</h2>
<div class="outline-text-2" id="text-13">
</div><div id="outline-container-orgheadline230" class="outline-3">
<h3 id="orgheadline230"><span class="section-number-3">13.1</span> erc</h3>
<div class="outline-text-3" id="text-13-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">erc</span>
<span style="color: #ff8A65;">:commands</span> erc
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(add-to-list 'erc-modules 'notifications)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">logging:</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">erc-colorize</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span>erc-colorize-mode 1<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline231" class="outline-3">
<h3 id="orgheadline231"><span class="section-number-3">13.2</span> bitlbee</h3>
<div class="outline-text-3" id="text-13-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">bitlbee</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">bitlbee-password</span> <span style="color: #9ccc65;">"geheim"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'erc-join-hook 'bitlbee-identify<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">bitlbee-identify</span> <span style="color: #B388FF;">()</span>
<span style="color: #ffe4b5;">"If we're on the bitlbee server, send the identify command to the</span>
<span style="color: #ffe4b5;"> &amp;bitlbee channel."</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> <span style="color: #76ff03;">(</span><span style="color: #fff59d;">and</span> <span style="color: #26A69A;">(</span>string= <span style="color: #9ccc65;">"localhost"</span> erc-session-server<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>string= <span style="color: #9ccc65;">"&amp;bitlbee"</span> <span style="color: #FFCDD2;">(</span>buffer-name<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>erc-message <span style="color: #9ccc65;">"PRIVMSG"</span> <span style="color: #26A69A;">(</span>format <span style="color: #9ccc65;">"%s identify %s"</span>
<span style="color: #FFCDD2;">(</span>erc-default-target<span style="color: #FFCDD2;">)</span>
bitlbee-password<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline232" class="outline-3">
<h3 id="orgheadline232"><span class="section-number-3">13.3</span> slack</h3>
<div class="outline-text-3" id="text-13-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">slack</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline237" class="outline-2">
<h2 id="orgheadline237"><span class="section-number-2">14</span> Cooperation</h2>
<div class="outline-text-2" id="text-14">
</div><div id="outline-container-orgheadline234" class="outline-3">
<h3 id="orgheadline234"><span class="section-number-3">14.1</span> togetherly</h3>
<div class="outline-text-3" id="text-14-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">togetherly</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline235" class="outline-3">
<h3 id="orgheadline235"><span class="section-number-3">14.2</span> floobits</h3>
<div class="outline-text-3" id="text-14-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">floobits</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline236" class="outline-3">
<h3 id="orgheadline236"><span class="section-number-3">14.3</span> rudel</h3>
<div class="outline-text-3" id="text-14-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">rudel</span>
<span style="color: #ff8A65;">:disabled</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline289" class="outline-2">
<h2 id="orgheadline289"><span class="section-number-2">15</span> Other</h2>
<div class="outline-text-2" id="text-15">
</div><div id="outline-container-orgheadline238" class="outline-3">
<h3 id="orgheadline238"><span class="section-number-3">15.1</span> anzu</h3>
<div class="outline-text-3" id="text-15-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">anzu</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>global-anzu-mode +1<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>custom-set-variables
'<span style="color: #B388FF;">(</span>anzu-mode-lighter <span style="color: #9ccc65;">""</span><span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span>anzu-deactivate-region t<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span>anzu-search-threshold 1000<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span>anzu-replace-threshold 50<span style="color: #B388FF;">)</span>
'<span style="color: #B388FF;">(</span>anzu-replace-to-string-separator <span style="color: #9ccc65;">" =&gt; "</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>define-key isearch-mode-map <span style="color: #B388FF;">[</span>remap isearch-query-replace<span style="color: #B388FF;">]</span>
#'anzu-isearch-query-replace<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>define-key isearch-mode-map <span style="color: #B388FF;">[</span>remap isearch-query-replace-regexp<span style="color: #B388FF;">]</span>
#'anzu-isearch-query-replace-regexp<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline239" class="outline-3">
<h3 id="orgheadline239"><span class="section-number-3">15.2</span> fontawesome</h3>
<div class="outline-text-3" id="text-15-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">fontawesome</span>
<span style="color: #ff8A65;">:commands</span> helm-fontawesome<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline240" class="outline-3">
<h3 id="orgheadline240"><span class="section-number-3">15.3</span> shell-history</h3>
<div class="outline-text-3" id="text-15-3">
<p>
I think that shell-history is causing projectile to be very slow so I have disabled it.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">shell-history</span>
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:disabled</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline241" class="outline-3">
<h3 id="orgheadline241"><span class="section-number-3">15.4</span> iedit</h3>
<div class="outline-text-3" id="text-15-4">
<p>
I don't use iedit directly, but it is used by <a href="#orgheadline173">emr</a> and I need to disable <code>iedit-toggle-key-default</code> or else a buffer pops up complaing that the key has been bound to something else
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">iedit</span>
<span style="color: #ff8A65;">:defer</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline242" class="outline-3">
<h3 id="orgheadline242"><span class="section-number-3">15.5</span> tramp</h3>
<div class="outline-text-3" id="text-15-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">tramp</span>
<span style="color: #ff8A65;">:commands</span> tramp
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> tramp-default-method <span style="color: #9ccc65;">"scp"</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline243" class="outline-3">
<h3 id="orgheadline243"><span class="section-number-3">15.6</span> flycheck</h3>
<div class="outline-text-3" id="text-15-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">flycheck</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">flycheck-package</span>
<span style="color: #ff8A65;">:config</span> <span style="color: #B388FF;">(</span>flycheck-package-setup<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">imalison:use-package</span> flycheck-cask
<span style="color: #ff8A65;">:after</span> flycheck
<span style="color: #ff8A65;">:config</span>
<span style="color: #B388FF;">(</span>add-hook 'flycheck-mode-hook #'flycheck-cask-setup<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'flycheck-emacs-lisp-checkdoc-variables
'sentence-end-double-space<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>global-flycheck-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:diminish</span> flycheck-mode<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline244" class="outline-3">
<h3 id="orgheadline244"><span class="section-number-3">15.7</span> narrow-indirect</h3>
<div class="outline-text-3" id="text-15-7">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">narrow-indirect</span>
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>define-key ctl-x-4-map <span style="color: #9ccc65;">"nd"</span> 'ni-narrow-to-defun-indirect-other-window<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>define-key ctl-x-4-map <span style="color: #9ccc65;">"nn"</span> 'ni-narrow-to-region-indirect-other-window<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>define-key ctl-x-4-map <span style="color: #9ccc65;">"np"</span> 'ni-narrow-to-page-indirect-other-window<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline245" class="outline-3">
<h3 id="orgheadline245"><span class="section-number-3">15.8</span> editorconfig</h3>
<div class="outline-text-3" id="text-15-8">
<p>
I had to disable this mode because something that it does messes with coding settings and makes it so that I have to select the appropriate encoding every time I save gpg encrypted files.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">editorconfig</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-to-list 'editorconfig-exclude-modes '<span style="color: #B388FF;">(</span>org-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>editorconfig-mode 1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline246" class="outline-3">
<h3 id="orgheadline246"><span class="section-number-3">15.9</span> dtrt-indent</h3>
<div class="outline-text-3" id="text-15-9">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">dtrt-indent</span>
<span style="color: #ff8A65;">:commands</span> 'dtrt-indent-mode
<span style="color: #ff8A65;">:init</span> <span style="color: #2196F3;">(</span>add-hook 'prog-mode-hook 'dtrt-indent-mode<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> dtrt-indent-active-mode-line-info <span style="color: #9ccc65;">" [&#10236;]"</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline247" class="outline-3">
<h3 id="orgheadline247"><span class="section-number-3">15.10</span> indent-guide</h3>
<div class="outline-text-3" id="text-15-10">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">indent-guide</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>indent-guide-global-mode -1<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> indent-guide-delay 0.1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline248" class="outline-3">
<h3 id="orgheadline248"><span class="section-number-3">15.11</span> rainbow-delimiters</h3>
<div class="outline-text-3" id="text-15-11">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">rainbow-delimiters</span>
<span style="color: #ff8A65;">:commands</span> rainbow-delimiters-mode
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>add-hook 'prog-mode-hook <span style="color: #B388FF;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #76ff03;">()</span> <span style="color: #76ff03;">(</span>rainbow-delimiters-mode t<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline249" class="outline-3">
<h3 id="orgheadline249"><span class="section-number-3">15.12</span> undo-tree</h3>
<div class="outline-text-3" id="text-15-12">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">undo-tree</span>
<span style="color: #ff8A65;">:disabled</span> t <span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">this has been getting pretty annoying</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C--"</span> . undo-redo<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c u"</span> . undo-tree-visualize<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c r"</span> . undo-tree-redo<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span>diminish 'undo-tree-mode<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #b0bec5;">;;</span><span style="color: #b0bec5;">(setq undo-tree-visualizer-diff t) ;; This causes performance problems</span>
<span style="color: #EF6C00;">(</span>global-undo-tree-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> undo-tree-visualizer-timestamps t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline250" class="outline-3">
<h3 id="orgheadline250"><span class="section-number-3">15.13</span> recentf</h3>
<div class="outline-text-3" id="text-15-13">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">recentf</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> recentf-max-saved-items 1000
recentf-max-menu-items 1000<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>advice-add 'recentf-cleanup <span style="color: #ff8A65;">:around</span> 'imalison:shut-up-around<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>recentf-mode 1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline251" class="outline-3">
<h3 id="orgheadline251"><span class="section-number-3">15.14</span> key-chord</h3>
<div class="outline-text-3" id="text-15-14">
<p>
I have currently disabled key-chord because it may cause typing lag.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">key-chord</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:disable-keychord-around</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">function</span> <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">let</span> <span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>key-chord-mode-was-enabled <span style="color: #26A69A;">(</span><span style="color: #fff59d;">bound-and-true-p</span> key-chord-mode<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> key-chord-mode-was-enabled <span style="color: #76ff03;">(</span>key-chord-mode -1<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">condition-case</span> err <span style="color: #76ff03;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #26A69A;">(</span>apply function args<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span> <span style="color: #76ff03;">(</span><span style="color: #f36c60; font-weight: bold;">error</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> key-chord-mode-was-enabled <span style="color: #76ff03;">(</span>key-chord-mode 1<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>advice-add 'key-chord-mode <span style="color: #ff8A65;">:around</span> 'imalison:shut-up-around<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>key-chord-mode 1<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>advice-add 'imalison:avy <span style="color: #ff8A65;">:around</span> 'imalison:disable-keychord-around<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>key-chord-define-global <span style="color: #9ccc65;">"tg"</span> 'imalison:term-hydra/body<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>key-chord-define-global <span style="color: #9ccc65;">"pj"</span> 'imalison:projectile-find-file<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>key-chord-define-global <span style="color: #9ccc65;">"p["</span> 'projectile-switch-project<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>key-chord-define-global <span style="color: #9ccc65;">"fj"</span> 'imalison:do-ag<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>key-chord-define-global <span style="color: #9ccc65;">"jh"</span> 'imalison:avy<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline252" class="outline-3">
<h3 id="orgheadline252"><span class="section-number-3">15.15</span> nodejs-repl</h3>
<div class="outline-text-3" id="text-15-15">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">nodejs-repl</span>
<span style="color: #ff8A65;">:commands</span> nodejs-repl<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline253" class="outline-3">
<h3 id="orgheadline253"><span class="section-number-3">15.16</span> calc-mode</h3>
<div class="outline-text-3" id="text-15-16">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">calc-mode</span>
<span style="color: #ff8A65;">:ensure</span> nil
<span style="color: #ff8A65;">:commands</span> calc
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> calc-context-sensitive-enter t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline254" class="outline-3">
<h3 id="orgheadline254"><span class="section-number-3">15.17</span> helm-spotify</h3>
<div class="outline-text-3" id="text-15-17">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">helm-spotify</span>
<span style="color: #ff8A65;">:commands</span> helm-spotify<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline255" class="outline-3">
<h3 id="orgheadline255"><span class="section-number-3">15.18</span> jabber</h3>
<div class="outline-text-3" id="text-15-18">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">jabber</span>
<span style="color: #ff8A65;">:commands</span> jabber-connect
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> jabber-alert-presence-hooks nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">jabber-message-content-message</span> <span style="color: #B388FF;">(</span>from buffer text<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">when</span> <span style="color: #76ff03;">(</span><span style="color: #fff59d;">or</span> jabber-message-alert-same-buffer
<span style="color: #26A69A;">(</span>not <span style="color: #FFCDD2;">(</span>memq <span style="color: #795548;">(</span>selected-window<span style="color: #795548;">)</span> <span style="color: #795548;">(</span>get-buffer-window-list buffer<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">if</span> <span style="color: #26A69A;">(</span>jabber-muc-sender-p from<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>format <span style="color: #9ccc65;">"%s: %s"</span> <span style="color: #FFCDD2;">(</span>jabber-jid-resource from<span style="color: #FFCDD2;">)</span> text<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>format <span style="color: #9ccc65;">"%s: %s"</span> <span style="color: #FFCDD2;">(</span>jabber-jid-displayname from<span style="color: #FFCDD2;">)</span> text<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> jabber-alert-message-function 'jabber-message-content-message<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline256" class="outline-3">
<h3 id="orgheadline256"><span class="section-number-3">15.19</span> htmlize</h3>
<div class="outline-text-3" id="text-15-19">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">htmlize</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline257" class="outline-3">
<h3 id="orgheadline257"><span class="section-number-3">15.20</span> calfw</h3>
<div class="outline-text-3" id="text-15-20">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">calfw</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">calfw-org</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline258" class="outline-3">
<h3 id="orgheadline258"><span class="section-number-3">15.21</span> clocker</h3>
<div class="outline-text-3" id="text-15-21">
<p>
Not really sure what this is
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">clocker</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline259" class="outline-3">
<h3 id="orgheadline259"><span class="section-number-3">15.22</span> deft</h3>
<div class="outline-text-3" id="text-15-22">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">deft</span>
<span style="color: #ff8A65;">:commands</span> deft
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> deft-default-extension <span style="color: #9ccc65;">"org"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> deft-extensions '<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"org"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> deft-use-filter-string-for-filename t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> deft-file-naming-rules '<span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span>noslash . <span style="color: #9ccc65;">"_"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>nospace . <span style="color: #9ccc65;">"_"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>case-fn . downcase<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> deft-directory <span style="color: #9ccc65;">"~/SparkleShare/org/notes"</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline260" class="outline-3">
<h3 id="orgheadline260"><span class="section-number-3">15.23</span> epg</h3>
<div class="outline-text-3" id="text-15-23">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">epg</span>
<span style="color: #ff8A65;">:after</span> shut-up
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">shut-up</span>
<span style="color: #EF6C00;">(</span>epa-file-enable<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline261" class="outline-3">
<h3 id="orgheadline261"><span class="section-number-3">15.24</span> pinentry</h3>
<div class="outline-text-3" id="text-15-24">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">pinentry</span>
<span style="color: #ff8A65;">:defer</span> 5
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span>pinentry-start<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline262" class="outline-3">
<h3 id="orgheadline262"><span class="section-number-3">15.25</span> twittering-mode</h3>
<div class="outline-text-3" id="text-15-25">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">twittering-mode</span>
<span style="color: #ff8A65;">:commands</span> twittering-mode<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline263" class="outline-3">
<h3 id="orgheadline263"><span class="section-number-3">15.26</span> matrix-client</h3>
<div class="outline-text-3" id="text-15-26">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">matrix-client</span>
<span style="color: #ff8A65;">:disabled</span> t <span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">fails to load eieio on startup</span>
<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline264" class="outline-3">
<h3 id="orgheadline264"><span class="section-number-3">15.27</span> mu4e</h3>
<div class="outline-text-3" id="text-15-27">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">eval-when-compile</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">s</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">mu4e-elisp-directory</span>
<span style="color: #EF6C00;">(</span>s-trim <span style="color: #B388FF;">(</span>shell-command-to-string <span style="color: #9ccc65;">"mu4e_directory"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">mu4e</span>
<span style="color: #ff8A65;">:load-path</span> mu4e-elisp-directory
<span style="color: #ff8A65;">:ensure</span> nil
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>mu4e mu4e-view-message-with-msgid mu4e-update-index email<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"C-c 0"</span> . email<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">email</span> <span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;optional</span> arg<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #9ccc65;">"P"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">if</span> <span style="color: #76ff03;">(</span>string-equal <span style="color: #26A69A;">(</span>persp-name persp-curr<span style="color: #26A69A;">)</span> <span style="color: #9ccc65;">"email"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #26A69A;">(</span>delete-other-windows<span style="color: #26A69A;">)</span> <span style="color: #26A69A;">(</span>mu4e<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #26A69A;">(</span>persp-switch <span style="color: #9ccc65;">"email"</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">when</span> <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">or</span> <span style="color: #795548;">(</span>not <span style="color: #DCE775;">(</span>mu4e-running-p<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span> arg<span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span>delete-other-windows<span style="color: #FFCDD2;">)</span> <span style="color: #FFCDD2;">(</span>mu4e<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">enable inline images</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-view-show-images t<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">show images</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-show-images t<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Try to display html as text</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-view-prefer-html nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-html2text-command <span style="color: #9ccc65;">"html2text -width 80 -nobs -utf8"</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">use imagemagick, if available</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">when</span> <span style="color: #B388FF;">(</span>fboundp 'imagemagick-register-types<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>imagemagick-register-types<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mail-user-agent 'mu4e-user-agent<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">org-mu4e</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-compose-complete-only-after nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-maildir <span style="color: #9ccc65;">"~/Mail"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-drafts-folder <span style="color: #9ccc65;">"/[Gmail].Drafts"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-sent-folder <span style="color: #9ccc65;">"/[Gmail].Sent Mail"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-trash-folder <span style="color: #9ccc65;">"/[Gmail].Trash"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-sent-messages-behavior 'delete<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-headers-skip-duplicates t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-update-interval <span style="color: #B388FF;">(</span>* 60 20<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> message-kill-buffer-on-exit t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mail-user-agent 'mu4e-user-agent<span style="color: #EF6C00;">)</span> <span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">make mu4e the default mail client</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">don't save message to Sent Messages, Gmail/IMAP takes care of this</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-sent-messages-behavior 'delete<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">allow for updating mail using 'U' in the main view:</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> mu4e-get-mail-command <span style="color: #9ccc65;">"timeout 60 offlineimap"</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'mu4e-compose-mode-hook
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">my-do-compose-stuff</span> <span style="color: #76ff03;">()</span> <span style="color: #76ff03;">(</span>flyspell-mode<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'mu4e-headers-actions '<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"view in browser"</span> . mu4e-action-view-in-browser<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-to-list 'mu4e-view-actions '<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"view in browser"</span> . mu4e-action-view-in-browser<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">mu4e-view</span> <span style="color: #B388FF;">(</span>msg headersbuf<span style="color: #B388FF;">)</span>
<span style="color: #ffe4b5;">"Display the message MSG in a new buffer, and keep in sync with HDRSBUF.</span>
<span style="color: #ffe4b5;"> 'In sync' here means that moving to the next/previous message in</span>
<span style="color: #ffe4b5;"> the the message view affects HDRSBUF, as does marking etc.</span>
<span style="color: #ffe4b5;"> As a side-effect, a message that is being viewed loses its 'unread'</span>
<span style="color: #ffe4b5;"> marking if it still had that."</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>embedded <span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">is it as an embedded msg (ie. message/rfc822 att)?</span>
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">when</span> <span style="color: #795548;">(</span>gethash <span style="color: #DCE775;">(</span>mu4e-message-field msg <span style="color: #ff8A65;">:path</span><span style="color: #DCE775;">)</span>
mu4e~path-parent-docid-map<span style="color: #795548;">)</span> <span style="color: #f36c60; font-weight: bold;">t</span><span style="color: #FFCDD2; font-weight: bold;">)</span><span style="color: #26A69A; font-weight: bold;">)</span>
<span style="color: #26A69A;">(</span>buf
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">if</span> embedded
<span style="color: #795548;">(</span>mu4e~view-embedded-winbuf<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>get-buffer-create mu4e~view-buffer-name<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">note: mu4e~view-mark-as-read will pseudo-recursively call mu4e-view again</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">by triggering mu4e~view again as it marks the message as read</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">with-current-buffer</span> buf
<span style="color: #26A69A;">(</span>switch-to-buffer buf<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">setq</span> mu4e~view-msg msg<span style="color: #26A69A;">)</span>
<span style="color: #b0bec5;">;;</span><span style="color: #b0bec5;">(or embedded (not (mu4e~view-mark-as-read msg)))</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">when</span> <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">or</span> <span style="color: #795548;">(</span>mu4e~view-mark-as-read msg<span style="color: #795548;">)</span> t<span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">let</span> <span style="color: #795548;">(</span><span style="color: #DCE775;">(</span>inhibit-read-only t<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>erase-buffer<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>mu4e~delete-all-overlays<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>insert <span style="color: #DCE775;">(</span>mu4e-view-message-text msg<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>goto-char <span style="color: #DCE775;">(</span>point-min<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>mu4e~fontify-cited<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>mu4e~fontify-signature<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>mu4e~view-make-urls-clickable<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>mu4e~view-show-images-maybe msg<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span><span style="color: #fff59d;">setq</span>
mu4e~view-buffer buf
mu4e~view-headers-buffer headersbuf<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span><span style="color: #fff59d;">when</span> embedded <span style="color: #DCE775;">(</span>local-set-key <span style="color: #9ccc65;">"q"</span> 'kill-buffer-and-window<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>mu4e-view-mode<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">smtpmail</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">alternatively, for emacs-24 you can use:</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> message-send-mail-function 'smtpmail-send-it
smtpmail-stream-type 'starttls
smtpmail-default-smtp-server <span style="color: #9ccc65;">"smtp.gmail.com"</span>
smtpmail-smtp-server <span style="color: #9ccc65;">"smtp.gmail.com"</span>
smtpmail-smtp-service 587<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline265" class="outline-3">
<h3 id="orgheadline265"><span class="section-number-3">15.28</span> gmail-message-mode</h3>
<div class="outline-text-3" id="text-15-28">
<p>
This is useful with server mode when editing gmail messages. I think that it is not currently working, or it may need to be manually enabled.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">gmail-message-mode</span>
<span style="color: #ff8A65;">:demand</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline266" class="outline-3">
<h3 id="orgheadline266"><span class="section-number-3">15.29</span> ham-mode</h3>
<div class="outline-text-3" id="text-15-29">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">ham-mode</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> ham-mode-html-to-markdown-command '<span style="color: #B388FF;">(</span><span style="color: #9ccc65;">"pandoc"</span> <span style="color: #9ccc65;">"--from"</span> <span style="color: #9ccc65;">"html"</span> <span style="color: #9ccc65;">"--to"</span> <span style="color: #9ccc65;">"markdown"</span> file<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline267" class="outline-3">
<h3 id="orgheadline267"><span class="section-number-3">15.30</span> alert</h3>
<div class="outline-text-3" id="text-15-30">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">alert</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">alert-notifier-notify</span> <span style="color: #B388FF;">(</span>info<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">if</span> alert-notifier-command
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">let</span> <span style="color: #26A69A;">(</span><span style="color: #FFCDD2;">(</span>args
<span style="color: #795548;">(</span>list <span style="color: #9ccc65;">"-title"</span> <span style="color: #DCE775;">(</span>alert-encode-string <span style="color: #e91e63;">(</span>plist-get info <span style="color: #ff8A65;">:title</span><span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
<span style="color: #9ccc65;">"-activate"</span> <span style="color: #9ccc65;">"org.gnu.Emacs"</span>
<span style="color: #9ccc65;">"-message"</span> <span style="color: #DCE775;">(</span>alert-encode-string <span style="color: #e91e63;">(</span>plist-get info <span style="color: #ff8A65;">:message</span><span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
<span style="color: #9ccc65;">"-execute"</span> <span style="color: #DCE775;">(</span>format <span style="color: #9ccc65;">"\"%s\""</span> <span style="color: #e91e63;">(</span>switch-to-buffer-command <span style="color: #2196F3;">(</span>plist-get info <span style="color: #ff8A65;">:buffer</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>apply #'call-process alert-notifier-command nil nil nil args<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>alert-message-notify info<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">switch-to-buffer-command</span> <span style="color: #B388FF;">(</span>buffer-name<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>emacsclient-command <span style="color: #76ff03;">(</span>format <span style="color: #9ccc65;">"(switch-to-buffer \\\"%s\\\")"</span> buffer-name<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">emacsclient-command</span> <span style="color: #B388FF;">(</span>command<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>format <span style="color: #9ccc65;">"emacsclient --server-file='%s' -e '%s'"</span> server-name command<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> alert-default-style 'notifier<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline268" class="outline-3">
<h3 id="orgheadline268"><span class="section-number-3">15.31</span> sauron</h3>
<div class="outline-text-3" id="text-15-31">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">sauron</span>
<span style="color: #ff8A65;">:defer</span> 5
<span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>sauron-start sauron-start-hidden<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">when</span> <span style="color: #B388FF;">(</span>eq system-type 'darwin<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> sauron-modules '<span style="color: #76ff03;">(</span>sauron-erc sauron-org sauron-notifications
sauron-twittering sauron-jabber sauron-identica<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">sauron-dbus-start</span> <span style="color: #76ff03;">()</span>
nil<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>makunbound 'dbus-path-emacs<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>sauron-start-hidden<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">This should really check (featurep 'dbus) but for some reason</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">this is always true even if support is not there.</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> sauron-prio-sauron-started 2<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> sauron-min-priority 3<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(setq sauron-dbus-cookie t) ;; linux only?</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> sauron-separate-frame nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> sauron-nick-insensitivity 1<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">sauron:jabber-notify</span> <span style="color: #B388FF;">(</span>origin priority message <span style="color: #84ffff;">&amp;optional</span> properties<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>funcall notify-function <span style="color: #9ccc65;">"gtalk"</span> message<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">sauron:erc-notify</span> <span style="color: #B388FF;">(</span>origin priority message <span style="color: #84ffff;">&amp;optional</span> properties<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>event <span style="color: #FFCDD2;">(</span>plist-get properties <span style="color: #ff8A65;">:event</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>funcall notify-function <span style="color: #9ccc65;">"IRC"</span> message<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">sauron:mu4e-notify</span> <span style="color: #B388FF;">(</span>origin priority message <span style="color: #84ffff;">&amp;optional</span> properties<span style="color: #B388FF;">)</span>
nil<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">sauron:dbus-notify</span> <span style="color: #B388FF;">(</span>origin priority message <span style="color: #84ffff;">&amp;optional</span> properties<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>funcall notify-function <span style="color: #9ccc65;">"GMail"</span> message<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">sauron:dispatch-notify</span> <span style="color: #B388FF;">(</span>origin priority message <span style="color: #84ffff;">&amp;optional</span> properties<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>handler <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">cond</span> <span style="color: #795548;">(</span><span style="color: #DCE775;">(</span>string= origin <span style="color: #9ccc65;">"erc"</span><span style="color: #DCE775;">)</span> 'sauron:erc-notify<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span><span style="color: #DCE775;">(</span>string= origin <span style="color: #9ccc65;">"jabber"</span><span style="color: #DCE775;">)</span> 'sauron:jabber-notify<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span><span style="color: #DCE775;">(</span>string= origin <span style="color: #9ccc65;">"mu4e"</span><span style="color: #DCE775;">)</span> 'sauron:mu4e-notify<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span><span style="color: #DCE775;">(</span>string= origin <span style="color: #9ccc65;">"dbus"</span><span style="color: #DCE775;">)</span> 'sauron:dbus-notify<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>t <span style="color: #DCE775;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #e91e63;">(</span><span style="color: #84ffff;">&amp;rest</span> r<span style="color: #e91e63;">)</span> nil<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>funcall handler origin priority message properties<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Prefering alert.el for now ;; (add-hook 'sauron-event-added-functions 'sauron:dispatch-notify)</span>
<span style="color: #EF6C00;">(</span>sauron-start-hidden<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>add-hook 'sauron-event-added-functions 'sauron-alert-el-adapter<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline269" class="outline-3">
<h3 id="orgheadline269"><span class="section-number-3">15.32</span> screenshot</h3>
<div class="outline-text-3" id="text-15-32">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">screenshot</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline270" class="outline-3">
<h3 id="orgheadline270"><span class="section-number-3">15.33</span> libmpdee</h3>
<div class="outline-text-3" id="text-15-33">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">libmpdee</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline271" class="outline-3">
<h3 id="orgheadline271"><span class="section-number-3">15.34</span> flyspell</h3>
<div class="outline-text-3" id="text-15-34">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">flyspell</span>
<span style="color: #ff8A65;">:disabled</span> t <span style="color: #b0bec5;">; </span><span style="color: #b0bec5;">kind of annoying</span>
<span style="color: #ff8A65;">:preface</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> flyspell-issue-welcome-flag nil<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>diminish 'flyspell-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">bind-key</span> <span style="color: #9ccc65;">"M-s"</span> 'flyspell-correct-word-before-point flyspell-mode-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">unbind-key</span> <span style="color: #9ccc65;">"C-;"</span> flyspell-mode-map<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">flyspell-emacs-popup-textual</span> <span style="color: #B388FF;">(</span>event poss word<span style="color: #B388FF;">)</span>
<span style="color: #ffe4b5;">"A textual flyspell popup menu."</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>corrects <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">if</span> flyspell-sort-corrections
<span style="color: #795548;">(</span>sort <span style="color: #DCE775;">(</span>car <span style="color: #e91e63;">(</span>cdr <span style="color: #2196F3;">(</span>cdr poss<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span> 'string&lt;<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>car <span style="color: #DCE775;">(</span>cdr <span style="color: #e91e63;">(</span>cdr poss<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>cor-menu <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">if</span> <span style="color: #795548;">(</span>consp corrects<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>mapcar <span style="color: #DCE775;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #e91e63;">(</span>correct<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>list correct correct<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
corrects<span style="color: #795548;">)</span>
'<span style="color: #795548;">()</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>affix <span style="color: #FFCDD2;">(</span>car <span style="color: #795548;">(</span>cdr <span style="color: #DCE775;">(</span>cdr <span style="color: #e91e63;">(</span>cdr poss<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
show-affix-info
<span style="color: #26A69A;">(</span>base-menu <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">let</span> <span style="color: #795548;">(</span><span style="color: #DCE775;">(</span>save <span style="color: #e91e63;">(</span><span style="color: #fff59d;">if</span> <span style="color: #2196F3;">(</span><span style="color: #fff59d;">and</span> <span style="color: #EF6C00;">(</span>consp affix<span style="color: #EF6C00;">)</span> show-affix-info<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>list
<span style="color: #EF6C00;">(</span>list <span style="color: #B388FF;">(</span>concat <span style="color: #9ccc65;">"Save affix: "</span>
<span style="color: #76ff03;">(</span>car affix<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
'save<span style="color: #EF6C00;">)</span>
'<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"Accept (session)"</span> session<span style="color: #EF6C00;">)</span>
'<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"Accept (buffer)"</span> buffer<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
'<span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"Save word"</span> save<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"Accept (session)"</span> session<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"Accept (buffer)"</span> buffer<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span><span style="color: #fff59d;">if</span> <span style="color: #DCE775;">(</span>consp cor-menu<span style="color: #DCE775;">)</span>
<span style="color: #DCE775;">(</span>append cor-menu <span style="color: #e91e63;">(</span>cons <span style="color: #9ccc65;">""</span> save<span style="color: #e91e63;">)</span><span style="color: #DCE775;">)</span>
save<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>menu <span style="color: #FFCDD2;">(</span>mapcar
<span style="color: #795548;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #DCE775;">(</span>arg<span style="color: #DCE775;">)</span> <span style="color: #DCE775;">(</span><span style="color: #fff59d;">if</span> <span style="color: #e91e63;">(</span>consp arg<span style="color: #e91e63;">)</span> <span style="color: #e91e63;">(</span>car arg<span style="color: #e91e63;">)</span> arg<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
base-menu<span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>cadr <span style="color: #26A69A;">(</span>assoc <span style="color: #FFCDD2;">(</span>popup-menu* menu <span style="color: #ff8A65;">:scroll-bar</span> t<span style="color: #FFCDD2;">)</span> base-menu<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>fset 'flyspell-emacs-popup 'flyspell-emacs-popup-textual<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline272" class="outline-3">
<h3 id="orgheadline272"><span class="section-number-3">15.35</span> web-mode</h3>
<div class="outline-text-3" id="text-15-35">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">web-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"\\.tmpl\\'"</span> . web-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"\\.cql\\'"</span> . web-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defvar-setq</span> web-mode-content-types-alist
'<span style="color: #B388FF;">(</span><span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"gtl"</span> . <span style="color: #9ccc65;">"\\.tmpl\\'"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #9ccc65;">"gtl"</span> . <span style="color: #9ccc65;">"\\.cql\\'"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline273" class="outline-3">
<h3 id="orgheadline273"><span class="section-number-3">15.36</span> helm-themes</h3>
<div class="outline-text-3" id="text-15-36">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">helm-themes</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline274" class="outline-3">
<h3 id="orgheadline274"><span class="section-number-3">15.37</span> helm-swoop</h3>
<div class="outline-text-3" id="text-15-37">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">helm-swoop</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"C-S-s"</span> . helm-swoop<span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:commands</span> helm-swoop<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline275" class="outline-3">
<h3 id="orgheadline275"><span class="section-number-3">15.38</span> perspective</h3>
<div class="outline-text-3" id="text-15-38">
<p>
I've disabled perspective because I just don't use it much.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">perspective</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:demand</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>persp-mode<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">persp-get-perspectives-for-buffer</span> <span style="color: #B388FF;">(</span>buffer<span style="color: #B388FF;">)</span>
<span style="color: #ffe4b5;">"Get the names of all of the perspectives of which `buffer` is a member."</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">cl-loop</span> for perspective being the hash-value of perspectives-hash
if <span style="color: #76ff03;">(</span>member buffer <span style="color: #26A69A;">(</span>persp-buffers perspective<span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
collect <span style="color: #76ff03;">(</span>persp-name perspective<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">persp-pick-perspective-by-buffer</span> <span style="color: #B388FF;">(</span>buffer<span style="color: #B388FF;">)</span>
<span style="color: #ffe4b5;">"Select a buffer and go to the perspective to which that buffer</span>
<span style="color: #ffe4b5;"> belongs. If the buffer belongs to more than one perspective</span>
<span style="color: #ffe4b5;"> completion will be used to pick the perspective to switch to.</span>
<span style="color: #ffe4b5;"> Switch the focus to the window in which said buffer is displayed</span>
<span style="color: #ffe4b5;"> if such a window exists. Otherwise display the buffer in whatever</span>
<span style="color: #ffe4b5;"> window is active in the perspective."</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #76ff03;">(</span>list <span style="color: #26A69A;">(</span>funcall persp-interactive-completion-function
<span style="color: #9ccc65;">"Buffer: "</span> <span style="color: #FFCDD2;">(</span>mapcar 'buffer-name <span style="color: #795548;">(</span>buffer-list<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">let*</span> <span style="color: #76ff03;">(</span><span style="color: #26A69A;">(</span>perspectives <span style="color: #FFCDD2;">(</span>persp-get-perspectives-for-buffer <span style="color: #795548;">(</span>get-buffer buffer<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span>perspective <span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">if</span> <span style="color: #795548;">(</span>&gt; <span style="color: #DCE775;">(</span>length perspectives<span style="color: #DCE775;">)</span> 1<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>funcall persp-interactive-completion-function
<span style="color: #DCE775;">(</span>format <span style="color: #9ccc65;">"Select the perspective in which you would like to visit %s."</span>
buffer<span style="color: #DCE775;">)</span>
perspectives<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>car perspectives<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span><span style="color: #fff59d;">if</span> <span style="color: #26A69A;">(</span>string= <span style="color: #FFCDD2;">(</span>persp-name persp-curr<span style="color: #FFCDD2;">)</span> perspective<span style="color: #26A69A;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">This allows the opening of a single buffer in more than one window</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">in a single perspective.</span>
<span style="color: #26A69A;">(</span>switch-to-buffer buffer<span style="color: #26A69A;">)</span>
<span style="color: #26A69A;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #FFCDD2;">(</span>persp-switch perspective<span style="color: #FFCDD2;">)</span>
<span style="color: #FFCDD2;">(</span><span style="color: #fff59d;">if</span> <span style="color: #795548;">(</span>get-buffer-window buffer<span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>set-frame-selected-window nil <span style="color: #DCE775;">(</span>get-buffer-window buffer<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span>
<span style="color: #795548;">(</span>switch-to-buffer buffer<span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">persp-mode-switch-buffers</span> <span style="color: #B388FF;">(</span>arg<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #9ccc65;">"P"</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">if</span> arg <span style="color: #76ff03;">(</span>call-interactively 'ido-switch-buffer<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>call-interactively 'persp-pick-perspective-by-buffer<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>define-key persp-mode-map <span style="color: #B388FF;">(</span>kbd <span style="color: #9ccc65;">"C-x b"</span><span style="color: #B388FF;">)</span> 'persp-mode-switch-buffers<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"C-c 9"</span> . persp-switch<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline276" class="outline-3">
<h3 id="orgheadline276"><span class="section-number-3">15.39</span> smex</h3>
<div class="outline-text-3" id="text-15-39">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">smex</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">Using helm-M-x instead</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:commands</span> smex
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">This is here because smex feels like part of ido</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #9ccc65;">"M-x"</span> . smex<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline277" class="outline-3">
<h3 id="orgheadline277"><span class="section-number-3">15.40</span> java</h3>
<div class="outline-text-3" id="text-15-40">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>add-hook 'java-mode-hook
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #EF6C00;">()</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> c-basic-offset 4
tab-width 4
indent-tabs-mode t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline278" class="outline-3">
<h3 id="orgheadline278"><span class="section-number-3">15.41</span> android-mode</h3>
<div class="outline-text-3" id="text-15-41">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">android-mode</span>
<span style="color: #ff8A65;">:after</span> s
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> android-mode-sdk-dir
<span style="color: #B388FF;">(</span>s-trim <span style="color: #76ff03;">(</span>shell-command-to-string <span style="color: #9ccc65;">"android_sdk_directory"</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline279" class="outline-3">
<h3 id="orgheadline279"><span class="section-number-3">15.42</span> gradle-mode</h3>
<div class="outline-text-3" id="text-15-42">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">gradle-mode</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline280" class="outline-3">
<h3 id="orgheadline280"><span class="section-number-3">15.43</span> jsx-mode</h3>
<div class="outline-text-3" id="text-15-43">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">jsx-mode</span>
<span style="color: #ff8A65;">:mode</span> <span style="color: #9ccc65;">"\\.jsx\\'"</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline281" class="outline-3">
<h3 id="orgheadline281"><span class="section-number-3">15.44</span> css</h3>
<div class="outline-text-3" id="text-15-44">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span>eval-after-load 'css-mode
'<span style="color: #2196F3;">(</span>define-key css-mode-map <span style="color: #EF6C00;">(</span>kbd <span style="color: #9ccc65;">"C-c b"</span><span style="color: #EF6C00;">)</span> 'web-beautify-css<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline282" class="outline-3">
<h3 id="orgheadline282"><span class="section-number-3">15.45</span> robe</h3>
<div class="outline-text-3" id="text-15-45">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">robe</span>
<span style="color: #ff8A65;">:commands</span> robe-mode
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span> <span style="color: #EF6C00;">(</span>add-hook 'ruby-mode-hook 'robe-mode<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline283" class="outline-3">
<h3 id="orgheadline283"><span class="section-number-3">15.46</span> rinari</h3>
<div class="outline-text-3" id="text-15-46">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">rinari</span>
<span style="color: #ff8A65;">:after</span> ruby-mode<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline284" class="outline-3">
<h3 id="orgheadline284"><span class="section-number-3">15.47</span> helm-gtags</h3>
<div class="outline-text-3" id="text-15-47">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">helm-gtags</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> helm-gtags-ignore-case t
helm-gtags-auto-update t
helm-gtags-use-input-at-cursor t
helm-gtags-pulse-at-cursor t
helm-gtags-prefix-key <span style="color: #9ccc65;">"\C-cg"</span>
helm-gtags-suggested-key-mapping t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">cl-loop</span> for hook in '<span style="color: #B388FF;">(</span>dired-mode-hook eshell-mode-hook c-mode-hook
c++-mode-hook asm-mode-hook<span style="color: #B388FF;">)</span>
do <span style="color: #B388FF;">(</span>add-hook hook 'helm-gtags-mode<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:bind</span> <span style="color: #2196F3;">(</span><span style="color: #ff8A65;">:map</span> helm-gtags-mode-map
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c g a"</span> . helm-gtags-tags-in-this-function<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-j"</span> . helm-gtags-select<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-."</span> . helm-gtags-dwim<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"M-,"</span> . helm-gtags-pop-stack<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c &lt;"</span> . helm-gtags-previous-history<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #9ccc65;">"C-c &gt;"</span> . helm-gtags-next-history<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline285" class="outline-3">
<h3 id="orgheadline285"><span class="section-number-3">15.48</span> sgml-mode</h3>
<div class="outline-text-3" id="text-15-48">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">sgml-mode</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">:bind ("C-c b" . web-beautify-html) TODO: mode specific, change binding</span>
<span style="color: #ff8A65;">:commands</span> sgml-mode<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline286" class="outline-3">
<h3 id="orgheadline286"><span class="section-number-3">15.49</span> evil</h3>
<div class="outline-text-3" id="text-15-49">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">evil</span> <span style="color: #ff8A65;">:commands</span> <span style="color: #2196F3;">(</span>evil-mode<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline288" class="outline-3">
<h3 id="orgheadline288"><span class="section-number-3">15.50</span> hackernews</h3>
<div class="outline-text-3" id="text-15-50">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">hackernews</span> <span style="color: #ff8A65;">:commands</span> hackernews<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
<ol class="org-ol"><li><a id="orgheadline287"></a>structured-haskell-mode<br /><div class="outline-text-5" id="text-15-50-0-1">
<p>
This needs a hackage install and I've never used it before. Just putting this here for later.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">shm</span>
<span style="color: #ff8A65;">:disabled</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div></li></ol>
</div>
</div>
<div id="outline-container-orgheadline304" class="outline-2">
<h2 id="orgheadline304"><span class="section-number-2">16</span> Appearance</h2>
<div class="outline-text-2" id="text-16">
</div><div id="outline-container-orgheadline290" class="outline-3">
<h3 id="orgheadline290"><span class="section-number-3">16.1</span> Basic Config</h3>
<div class="outline-text-3" id="text-16-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> inhibit-startup-screen t<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>blink-cursor-mode -1<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline291" class="outline-3">
<h3 id="orgheadline291"><span class="section-number-3">16.2</span> Themes</h3>
<div class="outline-text-3" id="text-16-2">
<p>
Ensure all themes that I use are installed:
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">solarized-theme</span>
<span style="color: #ff8A65;">:init</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> solarized-high-contrast-mode-line t<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar-setq</span> packages-appearance
'<span style="color: #2196F3;">(</span>monokai-theme solarized-theme zenburn-theme base16-theme molokai-theme
tango-2-theme gotham-theme sublime-themes rainbow-delimiters waher-theme
ample-theme material-theme zerodark-theme color-theme-modern leuven-theme
spacemacs-theme gruvbox-theme forest-blue-theme flatland-theme afternoon-theme<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>ensure-packages-installed packages-appearance<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline292" class="outline-3">
<h3 id="orgheadline292"><span class="section-number-3">16.3</span> all-the-icons</h3>
<div class="outline-text-3" id="text-16-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">all-the-icons</span>
<span style="color: #ff8A65;">:demand</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline295" class="outline-3">
<h3 id="orgheadline295"><span class="section-number-3">16.4</span> spaceline</h3>
<div class="outline-text-3" id="text-16-4">
</div><div id="outline-container-orgheadline293" class="outline-4">
<h4 id="orgheadline293"><span class="section-number-4">16.4.1</span> Disable sRGB colorspace to make powerline separators work</h4>
<div class="outline-text-4" id="text-16-4-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> ns-use-srgb-colorspace nil<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline294" class="outline-4">
<h4 id="orgheadline294"><span class="section-number-4">16.4.2</span> config</h4>
<div class="outline-text-4" id="text-16-4-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">spaceline-config</span>
<span style="color: #ff8A65;">:ensure</span> spaceline
<span style="color: #ff8A65;">:commands</span> spaceline-compile
<span style="color: #ff8A65;">:preface</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">spaceline-gh-notifier-disable-default-notifier-modeline</span> <span style="color: #B388FF;">(</span><span style="color: #84ffff;">&amp;rest</span> args<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>delq 'github-notifier-mode-line global-mode-string<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span>advice-add 'github-notifier-mode <span style="color: #ff8A65;">:after</span>
'spaceline-gh-notifier-disable-default-notifier-modeline<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>advice-add 'github-notifier-update <span style="color: #ff8A65;">:after</span>
'spaceline-gh-notifier-disable-default-notifier-modeline<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> powerline-default-separator <span style="color: #B388FF;">(</span>random-choice '<span style="color: #76ff03;">(</span>butt slant wave<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> spaceline-workspace-numbers-unicode t
spaceline-window-numbers-unicode t<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">if</span> <span style="color: #B388FF;">(</span>display-graphic-p<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq-default</span> powerline-default-separator 'wave<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq-default</span> powerline-default-separator 'utf-8<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">spaceline-define-segment</span> imalison:muni
<span style="color: #ffe4b5;">"Display the number of minutes until the next muni train comes"</span>
<span style="color: #B388FF;">(</span>format <span style="color: #9ccc65;">"&#128647;%s"</span> <span style="color: #76ff03;">(</span>imalison:get-cached-muni-time<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #ff8A65;">:when</span> active<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">spaceline-define-segment</span> spaceline-gh-notifier
<span style="color: #ffe4b5;">"Display the number of github notifications the user has"</span>
<span style="color: #B388FF;">(</span>format <span style="color: #9ccc65;">"&#9993;%s"</span> github-notifier-unread-count<span style="color: #B388FF;">)</span>
<span style="color: #ff8A65;">:when</span> <span style="color: #B388FF;">(</span>&gt; github-notifier-unread-count 0<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>advice-add 'pl/separator-height <span style="color: #ff8A65;">:around</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">lambda</span> <span style="color: #76ff03;">(</span><span style="color: #fff59d;">function</span> <span style="color: #84ffff;">&amp;rest</span> args<span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>+ <span style="color: #26A69A;">(</span>apply function args<span style="color: #26A69A;">)</span> 10<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">This needs to be executed after setting the font because the separators</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">need to get regenerated</span>
<span style="color: #EF6C00;">(</span>advice-add 'imalison:set-font-size <span style="color: #ff8A65;">:after</span> 'spaceline-compile<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>spaceline-helm-mode<span style="color: #EF6C00;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">'spaceline-gh-notifier and 'imalison:muni disabled for now</span>
<span style="color: #EF6C00;">(</span>spaceline-spacemacs-theme<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline296" class="outline-3">
<h3 id="orgheadline296"><span class="section-number-3">16.5</span> helm-themes</h3>
<div class="outline-text-3" id="text-16-5">
<p>
helm-themes provides an easy way to switch between emacs-themes.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">helm-themes</span>
<span style="color: #ff8A65;">:after</span> helm<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline297" class="outline-3">
<h3 id="orgheadline297"><span class="section-number-3">16.6</span> window-number</h3>
<div class="outline-text-3" id="text-16-6">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">window-number</span>
<span style="color: #ff8A65;">:defer</span> t<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline298" class="outline-3">
<h3 id="orgheadline298"><span class="section-number-3">16.7</span> Whitespace Setup</h3>
<div class="outline-text-3" id="text-16-7">
<p>
Make whitespace-mode use just basic coloring:
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> whitespace-style
'<span style="color: #2196F3;">(</span>spaces tabs newline space-mark tab-mark newline-mark<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
<p>
Set the character used to represent spaces to ·, and the character used for tabs to be ▷.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">setq</span> whitespace-display-mappings
'<span style="color: #2196F3;">(</span><span style="color: #EF6C00;">(</span>space-mark 32 <span style="color: #B388FF;">[</span>183<span style="color: #B388FF;">]</span> <span style="color: #B388FF;">[</span>46<span style="color: #B388FF;">]</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>tab-mark 9 <span style="color: #B388FF;">[</span>9655 9<span style="color: #B388FF;">]</span> <span style="color: #B388FF;">[</span>92 9<span style="color: #B388FF;">]</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline299" class="outline-3">
<h3 id="orgheadline299"><span class="section-number-3">16.8</span> Colorize Compliation Buffers</h3>
<div class="outline-text-3" id="text-16-8">
<p>
This automatically applies ansi-color interpretation of terminal escape sequences to compilation buffers
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">colorize-compilation-buffer</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span>read-only-mode<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>ansi-color-apply-on-region <span style="color: #EF6C00;">(</span>point-min<span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span>point-max<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>read-only-mode<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'compilation-filter-hook 'colorize-compilation-buffer<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline300" class="outline-3">
<h3 id="orgheadline300"><span class="section-number-3">16.9</span> Automatic Theme Changer</h3>
<div class="outline-text-3" id="text-16-9">
<p>
Disabled for now
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">use-package</span> <span style="color: #8bc34a;">theme-changer</span>
<span style="color: #ff8A65;">:disabled</span> t
<span style="color: #ff8A65;">:config</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">destructuring-bind</span> <span style="color: #B388FF;">(</span>latitude longitude<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>imalison:get-lat-long<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> calendar-latitude latitude<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">setq</span> calendar-longitude longitude<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline301" class="outline-3">
<h3 id="orgheadline301"><span class="section-number-3">16.10</span> Fix <code>ansi-term</code> Colors</h3>
<div class="outline-text-3" id="text-16-10">
<p>
For some reason, loading certain themes can cause colors in
<code>ansi-term-color-vector</code> to be undefined. The following code handles restoring
the original <code>ansi-term-color-vector</code> state. The code is exectued in a
load-theme hook (See the heading below).
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">require</span> '<span style="color: #8bc34a;">term</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:ansi-term-color-vector</span> ansi-term-color-vector<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:ansi-term-color-vector-broken?</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">--some</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">or</span> <span style="color: #B388FF;">(</span>eq <span style="color: #ffcc80;">it</span> 'unspecified<span style="color: #B388FF;">)</span> <span style="color: #B388FF;">(</span>not <span style="color: #76ff03;">(</span>symbolp <span style="color: #ffcc80;">it</span><span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>append ansi-term-color-vector nil<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:restore-ansi-term-color-vector</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;optional</span> force<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">when</span> <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">or</span> force <span style="color: #B388FF;">(</span>imalison:ansi-term-color-vector-broken?<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">setq</span> ansi-term-color-vector imalison:ansi-term-color-vector<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline302" class="outline-3">
<h3 id="orgheadline302"><span class="section-number-3">16.11</span> After <code>load-theme</code> hook</h3>
<div class="outline-text-3" id="text-16-11">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:light-theme</span> 'solarized-light<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:dark-theme</span> 'material<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:after-load-theme</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> _args<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">when</span> <span style="color: #EF6C00;">(</span>fboundp 'powerline-reset<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span>powerline-reset<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>set-face-background 'fringe <span style="color: #EF6C00;">(</span>face-background 'default<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>imalison:restore-ansi-term-color-vector<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>advice-add 'load-theme <span style="color: #ff8A65;">:after</span> #'imalison:after-load-theme<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline303" class="outline-3">
<h3 id="orgheadline303"><span class="section-number-3">16.12</span> Frame Initialization</h3>
<div class="outline-text-3" id="text-16-12">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">defvar</span> <span style="color: #ffcc80;">imalison:linum-format</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:format-linum</span> <span style="color: #2196F3;">(</span>line-text<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>propertize <span style="color: #EF6C00;">(</span>format imalison:linum-format line-text<span style="color: #EF6C00;">)</span> 'face 'linum<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>make-variable-buffer-local 'imalison:linum-format<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:linum-before-numbering-hook</span> <span style="color: #2196F3;">()</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> imalison:linum-format
<span style="color: #EF6C00;">(</span>concat <span style="color: #9ccc65;">"%"</span> <span style="color: #B388FF;">(</span>number-to-string
<span style="color: #76ff03;">(</span>max <span style="color: #26A69A;">(</span>length
<span style="color: #FFCDD2;">(</span>number-to-string
<span style="color: #795548;">(</span>count-lines <span style="color: #DCE775;">(</span>point-min<span style="color: #DCE775;">)</span> <span style="color: #DCE775;">(</span>point-max<span style="color: #DCE775;">)</span><span style="color: #795548;">)</span><span style="color: #FFCDD2;">)</span><span style="color: #26A69A;">)</span> 3<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span> <span style="color: #9ccc65;">"d"</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:remove-fringe-and-hl-line-mode</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;rest</span> _stuff<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>fboundp 'scroll-bar-mode<span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span>scroll-bar-mode -1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>fboundp 'tool-bar-mode<span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span>tool-bar-mode -1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>fboundp 'menu-bar-mode<span style="color: #EF6C00;">)</span> <span style="color: #EF6C00;">(</span>menu-bar-mode -1<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">defvar-setq</span> linum-format 'imalison:format-linum<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>add-hook 'linum-before-numbering-hook 'imalison:linum-before-numbering-hook<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> left-margin-width 0<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">defvar-setq</span> hl-line-mode nil<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">defun</span> <span style="color: #84ffff;">imalison:appearance</span> <span style="color: #2196F3;">(</span><span style="color: #84ffff;">&amp;optional</span> frame<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">interactive</span> <span style="color: #EF6C00;">(</span>list nil<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">if</span> <span style="color: #EF6C00;">(</span>display-graphic-p<span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #B388FF;">(</span><span style="color: #fff59d;">condition-case</span> _ignored
<span style="color: #76ff03;">(</span>set-face-attribute 'default nil <span style="color: #ff8A65;">:font</span> <span style="color: #9ccc65;">"Source Code Pro"</span><span style="color: #76ff03;">)</span>
<span style="color: #76ff03;">(</span>'error nil<span style="color: #76ff03;">)</span><span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>set-face-attribute 'default nil <span style="color: #ff8A65;">:weight</span> 'semi-bold<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>set-face-attribute
'default nil <span style="color: #ff8A65;">:height</span> imalison:default-font-size-pt<span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span>
<span style="color: #EF6C00;">(</span><span style="color: #fff59d;">progn</span>
<span style="color: #B388FF;">(</span>load-theme 'source-code-pro t<span style="color: #B388FF;">)</span>
<span style="color: #B388FF;">(</span>message <span style="color: #9ccc65;">"not setting font"</span><span style="color: #B388FF;">)</span><span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span><span style="color: #fff59d;">setq</span> powerline-default-separator <span style="color: #EF6C00;">(</span><span style="color: #fff59d;">if</span> <span style="color: #B388FF;">(</span>display-graphic-p<span style="color: #B388FF;">)</span> 'wave 'utf-8<span style="color: #EF6C00;">)</span><span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>load-theme imalison:dark-theme t<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>spaceline-compile<span style="color: #2196F3;">)</span>
<span style="color: #2196F3;">(</span>imalison:remove-fringe-and-hl-line-mode<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">This is needed because you can't set the font or theme at daemon start-up.</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">(when (display-graphic-p) (imalison:appearance))</span>
<span style="color: #e91e63;">(</span>add-hook 'after-init-hook 'imalison:appearance<span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span>add-hook 'after-make-frame-functions 'imalison:appearance<span style="color: #e91e63;">)</span>
<span style="color: #b0bec5;">;; </span><span style="color: #b0bec5;">TODO/XXX: why do we immediately remove this hook?</span>
<span style="color: #e91e63;">(</span>remove-hook 'after-make-frame-functions 'imalison:appearance<span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgheadline305" class="outline-2">
<h2 id="orgheadline305"><span class="section-number-2">17</span> Post Init Custom</h2>
<div class="outline-text-2" id="text-17">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>file-exists-p custom-after-file<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span>load custom-after-file<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
<span style="color: #e91e63;">(</span><span style="color: #fff59d;">when</span> <span style="color: #2196F3;">(</span>file-exists-p machine-custom<span style="color: #2196F3;">)</span> <span style="color: #2196F3;">(</span>load machine-custom<span style="color: #2196F3;">)</span><span style="color: #e91e63;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Ivan Malison</p>
<p class="date">Created: 2016-10-19 Wed 18:08</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
</html>