forked from colonelpanic/dotfiles
7345 lines
707 KiB
HTML
7345 lines
707 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-12-26 Mon 01:12 -->
|
|
<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;}
|
|
/* Languages per Org manual */
|
|
pre.src-asymptote:before { content: 'Asymptote'; }
|
|
pre.src-awk:before { content: 'Awk'; }
|
|
pre.src-C:before { content: 'C'; }
|
|
/* pre.src-C++ doesn't work in CSS */
|
|
pre.src-clojure:before { content: 'Clojure'; }
|
|
pre.src-css:before { content: 'CSS'; }
|
|
pre.src-D:before { content: 'D'; }
|
|
pre.src-ditaa:before { content: 'ditaa'; }
|
|
pre.src-dot:before { content: 'Graphviz'; }
|
|
pre.src-calc:before { content: 'Emacs Calc'; }
|
|
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
|
pre.src-fortran:before { content: 'Fortran'; }
|
|
pre.src-gnuplot:before { content: 'gnuplot'; }
|
|
pre.src-haskell:before { content: 'Haskell'; }
|
|
pre.src-java:before { content: 'Java'; }
|
|
pre.src-js:before { content: 'Javascript'; }
|
|
pre.src-latex:before { content: 'LaTeX'; }
|
|
pre.src-ledger:before { content: 'Ledger'; }
|
|
pre.src-lisp:before { content: 'Lisp'; }
|
|
pre.src-lilypond:before { content: 'Lilypond'; }
|
|
pre.src-lua:before { content: 'Lua'; }
|
|
pre.src-matlab:before { content: 'MATLAB'; }
|
|
pre.src-mscgen:before { content: 'Mscgen'; }
|
|
pre.src-ocaml:before { content: 'Objective Caml'; }
|
|
pre.src-octave:before { content: 'Octave'; }
|
|
pre.src-org:before { content: 'Org mode'; }
|
|
pre.src-oz:before { content: 'OZ'; }
|
|
pre.src-plantuml:before { content: 'Plantuml'; }
|
|
pre.src-processing:before { content: 'Processing.js'; }
|
|
pre.src-python:before { content: 'Python'; }
|
|
pre.src-R:before { content: 'R'; }
|
|
pre.src-ruby:before { content: 'Ruby'; }
|
|
pre.src-sass:before { content: 'Sass'; }
|
|
pre.src-scheme:before { content: 'Scheme'; }
|
|
pre.src-screen:before { content: 'Gnu Screen'; }
|
|
pre.src-sed:before { content: 'Sed'; }
|
|
pre.src-sh:before { content: 'shell'; }
|
|
pre.src-sql:before { content: 'SQL'; }
|
|
pre.src-sqlite:before { content: 'SQLite'; }
|
|
/* additional languages in org.el's org-babel-load-languages alist */
|
|
pre.src-forth:before { content: 'Forth'; }
|
|
pre.src-io:before { content: 'IO'; }
|
|
pre.src-J:before { content: 'J'; }
|
|
pre.src-makefile:before { content: 'Makefile'; }
|
|
pre.src-maxima:before { content: 'Maxima'; }
|
|
pre.src-perl:before { content: 'Perl'; }
|
|
pre.src-picolisp:before { content: 'Pico Lisp'; }
|
|
pre.src-scala:before { content: 'Scala'; }
|
|
pre.src-shell:before { content: 'Shell Script'; }
|
|
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
|
|
/* additional language identifiers per "defun org-babel-execute"
|
|
in ob-*.el */
|
|
pre.src-cpp:before { content: 'C++'; }
|
|
pre.src-abc:before { content: 'ABC'; }
|
|
pre.src-coq:before { content: 'Coq'; }
|
|
pre.src-groovy:before { content: 'Groovy'; }
|
|
/* additional language identifiers from org-babel-shell-names in
|
|
ob-shell.el: ob-shell is the only babel language using a lambda to put
|
|
the execution function name together. */
|
|
pre.src-bash:before { content: 'bash'; }
|
|
pre.src-csh:before { content: 'csh'; }
|
|
pre.src-ash:before { content: 'ash'; }
|
|
pre.src-dash:before { content: 'dash'; }
|
|
pre.src-ksh:before { content: 'ksh'; }
|
|
pre.src-mksh:before { content: 'mksh'; }
|
|
pre.src-posh:before { content: 'posh'; }
|
|
/* Additional Emacs modes also supported by the LaTeX listings package */
|
|
pre.src-ada:before { content: 'Ada'; }
|
|
pre.src-asm:before { content: 'Assembler'; }
|
|
pre.src-caml:before { content: 'Caml'; }
|
|
pre.src-delphi:before { content: 'Delphi'; }
|
|
pre.src-html:before { content: 'HTML'; }
|
|
pre.src-idl:before { content: 'IDL'; }
|
|
pre.src-mercury:before { content: 'Mercury'; }
|
|
pre.src-metapost:before { content: 'MetaPost'; }
|
|
pre.src-modula-2:before { content: 'Modula-2'; }
|
|
pre.src-pascal:before { content: 'Pascal'; }
|
|
pre.src-ps:before { content: 'PostScript'; }
|
|
pre.src-prolog:before { content: 'Prolog'; }
|
|
pre.src-simula:before { content: 'Simula'; }
|
|
pre.src-tcl:before { content: 'tcl'; }
|
|
pre.src-tex:before { content: 'TeX'; }
|
|
pre.src-plain-tex:before { content: 'Plain TeX'; }
|
|
pre.src-verilog:before { content: 'Verilog'; }
|
|
pre.src-vhdl:before { content: 'VHDL'; }
|
|
pre.src-xml:before { content: 'XML'; }
|
|
pre.src-nxml:before { content: 'XML'; }
|
|
/* add a generic configuration mode; LaTeX export needs an additional
|
|
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
|
|
pre.src-conf:before { content: 'Configuration File'; }
|
|
|
|
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; }
|
|
.org-svg { width: 90%; }
|
|
/*]]>*/-->
|
|
</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: #fdf6e3; color: #657b83;}</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="#about">1. About</a></li>
|
|
<li><a href="#highlights">2. Highlights</a>
|
|
<ul>
|
|
<li><a href="#howigeneratehttpivanmalisongithubiodotfiles">2.1. How I generate </a>
|
|
<ul>
|
|
<li><a href="#githooks">2.1.1. Git Hooks</a></li>
|
|
<li><a href="#httpsgithubcomfniessenorghtmlthemesreadtheorg">2.1.2. Read The Org</a></li>
|
|
<li><a href="#headinglinks">2.1.3. Heading Links</a></li>
|
|
<li><a href="#setbackgroundcolorsourceblocks">2.1.4. Set Background Color Source Blocks</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#framecontrolframecontrol">2.2. Frame control</a></li>
|
|
<li><a href="#functionsmyfunctionssection">2.3. My functions section</a></li>
|
|
<li><a href="#configurationofmyownpackages">2.4. Configuration of My Own Packages</a></li>
|
|
<li><a href="#programminglanguagesprogramminglanguageconfigurations">2.5. Programming Language Configurations</a></li>
|
|
<li><a href="#orgorgmode">2.6. org-mode</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#htmlheaders">3. HTML Headers</a></li>
|
|
<li><a href="#early">4. Early</a>
|
|
<ul>
|
|
<li><a href="#lexicalbinding">4.1. Lexical Binding</a></li>
|
|
<li><a href="#security">4.2. Security</a></li>
|
|
<li><a href="#elpaarchivesetup">4.3. ELPA Archive Setup</a></li>
|
|
<li><a href="#bootstrappackageloading">4.4. Bootstrap Package Loading</a></li>
|
|
<li><a href="#setupautocompile">4.5. Setup auto-compile</a></li>
|
|
<li><a href="#prefernewerversions">4.6. Prefer Newer Versions</a></li>
|
|
<li><a href="#customfiles">4.7. Custom Files</a></li>
|
|
<li><a href="#emit">4.8. emit</a>
|
|
<ul>
|
|
<li><a href="#thisneedstobedonebetterbutitworksfornow">4.8.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="#benchmarking">4.9. Benchmarking</a></li>
|
|
<li><a href="#guidisables">4.10. GUI Disables</a></li>
|
|
<li><a href="#bytecompiler">4.11. Byte-Compiler</a></li>
|
|
<li><a href="#execpathfromshell">4.12. exec-path-from-shell</a></li>
|
|
<li><a href="#noflet">4.13. noflet</a></li>
|
|
<li><a href="#nonforkingshellcommandtostring">4.14. Non-Forking Shell Command To String</a></li>
|
|
<li><a href="#setemacsenvironmentvariable">4.15. Set EMACS environment variable</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#functions">5. Functions</a>
|
|
<ul>
|
|
<li><a href="#joinpaths">5.1. Join Paths</a></li>
|
|
<li><a href="#variables">5.2. Variables</a></li>
|
|
<li><a href="#usepackagewrapperwithlocalloadpathsupport">5.3. Use Package Wrapper With Local Load Path Support</a></li>
|
|
<li><a href="#requiredpackages">5.4. Required Packages</a>
|
|
<ul>
|
|
<li><a href="#s">5.4.1. s</a></li>
|
|
<li><a href="#dash">5.4.2. dash</a></li>
|
|
<li><a href="#gh">5.4.3. gh</a></li>
|
|
<li><a href="#shutup">5.4.4. shut-up</a></li>
|
|
<li><a href="#pcache">5.4.5. pcache</a></li>
|
|
<li><a href="#parsecsv">5.4.6. parse-csv</a></li>
|
|
<li><a href="#emit1">5.4.7. emit</a></li>
|
|
<li><a href="#request">5.4.8. request</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#namedbuild">5.5. Named Build</a></li>
|
|
<li><a href="#emacsversionpredicate">5.6. Emacs Version Predicate</a></li>
|
|
<li><a href="#composefunctions">5.7. Compose Functions</a>
|
|
<ul>
|
|
<li><a href="#aversionsupportingmacros">5.7.1. A version supporting macros</a></li>
|
|
<li><a href="#arbitraryargumentsateverystep">5.7.2. Arbitrary arguments at every step</a></li>
|
|
<li><a href="#simplerunaryversion">5.7.3. Simpler unary version</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#withadvice">5.8. With Advice</a></li>
|
|
<li><a href="#makeinteractive">5.9. Make Interactive</a></li>
|
|
<li><a href="#adviceaddaroundbuilder">5.10. Advice Add Around Builder</a>
|
|
<ul>
|
|
<li><a href="#killnew">5.10.1. Kill New</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#letaround">5.11. Let Around</a></li>
|
|
<li><a href="#letaroundadvice">5.12. Let Around Advice</a></li>
|
|
<li><a href="#letadvise">5.13. Let Advise</a></li>
|
|
<li><a href="#composearoundbuilder">5.14. Compose Around Builder</a></li>
|
|
<li><a href="#measuretime">5.15. Measure Time</a></li>
|
|
<li><a href="#addfilestoorgagendafiles">5.16. Add Files to <code>org-agenda-files</code></a></li>
|
|
<li><a href="#getstringfromfile">5.17. Get String From File</a></li>
|
|
<li><a href="#getcurrentlocation">5.18. Get Current Location</a></li>
|
|
<li><a href="#haversinedistance">5.19. Haversine distance</a></li>
|
|
<li><a href="#fontsize">5.20. Font Size</a></li>
|
|
<li><a href="#messageresultbuilder">5.21. Message Result Builder</a></li>
|
|
<li><a href="#customshellcommandonregion">5.22. Custom <code>shell-command-on-region</code></a></li>
|
|
<li><a href="#copyyankstringfunctions">5.23. Copy/Yank String Functions</a>
|
|
<ul>
|
|
<li><a href="#copyportionsofthebufferfilename">5.23.1. Copy portions of the buffer file name</a></li>
|
|
<li><a href="#copythecurrentbranchusingmagit">5.23.2. Copy the current branch using magit</a></li>
|
|
<li><a href="#copythecurrentbuffername">5.23.3. Copy the current buffer name</a></li>
|
|
<li><a href="#copythelastmessage">5.23.4. Copy the last message</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#namedcompile">5.24. Named Compile</a></li>
|
|
<li><a href="#replaceescapesequences">5.25. Replace Escape Sequences</a></li>
|
|
<li><a href="#downloadafileintoabuffer">5.26. Download a File Into a Buffer</a></li>
|
|
<li><a href="#concatwithsymbols">5.27. Concat With Symbols</a></li>
|
|
<li><a href="#editascriptonpath">5.28. Edit a script on PATH</a></li>
|
|
<li><a href="#togglelexicalbindinginthecurrentbuffer">5.29. Toggle lexical binding in the current buffer</a></li>
|
|
<li><a href="#synckillringwithcopyq">5.30. Sync kill ring with copyq</a></li>
|
|
<li><a href="#helmzshhistory">5.31. helm-zsh-history</a>
|
|
<ul>
|
|
<li><a href="#useprojectileasdefaultdirectory">5.31.1. Use projectile as default directory</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#disablehooks">5.32. Disable hooks</a></li>
|
|
<li><a href="#other">5.33. Other</a></li>
|
|
<li><a href="#keyboardmacros">5.34. Keyboard Macros</a>
|
|
<ul>
|
|
<li><a href="#foreditingliterateconfig">5.34.1. For editing literate config</a>
|
|
<ul>
|
|
<li><a href="#extractcurrentsexptosrcblock">5.34.1.1. extract-current-sexp-to-src-block</a></li>
|
|
<li><a href="#namesourceblockforusepackagename">5.34.1.2. name-source-block-for-use-package-name</a></li>
|
|
<li><a href="#extractandnameusepackageblock">5.34.1.3. extract-and-name-use-package-block</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#general">6. General</a>
|
|
<ul>
|
|
<li><a href="#userinfo">6.1. User Info</a></li>
|
|
<li><a href="#sanedefaults">6.2. Sane Defaults</a></li>
|
|
<li><a href="#systemclipboard">6.3. System Clipboard</a></li>
|
|
<li><a href="#linenumbers">6.4. Line Numbers</a></li>
|
|
<li><a href="#backups">6.5. Backups</a>
|
|
<ul>
|
|
<li><a href="#putthemallinonedirectory">6.5.1. Put them all in one directory</a></li>
|
|
<li><a href="#completelydisablebackups">6.5.2. Completely disable backups</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#prompts">6.6. Prompts</a>
|
|
<ul>
|
|
<li><a href="#nopopupframes">6.6.1. No popup frames</a></li>
|
|
<li><a href="#booleanyesorno">6.6.2. boolean (yes-or-no)</a></li>
|
|
<li><a href="#nodialogboxes">6.6.3. No dialog boxes</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#splitting">6.7. Splitting</a></li>
|
|
<li><a href="#bufferdisplay">6.8. Buffer Display</a>
|
|
<ul>
|
|
<li><a href="#ewmctrl">6.8.1. ewmctrl</a></li>
|
|
<li><a href="#handlexrefsannoyingdedicatedwindowgarbage">6.8.2. Handle xrefs annoying dedicated window garbage</a></li>
|
|
<li><a href="#displaybufferalist">6.8.3. display-buffer-alist</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#fillsetup">6.9. Fill Setup</a></li>
|
|
<li><a href="#showtrailingwhitespace">6.10. Show Trailing Whitespace</a>
|
|
<ul>
|
|
<li><a href="#disable">6.10.1. Disable</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#encoding">6.11. Encoding</a></li>
|
|
<li><a href="#visiblebell">6.12. Visible Bell</a></li>
|
|
<li><a href="#configurevc">6.13. Configure <code>vc</code></a></li>
|
|
<li><a href="#timeinmodeline">6.14. Time in Mode Line</a></li>
|
|
<li><a href="#killring">6.15. Kill Ring</a></li>
|
|
<li><a href="#subword">6.16. Subword</a></li>
|
|
<li><a href="#scratchbuffer">6.17. Scratch Buffer</a></li>
|
|
<li><a href="#dontpromptaboutlocalvariables">6.18. Don't prompt about local variables</a></li>
|
|
<li><a href="#proced">6.19. proced</a></li>
|
|
<li><a href="#setdefaultbrowser">6.20. Set default browser</a></li>
|
|
<li><a href="#setepaprogram">6.21. Set epa program</a></li>
|
|
<li><a href="#makefilesexecutable">6.22. Make files executable</a></li>
|
|
<li><a href="#misc">6.23. Misc</a></li>
|
|
<li><a href="#paradox">6.24. paradox</a></li>
|
|
<li><a href="#diminish">6.25. diminish</a></li>
|
|
<li><a href="#editserver">6.26. edit-server</a></li>
|
|
<li><a href="#loaddir">6.27. load-dir</a></li>
|
|
<li><a href="#server">6.28. server</a></li>
|
|
<li><a href="#listenvironment">6.29. list-environment</a></li>
|
|
<li><a href="#bughunter">6.30. bug-hunter</a></li>
|
|
<li><a href="#shackle">6.31. shackle</a></li>
|
|
<li><a href="#beacon">6.32. beacon</a></li>
|
|
<li><a href="#iregister">6.33. iregister</a></li>
|
|
<li><a href="#discovermymajor">6.34. discover-my-major</a></li>
|
|
<li><a href="#refine">6.35. refine</a></li>
|
|
<li><a href="#winner">6.36. winner</a></li>
|
|
<li><a href="#eyebrowse">6.37. eyebrowse</a></li>
|
|
<li><a href="#stream">6.38. stream</a></li>
|
|
<li><a href="#tile">6.39. tile</a></li>
|
|
<li><a href="#fillcolumnindicator">6.40. fill-column-indicator</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#keybindings">7. Keybindings</a>
|
|
<ul>
|
|
<li><a href="#godmode">7.1. god-mode</a></li>
|
|
<li><a href="#bindkey">7.2. bind-key</a></li>
|
|
<li><a href="#whichkey">7.3. which-key</a></li>
|
|
<li><a href="#hydra">7.4. hydra</a>
|
|
<ul>
|
|
<li><a href="#fontsettings">7.4.1. Font Settings</a></li>
|
|
<li><a href="#copyyanking">7.4.2. Copy/Yanking</a></li>
|
|
<li><a href="#compile">7.4.3. Compile</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#killemacs">7.5. kill-emacs</a></li>
|
|
<li><a href="#imenu">7.6. imenu</a></li>
|
|
<li><a href="#undo">7.7. undo</a></li>
|
|
<li><a href="#otherwindow">7.8. other-window</a></li>
|
|
<li><a href="#markring">7.9. Mark ring</a></li>
|
|
<li><a href="#otherbindings">7.10. Other bindings</a></li>
|
|
<li><a href="#globalsetkeytousepackage">7.11. global-set-key-to-use-package</a></li>
|
|
<li><a href="#osx">7.12. OSX</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#navigation">8. Navigation</a>
|
|
<ul>
|
|
<li><a href="#zoptochar">8.1. zop-to-char</a></li>
|
|
<li><a href="#helm">8.2. helm</a></li>
|
|
<li><a href="#helmprojectile">8.3. helm-projectile</a></li>
|
|
<li><a href="#projectile">8.4. projectile</a></li>
|
|
<li><a href="#ido">8.5. ido</a></li>
|
|
<li><a href="#avy">8.6. avy</a></li>
|
|
<li><a href="#acewindow">8.7. ace-window</a></li>
|
|
<li><a href="#neotree">8.8. neotree</a></li>
|
|
<li><a href="#jumpchar">8.9. jump-char</a></li>
|
|
<li><a href="#flimenu">8.10. flimenu</a></li>
|
|
<li><a href="#swiper">8.11. swiper</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#completion">9. Completion</a>
|
|
<ul>
|
|
<li><a href="#company">9.1. company</a>
|
|
<ul>
|
|
<li><a href="#companyflx">9.1.1. company-flx</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#autocomplete">9.2. auto-complete</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#textmanipulation">10. Text Manipulation</a>
|
|
<ul>
|
|
<li><a href="#smartparens">10.1. smartparens</a></li>
|
|
<li><a href="#multiplecursors">10.2. multiple-cursors</a></li>
|
|
<li><a href="#expandregion">10.3. expand-region</a></li>
|
|
<li><a href="#multiline">10.4. multi-line</a></li>
|
|
<li><a href="#commentdwim">10.5. comment-dwim-2</a></li>
|
|
<li><a href="#unfill">10.6. unfill</a></li>
|
|
<li><a href="#cliphist">10.7. cliphist</a></li>
|
|
<li><a href="#electricoperatormode">10.8. electric-operator-mode</a></li>
|
|
<li><a href="#stringinflection">10.9. string-inflection</a></li>
|
|
<li><a href="#yasnippet">10.10. yasnippet</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#flycheck">11. flycheck</a></li>
|
|
<li><a href="#majormodes">12. Major Modes</a>
|
|
<ul>
|
|
<li><a href="#programming">12.1. Programming</a>
|
|
<ul>
|
|
<li><a href="#python">12.1.1. python</a>
|
|
<ul>
|
|
<li><a href="#pyimport">12.1.1.1. pyimport</a></li>
|
|
<li><a href="#jedi">12.1.1.2. jedi</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#go">12.1.2. go</a>
|
|
<ul>
|
|
<li><a href="#showdiffsoftestifyoutput">12.1.2.1. Show diffs of testify output</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#emacslisp">12.1.3. emacs-lisp</a>
|
|
<ul>
|
|
<li><a href="#elispslimenav">12.1.3.1. elisp-slime-nav</a></li>
|
|
<li><a href="#macrostep">12.1.3.2. macrostep</a></li>
|
|
<li><a href="#emr">12.1.3.3. emr</a></li>
|
|
<li><a href="#editingconfiguration">12.1.3.4. Editing configuration</a></li>
|
|
<li><a href="#checkdoc">12.1.3.5. Checkdoc</a></li>
|
|
<li><a href="#edebug">12.1.3.6. edebug</a></li>
|
|
<li><a href="#overseer">12.1.3.7. overseer</a></li>
|
|
<li><a href="#misc1">12.1.3.8. Misc</a></li>
|
|
<li><a href="#eros">12.1.3.9. eros</a></li>
|
|
<li><a href="#reevalutedefvarswhenrunningevallastsexp">12.1.3.10. Reevalute defvars when running eval-last-sexp</a></li>
|
|
<li><a href="#inithook">12.1.3.11. Init hook</a></li>
|
|
<li><a href="#keybinds">12.1.3.12. Keybinds</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#clojure">12.1.4. clojure</a>
|
|
<ul>
|
|
<li><a href="#cider">12.1.4.1. cider</a></li>
|
|
<li><a href="#cljrefactor">12.1.4.2. clj-refactor</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#scala">12.1.5. scala</a></li>
|
|
<li><a href="#js">12.1.6. js</a></li>
|
|
<li><a href="#rust">12.1.7. rust</a></li>
|
|
<li><a href="#haskell">12.1.8. haskell</a>
|
|
<ul>
|
|
<li><a href="#intero">12.1.8.1. intero</a></li>
|
|
<li><a href="#hindent">12.1.8.2. hindent</a></li>
|
|
<li><a href="#ghcmod">12.1.8.3. ghc-mod</a></li>
|
|
<li><a href="#companyghc">12.1.8.4. company-ghc</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#cc">12.1.9. C/C++</a></li>
|
|
<li><a href="#c">12.1.10. C#</a></li>
|
|
<li><a href="#racket">12.1.11. racket</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#dataconfigprotocol">12.2. Data/Config/Protocol</a>
|
|
<ul>
|
|
<li><a href="#thrift">12.2.1. thrift</a></li>
|
|
<li><a href="#protobuf">12.2.2. protobuf</a></li>
|
|
<li><a href="#jsonmode">12.2.3. json-mode</a></li>
|
|
<li><a href="#yamlmode">12.2.4. yaml-mode</a></li>
|
|
<li><a href="#esmode">12.2.5. es-mode</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#document">12.3. Document</a>
|
|
<ul>
|
|
<li><a href="#org">12.3.1. org</a>
|
|
<ul>
|
|
<li><a href="#config">12.3.1.1. config</a></li>
|
|
<li><a href="#useframes">12.3.1.2. Use frames</a></li>
|
|
<li><a href="#setbackgroundcolorofsourceblocksforexport">12.3.1.3. Set Background Color of Source Blocks for Export</a></li>
|
|
<li><a href="#usemyowndefaultnamingschemefororgheadings">12.3.1.4. Use my own default naming scheme for org-headings</a></li>
|
|
<li><a href="#orgprojectile">12.3.1.5. org-projectile</a></li>
|
|
<li><a href="#orgnotify">12.3.1.6. org-notify</a></li>
|
|
<li><a href="#orgreveal">12.3.1.7. org-reveal</a></li>
|
|
<li><a href="#orgcaldav">12.3.1.8. org-caldav</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#tex">12.3.2. TeX</a>
|
|
<ul>
|
|
<li><a href="#latex">12.3.2.1. latex</a></li>
|
|
<li><a href="#auctexlatexmk">12.3.2.2. auctex-latexmk</a></li>
|
|
<li><a href="#companyauctex">12.3.2.3. company-auctex</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#markdownmode">12.3.3. markdown-mode</a></li>
|
|
<li><a href="#plantumlmode">12.3.4. plantuml-mode</a></li>
|
|
<li><a href="#wsdmode">12.3.5. wsd-mode</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#utility">12.4. Utility</a>
|
|
<ul>
|
|
<li><a href="#restclient">12.4.1. restclient</a></li>
|
|
<li><a href="#jqmode">12.4.2. jq-mode</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#sourcecontrol">13. Source Control</a>
|
|
<ul>
|
|
<li><a href="#magit">13.1. magit</a>
|
|
<ul>
|
|
<li><a href="#magithub">13.1.1. magithub</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#gitlink">13.2. git-link</a></li>
|
|
<li><a href="#magitgitflow">13.3. magit-gitflow</a></li>
|
|
<li><a href="#gittimemachine">13.4. git-timemachine</a></li>
|
|
<li><a href="#gitgutter">13.5. git-gutter</a></li>
|
|
<li><a href="#gitoliteclone">13.6. gitolite-clone</a></li>
|
|
<li><a href="#gitconfigmode">13.7. gitconfig-mode</a></li>
|
|
<li><a href="#gitignoremode">13.8. gitignore-mode</a></li>
|
|
<li><a href="#github">13.9. github</a>
|
|
<ul>
|
|
<li><a href="#githubsearch">13.9.1. github-search</a></li>
|
|
<li><a href="#githubclone">13.9.2. github-clone</a></li>
|
|
<li><a href="#githubnotifier">13.9.3. github-notifier</a></li>
|
|
<li><a href="#githubbrowsefile">13.9.4. github-browse-file</a></li>
|
|
<li><a href="#magitghpulls">13.9.5. magit-gh-pulls</a></li>
|
|
<li><a href="#gist">13.9.6. gist</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#programming1">14. Programming</a>
|
|
<ul>
|
|
<li><a href="#realgud">14.1. realgud</a></li>
|
|
<li><a href="#emr1">14.2. emr</a></li>
|
|
<li><a href="#semantic">14.3. semantic</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#utility1">15. Utility</a>
|
|
<ul>
|
|
<li><a href="#term">15.1. term</a></li>
|
|
<li><a href="#termmanager">15.2. term-manager</a></li>
|
|
<li><a href="#termprojectile">15.3. term-projectile</a></li>
|
|
<li><a href="#crux">15.4. crux</a></li>
|
|
<li><a href="#kdeconnect">15.5. kde-connect</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#chat">16. Chat</a>
|
|
<ul>
|
|
<li><a href="#erc">16.1. erc</a></li>
|
|
<li><a href="#bitlbee">16.2. bitlbee</a></li>
|
|
<li><a href="#slack">16.3. slack</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#cooperation">17. Cooperation</a>
|
|
<ul>
|
|
<li><a href="#togetherly">17.1. togetherly</a></li>
|
|
<li><a href="#floobits">17.2. floobits</a></li>
|
|
<li><a href="#rudel">17.3. rudel</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#other1">18. Other</a>
|
|
<ul>
|
|
<li><a href="#anzu">18.1. anzu</a></li>
|
|
<li><a href="#fontawesome">18.2. fontawesome</a></li>
|
|
<li><a href="#shellhistory">18.3. shell-history</a></li>
|
|
<li><a href="#iedit">18.4. iedit</a></li>
|
|
<li><a href="#tramp">18.5. tramp</a></li>
|
|
<li><a href="#narrowindirect">18.6. narrow-indirect</a></li>
|
|
<li><a href="#editorconfig">18.7. editorconfig</a></li>
|
|
<li><a href="#dtrtindent">18.8. dtrt-indent</a></li>
|
|
<li><a href="#indentguide">18.9. indent-guide</a></li>
|
|
<li><a href="#rainbowdelimiters">18.10. rainbow-delimiters</a></li>
|
|
<li><a href="#undotree">18.11. undo-tree</a></li>
|
|
<li><a href="#recentf">18.12. recentf</a></li>
|
|
<li><a href="#keychord">18.13. key-chord</a></li>
|
|
<li><a href="#nodejsrepl">18.14. nodejs-repl</a></li>
|
|
<li><a href="#calcmode">18.15. calc-mode</a></li>
|
|
<li><a href="#helmspotify">18.16. helm-spotify</a></li>
|
|
<li><a href="#jabber">18.17. jabber</a></li>
|
|
<li><a href="#htmlize">18.18. htmlize</a></li>
|
|
<li><a href="#calfw">18.19. calfw</a></li>
|
|
<li><a href="#clocker">18.20. clocker</a></li>
|
|
<li><a href="#deft">18.21. deft</a></li>
|
|
<li><a href="#epg">18.22. epg</a></li>
|
|
<li><a href="#pinentry">18.23. pinentry</a></li>
|
|
<li><a href="#twitteringmode">18.24. twittering-mode</a></li>
|
|
<li><a href="#matrixclient">18.25. matrix-client</a></li>
|
|
<li><a href="#mue">18.26. mu4e</a></li>
|
|
<li><a href="#gmailmessagemode">18.27. gmail-message-mode</a></li>
|
|
<li><a href="#hammode">18.28. ham-mode</a></li>
|
|
<li><a href="#alert">18.29. alert</a></li>
|
|
<li><a href="#sauron">18.30. sauron</a></li>
|
|
<li><a href="#screenshot">18.31. screenshot</a></li>
|
|
<li><a href="#libmpdee">18.32. libmpdee</a></li>
|
|
<li><a href="#flyspell">18.33. flyspell</a></li>
|
|
<li><a href="#webmode">18.34. web-mode</a></li>
|
|
<li><a href="#helmthemes">18.35. helm-themes</a></li>
|
|
<li><a href="#helmswoop">18.36. helm-swoop</a></li>
|
|
<li><a href="#perspective">18.37. perspective</a></li>
|
|
<li><a href="#smex">18.38. smex</a></li>
|
|
<li><a href="#java">18.39. java</a></li>
|
|
<li><a href="#androidmode">18.40. android-mode</a></li>
|
|
<li><a href="#gradlemode">18.41. gradle-mode</a></li>
|
|
<li><a href="#jsxmode">18.42. jsx-mode</a></li>
|
|
<li><a href="#css">18.43. css</a></li>
|
|
<li><a href="#robe">18.44. robe</a></li>
|
|
<li><a href="#rinari">18.45. rinari</a></li>
|
|
<li><a href="#helmgtags">18.46. helm-gtags</a></li>
|
|
<li><a href="#sgmlmode">18.47. sgml-mode</a></li>
|
|
<li><a href="#evil">18.48. evil</a></li>
|
|
<li><a href="#hackernews">18.49. hackernews</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#appearance">19. Appearance</a>
|
|
<ul>
|
|
<li><a href="#basicconfig">19.1. Basic Config</a></li>
|
|
<li><a href="#themes">19.2. Themes</a></li>
|
|
<li><a href="#alltheicons">19.3. all-the-icons</a></li>
|
|
<li><a href="#spaceline">19.4. spaceline</a>
|
|
<ul>
|
|
<li><a href="#disablesrgbcolorspacetomakepowerlineseparatorswork">19.4.1. Disable sRGB colorspace to make powerline separators work</a></li>
|
|
<li><a href="#config1">19.4.2. config</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#pagebreaklines">19.5. page-break-lines</a></li>
|
|
<li><a href="#helmthemes1">19.6. helm-themes</a></li>
|
|
<li><a href="#windownumber">19.7. window-number</a></li>
|
|
<li><a href="#whitespacesetup">19.8. Whitespace Setup</a></li>
|
|
<li><a href="#colorizecompliationbuffers">19.9. Colorize Compliation Buffers</a></li>
|
|
<li><a href="#automaticthemechanger">19.10. Automatic Theme Changer</a></li>
|
|
<li><a href="#fixansitermcolors">19.11. Fix <code>ansi-term</code> Colors</a></li>
|
|
<li><a href="#afterloadthemehook">19.12. After <code>load-theme</code> hook</a></li>
|
|
<li><a href="#frameinitialization">19.13. Frame Initialization</a>
|
|
<ul>
|
|
<li><a href="#hookstoseteverythingup">19.13.1. Hooks to set everything up</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#postinitcustom">20. Post Init Custom</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
This document is best read at <a href="http://ivanmalison.github.io/dotfiles/">http://ivanmalison.github.io/dotfiles/</a> or, of
|
|
course, in emacs, as the internal links that follow are unlikely to work
|
|
anywhere else (including, for example, at
|
|
<a href="https://github.com/IvanMalison/dotfiles">https://github.com/IvanMalison/dotfiles</a>).
|
|
</p>
|
|
<div id="outline-container-about" class="outline-2">
|
|
<h2 id="about"><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 that
|
|
those two have. 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-highlights" class="outline-2">
|
|
<h2 id="highlights"><span class="section-number-2">2</span> Highlights</h2>
|
|
<div class="outline-text-2" id="text-2">
|
|
<p>
|
|
These sections are the ones that have the most potential to be interesting to
|
|
others:
|
|
</p>
|
|
</div>
|
|
<div id="outline-container-howigeneratehttpivanmalisongithubiodotfiles" class="outline-3">
|
|
<h3 id="howigeneratehttpivanmalisongithubiodotfiles"><span class="section-number-3">2.1</span> How I generate <a href="http://ivanmalison.github.io/dotfiles/">http://ivanmalison.github.io/dotfiles/</a></h3>
|
|
<div class="outline-text-3" id="text-2-1">
|
|
</div><div id="outline-container-githooks" class="outline-4">
|
|
<h4 id="githooks"><span class="section-number-4">2.1.1</span> Git Hooks</h4>
|
|
<div class="outline-text-4" id="text-2-1-1">
|
|
<p>
|
|
I wrote a <a href="https://github.com/IvanMalison/dotfiles/tree/master/dotfiles/emacs.d/bin">githook and an installer script</a> that automatically update index.html
|
|
at the root of the repository by running <code>org-html-export-to-html</code> on my
|
|
README.org (essentially this document) . These should work no matter where they
|
|
are placed in a repository. The org-mode file that they target is set <a href="https://github.com/IvanMalison/dotfiles/blob/16a4f6c3aadef39a45d30c15e8637b40858721ea/dotfiles/emacs.d/bin/util.sh#L4">here</a> and
|
|
should be relatively easy to change.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-httpsgithubcomfniessenorghtmlthemesreadtheorg" class="outline-4">
|
|
<h4 id="httpsgithubcomfniessenorghtmlthemesreadtheorg"><span class="section-number-4">2.1.2</span> <a href="https://github.com/fniessen/org-html-themes">Read The Org</a></h4>
|
|
<div class="outline-text-4" id="text-2-1-2">
|
|
<p>
|
|
I use <a href="https://github.com/fniessen">fniessen</a>'s ReadTheOrg theme which can be found at <a href="https://github.com/fniessen/org-html-themes">https://github.com/fniessen/org-html-themes</a>.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-headinglinks" class="outline-4">
|
|
<h4 id="headinglinks"><span class="section-number-4">2.1.3</span> Heading Links</h4>
|
|
<div class="outline-text-4" id="text-2-1-3">
|
|
<p>
|
|
To make it so that internal heading links have names that correspond to the
|
|
heading text, and don't change when new headings are added to the document, I
|
|
wrote a custom version of <code>org-export-get-reference</code>.
|
|
</p>
|
|
|
|
<p>
|
|
See how <a href="#usemyowndefaultnamingschemefororgheadings">this link</a> (which is just a normal internal link in the original
|
|
document) takes you to
|
|
<a href="http://ivanmalison.github.io/dotfiles/#usemyowndefaultnamingschemefororgheadings">http://ivanmalison.github.io/dotfiles/#usemyowndefaultnamingschemefororgheadings</a>.
|
|
</p>
|
|
|
|
<p>
|
|
In case you haven't noticed, that is where you should go grab the code that does
|
|
this.
|
|
</p>
|
|
|
|
<p>
|
|
I'm considering turning this snippet in to a package, so please let me know if
|
|
that is something you are interested in.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-setbackgroundcolorsourceblocks" class="outline-4">
|
|
<h4 id="setbackgroundcolorsourceblocks"><span class="section-number-4">2.1.4</span> Set Background Color Source Blocks</h4>
|
|
<div class="outline-text-4" id="text-2-1-4">
|
|
<p>
|
|
For some reason, org-mode uses all of your currently active fontification when exporting EXCEPT for background color. <a href="#setbackgroundcolorofsourceblocksforexport">This</a> modification fixes this.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-framecontrolframecontrol" class="outline-3">
|
|
<h3 id="framecontrolframecontrol"><span class="section-number-3">2.2</span> <a href="#orgtarget1">Frame control</a></h3>
|
|
<div class="outline-text-3" id="text-2-2">
|
|
<p>
|
|
My custom <a href="#orgtarget1">frame control</a> stuff is built to integrate really nicely with xmonad. I
|
|
think its pretty awesome!
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-functionsmyfunctionssection" class="outline-3">
|
|
<h3 id="functionsmyfunctionssection"><span class="section-number-3">2.3</span> <a href="#functions">My functions section</a></h3>
|
|
<div class="outline-text-3" id="text-2-3">
|
|
<p>
|
|
…has a bunch of generally useful functions:
|
|
</p>
|
|
<ul class="org-ul">
|
|
<li><a href="https://github.com/IvanMalison/emit/blob/2e4d788abd68bac538acb06443179b8d5885052e/emit.el#L104">emit-prefix-selector</a> (SUPER USEFUL, moved to emit) See <a href="https://github.com/IvanMalison/emit#prefix-selector">README</a> for explantion</li>
|
|
<li><a href="#fontsize">Font Size</a> functions and an <a href="#orgtarget2">Awesome Hydra</a> for them</li>
|
|
<li><a href="#orgtarget3">Download a file into a buffer</a> (curl straight into a file)</li>
|
|
<li><a href="#orgtarget4">Edit a script on $PATH</a></li>
|
|
<li><a href="#copyyanking">Copy Portions of Buffer File Path Hydra</a> and the associated <a href="#copyyankstringfunctions">Copy String Functions</a></li>
|
|
<li><a href="#orgtarget5">Named Build of Builder Macros</a> (<a href="https://github.com/IvanMalison/emit#named-builder">README</a>) and <a href="#orgtarget6">A Compose Supporting Macros</a> (<a href="https://github.com/IvanMalison/emit#compose">README</a>)</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-configurationofmyownpackages" class="outline-3">
|
|
<h3 id="configurationofmyownpackages"><span class="section-number-3">2.4</span> Configuration of My Own Packages</h3>
|
|
<div class="outline-text-3" id="text-2-4">
|
|
<ul class="org-ul">
|
|
<li><a href="#termprojectile">term-projectile</a> and <a href="#termmanager">term-manager</a></li>
|
|
<li><a href="#orgprojectile">org-projectile</a></li>
|
|
<li><a href="#multiline">multi-line</a></li>
|
|
<li><a href="#githubsearch">github-search</a></li>
|
|
<li><a href="#flimenu">flimenu</a></li>
|
|
<li><a href="#tile">tile</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-programminglanguagesprogramminglanguageconfigurations" class="outline-3">
|
|
<h3 id="programminglanguagesprogramminglanguageconfigurations"><span class="section-number-3">2.5</span> <a href="#orgtarget7">Programming Language Configurations</a></h3>
|
|
<div class="outline-text-3" id="text-2-5">
|
|
<p>
|
|
My programming language major mode configurations can all be found <a href="#orgtarget7">here</a>.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orgorgmode" class="outline-3">
|
|
<h3 id="orgorgmode"><span class="section-number-3">2.6</span> <a href="#org">org-mode</a></h3>
|
|
<div class="outline-text-3" id="text-2-6">
|
|
<p>
|
|
My <a href="#org">org-mode</a> configuration is pretty comprehensive, but not super well commented.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-htmlheaders" class="outline-2">
|
|
<h2 id="htmlheaders"><span class="section-number-2">3</span> HTML Headers</h2>
|
|
<div class="outline-text-2" id="text-3">
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-early" class="outline-2">
|
|
<h2 id="early"><span class="section-number-2">4</span> Early</h2>
|
|
<div class="outline-text-2" id="text-4">
|
|
<p>
|
|
The configurations in this section need to occur early in emacs startup for some reason or another.
|
|
</p>
|
|
</div>
|
|
<div id="outline-container-lexicalbinding" class="outline-3">
|
|
<h3 id="lexicalbinding"><span class="section-number-3">4.1</span> Lexical Binding</h3>
|
|
<div class="outline-text-3" id="text-4-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: #93a1a1;">;;; </span><span style="color: #93a1a1;">-*- lexical-binding: t -*-</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq-default</span> lexical-binding t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-security" class="outline-3">
|
|
<h3 id="security"><span class="section-number-3">4.2</span> Security</h3>
|
|
<div class="outline-text-3" id="text-4-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:secure</span> t<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:use-https-and-tls</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> tls-checktrust t<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>trustfile
|
|
<span style="color: #859900;">(</span>replace-regexp-in-string
|
|
<span style="color: #2aa198;">"\\\\"</span> <span style="color: #2aa198;">"/"</span>
|
|
<span style="color: #b58900;">(</span>replace-regexp-in-string
|
|
<span style="color: #2aa198;">"\n"</span> <span style="color: #2aa198;">""</span>
|
|
<span style="color: #268bd2;">(</span>shell-command-to-string <span style="color: #2aa198;">"python -m certifi"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> tls-program
|
|
<span style="color: #6c71c4;">(</span>list
|
|
<span style="color: #859900;">(</span>format <span style="color: #2aa198;">"gnutls-cli%s --x509cafile %s -p %%p %%h"</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>eq window-system 'w32<span style="color: #268bd2;">)</span> <span style="color: #2aa198;">".exe"</span> <span style="color: #2aa198;">""</span><span style="color: #b58900;">)</span> trustfile<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:test-security</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>bad-hosts
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">loop</span> for bad
|
|
in `<span style="color: #b58900;">(</span><span style="color: #2aa198;">"https://wrong.host.badssl.com/"</span>
|
|
<span style="color: #2aa198;">"https://self-signed.badssl.com/"</span><span style="color: #b58900;">)</span>
|
|
if <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">condition-case</span> _e
|
|
<span style="color: #268bd2;">(</span>url-retrieve
|
|
bad <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #859900;">(</span>_retrieved<span style="color: #859900;">)</span> t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #cb4b16; font-weight: bold;">error</span> nil<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
collect bad<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> bad-hosts
|
|
<span style="color: #6c71c4;">(</span><span style="color: #cb4b16; font-weight: bold;">error</span> <span style="color: #859900;">(</span>format <span style="color: #2aa198;">"tls misconfigured; retrieved %s ok"</span>
|
|
bad-hosts<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>url-retrieve <span style="color: #2aa198;">"https://badssl.com"</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #b58900;">(</span>_retrieved<span style="color: #b58900;">)</span> t<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> imalison:secure <span style="color: #b58900;">(</span>imalison:use-https-and-tls<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-elpaarchivesetup" class="outline-3">
|
|
<h3 id="elpaarchivesetup"><span class="section-number-3">4.3</span> ELPA Archive Setup</h3>
|
|
<div class="outline-text-3" id="text-4-3">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">package</span><span style="color: #2aa198;">)</span>
|
|
<span class="linenr"> 2: </span>
|
|
<span class="linenr"> 3: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:build-archive-uri</span> <span style="color: #b58900;">(</span>uri protocol<span style="color: #b58900;">)</span>
|
|
<span class="linenr"> 4: </span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">unless</span> protocol <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> protocol <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">if</span> imalison:secure <span style="color: #2aa198;">"https"</span> <span style="color: #2aa198;">"http"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span class="linenr"> 5: </span> <span style="color: #b58900;">(</span>format <span style="color: #2aa198;">"%s://%s"</span> protocol uri<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span class="linenr"> 6: </span>
|
|
<span class="linenr"> 7: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:melpa-uri</span> nil<span style="color: #2aa198;">)</span>
|
|
<span class="linenr"> 8: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:package-archive-triples</span>
|
|
<span class="linenr"> 9: </span> `<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"elpa"</span> <span style="color: #2aa198;">"tromey.com/elpa/"</span> <span style="color: #2aa198;">"http"</span><span style="color: #268bd2;">)</span>
|
|
<span class="linenr">10: </span> <span style="color: #268bd2;">(</span><span style="color: #2aa198;">"org"</span> <span style="color: #2aa198;">"orgmode.org/elpa/"</span> <span style="color: #2aa198;">"http"</span><span style="color: #268bd2;">)</span>
|
|
<span class="linenr">11: </span> <span style="color: #268bd2;">(</span><span style="color: #2aa198;">"melpa"</span> ,<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">or</span> imalison:melpa-uri <span style="color: #2aa198;">"melpa.org/packages/"</span><span style="color: #6c71c4;">)</span> nil<span style="color: #268bd2;">)</span>
|
|
<span class="linenr">12: </span> <span style="color: #268bd2;">(</span><span style="color: #2aa198;">"melpa-stable"</span> <span style="color: #2aa198;">"stable.melpa.org/packages/"</span> nil<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span class="linenr">13: </span>
|
|
<span class="linenr">14: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:add-package-archive</span> <span style="color: #b58900;">(</span>archive-name archive-uri<span style="color: #b58900;">)</span>
|
|
<span class="linenr">15: </span> <span style="color: #b58900;">(</span>add-to-list 'package-archives
|
|
<span class="linenr">16: </span> `<span style="color: #268bd2;">(</span>,archive-name . ,archive-uri<span style="color: #268bd2;">)</span> t<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span class="linenr">17: </span>
|
|
<span class="linenr">18: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for package-triple in imalison:package-archive-triples
|
|
<span class="linenr">19: </span> do <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">cl-destructuring-bind</span> <span style="color: #268bd2;">(</span>archive-name archive-uri protocol<span style="color: #268bd2;">)</span> package-triple
|
|
<span class="linenr">20: </span> <span style="color: #268bd2;">(</span>imalison:add-package-archive
|
|
<span class="linenr">21: </span> archive-name <span style="color: #6c71c4;">(</span>imalison:build-archive-uri archive-uri protocol<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-bootstrappackageloading" class="outline-3">
|
|
<h3 id="bootstrappackageloading"><span class="section-number-3">4.4</span> Bootstrap Package Loading</h3>
|
|
<div class="outline-text-3" id="text-4-4">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">ensure-packages-installed</span> <span style="color: #b58900;">(</span>packages<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">unless</span> package-archive-contents
|
|
<span style="color: #268bd2;">(</span>package-refresh-contents<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>mapcar
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #6c71c4;">(</span>package<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #859900;">(</span>package-installed-p package<span style="color: #859900;">)</span>
|
|
package
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #b58900;">(</span>message <span style="color: #268bd2;">(</span>format <span style="color: #2aa198;">"Installing package %s."</span> package<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>package-install package<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
packages<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</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: #2aa198;">(</span>package-initialize t<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>ensure-packages-installed '<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">use-package</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">eval-when-compile</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">use-package</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> use-package-always-ensure t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-setupautocompile" class="outline-3">
|
|
<h3 id="setupautocompile"><span class="section-number-3">4.5</span> Setup auto-compile</h3>
|
|
<div class="outline-text-3" id="text-4-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">auto-compile</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:ensure</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>auto-compile-on-load-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>auto-compile-on-save-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-prefernewerversions" class="outline-3">
|
|
<h3 id="prefernewerversions"><span class="section-number-3">4.6</span> Prefer Newer Versions</h3>
|
|
<div class="outline-text-3" id="text-4-6">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> load-prefer-newer t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-customfiles" class="outline-3">
|
|
<h3 id="customfiles"><span class="section-number-3">4.7</span> Custom Files</h3>
|
|
<div class="outline-text-3" id="text-4-7">
|
|
<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 added 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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">machine-custom</span> <span style="color: #2aa198;">"~/.emacs.d/this-machine.el"</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">custom-after-file</span> <span style="color: #2aa198;">"~/.emacs.d/custom-after.el"</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> custom-file <span style="color: #2aa198;">"~/.emacs.d/custom-before.el"</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>file-exists-p custom-file<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>load custom-file<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-emit" class="outline-3">
|
|
<h3 id="emit"><span class="section-number-3">4.8</span> emit</h3>
|
|
<div class="outline-text-3" id="text-4-8">
|
|
</div><div id="outline-container-thisneedstobedonebetterbutitworksfornow" class="outline-4">
|
|
<h4 id="thisneedstobedonebetterbutitworksfornow"><span class="section-number-4">4.8.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-4-8-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>file-exists-p <span style="color: #2aa198;">"~/.emacs.d/load.d/emit.el"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>load <span style="color: #2aa198;">"~/.emacs.d/load.d/emit.el"</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-benchmarking" class="outline-3">
|
|
<h3 id="benchmarking"><span class="section-number-3">4.9</span> Benchmarking</h3>
|
|
<div class="outline-text-3" id="text-4-9">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:do-benchmark</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">benchmark-init</span>
|
|
<span style="color: #657b83; font-weight: bold;">:if</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">bound-and-true-p</span> imalison:do-benchmark<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-guidisables" class="outline-3">
|
|
<h3 id="guidisables"><span class="section-number-3">4.10</span> GUI Disables</h3>
|
|
<div class="outline-text-3" id="text-4-10">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>fboundp 'menu-bar-mode<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>menu-bar-mode -1<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>fboundp 'tool-bar-mode<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>tool-bar-mode -1<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>fboundp 'scroll-bar-mode<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>scroll-bar-mode -1<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
<p>
|
|
Tooltips are annoying:
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #b58900;">(</span>fboundp 'tooltip-mode<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>tooltip-mode -1<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> tooltip-use-echo-area t<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>'
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-bytecompiler" class="outline-3">
|
|
<h3 id="bytecompiler"><span class="section-number-3">4.11</span> Byte-Compiler</h3>
|
|
<div class="outline-text-3" id="text-4-11">
|
|
<p>
|
|
These definitions silence the byte-compiler.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">grep-find-ignored-directories</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">grep-find-ignored-files</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">ido-context-switch-command</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">ido-cur-item</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">ido-cur-list</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">ido-default-item</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">inherit-input-method</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">oauth--token-data</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">tls-checktrust</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">tls-program</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">url-callback-arguments</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">url-callback-function</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">url-http-extra-headers</span> nil<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This variable doesn't exist in old versions of org-mode</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">org-show-context-detail</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-execpathfromshell" class="outline-3">
|
|
<h3 id="execpathfromshell"><span class="section-number-3">4.12</span> exec-path-from-shell</h3>
|
|
<div class="outline-text-3" id="text-4-12">
|
|
<p>
|
|
Sets environment variables by starting a shell.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">exec-path-from-shell</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">For debugging</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> nil
|
|
<span style="color: #6c71c4;">(</span>message <span style="color: #2aa198;">"path: %s, setup: %s"</span> <span style="color: #859900;">(</span>getenv <span style="color: #2aa198;">"PATH"</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>getenv <span style="color: #2aa198;">"ENVIRONMENT_SETUP_DONE"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> exec-path-from-shell-debug t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> exec-path-from-shell-arguments <span style="color: #6c71c4;">(</span>list <span style="color: #2aa198;">"-l"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> exec-path-from-shell-check-startup-files nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'exec-path-from-shell-variables <span style="color: #2aa198;">"SHELL"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'exec-path-from-shell-variables <span style="color: #2aa198;">"GOPATH"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'exec-path-from-shell-variables <span style="color: #2aa198;">"ENVIRONMENT_SETUP_DONE"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'exec-path-from-shell-variables <span style="color: #2aa198;">"PYTHONPATH"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>exec-path-from-shell-initialize<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-noflet" class="outline-3">
|
|
<h3 id="noflet"><span class="section-number-3">4.13</span> noflet</h3>
|
|
<div class="outline-text-3" id="text-4-13">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">noflet</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-nonforkingshellcommandtostring" class="outline-3">
|
|
<h3 id="nonforkingshellcommandtostring"><span class="section-number-3">4.14</span> Non-Forking Shell Command To String</h3>
|
|
<div class="outline-text-3" id="text-4-14">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:call-process-to-string</span> <span style="color: #b58900;">(</span>program <span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">with-temp-buffer</span>
|
|
<span style="color: #268bd2;">(</span>apply 'call-process program nil <span style="color: #6c71c4;">(</span>current-buffer<span style="color: #6c71c4;">)</span> nil args<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>buffer-string<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:get-call-process-args-from-shell-command</span> <span style="color: #b58900;">(</span>command<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">cl-destructuring-bind</span>
|
|
<span style="color: #268bd2;">(</span>the-command . args<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>split-string command <span style="color: #2aa198;">" "</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>binary-path <span style="color: #b58900;">(</span>executable-find the-command<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> binary-path
|
|
<span style="color: #859900;">(</span>cons binary-path args<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:shell-command-to-string</span> <span style="color: #b58900;">(</span>command<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>call-process-args
|
|
<span style="color: #859900;">(</span>imalison:get-call-process-args-from-shell-command command<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> call-process-args
|
|
<span style="color: #6c71c4;">(</span>apply 'imalison:call-process-to-string call-process-args<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>shell-command-to-string command<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:try-call-process</span> <span style="color: #b58900;">(</span>command<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>call-process-args
|
|
<span style="color: #859900;">(</span>imalison:get-call-process-args-from-shell-command command<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> call-process-args
|
|
<span style="color: #6c71c4;">(</span>apply 'imalison:call-process-to-string call-process-args<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
This had to be disabled because it was causing a bunch of issues with projectile.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span>advice-add 'shell-command-to-string <span style="color: #657b83; font-weight: bold;">:before-until</span> 'imalison:try-call-process<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
This solution only applies it to projectile-find-file
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:call-with-quick-shell-command</span> <span style="color: #b58900;">(</span>fn <span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">noflet</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>shell-command-to-string <span style="color: #859900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">or</span> <span style="color: #b58900;">(</span>apply 'imalison:try-call-process args<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>apply this-fn args<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>apply fn args<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>advice-add 'projectile-find-file <span style="color: #657b83; font-weight: bold;">:around</span> 'imalison:call-with-quick-shell-command<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-setemacsenvironmentvariable" class="outline-3">
|
|
<h3 id="setemacsenvironmentvariable"><span class="section-number-3">4.15</span> Set EMACS environment variable</h3>
|
|
<div class="outline-text-3" id="text-4-15">
|
|
<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: #2aa198;">(</span>setenv <span style="color: #2aa198;">"EMACS"</span>
|
|
<span style="color: #b58900;">(</span>file-truename <span style="color: #268bd2;">(</span>expand-file-name invocation-name invocation-directory<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</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…
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-functions" class="outline-2">
|
|
<h2 id="functions"><span class="section-number-2">5</span> Functions</h2>
|
|
<div class="outline-text-2" id="text-5">
|
|
</div><div id="outline-container-joinpaths" class="outline-3">
|
|
<h3 id="joinpaths"><span class="section-number-3">5.1</span> Join Paths</h3>
|
|
<div class="outline-text-3" id="text-5-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:join-paths</span> <span style="color: #b58900;">(</span>root <span style="color: #b58900;">&rest</span> dirs<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>result root<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for dir in dirs do
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> result <span style="color: #859900;">(</span>concat <span style="color: #b58900;">(</span>file-name-as-directory result<span style="color: #b58900;">)</span> dir<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
result<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-variables" class="outline-3">
|
|
<h3 id="variables"><span class="section-number-3">5.2</span> Variables</h3>
|
|
<div class="outline-text-3" id="text-5-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:projects-directory</span>
|
|
<span style="color: #b58900;">(</span>imalison:join-paths <span style="color: #268bd2;">(</span>substitute-in-file-name <span style="color: #2aa198;">"$HOME"</span><span style="color: #268bd2;">)</span> <span style="color: #2aa198;">"Projects"</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:gpg-key</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-usepackagewrapperwithlocalloadpathsupport" class="outline-3">
|
|
<h3 id="usepackagewrapperwithlocalloadpathsupport"><span class="section-number-3">5.3</span> Use Package Wrapper With Local Load Path Support</h3>
|
|
<div class="outline-text-3" id="text-5-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span>put 'imalison:use-package 'lisp-indent-function 'defun<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>put 'imalison:use-package* 'lisp-indent-function 'defun<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:use-package*</span> <span style="color: #b58900;">(</span>package target-directory <span style="color: #b58900;">&rest</span> forms<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>actual-target <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #b58900;">(</span>file-exists-p target-directory<span style="color: #b58900;">)</span>
|
|
target-directory
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>in-projects <span style="color: #859900;">(</span>imalison:join-paths imalison:projects-directory
|
|
target-directory<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #6c71c4;">(</span>file-exists-p in-projects<span style="color: #6c71c4;">)</span>
|
|
in-projects<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>additional-forms
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">when</span> actual-target
|
|
<span style="color: #b58900;">(</span>list
|
|
<span style="color: #657b83; font-weight: bold;">:load-path</span> actual-target
|
|
<span style="color: #657b83; font-weight: bold;">:ensure</span> nil<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
`<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> ,package
|
|
,@additional-forms ,@forms<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:use-package</span> <span style="color: #b58900;">(</span>package <span style="color: #b58900;">&rest</span> forms<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package*</span> ,package ,<span style="color: #268bd2;">(</span>symbol-name package<span style="color: #268bd2;">)</span> ,@forms<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-requiredpackages" class="outline-3">
|
|
<h3 id="requiredpackages"><span class="section-number-3">5.4</span> Required Packages</h3>
|
|
<div class="outline-text-3" id="text-5-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-s" class="outline-4">
|
|
<h4 id="s"><span class="section-number-4">5.4.1</span> s</h4>
|
|
<div class="outline-text-4" id="text-5-4-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">s</span> <span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-dash" class="outline-4">
|
|
<h4 id="dash"><span class="section-number-4">5.4.2</span> dash</h4>
|
|
<div class="outline-text-4" id="text-5-4-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">dash</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>dash-enable-font-lock<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-gh" class="outline-4">
|
|
<h4 id="gh"><span class="section-number-4">5.4.3</span> gh</h4>
|
|
<div class="outline-text-4" id="text-5-4-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package*</span> gh <span style="color: #2aa198;">"gh.el"</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-shutup" class="outline-4">
|
|
<h4 id="shutup"><span class="section-number-4">5.4.4</span> shut-up</h4>
|
|
<div class="outline-text-4" id="text-5-4-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">shut-up</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:shut-up-around</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">function</span> <span style="color: #b58900;">&rest</span> args<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">shut-up</span> <span style="color: #6c71c4;">(</span>apply function args<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-pcache" class="outline-4">
|
|
<h4 id="pcache"><span class="section-number-4">5.4.5</span> pcache</h4>
|
|
<div class="outline-text-4" id="text-5-4-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">pcache</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-parsecsv" class="outline-4">
|
|
<h4 id="parsecsv"><span class="section-number-4">5.4.6</span> parse-csv</h4>
|
|
<div class="outline-text-4" id="text-5-4-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">parse-csv</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-emit1" class="outline-4">
|
|
<h4 id="emit1"><span class="section-number-4">5.4.7</span> emit</h4>
|
|
<div class="outline-text-4" id="text-5-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package</span> emit
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-request" class="outline-4">
|
|
<h4 id="request"><span class="section-number-4">5.4.8</span> request</h4>
|
|
<div class="outline-text-4" id="text-5-4-8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">request</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-namedbuild" class="outline-3">
|
|
<h3 id="namedbuild"><span class="section-number-3">5.5</span> Named Build</h3>
|
|
<div class="outline-text-3" id="text-5-5">
|
|
<p>
|
|
<a id="orgtarget5"></a>
|
|
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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:named-build</span> <span style="color: #b58900;">(</span>name builder <span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defalias</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">quote</span> ,name<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>,builder ,@args<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>put 'imalison:named-build 'lisp-indent-function 1<span style="color: #2aa198;">)</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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:named-builder-builder</span> <span style="color: #b58900;">(</span>named-builder-name builder-name<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> ,named-builder-name <span style="color: #6c71c4;">(</span>function-name <span style="color: #b58900;">&rest</span> args<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>cons 'imalison:named-build
|
|
<span style="color: #859900;">(</span>cons function-name
|
|
<span style="color: #b58900;">(</span>cons <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">quote</span> ,builder-name<span style="color: #268bd2;">)</span> args<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>put <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">quote</span> ,named-builder-name<span style="color: #6c71c4;">)</span> 'lisp-indent-function 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:named-builder</span> <span style="color: #b58900;">(</span>name<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">imalison:named-builder-builder</span>
|
|
,name ,<span style="color: #268bd2;">(</span>intern <span style="color: #6c71c4;">(</span>concat <span style="color: #859900;">(</span>symbol-name name<span style="color: #859900;">)</span> <span style="color: #2aa198;">"-fn"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-emacsversionpredicate" class="outline-3">
|
|
<h3 id="emacsversionpredicate"><span class="section-number-3">5.6</span> Emacs Version Predicate</h3>
|
|
<div class="outline-text-3" id="text-5-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:emacs-version-predicate-fn</span> <span style="color: #b58900;">(</span>major-version minor-version<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">or</span> <span style="color: #6c71c4;">(</span>> emacs-major-version ,major-version<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">and</span> <span style="color: #859900;">(</span>>= emacs-major-version ,major-version<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>>= emacs-minor-version ,minor-version<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:check-emacs-version</span> <span style="color: #b58900;">(</span>major-version minor-version<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>funcall <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:emacs-version-predicate-fn</span> major-version minor-version<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:named-builder</span> imalison:emacs-version-predicate<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-composefunctions" class="outline-3">
|
|
<h3 id="composefunctions"><span class="section-number-3">5.7</span> Compose Functions</h3>
|
|
<div class="outline-text-3" id="text-5-7">
|
|
</div><div id="outline-container-aversionsupportingmacros" class="outline-4">
|
|
<h4 id="aversionsupportingmacros"><span class="section-number-4">5.7.1</span> A version supporting macros</h4>
|
|
<div class="outline-text-4" id="text-5-7-1">
|
|
<p>
|
|
<a id="orgtarget6"></a>
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:help-function-arglist</span> <span style="color: #b58900;">(</span>fn<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>result <span style="color: #859900;">(</span>help-function-arglist fn<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #6c71c4;">(</span>eq result t<span style="color: #6c71c4;">)</span> '<span style="color: #6c71c4;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #6c71c4;">)</span> result<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:compose-fn</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> funcs<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>last-function <span style="color: #859900;">(</span>car <span style="color: #b58900;">(</span>last funcs<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>arguments <span style="color: #859900;">(</span>imalison:help-function-arglist last-function<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>call-arguments <span style="color: #859900;">(</span>delq '<span style="color: #b58900;">&optional</span> arguments<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">When we have an &rest arguments there is no point in taking any</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">of the arguments by name, so we simply pass them all as an</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">argument list. See the comment below to understand how this</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">impacts the evaluation of the last function.</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #6c71c4;">(</span>memq '<span style="color: #b58900;">&rest</span> arguments<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> arguments '<span style="color: #859900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> call-arguments '<span style="color: #859900;">(</span>args<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
`<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-argspec</span> ,arguments ,call-arguments ,@funcs<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:compose-argspec</span> <span style="color: #b58900;">(</span>arguments call-arguments <span style="color: #b58900;">&rest</span> funcs<span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"Build a new function with NAME that is the composition of FUNCS."</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> ,arguments
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-helper</span> ,funcs ,call-arguments<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:compose-helper</span> <span style="color: #b58900;">(</span>funcs arguments<span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"Builds funcalls of FUNCS applied to the arg."</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>equal <span style="color: #6c71c4;">(</span>length funcs<span style="color: #6c71c4;">)</span> 1<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>last-function <span style="color: #b58900;">(</span>car funcs<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This hideous clause is here because it is the only way to</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">handle functions that take &rest args.</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #859900;">(</span>memq '<span style="color: #b58900;">&rest</span> <span style="color: #b58900;">(</span>imalison:help-function-arglist last-function<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> last-function <span style="color: #b58900;">(</span>apply-partially 'apply last-function<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
`<span style="color: #6c71c4;">(</span>,last-function ,@arguments<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
`<span style="color: #268bd2;">(</span>,<span style="color: #6c71c4;">(</span>car funcs<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-helper</span> ,<span style="color: #859900;">(</span>cdr funcs<span style="color: #859900;">)</span> ,arguments<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:compose-macro-fn</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span>cons 'macro <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-fn</span> ,@args<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:named-builder</span> imalison:compose<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:named-builder</span> imalison:compose-macro<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-arbitraryargumentsateverystep" class="outline-4">
|
|
<h4 id="arbitraryargumentsateverystep"><span class="section-number-4">5.7.2</span> Arbitrary arguments at every step</h4>
|
|
<div class="outline-text-4" id="text-5-7-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:make-list</span> <span style="color: #b58900;">(</span>thing<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>listp thing<span style="color: #268bd2;">)</span>
|
|
thing
|
|
<span style="color: #268bd2;">(</span>list thing<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:compose-with-apply</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> funcs<span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"Build a new function with NAME that is the composition of FUNCS."</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-with-apply-helper</span> ,funcs<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:compose-with-apply-helper</span> <span style="color: #b58900;">(</span>funcs<span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"Builds funcalls of FUNCS applied to the arg."</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>equal <span style="color: #6c71c4;">(</span>length funcs<span style="color: #6c71c4;">)</span> 0<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">quote</span> args<span style="color: #268bd2;">)</span>
|
|
`<span style="color: #268bd2;">(</span>apply ,<span style="color: #6c71c4;">(</span>car funcs<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>imalison:make-list <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-with-apply-helper</span> ,<span style="color: #b58900;">(</span>cdr funcs<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-simplerunaryversion" class="outline-4">
|
|
<h4 id="simplerunaryversion"><span class="section-number-4">5.7.3</span> Simpler unary version</h4>
|
|
<div class="outline-text-4" id="text-5-7-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:compose-unary</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> funcs<span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"Build a new function with NAME that is the composition of FUNCS."</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">(</span>arg<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-helper-unary</span> ,funcs<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:compose-helper-unary</span> <span style="color: #b58900;">(</span>funcs<span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"Builds funcalls of FUNCS applied to the arg."</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>equal <span style="color: #6c71c4;">(</span>length funcs<span style="color: #6c71c4;">)</span> 0<span style="color: #268bd2;">)</span>
|
|
'arg
|
|
`<span style="color: #268bd2;">(</span>funcall ,<span style="color: #6c71c4;">(</span>car funcs<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-helper-unary</span> ,<span style="color: #859900;">(</span>cdr funcs<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-withadvice" class="outline-3">
|
|
<h3 id="withadvice"><span class="section-number-3">5.8</span> With Advice</h3>
|
|
<div class="outline-text-3" id="text-5-8">
|
|
<p>
|
|
Taken from <a href="http://emacs.stackexchange.com/questions/16490/emacs-let-bound-advice">here</a>.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:with-advice</span> <span style="color: #b58900;">(</span>args <span style="color: #b58900;">&rest</span> body<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">declare</span> <span style="color: #268bd2;">(</span>indent 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>fun-name <span style="color: #859900;">(</span>car args<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>advice <span style="color: #859900;">(</span>cadr args<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>orig-sym <span style="color: #859900;">(</span>make-symbol <span style="color: #2aa198;">"orig"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
`<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-letf*</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>,orig-sym <span style="color: #b58900;">(</span>symbol-function ',fun-name<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #b58900;">(</span>symbol-function ',fun-name<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>apply ,advice ,orig-sym args<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
,@body<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-makeinteractive" class="outline-3">
|
|
<h3 id="makeinteractive"><span class="section-number-3">5.9</span> Make Interactive</h3>
|
|
<div class="outline-text-3" id="text-5-9">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:make-interactive-fn</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">function</span><span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>apply ,function args<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:named-builder</span> imalison:make-interactive<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-adviceaddaroundbuilder" class="outline-3">
|
|
<h3 id="adviceaddaroundbuilder"><span class="section-number-3">5.10</span> Advice Add Around Builder</h3>
|
|
<div class="outline-text-3" id="text-5-10">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:advice-add-around-builder-fn</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> functions<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-argspec</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">function</span> <span style="color: #b58900;">&rest</span> args<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">function</span> args<span style="color: #268bd2;">)</span> ,@functions apply<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:named-builder</span> imalison:advice-add-around-builder<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-killnew" class="outline-4">
|
|
<h4 id="killnew"><span class="section-number-4">5.10.1</span> Kill New</h4>
|
|
<div class="outline-text-4" id="text-5-10-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:advice-add-around-builder</span> imalison:kill-new-around kill-new<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-letaround" class="outline-3">
|
|
<h3 id="letaround"><span class="section-number-3">5.11</span> Let Around</h3>
|
|
<div class="outline-text-3" id="text-5-11">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:let-around-fn</span> <span style="color: #b58900;">(</span>orig-func <span style="color: #b58900;">&rest</span> forms<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>orig-interactive-form <span style="color: #859900;">(</span>interactive-form orig-func<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>docstring-form <span style="color: #859900;">(</span>format <span style="color: #2aa198;">"Call `</span><span style="color: #268bd2; font-weight: bold;">%s</span><span style="color: #2aa198;">' with bindings: %s."</span> orig-func forms<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>additional-forms <span style="color: #859900;">(</span>list docstring-form<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> orig-interactive-form
|
|
<span style="color: #6c71c4;">(</span>nconc additional-forms <span style="color: #859900;">(</span>list orig-interactive-form<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
`<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #6c71c4;">)</span>
|
|
,@additional-forms
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> ,forms
|
|
<span style="color: #859900;">(</span>apply <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">quote</span> ,orig-func<span style="color: #b58900;">)</span> args<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:named-builder</span> imalison:let-around<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-letaroundadvice" class="outline-3">
|
|
<h3 id="letaroundadvice"><span class="section-number-3">5.12</span> Let Around Advice</h3>
|
|
<div class="outline-text-3" id="text-5-12">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:let-advise-around-fn</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> forms<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">(</span>orig-func <span style="color: #b58900;">&rest</span> args<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> ,forms
|
|
<span style="color: #6c71c4;">(</span>apply orig-func args<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:named-builder</span> imalison:let-advise-around<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-letadvise" class="outline-3">
|
|
<h3 id="letadvise"><span class="section-number-3">5.13</span> Let Advise</h3>
|
|
<div class="outline-text-3" id="text-5-13">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:let-advise</span> <span style="color: #b58900;">(</span>advised-function <span style="color: #b58900;">&rest</span> forms<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>advice-fn-name <span style="color: #859900;">(</span>imalison:concat-symbols
|
|
<span style="color: #2aa198;">"around-advice-"</span> advised-function<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
`<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">imalison:let-advise-around</span> ,advice-fn-name ,@forms<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>advice-add <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">quote</span> ,advised-function<span style="color: #859900;">)</span> <span style="color: #657b83; font-weight: bold;">:around</span> <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">quote</span> ,advice-fn-name<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>put 'imalison:let-advise 'lisp-indent-function 1<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-composearoundbuilder" class="outline-3">
|
|
<h3 id="composearoundbuilder"><span class="section-number-3">5.14</span> Compose Around Builder</h3>
|
|
<div class="outline-text-3" id="text-5-14">
|
|
<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: #93a1a1;">;; </span><span style="color: #93a1a1;">TODO/XXX: Isn't this just apply? why doesn't apply work here</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:around-identity</span> <span style="color: #b58900;">(</span>fn <span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>apply fn args<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:compose-around-builder-fn</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> functions<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-fn</span> ,@functions imalison:around-identity<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:named-builder</span> imalison:compose-around-builder<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-measuretime" class="outline-3">
|
|
<h3 id="measuretime"><span class="section-number-3">5.15</span> Measure Time</h3>
|
|
<div class="outline-text-3" id="text-5-15">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:measure-time</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> body<span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"Measure and return the running time of the code block."</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">declare</span> <span style="color: #268bd2;">(</span>indent defun<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>start <span style="color: #859900;">(</span>make-symbol <span style="color: #2aa198;">"start"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
`<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>,start <span style="color: #b58900;">(</span>float-time<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
,@body
|
|
<span style="color: #6c71c4;">(</span>- <span style="color: #859900;">(</span>float-time<span style="color: #859900;">)</span> ,start<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-addfilestoorgagendafiles" class="outline-3">
|
|
<h3 id="addfilestoorgagendafiles"><span class="section-number-3">5.16</span> Add Files to <code>org-agenda-files</code></h3>
|
|
<div class="outline-text-3" id="text-5-16">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:add-to-org-agenda-files</span> <span style="color: #b58900;">(</span>incoming-files<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-agenda-files
|
|
<span style="color: #268bd2;">(</span>delete-dups
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for filepath in <span style="color: #859900;">(</span>append org-agenda-files incoming-files<span style="color: #859900;">)</span>
|
|
when <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">and</span> filepath <span style="color: #b58900;">(</span>file-exists-p <span style="color: #268bd2;">(</span>file-truename filepath<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
collect <span style="color: #859900;">(</span>file-truename filepath<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-getstringfromfile" class="outline-3">
|
|
<h3 id="getstringfromfile"><span class="section-number-3">5.17</span> Get String From File</h3>
|
|
<div class="outline-text-3" id="text-5-17">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:get-string-from-file</span> <span style="color: #b58900;">(</span>file-path<span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"Return file-path's file content."</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">with-temp-buffer</span>
|
|
<span style="color: #268bd2;">(</span>insert-file-contents file-path<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>buffer-string<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-getcurrentlocation" class="outline-3">
|
|
<h3 id="getcurrentlocation"><span class="section-number-3">5.18</span> Get Current Location</h3>
|
|
<div class="outline-text-3" id="text-5-18">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:get-lat-long</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">condition-case</span> _ex
|
|
<span style="color: #268bd2;">(</span>mapcar 'string-to-number <span style="color: #6c71c4;">(</span>s-split <span style="color: #2aa198;">","</span> <span style="color: #859900;">(</span>s-trim <span style="color: #b58900;">(</span>shell-command-to-string
|
|
<span style="color: #2aa198;">"whereami"</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #cb4b16; font-weight: bold;">error</span> <span style="color: #6c71c4;">(</span>list 37.7879312624533 -122.402388853402<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-haversinedistance" class="outline-3">
|
|
<h3 id="haversinedistance"><span class="section-number-3">5.19</span> Haversine distance</h3>
|
|
<div class="outline-text-3" id="text-5-19">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:sin2</span> <span style="color: #b58900;">(</span>p<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>sin-p <span style="color: #859900;">(</span>sin p<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>* sin-p sin-p<span style="color: #268bd2;">)</span> <span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:haversine-distance</span>
|
|
<span style="color: #b58900;">(</span>left-lat-long right-lat-long <span style="color: #b58900;">&optional</span> radius<span style="color: #b58900;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Default to earth radius in km</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">unless</span> radius <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> radius 6378.1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">cl-destructuring-bind</span> <span style="color: #268bd2;">(</span>left-lat left-long<span style="color: #268bd2;">)</span> left-lat-long
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-destructuring-bind</span> <span style="color: #6c71c4;">(</span>right-lat right-long<span style="color: #6c71c4;">)</span> right-lat-long
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>l1 <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">degrees-to-radians</span> left-lat<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>f1 <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">degrees-to-radians</span> left-long<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>l2 <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">degrees-to-radians</span> right-lat<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>f2 <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">degrees-to-radians</span> right-long<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span> <span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>* 2 radius
|
|
<span style="color: #b58900;">(</span>asin
|
|
<span style="color: #268bd2;">(</span>sqrt
|
|
<span style="color: #6c71c4;">(</span>+ <span style="color: #859900;">(</span>imalison:sin2 <span style="color: #2aa198;">(</span>/ <span style="color: #b58900;">(</span>- f2 f1<span style="color: #b58900;">)</span> 2<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>* <span style="color: #2aa198;">(</span>cos f2<span style="color: #2aa198;">)</span> <span style="color: #2aa198;">(</span>cos f1<span style="color: #2aa198;">)</span> <span style="color: #2aa198;">(</span>imalison:sin2 <span style="color: #b58900;">(</span>/ <span style="color: #268bd2;">(</span>- l2 l1<span style="color: #268bd2;">)</span> 2<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span><span style="color: #859900;">)</span> <span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-fontsize" class="outline-3">
|
|
<h3 id="fontsize"><span class="section-number-3">5.20</span> Font Size</h3>
|
|
<div class="outline-text-3" id="text-5-20">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:default-font-size-pt</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">cond</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>eq system-type 'darwin<span style="color: #6c71c4;">)</span> 120<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>eq system-type 'gnu/linux<span style="color: #6c71c4;">)</span> 105<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:huge-font-size</span> 280<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:current-font-size</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span>plist-get <span style="color: #268bd2;">(</span>custom-face-attributes-get 'default nil<span style="color: #268bd2;">)</span> <span style="color: #657b83; font-weight: bold;">:height</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:set-font-size</span> <span style="color: #b58900;">(</span>size<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #268bd2;">(</span>list <span style="color: #6c71c4;">(</span>string-to-number <span style="color: #859900;">(</span>read-string <span style="color: #2aa198;">"Enter a font size: "</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>set-face-attribute 'default nil <span style="color: #657b83; font-weight: bold;">:height</span> size<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:set-huge-font-size</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>imalison:set-font-size imalison:huge-font-size<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">cl-defun</span> <span style="color: #268bd2;">imalison:modify-font-size</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&optional</span> <span style="color: #268bd2;">(</span>arg 10<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #2aa198;">"p"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>imalison:set-font-size <span style="color: #268bd2;">(</span>+ <span style="color: #6c71c4;">(</span>imalison:current-font-size<span style="color: #6c71c4;">)</span> arg<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:font-size-incr</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>imalison:modify-font-size +10<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:font-size-decr</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>imalison:modify-font-size -10<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:font-size-reset</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>imalison:set-font-size imalison:default-font-size-pt<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-messageresultbuilder" class="outline-3">
|
|
<h3 id="messageresultbuilder"><span class="section-number-3">5.21</span> Message Result Builder</h3>
|
|
<div class="outline-text-3" id="text-5-21">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:message-result-builder</span> <span style="color: #b58900;">(</span>new-function-name function-to-call <span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> ,new-function-name <span style="color: #268bd2;">()</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>message <span style="color: #2aa198;">"%s"</span> <span style="color: #6c71c4;">(</span>apply <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">quote</span> ,function-to-call<span style="color: #859900;">)</span> <span style="color: #859900;">(</span>list ,@args<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:message-result-builder-runtime</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">function</span> <span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>message <span style="color: #2aa198;">"%s"</span> <span style="color: #6c71c4;">(</span>apply function-to-call args<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:message-function-result</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">function</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #268bd2;">(</span>find-function-read<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>message <span style="color: #2aa198;">"%s"</span> <span style="color: #268bd2;">(</span>funcall function<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-customshellcommandonregion" class="outline-3">
|
|
<h3 id="customshellcommandonregion"><span class="section-number-3">5.22</span> Custom <code>shell-command-on-region</code></h3>
|
|
<div class="outline-text-3" id="text-5-22">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:copy-shell-command-on-region</span> <span style="color: #b58900;">(</span>start end command<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #268bd2;">(</span>list <span style="color: #6c71c4;">(</span>region-beginning<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>region-end<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>read-shell-command <span style="color: #2aa198;">"Shell command on region: "</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>original-buffer <span style="color: #859900;">(</span>current-buffer<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">with-temp-buffer</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>temp-buffer <span style="color: #268bd2;">(</span>current-buffer<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">with-current-buffer</span> original-buffer
|
|
<span style="color: #b58900;">(</span>shell-command-on-region start end command temp-buffer<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>min <span style="color: #6c71c4;">(</span>point-min<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>max <span style="color: #6c71c4;">(</span>point-max<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>kill-ring-save min max<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>buffer-substring min max<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:shell-command-on-region-replace</span> <span style="color: #b58900;">(</span>start end command<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #268bd2;">(</span>list <span style="color: #6c71c4;">(</span>region-beginning<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>region-end<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>read-shell-command <span style="color: #2aa198;">"Shell command on region: "</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>shell-command-on-region start end command nil t<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:shell-command-on-region
|
|
imalison:copy-shell-command-on-region
|
|
imalison:shell-command-on-region-replace<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-copyyankstringfunctions" class="outline-3">
|
|
<h3 id="copyyankstringfunctions"><span class="section-number-3">5.23</span> Copy/Yank String Functions</h3>
|
|
<div class="outline-text-3" id="text-5-23">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:compose-copy-builder-fn</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> funcs<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">imalison:make-interactive-fn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-fn</span> kill-new ,@funcs<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:named-builder</span> imalison:compose-copy-builder<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-copyportionsofthebufferfilename" class="outline-4">
|
|
<h4 id="copyportionsofthebufferfilename"><span class="section-number-4">5.23.1</span> Copy portions of the buffer file name</h4>
|
|
<div class="outline-text-4" id="text-5-23-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:copy-buffer-file-path-builder</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-copy-builder</span> ,@args buffer-file-name<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:copy-buffer-file-path-builder</span> imalison:copy-buffer-file-path-full<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:copy-buffer-file-path-builder</span> imalison:copy-buffer-file-name
|
|
file-name-nondirectory<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:copy-buffer-file-path-builder</span> imalison:copy-buffer-file-path
|
|
car
|
|
projectile-make-relative-to-root
|
|
list<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-copythecurrentbranchusingmagit" class="outline-4">
|
|
<h4 id="copythecurrentbranchusingmagit"><span class="section-number-4">5.23.2</span> Copy the current branch using magit</h4>
|
|
<div class="outline-text-4" id="text-5-23-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-copy-builder</span> imalison:copy-current-git-branch
|
|
magit-get-current-branch<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-copythecurrentbuffername" class="outline-4">
|
|
<h4 id="copythecurrentbuffername"><span class="section-number-4">5.23.3</span> Copy the current buffer name</h4>
|
|
<div class="outline-text-4" id="text-5-23-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-copy-builder</span> imalison:copy-current-buffer-name
|
|
buffer-name<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-copythelastmessage" class="outline-4">
|
|
<h4 id="copythelastmessage"><span class="section-number-4">5.23.4</span> Copy the last message</h4>
|
|
<div class="outline-text-4" id="text-5-23-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:last-message</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&optional</span> num<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">or</span> num <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> num 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>= num 0<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>current-message<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">save-excursion</span>
|
|
<span style="color: #6c71c4;">(</span>set-buffer <span style="color: #2aa198;">"*Messages*"</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">save-excursion</span>
|
|
<span style="color: #859900;">(</span>forward-line <span style="color: #b58900;">(</span>- 1 num<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>backward-char<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>end <span style="color: #6c71c4;">(</span>point<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>forward-line 0<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>buffer-substring-no-properties <span style="color: #268bd2;">(</span>point<span style="color: #268bd2;">)</span> end<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:compose-copy-builder</span> imalison:copy-last-message imalison:last-message<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-namedcompile" class="outline-3">
|
|
<h3 id="namedcompile"><span class="section-number-3">5.24</span> Named Compile</h3>
|
|
<div class="outline-text-3" id="text-5-24">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:named-compile</span> <span style="color: #b58900;">(</span>command<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span>
|
|
<span style="color: #268bd2;">(</span>list
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>command <span style="color: #268bd2;">(</span>eval compile-command<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">or</span> compilation-read-command current-prefix-arg<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>compilation-read-command command<span style="color: #b58900;">)</span>
|
|
command<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>compilation-start command nil <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>format <span style="color: #2aa198;">"*compilation %s*"</span> command<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-replaceescapesequences" class="outline-3">
|
|
<h3 id="replaceescapesequences"><span class="section-number-3">5.25</span> Replace Escape Sequences</h3>
|
|
<div class="outline-text-3" id="text-5-25">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:replace-escape-sequences</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">shut-up</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>delimited <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">and</span> transient-mark-mode mark-active<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>beg <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">when</span> delimited <span style="color: #268bd2;">(</span>region-beginning<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>end <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">when</span> delimited <span style="color: #268bd2;">(</span>region-end<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">save-excursion</span>
|
|
<span style="color: #859900;">(</span>perform-replace <span style="color: #2aa198;">"\\t"</span> <span style="color: #2aa198;">" "</span> nil nil delimited nil nil beg end nil<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">save-excursion</span>
|
|
<span style="color: #859900;">(</span>perform-replace <span style="color: #2aa198;">"\\n"</span> <span style="color: #2aa198;">"\n"</span> nil nil delimited nil nil beg end nil<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-downloadafileintoabuffer" class="outline-3">
|
|
<h3 id="downloadafileintoabuffer"><span class="section-number-3">5.26</span> Download a File Into a Buffer</h3>
|
|
<div class="outline-text-3" id="text-5-26">
|
|
<p>
|
|
<a id="orgtarget3"></a>
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:download-to-buffer</span> <span style="color: #b58900;">(</span>uri<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #268bd2;">(</span>list <span style="color: #6c71c4;">(</span>read-string <span style="color: #2aa198;">"Enter uri: "</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>request uri
|
|
<span style="color: #657b83; font-weight: bold;">:parser</span> 'buffer-string
|
|
<span style="color: #657b83; font-weight: bold;">:success</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-function</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #859900;">(</span><span style="color: #b58900;">&key</span> data <span style="color: #b58900;">&allow-other-keys</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>created-buffer <span style="color: #6c71c4;">(</span>get-buffer-create uri<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">with-current-buffer</span> created-buffer
|
|
<span style="color: #268bd2;">(</span>insert data<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>switch-to-buffer created-buffer<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-concatwithsymbols" class="outline-3">
|
|
<h3 id="concatwithsymbols"><span class="section-number-3">5.27</span> Concat With Symbols</h3>
|
|
<div class="outline-text-3" id="text-5-27">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:maybe-symbol-name</span> <span style="color: #b58900;">(</span>arg<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>symbolp arg<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>symbol-name arg<span style="color: #268bd2;">)</span>
|
|
arg<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:concat-symbols</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>intern <span style="color: #268bd2;">(</span>mapconcat 'imalison:maybe-symbol-name args <span style="color: #2aa198;">""</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-editascriptonpath" class="outline-3">
|
|
<h3 id="editascriptonpath"><span class="section-number-3">5.28</span> Edit a script on PATH</h3>
|
|
<div class="outline-text-3" id="text-5-28">
|
|
<p>
|
|
<a id="orgtarget4"></a> Note that you'll need to make sure that emacs properly inherits
|
|
the path variable for this work. Check out my <a href="#execpathfromshell">exec-path-from-shell</a> config for
|
|
details.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:get-executables-at-path</span> <span style="color: #b58900;">(</span>filepath<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">and</span> <span style="color: #6c71c4;">(</span>file-exists-p filepath<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>f-directory? filepath<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">--filter</span> <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>fullpath <span style="color: #268bd2;">(</span>imalison:join-paths filepath <span style="color: #268bd2;">it</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">and</span> <span style="color: #b58900;">(</span>file-executable-p fullpath<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>not <span style="color: #268bd2;">(</span>f-directory? fullpath<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>directory-files filepath<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:get-executables-on-path</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span>mapcan 'imalison:get-executables-at-path <span style="color: #268bd2;">(</span>eshell-parse-colon-path <span style="color: #6c71c4;">(</span>getenv <span style="color: #2aa198;">"PATH"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:edit-script</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>find-file <span style="color: #268bd2;">(</span>executable-find
|
|
<span style="color: #6c71c4;">(</span>ido-completing-read <span style="color: #2aa198;">"Select a script to edit: "</span>
|
|
<span style="color: #859900;">(</span>imalison:get-executables-on-path<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-togglelexicalbindinginthecurrentbuffer" class="outline-3">
|
|
<h3 id="togglelexicalbindinginthecurrentbuffer"><span class="section-number-3">5.29</span> Toggle lexical binding in the current buffer</h3>
|
|
<div class="outline-text-3" id="text-5-29">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:toggle-lexical-binding</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>new-binding <span style="color: #859900;">(</span>not lexical-binding<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>message <span style="color: #2aa198;">"Setting lexical-binding to: %s"</span> new-binding<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> lexical-binding new-binding<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-synckillringwithcopyq" class="outline-3">
|
|
<h3 id="synckillringwithcopyq"><span class="section-number-3">5.30</span> Sync kill ring with copyq</h3>
|
|
<div class="outline-text-3" id="text-5-30">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:copyq-get</span> <span style="color: #b58900;">(</span>i<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>imalison:shell-command-to-string <span style="color: #268bd2;">(</span>format <span style="color: #2aa198;">"copyq eval read(%s)"</span> i<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:copyq-sync</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>missing-items <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for i from 0 to <span style="color: #b58900;">(</span>string-to-number
|
|
<span style="color: #268bd2;">(</span>imalison:shell-command-to-string <span style="color: #2aa198;">"copyq eval size()"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
for item = <span style="color: #b58900;">(</span>imalison:copyq-get i<span style="color: #b58900;">)</span>
|
|
when <span style="color: #b58900;">(</span>not <span style="color: #268bd2;">(</span>member item kill-ring<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
collect item<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> kill-ring <span style="color: #6c71c4;">(</span>nconc kill-ring missing-items<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>executable-find <span style="color: #2aa198;">"copyq"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>run-with-idle-timer 10 nil 'imalison:copyq-sync<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-helmzshhistory" class="outline-3">
|
|
<h3 id="helmzshhistory"><span class="section-number-3">5.31</span> helm-zsh-history</h3>
|
|
<div class="outline-text-3" id="text-5-31">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">helm-c-source-zsh-history</span>
|
|
'<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>name . <span style="color: #2aa198;">"Zsh History"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>candidates . helm-c-zsh-history-set-candidates<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>action . <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span><span style="color: #2aa198;">"Execute Command"</span> . helm-c-zsh-history-action<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>volatile<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>requires-pattern . 3<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>delayed<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">helm-c-zsh-history-set-candidates</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&optional</span> request-prefix<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>pattern <span style="color: #859900;">(</span>replace-regexp-in-string
|
|
<span style="color: #2aa198;">" "</span> <span style="color: #2aa198;">".*"</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">or</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">and</span> request-prefix
|
|
<span style="color: #6c71c4;">(</span>concat request-prefix
|
|
<span style="color: #2aa198;">" "</span> helm-pattern<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
helm-pattern<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">with-current-buffer</span> <span style="color: #6c71c4;">(</span>find-file-noselect <span style="color: #2aa198;">"~/.zsh_history"</span> t t<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>auto-revert-mode -1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>goto-char <span style="color: #859900;">(</span>point-max<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">loop</span> for pos = <span style="color: #859900;">(</span>re-search-backward pattern nil t<span style="color: #859900;">)</span>
|
|
while pos
|
|
collect <span style="color: #859900;">(</span>replace-regexp-in-string
|
|
<span style="color: #2aa198;">"\\`:.+?;"</span> <span style="color: #2aa198;">""</span>
|
|
<span style="color: #b58900;">(</span>buffer-substring <span style="color: #268bd2;">(</span>line-beginning-position<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>line-end-position<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">helm-c-zsh-history-action</span> <span style="color: #b58900;">(</span>candidate<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>imalison:named-compile candidate<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">helm-command-from-zsh</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">helm</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>helm-other-buffer 'helm-c-source-zsh-history <span style="color: #2aa198;">"*helm zsh history*"</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-useprojectileasdefaultdirectory" class="outline-4">
|
|
<h4 id="useprojectileasdefaultdirectory"><span class="section-number-4">5.31.1</span> Use projectile as default directory</h4>
|
|
<div class="outline-text-4" id="text-5-31-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:let-around</span> imalison:projectile-helm-command-from-zsh helm-command-from-zsh
|
|
<span style="color: #b58900;">(</span>default-directory <span style="color: #268bd2;">(</span>projectile-project-root<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-disablehooks" class="outline-3">
|
|
<h3 id="disablehooks"><span class="section-number-3">5.32</span> Disable hooks</h3>
|
|
<div class="outline-text-3" id="text-5-32">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">cl-defmacro</span> <span style="color: #268bd2;">imalison:disable-mode-hook</span> <span style="color: #b58900;">(</span>mode-name <span style="color: #b58900;">&optional</span> <span style="color: #268bd2;">(</span>disable-value -1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> ,<span style="color: #268bd2;">(</span>imalison:concat-symbols 'imalison:disable- mode-name<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">()</span>
|
|
<span style="color: #268bd2;">(</span>,mode-name ,disable-value<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:disable-mode-hook</span> linum-mode<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:disable-mode-hook</span> yas-minor-mode<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-other" class="outline-3">
|
|
<h3 id="other"><span class="section-number-3">5.33</span> Other</h3>
|
|
<div class="outline-text-3" id="text-5-33">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">random-choice</span> <span style="color: #b58900;">(</span>choices<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>nth <span style="color: #268bd2;">(</span>random <span style="color: #6c71c4;">(</span>length choices<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span> choices<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">display-prefix</span> <span style="color: #b58900;">(</span>arg<span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"Display the value of the raw prefix arg."</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #2aa198;">"p"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>message <span style="color: #2aa198;">"%s"</span> arg<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:uuid</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>s-replace <span style="color: #2aa198;">"\n"</span> <span style="color: #2aa198;">""</span> <span style="color: #268bd2;">(</span>shell-command-to-string <span style="color: #2aa198;">"uuid"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:disable-smartparens-mode</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span>smartparens-mode 0<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:insert-uuid</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>insert <span style="color: #268bd2;">(</span>imalison:uuid<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:compare-int-list</span> <span style="color: #b58900;">(</span>a b<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">and</span> a b<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cond</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>> <span style="color: #b58900;">(</span>car a<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>car b<span style="color: #b58900;">)</span><span style="color: #859900;">)</span> 1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>< <span style="color: #b58900;">(</span>car a<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>car b<span style="color: #b58900;">)</span><span style="color: #859900;">)</span> -1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>t <span style="color: #859900;">(</span>imalison:compare-int-list <span style="color: #b58900;">(</span>cdr a<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>cdr b<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">get-date-created-from-agenda-entry</span> <span style="color: #b58900;">(</span>agenda-entry<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>org-time-string-to-time
|
|
<span style="color: #268bd2;">(</span>org-entry-get <span style="color: #6c71c4;">(</span>get-text-property 1 'org-marker agenda-entry<span style="color: #6c71c4;">)</span> <span style="color: #2aa198;">"CREATED"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">defvar-setq</span> <span style="color: #b58900;">(</span>name value<span style="color: #b58900;">)</span>
|
|
`<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>boundp <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">quote</span> ,name<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ,name ,value<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> ,name ,value<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">eval-region-or-last-sexp</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>region-active-p<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>call-interactively 'eval-region<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>call-interactively 'eval-last-sexp<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">undo-redo</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&optional</span> arg<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #2aa198;">"P"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> arg <span style="color: #268bd2;">(</span>undo-tree-redo<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>undo-tree-undo<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">up-list-region</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>up-list<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>set-mark-command nil<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>backward-sexp<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">up-list-back</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>up-list<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>backward-sexp<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">frame-exists</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span>cl-find-if
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #6c71c4;">(</span>frame<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>assoc 'display <span style="color: #859900;">(</span>frame-parameters frame<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span> <span style="color: #268bd2; font-weight: bold;">(</span><span style="color: #cb4b16; font-weight: bold;">frame-list</span><span style="color: #268bd2; font-weight: bold;">)</span><span style="color: #b58900; font-weight: bold;">)</span><span style="color: #2aa198; font-weight: bold;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">make-frame-if-none-exists</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>existing-frame <span style="color: #859900;">(</span>frame-exists<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> existing-frame
|
|
existing-frame
|
|
<span style="color: #6c71c4;">(</span>make-frame-on-display <span style="color: #859900;">(</span>getenv <span style="color: #2aa198;">"DISPLAY"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">make-frame-if-none-exists-and-focus</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span>make-frame-visible <span style="color: #268bd2;">(</span>select-frame <span style="color: #6c71c4;">(</span>make-frame-if-none-exists<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">notification-center</span> <span style="color: #b58900;">(</span>title message<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">cl-flet</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>encfn <span style="color: #859900;">(</span>s<span style="color: #859900;">)</span> <span style="color: #859900;">(</span>encode-coding-string s <span style="color: #b58900;">(</span>keyboard-coding-system<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>shell-command
|
|
<span style="color: #6c71c4;">(</span>format <span style="color: #2aa198;">"osascript -e 'display notification \"%s\" with title \"%s\"'"</span>
|
|
<span style="color: #859900;">(</span>encfn message<span style="color: #859900;">)</span> <span style="color: #859900;">(</span>encfn title<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">growl-notify</span> <span style="color: #b58900;">(</span>title message<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>shell-command <span style="color: #268bd2;">(</span>format <span style="color: #2aa198;">"grownotify -t %s -m %s"</span> title message<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">notify-send</span> <span style="color: #b58900;">(</span>title message<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>shell-command <span style="color: #268bd2;">(</span>format <span style="color: #2aa198;">"notify-send -u critical %s %s"</span> title message<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">notify-function</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">cond</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>eq system-type 'darwin<span style="color: #6c71c4;">)</span> 'notification-center<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>eq system-type 'gnu/linux<span style="color: #6c71c4;">)</span> 'notify-send<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:mark-ring
|
|
helm-mark-ring
|
|
helm-global-mark-ring<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-keyboardmacros" class="outline-3">
|
|
<h3 id="keyboardmacros"><span class="section-number-3">5.34</span> Keyboard Macros</h3>
|
|
<div class="outline-text-3" id="text-5-34">
|
|
</div><div id="outline-container-foreditingliterateconfig" class="outline-4">
|
|
<h4 id="foreditingliterateconfig"><span class="section-number-4">5.34.1</span> For editing literate config</h4>
|
|
<div class="outline-text-4" id="text-5-34-1">
|
|
</div><div id="outline-container-extractcurrentsexptosrcblock" class="outline-5">
|
|
<h5 id="extractcurrentsexptosrcblock"><span class="section-number-5">5.34.1.1</span> extract-current-sexp-to-src-block</h5>
|
|
<div class="outline-text-5" id="text-5-34-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: #2aa198;">(</span>fset 'extract-current-sexp-to-src-block
|
|
<span style="color: #b58900;">[</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: #b58900;">]</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-namesourceblockforusepackagename" class="outline-5">
|
|
<h5 id="namesourceblockforusepackagename"><span class="section-number-5">5.34.1.2</span> name-source-block-for-use-package-name</h5>
|
|
<div class="outline-text-5" id="text-5-34-1-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span>fset 'name-source-block-for-use-package-name
|
|
<span style="color: #b58900;">[</span>?\C-c ?\' ?\M-< ?\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: #b58900;">]</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-extractandnameusepackageblock" class="outline-5">
|
|
<h5 id="extractandnameusepackageblock"><span class="section-number-5">5.34.1.3</span> extract-and-name-use-package-block</h5>
|
|
<div class="outline-text-5" id="text-5-34-1-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span>fset 'extract-and-name-use-package-block
|
|
<span style="color: #b58900;">[</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-< ?\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: #b58900;">]</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-general" class="outline-2">
|
|
<h2 id="general"><span class="section-number-2">6</span> General</h2>
|
|
<div class="outline-text-2" id="text-6">
|
|
</div><div id="outline-container-userinfo" class="outline-3">
|
|
<h3 id="userinfo"><span class="section-number-3">6.1</span> User Info</h3>
|
|
<div class="outline-text-3" id="text-6-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> user-full-name
|
|
<span style="color: #b58900;">(</span>replace-regexp-in-string <span style="color: #2aa198;">"\n$"</span> <span style="color: #2aa198;">""</span> <span style="color: #268bd2;">(</span>shell-command-to-string
|
|
<span style="color: #2aa198;">"git config --get user.name"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> user-mail-address
|
|
<span style="color: #b58900;">(</span>replace-regexp-in-string <span style="color: #2aa198;">"\n$"</span> <span style="color: #2aa198;">""</span> <span style="color: #268bd2;">(</span>shell-command-to-string
|
|
<span style="color: #2aa198;">"git config --get user.email"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-sanedefaults" class="outline-3">
|
|
<h3 id="sanedefaults"><span class="section-number-3">6.2</span> Sane Defaults</h3>
|
|
<div class="outline-text-3" id="text-6-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span class="linenr">1: </span><span style="color: #2aa198;">(</span>global-auto-revert-mode<span style="color: #2aa198;">)</span>
|
|
<span class="linenr">2: </span><span style="color: #2aa198;">(</span>show-paren-mode 1<span style="color: #2aa198;">)</span>
|
|
<span class="linenr">3: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> reb-re-syntax 'string<span style="color: #2aa198;">)</span>
|
|
<span id="coderef-ad-redefinition-action" class="coderef-off"><span class="linenr">4: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ad-redefinition-action 'accept<span style="color: #2aa198;">)</span></span>
|
|
<span class="linenr">5: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq-default</span> find-file-visit-truename t<span style="color: #2aa198;">)</span>
|
|
<span class="linenr">6: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> large-file-warning-threshold <span style="color: #b58900;">(</span>* 25 1024 1024<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span class="linenr">7: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> line-move-visual t<span style="color: #2aa198;">)</span>
|
|
<span class="linenr">8: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> require-final-newline t<span style="color: #2aa198;">)</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-systemclipboard" class="outline-3">
|
|
<h3 id="systemclipboard"><span class="section-number-3">6.3</span> System Clipboard</h3>
|
|
<div class="outline-text-3" id="text-6-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> save-interprogram-paste-before-kill t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-linenumbers" class="outline-3">
|
|
<h3 id="linenumbers"><span class="section-number-3">6.4</span> Line Numbers</h3>
|
|
<div class="outline-text-3" id="text-6-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span>line-number-mode t<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>column-number-mode t<span style="color: #2aa198;">)</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: #2aa198;">(</span>global-linum-mode -1<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>add-hook 'prog-mode-hook <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span> <span style="color: #268bd2;">(</span>linum-mode t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-backups" class="outline-3">
|
|
<h3 id="backups"><span class="section-number-3">6.5</span> Backups</h3>
|
|
<div class="outline-text-3" id="text-6-5">
|
|
</div><div id="outline-container-putthemallinonedirectory" class="outline-4">
|
|
<h4 id="putthemallinonedirectory"><span class="section-number-4">6.5.1</span> Put them all in one directory</h4>
|
|
<div class="outline-text-4" id="text-6-5-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defconst</span> <span style="color: #268bd2;">emacs-tmp-dir</span>
|
|
<span style="color: #b58900;">(</span>format <span style="color: #2aa198;">"%s/%s%s/"</span> temporary-file-directory <span style="color: #2aa198;">"emacs"</span> <span style="color: #268bd2;">(</span>user-uid<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> backup-directory-alist `<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">".*"</span> . ,emacs-tmp-dir<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> auto-save-file-name-transforms `<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">".*"</span> ,emacs-tmp-dir t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> auto-save-list-file-prefix emacs-tmp-dir<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-completelydisablebackups" class="outline-4">
|
|
<h4 id="completelydisablebackups"><span class="section-number-4">6.5.2</span> Completely disable backups</h4>
|
|
<div class="outline-text-4" id="text-6-5-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> backup-inhibited t<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> make-backup-files nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> auto-save-default nil<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-prompts" class="outline-3">
|
|
<h3 id="prompts"><span class="section-number-3">6.6</span> Prompts</h3>
|
|
<div class="outline-text-3" id="text-6-6">
|
|
</div><div id="outline-container-nopopupframes" class="outline-4">
|
|
<h4 id="nopopupframes"><span class="section-number-4">6.6.1</span> No popup frames</h4>
|
|
<div class="outline-text-4" id="text-6-6-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ns-pop-up-frames nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> pop-up-frames nil<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-booleanyesorno" class="outline-4">
|
|
<h4 id="booleanyesorno"><span class="section-number-4">6.6.2</span> boolean (yes-or-no)</h4>
|
|
<div class="outline-text-4" id="text-6-6-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span class="linenr"> 1: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defadvice</span> <span style="color: #268bd2;">yes-or-no-p</span> <span style="color: #b58900;">(</span>around prevent-dialog activate<span style="color: #b58900;">)</span>
|
|
<span class="linenr"> 2: </span> <span style="color: #2aa198;">"Prevent yes-or-no-p from activating a dialog"</span>
|
|
<span class="linenr"> 3: </span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>use-dialog-box nil<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span class="linenr"> 4: </span> ad-do-it<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span class="linenr"> 5: </span>
|
|
<span class="linenr"> 6: </span><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defadvice</span> <span style="color: #268bd2;">y-or-n-p</span> <span style="color: #b58900;">(</span>around prevent-dialog-yorn activate<span style="color: #b58900;">)</span>
|
|
<span class="linenr"> 7: </span> <span style="color: #2aa198;">"Prevent y-or-n-p from activating a dialog"</span>
|
|
<span class="linenr"> 8: </span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>use-dialog-box nil<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span class="linenr"> 9: </span> ad-do-it<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defalias</span> '<span style="color: #268bd2;">yes-or-no-p</span> 'y-or-n-p<span style="color: #2aa198;">)</span></span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-nodialogboxes" class="outline-4">
|
|
<h4 id="nodialogboxes"><span class="section-number-4">6.6.3</span> No dialog boxes</h4>
|
|
<div class="outline-text-4" id="text-6-6-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> use-dialog-box nil<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-splitting" class="outline-3">
|
|
<h3 id="splitting"><span class="section-number-3">6.7</span> Splitting</h3>
|
|
<div class="outline-text-3" id="text-6-7">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">split-horizontally-for-temp-buffers</span> <span style="color: #b58900;">()</span> <span style="color: #b58900;">(</span>split-window-horizontally<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>add-hook 'temp-buffer-setup-hook 'split-horizontally-for-temp-buffers<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> split-height-threshold nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> split-width-threshold 160<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-bufferdisplay" class="outline-3">
|
|
<h3 id="bufferdisplay"><span class="section-number-3">6.8</span> Buffer Display</h3>
|
|
<div class="outline-text-3" id="text-6-8">
|
|
</div><div id="outline-container-ewmctrl" class="outline-4">
|
|
<h4 id="ewmctrl"><span class="section-number-4">6.8.1</span> ewmctrl</h4>
|
|
<div class="outline-text-4" id="text-6-8-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ewmctrl</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-handlexrefsannoyingdedicatedwindowgarbage" class="outline-4">
|
|
<h4 id="handlexrefsannoyingdedicatedwindowgarbage"><span class="section-number-4">6.8.2</span> Handle xrefs annoying dedicated window garbage</h4>
|
|
<div class="outline-text-4" id="text-6-8-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">xref</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">xref--show-pos-in-buf</span> <span style="color: #268bd2;">(</span>pos buf select<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>xref-buf <span style="color: #b58900;">(</span>current-buffer<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
win<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">with-selected-window</span>
|
|
<span style="color: #859900;">(</span>display-buffer buf<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>xref--goto-char pos<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>run-hooks 'xref-after-jump-hook<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>buf <span style="color: #6c71c4;">(</span>current-buffer<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> win <span style="color: #268bd2;">(</span>selected-window<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">with-current-buffer</span> xref-buf
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq-local</span> other-window-scroll-buffer buf<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> select
|
|
<span style="color: #859900;">(</span>select-window win<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-displaybufferalist" class="outline-4">
|
|
<h4 id="displaybufferalist"><span class="section-number-4">6.8.3</span> display-buffer-alist</h4>
|
|
<div class="outline-text-4" id="text-6-8-3">
|
|
<p>
|
|
<a id="orgtarget1"></a>
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:use-frames-only</span> nil<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:use-frames-only</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">or</span> imalison:use-frames-only
|
|
<span style="color: #268bd2;">(</span>member <span style="color: #6c71c4;">(</span>getenv <span style="color: #2aa198;">"XDG_CURRENT_DESKTOP"</span><span style="color: #6c71c4;">)</span> '<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"XMonad"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:use-new-frame-or-window</span> nil<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:use-new-frame-or-window-next-command</span> nil<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:other-window-or-frame-next-command</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imalison:use-new-frame-or-window-next-command
|
|
<span style="color: #268bd2;">(</span>not imalison:use-new-frame-or-window-next-command<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>message <span style="color: #2aa198;">"Using other frame: %s"</span>
|
|
imalison:use-new-frame-or-window-next-command<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:use-other-frame-or-window</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">or</span> imalison:use-new-frame-or-window-next-command
|
|
imalison:use-new-frame-or-window<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:display-buffer</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>imalison:use-other-frame-or-window args<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>apply 'imalison:display-buffer-other-frame-or-window args<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>apply 'display-buffer-same-window args<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:display-buffer-other-frame-or-window</span> <span style="color: #b58900;">(</span>buffer args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>imalison:use-frames-only<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>apply 'display-buffer-use-some-frame buffer <span style="color: #6c71c4;">(</span>append args <span style="color: #859900;">(</span>inhibit-same-window t<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>apply 'display-buffer-reuse-window buffer args<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:split-window-right</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>imalison:use-frames-only<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>make-frame<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>split-window-right<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:other-window</span> <span style="color: #b58900;">(</span>count<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span>
|
|
<span style="color: #268bd2;">(</span>list 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>other-window count 'visible<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>select-frame-set-input-focus <span style="color: #268bd2;">(</span>selected-frame<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:set-use-new-frame-to-default</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imalison:use-new-frame-or-window-next-command nil<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>advice-add 'display-buffer <span style="color: #657b83; font-weight: bold;">:after</span> 'imalison:set-use-new-frame-to-default<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> imalison:use-frames-only
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> pop-up-frames 'graphic-only<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-c s"</span> 'imalison:other-window-or-frame-next-command<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x o"</span> 'imalison:other-window<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x 3"</span> 'imalison:split-window-right<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x O"</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #6c71c4;">()</span> <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>imalison:other-window -1<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> display-buffer-alist
|
|
'<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"\\*Flycheck errors\\*"</span> . <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>display-buffer-use-some-frame<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>inhibit-same-window t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">".*popup\*"</span> . <span style="color: #859900;">(</span>display-buffer-pop-up-window<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">".*magit-diff.*"</span> . <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>display-buffer-pop-up-window<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>reusable-frames . 0<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>inhibit-switch-frame . t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>inhibit-same-window . t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"\\*helm.*"</span> . <span style="color: #859900;">(</span>display-buffer-same-window
|
|
dispaly-buffer-pop-up-window<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"\\*Register Preview\\*"</span> . <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>display-buffer-pop-up-window<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>imalison:use-other-frame-or-window
|
|
.
|
|
<span style="color: #859900;">(</span><span style="color: #b58900;">(</span>display-buffer-use-some-frame display-buffer-pop-up-frame<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>inhibit-same-window . t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>reusable-frames . t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">".*"</span> . <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>display-buffer-same-window
|
|
display-buffer-use-some-frame
|
|
display-buffer-pop-up-frame<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>reusable-frames . t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-fillsetup" class="outline-3">
|
|
<h3 id="fillsetup"><span class="section-number-3">6.9</span> Fill Setup</h3>
|
|
<div class="outline-text-3" id="text-6-9">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> sentence-end-double-space nil<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
<p>
|
|
Set the default fill-column
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq-default</span> fill-column 80<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-showtrailingwhitespace" class="outline-3">
|
|
<h3 id="showtrailingwhitespace"><span class="section-number-3">6.10</span> Show Trailing Whitespace</h3>
|
|
<div class="outline-text-3" id="text-6-10">
|
|
<p>
|
|
Trailing whitespace is really messy and annoying, which makes this a must-have
|
|
in my opinion. It's kind of crazy how often you will encounter serious codebases
|
|
with random whitespace ALL over the place.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq-default</span> show-trailing-whitespace t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-disable" class="outline-4">
|
|
<h4 id="disable"><span class="section-number-4">6.10.1</span> Disable</h4>
|
|
<div class="outline-text-4" id="text-6-10-1">
|
|
<p>
|
|
Unfortunately, this setting can get annoying in a lot of modes, which is why I
|
|
use this hook to disable it in those modes
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:disable-show-trailing-whitespace</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> show-trailing-whitespace nil<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-encoding" class="outline-3">
|
|
<h3 id="encoding"><span class="section-number-3">6.11</span> Encoding</h3>
|
|
<div class="outline-text-3" id="text-6-11">
|
|
<p>
|
|
UTF-8 everywhere
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:set-coding-systems</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>set-language-environment <span style="color: #2aa198;">"Latin-1"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>set-default-coding-systems 'utf-8<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">unless</span> <span style="color: #268bd2;">(</span>eq system-type 'windows-nt<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>set-selection-coding-system 'utf-8<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>set-terminal-coding-system 'utf-8<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> locale-coding-system 'utf-8<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>prefer-coding-system 'utf-8<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>imalison:set-coding-systems<span style="color: #2aa198;">)</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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> utf-translate-cjk-mode nil<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-visiblebell" class="outline-3">
|
|
<h3 id="visiblebell"><span class="section-number-3">6.12</span> Visible Bell</h3>
|
|
<div class="outline-text-3" id="text-6-12">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> visible-bell t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-configurevc" class="outline-3">
|
|
<h3 id="configurevc"><span class="section-number-3">6.13</span> Configure <code>vc</code></h3>
|
|
<div class="outline-text-3" id="text-6-13">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> vc-follow-symlinks t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-timeinmodeline" class="outline-3">
|
|
<h3 id="timeinmodeline"><span class="section-number-3">6.14</span> Time in Mode Line</h3>
|
|
<div class="outline-text-3" id="text-6-14">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> display-time-default-load-average nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> display-time-interval 1<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> display-time-format <span style="color: #2aa198;">"%a|%m-%d|%r"</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>display-time-mode <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>imalison:use-frames-only<span style="color: #268bd2;">)</span> -1 +1<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-killring" class="outline-3">
|
|
<h3 id="killring"><span class="section-number-3">6.15</span> Kill Ring</h3>
|
|
<div class="outline-text-3" id="text-6-15">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> kill-ring-max 1000<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-subword" class="outline-3">
|
|
<h3 id="subword"><span class="section-number-3">6.16</span> Subword</h3>
|
|
<div class="outline-text-3" id="text-6-16">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> c-subword-mode t<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>global-subword-mode<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-scratchbuffer" class="outline-3">
|
|
<h3 id="scratchbuffer"><span class="section-number-3">6.17</span> Scratch Buffer</h3>
|
|
<div class="outline-text-3" id="text-6-17">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> initial-scratch-message <span style="color: #2aa198;">""</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-dontpromptaboutlocalvariables" class="outline-3">
|
|
<h3 id="dontpromptaboutlocalvariables"><span class="section-number-3">6.18</span> Don't prompt about local variables</h3>
|
|
<div class="outline-text-3" id="text-6-18">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">risky-local-variable-p</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
nil<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-proced" class="outline-3">
|
|
<h3 id="proced"><span class="section-number-3">6.19</span> proced</h3>
|
|
<div class="outline-text-3" id="text-6-19">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">proced</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> proced-auto-update-interval 1<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>add-hook 'proced-mode-hook <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span> <span style="color: #268bd2;">(</span>proced-toggle-auto-update +1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-setdefaultbrowser" class="outline-3">
|
|
<h3 id="setdefaultbrowser"><span class="section-number-3">6.20</span> Set default browser</h3>
|
|
<div class="outline-text-3" id="text-6-20">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>equal system-type 'gnu/linux<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> browse-url-browser-function 'browse-url-generic
|
|
browse-url-generic-program <span style="color: #2aa198;">"google-chrome-stable"</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-setepaprogram" class="outline-3">
|
|
<h3 id="setepaprogram"><span class="section-number-3">6.21</span> Set epa program</h3>
|
|
<div class="outline-text-3" id="text-6-21">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> epg-gpg-program <span style="color: #2aa198;">"gpg"</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-makefilesexecutable" class="outline-3">
|
|
<h3 id="makefilesexecutable"><span class="section-number-3">6.22</span> Make files executable</h3>
|
|
<div class="outline-text-3" id="text-6-22">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span>add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-misc" class="outline-3">
|
|
<h3 id="misc"><span class="section-number-3">6.23</span> Misc</h3>
|
|
<div class="outline-text-3" id="text-6-23">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">iedit-toggle-key-default</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>put 'set-goal-column 'disabled nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>auto-fill-mode -1<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> indent-tabs-mode nil<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> confirm-nonexistent-file-or-buffer nil<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">No prompt for killing a buffer with processes attached.</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> kill-buffer-query-functions
|
|
<span style="color: #b58900;">(</span>remq 'process-kill-buffer-query-function
|
|
kill-buffer-query-functions<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> inhibit-startup-message t
|
|
inhibit-startup-echo-area-message t<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This makes it so that emacs --daemon puts its files in ~/.emacs.d/server</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(setq server-use-tcp t)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Make buffer names unique.</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> uniquify-buffer-name-style 'forward<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Don't disable commands...</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> disabled-command-function nil<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Make forward word understand camel and snake case.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Preserve pastes from OS when saving a new item to the kill</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">ring. Why wouldn't this be enabled by default?</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq-default</span> cursor-type 'box<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq-default</span> cursor-in-non-selected-windows 'bar<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> nil <span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Causing too many annoying issues</span>
|
|
<span style="color: #b58900;">(</span>add-hook 'after-init-hook '<span style="color: #268bd2;">(</span>lambda <span style="color: #6c71c4;">()</span> <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> debug-on-error t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Make mouse scrolling less jumpy.</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mouse-wheel-scroll-amount '<span style="color: #b58900;">(</span>1 <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>shift<span style="color: #6c71c4;">)</span> . 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ediff-split-window-function 'split-window-horizontally<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ediff-window-setup-function 'ediff-setup-windows-plain<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Disable this per major mode or maybe using file size if it causes</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">performance issues?</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imenu-auto-rescan t<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imenu-max-item-length 300<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>put 'narrow-to-region 'disabled nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>put 'narrow-to-page 'disabled nil<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> echo-keystrokes 0.25<span style="color: #2aa198;">)</span>
|
|
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">text mode stuff:</span>
|
|
<span style="color: #2aa198;">(</span>remove-hook 'text-mode-hook #'turn-on-auto-fill<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>add-hook 'text-mode-hook 'turn-on-visual-line-mode<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> sentence-end-double-space nil<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq-default</span> c-basic-offset 4
|
|
tab-width 4
|
|
indent-tabs-mode t<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>add-hook 'prog-mode-hook <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span> <span style="color: #268bd2;">(</span>auto-fill-mode -1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(add-hook 'prog-mode-hook 'flyspell-prog-mode)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(add-hook 'prog-mode-hook (lambda () (highlight-lines-matching-regexp</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">".\\{81\\}" 'hi-blue)))</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-paradox" class="outline-3">
|
|
<h3 id="paradox"><span class="section-number-3">6.24</span> paradox</h3>
|
|
<div class="outline-text-3" id="text-6-24">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">paradox</span>
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> 10
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>paradox-upgrade-packages paradox-list-packages<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">gh</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> paradox-execute-asynchronously t
|
|
paradox-github-token <span style="color: #6c71c4;">(</span>gh-auth-get-oauth-token<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-diminish" class="outline-3">
|
|
<h3 id="diminish"><span class="section-number-3">6.25</span> diminish</h3>
|
|
<div class="outline-text-3" id="text-6-25">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">diminish</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:packages-to-diminish</span>
|
|
'<span style="color: #268bd2;">(</span>auto-revert-mode smartparens-mode eldoc-mode tern-mode js2-refactor-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for package in imalison:packages-to-diminish
|
|
do <span style="color: #6c71c4;">(</span>diminish package<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>eval-after-load 'subword '<span style="color: #6c71c4;">(</span>diminish 'subword-mode<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>eval-after-load 'simple '<span style="color: #6c71c4;">(</span>diminish 'visual-line-mode<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-editserver" class="outline-3">
|
|
<h3 id="editserver"><span class="section-number-3">6.26</span> edit-server</h3>
|
|
<div class="outline-text-3" id="text-6-26">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">edit-server</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> edit-server-start
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> 1
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>edit-server-start<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> edit-server-new-frame nil<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-loaddir" class="outline-3">
|
|
<h3 id="loaddir"><span class="section-number-3">6.27</span> load-dir</h3>
|
|
<div class="outline-text-3" id="text-6-27">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">load-dir</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> load-dir-debug nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'load-dirs <span style="color: #2aa198;">"~/.emacs.d/load.d"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">site-lisp</span> <span style="color: #2aa198;">"/usr/share/emacs24/site-lisp/"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #6c71c4;">(</span>file-exists-p site-lisp<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>add-to-list 'load-dirs site-lisp<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-server" class="outline-3">
|
|
<h3 id="server"><span class="section-number-3">6.28</span> server</h3>
|
|
<div class="outline-text-3" id="text-6-28">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">server</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unless</span> <span style="color: #6c71c4;">(</span>server-running-p<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>server-start<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-listenvironment" class="outline-3">
|
|
<h3 id="listenvironment"><span class="section-number-3">6.29</span> list-environment</h3>
|
|
<div class="outline-text-3" id="text-6-29">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">list-environment</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-bughunter" class="outline-3">
|
|
<h3 id="bughunter"><span class="section-number-3">6.30</span> bug-hunter</h3>
|
|
<div class="outline-text-3" id="text-6-30">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">bug-hunter</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-shackle" class="outline-3">
|
|
<h3 id="shackle"><span class="section-number-3">6.31</span> shackle</h3>
|
|
<div class="outline-text-3" id="text-6-31">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">shackle</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>diminish 'shackle-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> nil <span style="color: #93a1a1;">; </span><span style="color: #93a1a1;">disabled for now</span>
|
|
<span style="color: #6c71c4;">(</span>shackle-mode<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> shackle-inhibit-window-quit-on-same-windows t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> shackle-default-rule '<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:same</span> t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-beacon" class="outline-3">
|
|
<h3 id="beacon"><span class="section-number-3">6.32</span> beacon</h3>
|
|
<div class="outline-text-3" id="text-6-32">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">beacon</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"C-c b"</span> . beacon-blink<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span>beacon-mode 1<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-iregister" class="outline-3">
|
|
<h3 id="iregister"><span class="section-number-3">6.33</span> iregister</h3>
|
|
<div class="outline-text-3" id="text-6-33">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">iregister</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-discovermymajor" class="outline-3">
|
|
<h3 id="discovermymajor"><span class="section-number-3">6.34</span> discover-my-major</h3>
|
|
<div class="outline-text-3" id="text-6-34">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">discover-my-major</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-refine" class="outline-3">
|
|
<h3 id="refine"><span class="section-number-3">6.35</span> refine</h3>
|
|
<div class="outline-text-3" id="text-6-35">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">refine</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-winner" class="outline-3">
|
|
<h3 id="winner"><span class="section-number-3">6.36</span> winner</h3>
|
|
<div class="outline-text-3" id="text-6-36">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">winner</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> hydra
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>winner-undo winner-redo<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span>
|
|
<span style="color: #2aa198;">"C-c q"</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">defhydra</span> imalison:winner-hydra <span style="color: #859900;">()</span>
|
|
<span style="color: #2aa198;">"Winner"</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"p"</span> winner-undo <span style="color: #2aa198;">"back"</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"n"</span> winner-redo <span style="color: #2aa198;">"forward"</span> <span style="color: #657b83; font-weight: bold;">:exit</span> t<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>winner-mode 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-eyebrowse" class="outline-3">
|
|
<h3 id="eyebrowse"><span class="section-number-3">6.37</span> eyebrowse</h3>
|
|
<div class="outline-text-3" id="text-6-37">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">eyebrowse</span>
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> 1
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #268bd2;">(</span>eyebrowse-mode +1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-stream" class="outline-3">
|
|
<h3 id="stream"><span class="section-number-3">6.38</span> stream</h3>
|
|
<div class="outline-text-3" id="text-6-38">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">stream</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-tile" class="outline-3">
|
|
<h3 id="tile"><span class="section-number-3">6.39</span> tile</h3>
|
|
<div class="outline-text-3" id="text-6-39">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package</span> tile
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> hydra
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"C-c t"</span> . imalison:hydra-tile/body<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:tall-tile-strategy</span> <span style="color: #6c71c4;">(</span>tile-split-n-tall 3<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:wide-tile-strategy</span> tile-wide<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:master-tile-strategy</span> <span style="color: #6c71c4;">(</span>tile-argument-buffer-fetcher
|
|
<span style="color: #657b83; font-weight: bold;">:layout</span> tile-master-left<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defhydra</span> imalison:hydra-tile
|
|
nil
|
|
<span style="color: #2aa198;">"tile"</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"t"</span> <span style="color: #859900;">(</span>tile <span style="color: #657b83; font-weight: bold;">:strategy</span> imalison:tall-tile-strategy<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"w"</span> <span style="color: #859900;">(</span>tile <span style="color: #657b83; font-weight: bold;">:strategy</span> imalison:wide-tile-strategy<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"m"</span> <span style="color: #859900;">(</span>tile <span style="color: #657b83; font-weight: bold;">:strategy</span> imalison:master-tile-strategy<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"s"</span> tile-select<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"0"</span> <span style="color: #859900;">(</span>tile <span style="color: #657b83; font-weight: bold;">:strategy</span> tile-one<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"n"</span> tile<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"l"</span> winner-undo<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> tile-cycler
|
|
<span style="color: #6c71c4;">(</span>tile-strategies <span style="color: #657b83; font-weight: bold;">:strategies</span>
|
|
<span style="color: #859900;">(</span>list imalison:tall-tile-strategy
|
|
imalison:master-tile-strategy
|
|
imalison:wide-tile-strategy
|
|
tile-one<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-fillcolumnindicator" class="outline-3">
|
|
<h3 id="fillcolumnindicator"><span class="section-number-3">6.40</span> fill-column-indicator</h3>
|
|
<div class="outline-text-3" id="text-6-40">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">fill-column-indicator</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">fci-on-off-fci-before-company</span> <span style="color: #6c71c4;">(</span>command<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #859900;">(</span>string= <span style="color: #2aa198;">"show"</span> command<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>turn-off-fci-mode<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #859900;">(</span>string= <span style="color: #2aa198;">"hide"</span> command<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>turn-on-fci-mode<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>advice-add 'company-call-frontends <span style="color: #657b83; font-weight: bold;">:before</span> #'fci-on-off-fci-before-company<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'prog-mode-hook 'fci-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-keybindings" class="outline-2">
|
|
<h2 id="keybindings"><span class="section-number-2">7</span> Keybindings</h2>
|
|
<div class="outline-text-2" id="text-7">
|
|
</div><div id="outline-container-godmode" class="outline-3">
|
|
<h3 id="godmode"><span class="section-number-3">7.1</span> god-mode</h3>
|
|
<div class="outline-text-3" id="text-7-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">god-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>global-set-key <span style="color: #6c71c4;">(</span>kbd <span style="color: #2aa198;">"<escape>"</span><span style="color: #6c71c4;">)</span> 'god-local-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-bindkey" class="outline-3">
|
|
<h3 id="bindkey"><span class="section-number-3">7.2</span> bind-key</h3>
|
|
<div class="outline-text-3" id="text-7-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">bind-key</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-whichkey" class="outline-3">
|
|
<h3 id="whichkey"><span class="section-number-3">7.3</span> which-key</h3>
|
|
<div class="outline-text-3" id="text-7-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">which-key</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> which-key-idle-delay .50<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>diminish 'which-key-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>which-key-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-hydra" class="outline-3">
|
|
<h3 id="hydra"><span class="section-number-3">7.4</span> hydra</h3>
|
|
<div class="outline-text-3" id="text-7-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">hydra</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c f"</span> . imalison:hydra-font/body<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c y"</span> . imalison:hydra-yank/body<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c 6"</span> . imalison:compile/body<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-fontsettings" class="outline-4">
|
|
<h4 id="fontsettings"><span class="section-number-4">7.4.1</span> Font Settings</h4>
|
|
<div class="outline-text-4" id="text-7-4-1">
|
|
<p>
|
|
<a id="orgtarget2"></a>
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defhydra</span> imalison:hydra-font
|
|
nil
|
|
<span style="color: #2aa198;">"Font Settings"</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"-"</span> imalison:font-size-decr <span style="color: #2aa198;">"Decrease"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"d"</span> imalison:font-size-decr <span style="color: #2aa198;">"Decrease"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"="</span> imalison:font-size-incr <span style="color: #2aa198;">"Increase"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"+"</span> imalison:font-size-incr <span style="color: #2aa198;">"Increase"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"i"</span> imalison:font-size-incr <span style="color: #2aa198;">"Increase"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"h"</span> imalison:set-huge-font-size <span style="color: #2aa198;">"Huge"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"a"</span> imalison:appearance <span style="color: #2aa198;">"Set Default Appearance"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"f"</span> set-frame-font <span style="color: #2aa198;">"Set Frame Font"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"t"</span> helm-themes <span style="color: #2aa198;">"Choose Emacs Theme"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"0"</span> imalison:font-size-reset <span style="color: #2aa198;">"Reset to default size"</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-copyyanking" class="outline-4">
|
|
<h4 id="copyyanking"><span class="section-number-4">7.4.2</span> Copy/Yanking</h4>
|
|
<div class="outline-text-4" id="text-7-4-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defhydra</span> imalison:hydra-yank
|
|
nil
|
|
<span style="color: #2aa198;">"Yank text"</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"p"</span> imalison:copy-buffer-file-path <span style="color: #2aa198;">"Projectile path"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"l"</span> imalison:copy-current-buffer-name <span style="color: #2aa198;">"Buffer Name"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"f"</span> imalison:copy-buffer-file-path-full <span style="color: #2aa198;">"Full path"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"n"</span> imalison:copy-buffer-file-name <span style="color: #2aa198;">"File name"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"b"</span> imalison:copy-current-git-branch <span style="color: #2aa198;">"Git Branch"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"m"</span> imalison:copy-last-message <span style="color: #2aa198;">"Last Message"</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-compile" class="outline-4">
|
|
<h4 id="compile"><span class="section-number-4">7.4.3</span> Compile</h4>
|
|
<div class="outline-text-4" id="text-7-4-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:make-test</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>default-directory <span style="color: #859900;">(</span>projectile-project-root<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>imalison:named-compile <span style="color: #2aa198;">"make test"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:glide-up</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>imalison:named-compile <span style="color: #2aa198;">"glide up"</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defhydra</span> imalison:compile nil <span style="color: #2aa198;">"Compile"</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"p"</span> imalison:projectile-helm-command-from-zsh <span style="color: #2aa198;">"Run a command in projectile root"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"d"</span> helm-command-from-zsh <span style="color: #2aa198;">"Run a command in default directory"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"c"</span> imalison:named-compile <span style="color: #2aa198;">"Enter Custom Command"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"t"</span> imalison:make-test <span style="color: #2aa198;">"Test"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"u"</span> imalison:glide-up <span style="color: #2aa198;">"Update Dependencies"</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">The following parens close the use-package/progn created several blocks above</span>
|
|
<span style="color: #657b83; background-color: #fdf6e3;">))</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-killemacs" class="outline-3">
|
|
<h3 id="killemacs"><span class="section-number-3">7.5</span> kill-emacs</h3>
|
|
<div class="outline-text-3" id="text-7-5">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x C-c"</span> 'kill-emacs<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-imenu" class="outline-3">
|
|
<h3 id="imenu"><span class="section-number-3">7.6</span> imenu</h3>
|
|
<div class="outline-text-3" id="text-7-6">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x C-i"</span> 'imenu<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-undo" class="outline-3">
|
|
<h3 id="undo"><span class="section-number-3">7.7</span> undo</h3>
|
|
<div class="outline-text-3" id="text-7-7">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C--"</span> 'undo<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-otherwindow" class="outline-3">
|
|
<h3 id="otherwindow"><span class="section-number-3">7.8</span> other-window</h3>
|
|
<div class="outline-text-3" id="text-7-8">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x O"</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>other-window -1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-markring" class="outline-3">
|
|
<h3 id="markring"><span class="section-number-3">7.9</span> Mark ring</h3>
|
|
<div class="outline-text-3" id="text-7-9">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-c SPC"</span> 'imalison:mark-ring<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-otherbindings" class="outline-3">
|
|
<h3 id="otherbindings"><span class="section-number-3">7.10</span> Other bindings</h3>
|
|
<div class="outline-text-3" id="text-7-10">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x p"</span> 'pop-to-mark-command<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> set-mark-command-repeat-pop t<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x C-b"</span> 'buffer-menu<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x C-r"</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>revert-buffer t t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x w"</span> 'whitespace-mode<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"M-n"</span> 'forward-paragraph<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"M-p"</span> 'backward-paragraph<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-M-<backspace>"</span> 'backward-kill-sexp<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"s-<return>"</span> 'toggle-frame-fullscreen<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"M-|"</span> 'imalison:shell-command-on-region<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"C-x 9"</span> 'previous-buffer<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"s-v"</span> 'clipboard-yank<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-globalsetkeytousepackage" class="outline-3">
|
|
<h3 id="globalsetkeytousepackage"><span class="section-number-3">7.11</span> global-set-key-to-use-package</h3>
|
|
<div class="outline-text-3" id="text-7-11">
|
|
<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: #2aa198;">(</span>fset 'global-set-key-to-use-package
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">(</span><span style="color: #b58900;">&optional</span> arg<span style="color: #268bd2;">)</span> <span style="color: #2aa198;">"Keyboard macro."</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #2aa198;">"p"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>kmacro-exec-ring-item
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">quote</span> <span style="color: #859900;">(</span><span style="color: #b58900;">[</span>1 67108896 19 100 6 23 40 19 41 return
|
|
backspace 32 46 6 4<span style="color: #b58900;">]</span> 0 <span style="color: #2aa198;">"%d"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span> arg<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-osx" class="outline-3">
|
|
<h3 id="osx"><span class="section-number-3">7.12</span> OSX</h3>
|
|
<div class="outline-text-3" id="text-7-12">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>equal system-type 'darwin<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mac-option-modifier 'meta<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mac-command-modifier 'super<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-navigation" class="outline-2">
|
|
<h2 id="navigation"><span class="section-number-2">8</span> Navigation</h2>
|
|
<div class="outline-text-2" id="text-8">
|
|
</div><div id="outline-container-zoptochar" class="outline-3">
|
|
<h3 id="zoptochar"><span class="section-number-3">8.1</span> zop-to-char</h3>
|
|
<div class="outline-text-3" id="text-8-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">zop-to-char</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"M-z"</span> . zop-to-char<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> zop-to-char-kill-keys '<span style="color: #6c71c4;">(</span>?\C-k<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> zop-to-char-quit-at-point-keys '<span style="color: #6c71c4;">(</span>?\r<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-helm" class="outline-3">
|
|
<h3 id="helm"><span class="section-number-3">8.2</span> helm</h3>
|
|
<div class="outline-text-3" id="text-8-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">helm-config</span>
|
|
<span class="linenr"> 2: </span> <span style="color: #657b83; font-weight: bold;">:ensure</span> helm
|
|
<span class="linenr"> 3: </span> <span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span class="linenr"> 4: </span> <span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-y"</span> . helm-show-kill-ring<span style="color: #268bd2;">)</span>
|
|
<span class="linenr"> 5: </span> <span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-x"</span> . helm-M-x<span style="color: #268bd2;">)</span>
|
|
<span class="linenr"> 6: </span> <span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-x C-i"</span> . helm-imenu<span style="color: #268bd2;">)</span>
|
|
<span class="linenr"> 7: </span> <span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-h a"</span> . helm-apropos<span style="color: #268bd2;">)</span>
|
|
<span class="linenr"> 8: </span> <span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c C-h"</span> . helm-org-agenda-files-headings<span style="color: #268bd2;">)</span>
|
|
<span class="linenr"> 9: </span> <span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c ;"</span> . helm-recentf<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span class="linenr">10: </span> <span style="color: #657b83; font-weight: bold;">:diminish</span> helm-mode
|
|
<span class="linenr">11: </span> <span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span class="linenr">12: </span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span class="linenr">13: </span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">helm-org</span><span style="color: #268bd2;">)</span>
|
|
<span id="coderef-helm split window" class="coderef-off"><span class="linenr">14: </span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> helm-split-window-default-side 'same<span style="color: #268bd2;">)</span></span>
|
|
<span class="linenr">15: </span>
|
|
<span class="linenr">16: </span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-defun</span> <span style="color: #268bd2;">helm-org-headings-in-buffer</span> <span style="color: #6c71c4;">()</span>
|
|
<span class="linenr">17: </span> <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span class="linenr">18: </span> <span style="color: #6c71c4;">(</span>helm <span style="color: #657b83; font-weight: bold;">:sources</span> <span style="color: #859900;">(</span>helm-source-org-headings-for-files
|
|
<span class="linenr">19: </span> <span style="color: #b58900;">(</span>list <span style="color: #268bd2;">(</span>projectile-completing-read
|
|
<span class="linenr">20: </span> <span style="color: #2aa198;">"File to look at headings from: "</span>
|
|
<span class="linenr">21: </span> <span style="color: #6c71c4;">(</span>projectile-all-project-files<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span class="linenr">22: </span> <span style="color: #657b83; font-weight: bold;">:candidate-number-limit</span> 99999
|
|
<span class="linenr">23: </span> <span style="color: #657b83; font-weight: bold;">:buffer</span> <span style="color: #2aa198;">"*helm org inbuffer*"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span class="linenr">24: </span>
|
|
<span class="linenr">25: </span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">helm-descbinds</span>
|
|
<span class="linenr">26: </span> <span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span class="linenr">27: </span> <span style="color: #657b83; font-weight: bold;">:config</span> <span style="color: #6c71c4;">(</span>helm-descbinds-mode 1<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span class="linenr">28: </span>
|
|
<span class="linenr">29: </span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">helm-ag</span>
|
|
<span class="linenr">30: </span> <span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"C-c p 1"</span> . imalison:set-helm-ag-extra-options<span style="color: #6c71c4;">)</span>
|
|
<span class="linenr">31: </span> <span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span class="linenr">32: </span> <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span class="linenr">33: </span> <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:set-helm-ag-extra-options</span> <span style="color: #b58900;">()</span>
|
|
<span class="linenr">34: </span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span class="linenr">35: </span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>option <span style="color: #859900;">(</span>read-string <span style="color: #2aa198;">"Extra options: "</span> <span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">or</span> helm-ag--extra-options <span style="color: #2aa198;">""</span><span style="color: #2aa198;">)</span>
|
|
<span class="linenr">36: </span> 'helm-ag--extra-options-history<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span class="linenr">37: </span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> helm-ag--extra-options option<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span class="linenr">38: </span> <span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span class="linenr">39: </span> <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span class="linenr">40: </span> <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> helm-ag-always-set-extra-option nil<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span class="linenr">41: </span> <span style="color: #268bd2;">(</span>helm-mode 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</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-helmprojectile" class="outline-3">
|
|
<h3 id="helmprojectile"><span class="section-number-3">8.3</span> helm-projectile</h3>
|
|
<div class="outline-text-3" id="text-8-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">helm-projectile</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>helm-projectile-on<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> helm-projectile-projects-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-s"</span> . imalison:switch-to-project-and-search<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-t"</span> . imalison:helm-term-projectile<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:invalidate-cache-and-open-file</span> <span style="color: #6c71c4;">(</span>_dir<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>projectile-invalidate-cache nil<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>projectile-find-file<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:switch-to-project-and-search</span> <span style="color: #6c71c4;">(</span>dir<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>default-directory dir<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>projectile-require-project-root nil<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>helm-action-buffer <span style="color: #2aa198;">"this-buffer-should-not-exist"</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>helm-projectile-ag<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:helm-term-projectile</span> <span style="color: #6c71c4;">(</span>dir<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>default-directory dir<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>projectile-require-project-root nil<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>helm-action-buffer <span style="color: #2aa198;">"this-buffer-should-not-exist"</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>term-projectile-forward<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>helm-delete-action-from-source <span style="color: #2aa198;">"Search in Project"</span>
|
|
helm-source-projectile-projects<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>helm-delete-action-from-source <span style="color: #2aa198;">"Open term for project"</span>
|
|
helm-source-projectile-projects<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>helm-add-action-to-source <span style="color: #2aa198;">"Search in Project"</span>
|
|
'imalison:switch-to-project-and-search
|
|
helm-source-projectile-projects<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>helm-add-action-to-source <span style="color: #2aa198;">"Open term for project"</span>
|
|
'imalison:helm-term-projectile
|
|
helm-source-projectile-projects<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>helm-add-action-to-source <span style="color: #2aa198;">"Invalidate Cache and Open File"</span>
|
|
'imalison:invalidate-cache-and-open-file
|
|
helm-source-projectile-projects<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-projectile" class="outline-3">
|
|
<h3 id="projectile"><span class="section-number-3">8.4</span> projectile</h3>
|
|
<div class="outline-text-3" id="text-8-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">projectile</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-x f"</span> . projectile-find-file-in-known-projects<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c p f"</span> . imalison:projectile-find-file<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:do-ag-default-directory</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>helm-do-ag default-directory <span style="color: #859900;">(</span>car <span style="color: #b58900;">(</span>projectile-parse-dirconfig-file<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:do-ag
|
|
helm-projectile-ag
|
|
imalison:do-ag-default-directory
|
|
helm-do-ag<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:projectile-find-file
|
|
projectile-find-file
|
|
projectile-find-file-other-window<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:let-around</span> imalison:set-options-do-ag
|
|
imalison:do-ag
|
|
<span style="color: #6c71c4;">(</span>helm-ag-always-set-extra-option t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:projectile-make-all-subdirs-projects</span> <span style="color: #6c71c4;">(</span>directory<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for file-info in <span style="color: #859900;">(</span>directory-files-and-attributes directory<span style="color: #859900;">)</span>
|
|
do <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>nth 1 file-info<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>write-region <span style="color: #2aa198;">""</span> nil
|
|
<span style="color: #268bd2;">(</span>expand-file-name
|
|
<span style="color: #6c71c4;">(</span>concat directory <span style="color: #2aa198;">"/"</span>
|
|
<span style="color: #859900;">(</span>nth 0 file-info<span style="color: #859900;">)</span> <span style="color: #2aa198;">"/.projectile"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">persp-projectile</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> projectile-persp-switch-project<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>projectile-global-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> projectile-require-project-root nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> projectile-enable-caching nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> projectile-completion-system 'helm<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'projectile-globally-ignored-files <span style="color: #2aa198;">"Godeps"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">shut-up</span> <span style="color: #6c71c4;">(</span>helm-projectile-on<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>diminish 'projectile-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">bind-key*</span> <span style="color: #2aa198;">"C-c p s"</span> 'imalison:do-ag<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">bind-key*</span> <span style="color: #2aa198;">"C-c p S"</span> 'imalison:set-options-do-ag<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">bind-key*</span> <span style="color: #2aa198;">"C-c p f"</span> 'imalison:projectile-find-file<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-ido" class="outline-3">
|
|
<h3 id="ido"><span class="section-number-3">8.5</span> ido</h3>
|
|
<div class="outline-text-3" id="text-8-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ido</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> ido-mode
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>ido-mode 1<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ido-auto-merge-work-directories-length -1
|
|
ido-default-buffer-method 'selected-window
|
|
ido-use-virtual-buffers t
|
|
ido-use-filename-at-point nil
|
|
ido-create-new-buffer 'always<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>ido-everywhere 1<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ido-enable-flex-matching t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">flx</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">flx-ido</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> flx-ido-mode
|
|
<span style="color: #657b83; font-weight: bold;">:init</span> <span style="color: #6c71c4;">(</span>flx-ido-mode 1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">disable ido faces to see flx highlights.</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This makes flx-ido much faster.</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> gc-cons-threshold 20000000<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ido-use-faces nil<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ido-ubiquitous</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #6c71c4;">(</span>ido-ubiquitous-mode<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ido-vertical-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span>ido-vertical-mode 1<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ido-vertical-define-keys 'C-n-C-p-up-and-down<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">flx-ido</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-avy" class="outline-3">
|
|
<h3 id="avy"><span class="section-number-3">8.6</span> avy</h3>
|
|
<div class="outline-text-3" id="text-8-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">avy</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:avy
|
|
avy-goto-word-1
|
|
avy-goto-char<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-j"</span> . imalison:avy<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-g l"</span> . avy-goto-line<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-'"</span> . avy-goto-char-2<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-acewindow" class="outline-3">
|
|
<h3 id="acewindow"><span class="section-number-3">8.7</span> ace-window</h3>
|
|
<div class="outline-text-3" id="text-8-7">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ace-window</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:ace-window
|
|
ace-select-window
|
|
ace-swap-window<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> aw-keys '<span style="color: #268bd2;">(</span>?a ?s ?d ?f ?g ?h ?j ?k ?l<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"C-c w"</span> . imalison:ace-window<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-neotree" class="outline-3">
|
|
<h3 id="neotree"><span class="section-number-3">8.8</span> neotree</h3>
|
|
<div class="outline-text-3" id="text-8-8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">neotree</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-jumpchar" class="outline-3">
|
|
<h3 id="jumpchar"><span class="section-number-3">8.9</span> jump-char</h3>
|
|
<div class="outline-text-3" id="text-8-9">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">jump-char</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-;"</span> . jump-char-forward<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-flimenu" class="outline-3">
|
|
<h3 id="flimenu"><span class="section-number-3">8.10</span> flimenu</h3>
|
|
<div class="outline-text-3" id="text-8-10">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package</span> flimenu
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>flimenu-global-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-swiper" class="outline-3">
|
|
<h3 id="swiper"><span class="section-number-3">8.11</span> swiper</h3>
|
|
<div class="outline-text-3" id="text-8-11">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">swiper</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"C-s"</span> . swiper<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-completion" class="outline-2">
|
|
<h2 id="completion"><span class="section-number-2">9</span> Completion</h2>
|
|
<div class="outline-text-2" id="text-9">
|
|
</div><div id="outline-container-company" class="outline-3">
|
|
<h3 id="company"><span class="section-number-3">9.1</span> company</h3>
|
|
<div class="outline-text-3" id="text-9-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">company</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> company-mode imalison:company
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-\\"</span> . imalison:company<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:company
|
|
company-complete
|
|
company-yasnippet<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> company-idle-delay .25<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>global-company-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>diminish 'company-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span>add-hook 'prog-mode-hook <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #6c71c4;">()</span> <span style="color: #6c71c4;">(</span>company-mode t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-companyflx" class="outline-4">
|
|
<h4 id="companyflx"><span class="section-number-4">9.1.1</span> company-flx</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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">company-flx</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> company
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span>company-flx-mode +1<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-autocomplete" class="outline-3">
|
|
<h3 id="autocomplete"><span class="section-number-3">9.2</span> auto-complete</h3>
|
|
<div class="outline-text-3" id="text-9-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">auto-complete</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:auto-complete-hook</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span>debug<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #cb4b16; font-weight: bold;">warn</span> <span style="color: #2aa198;">"auto-complete-mode was activated, but is being automatically disabled."</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>auto-complete-mode-hook nil<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>auto-complete-mode -1<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'auto-complete-mode-hook 'imalison:auto-complete-hook<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-textmanipulation" class="outline-2">
|
|
<h2 id="textmanipulation"><span class="section-number-2">10</span> Text Manipulation</h2>
|
|
<div class="outline-text-2" id="text-10">
|
|
</div><div id="outline-container-smartparens" class="outline-3">
|
|
<h3 id="smartparens"><span class="section-number-3">10.1</span> smartparens</h3>
|
|
<div class="outline-text-3" id="text-10-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">smartparens</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:diminish</span> smartparens-mode
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> smartparens-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"H-z"</span> . sp-kill-symbol<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-)"</span> . sp-forward-slurp-sexp<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-}"</span> . sp-forward-barf-sexp<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-("</span> . sp-backward-slurp-sexp<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-{"</span> . sp-backward-barf-sexp<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">smartparens-config</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>smartparens-global-mode 1<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>sp-use-smartparens-bindings<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-M-<backspace>"</span> smartparens-mode-map<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-<backspace>"</span> smartparens-mode-map<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"M-<backspace>"</span> smartparens-mode-map<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-multiplecursors" class="outline-3">
|
|
<h3 id="multiplecursors"><span class="section-number-3">10.2</span> multiple-cursors</h3>
|
|
<div class="outline-text-3" id="text-10-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">multiple-cursors</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">phi-search-mc</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span>phi-search-mc/setup-keys<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">mc-extras</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span>define-key mc/keymap <span style="color: #859900;">(</span>kbd <span style="color: #2aa198;">"C-. ="</span><span style="color: #859900;">)</span> 'mc/compare-chars<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c m a"</span> . mc/mark-all-like-this<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c m m"</span> . mc/mark-all-like-this-dwim<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c m l"</span> . mc/edit-lines<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c m n"</span> . mc/mark-next-like-this<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c m p"</span> . mc/mark-previous-like-this<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c m s"</span> . mc/mark-sgml-tag-pair<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c m d"</span> . mc/mark-all-like-this-in-defun<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-expandregion" class="outline-3">
|
|
<h3 id="expandregion"><span class="section-number-3">10.3</span> expand-region</h3>
|
|
<div class="outline-text-3" id="text-10-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">expand-region</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> er/expand-region
|
|
<span style="color: #657b83; font-weight: bold;">:config</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> expand-region-contract-fast-key <span style="color: #2aa198;">"j"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c k"</span> . er/expand-region<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-multiline" class="outline-3">
|
|
<h3 id="multiline"><span class="section-number-3">10.4</span> multi-line</h3>
|
|
<div class="outline-text-3" id="text-10-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package</span> multi-line
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Demand multi-line to avoid failre to load mode specific strategies</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"C-c d"</span> . multi-line<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This only works for array respacing</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">multi-line-defhook</span> sh
|
|
<span style="color: #6c71c4;">(</span>make-instance
|
|
'multi-line-strategy
|
|
<span style="color: #657b83; font-weight: bold;">:find</span> multi-line-lisp-find-strategy
|
|
<span style="color: #657b83; font-weight: bold;">:respace</span> <span style="color: #859900;">(</span>multi-line-default-respacers
|
|
<span style="color: #b58900;">(</span>multi-line-clearing-reindenting-respacer
|
|
multi-line-force-first-and-last-respacer<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-commentdwim" class="outline-3">
|
|
<h3 id="commentdwim"><span class="section-number-3">10.5</span> comment-dwim-2</h3>
|
|
<div class="outline-text-3" id="text-10-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">comment-dwim-2</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"M-;"</span> . comment-dwim-2<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-unfill" class="outline-3">
|
|
<h3 id="unfill"><span class="section-number-3">10.6</span> unfill</h3>
|
|
<div class="outline-text-3" id="text-10-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">unfill</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"M-q"</span> . unfill-toggle<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-cliphist" class="outline-3">
|
|
<h3 id="cliphist"><span class="section-number-3">10.7</span> cliphist</h3>
|
|
<div class="outline-text-3" id="text-10-7">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">cliphist</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> cliphist-use-ivy t<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-electricoperatormode" class="outline-3">
|
|
<h3 id="electricoperatormode"><span class="section-number-3">10.8</span> electric-operator-mode</h3>
|
|
<div class="outline-text-3" id="text-10-8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">electric-operator</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span>add-hook 'python-mode-hook #'electric-operator-mode<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-stringinflection" class="outline-3">
|
|
<h3 id="stringinflection"><span class="section-number-3">10.9</span> string-inflection</h3>
|
|
<div class="outline-text-3" id="text-10-9">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">string-inflection</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> string-inflection-toggle
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"C-c l"</span> . string-inflection-toggle<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-yasnippet" class="outline-3">
|
|
<h3 id="yasnippet"><span class="section-number-3">10.10</span> yasnippet</h3>
|
|
<div class="outline-text-3" id="text-10-10">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">yasnippet</span>
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> 5
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>yas-global-mode<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>yas-global-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>diminish 'yas-minor-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'term-mode-hook <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">lambda</span><span style="color: #859900;">()</span> <span style="color: #859900;">(</span>yas-minor-mode -1<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> yas-prompt-functions
|
|
<span style="color: #6c71c4;">(</span>cons 'yas-ido-prompt
|
|
<span style="color: #859900;">(</span>cl-delete 'yas-ido-prompt yas-prompt-functions<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-flycheck" class="outline-2">
|
|
<h2 id="flycheck"><span class="section-number-2">11</span> flycheck</h2>
|
|
<div class="outline-text-2" id="text-11">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">flycheck</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">flycheck-package</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span> <span style="color: #6c71c4;">(</span>flycheck-package-setup<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package</span> flycheck-cask
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> flycheck
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span>add-hook 'flycheck-mode-hook #'flycheck-cask-setup<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-to-list 'flycheck-emacs-lisp-checkdoc-variables
|
|
'sentence-end-double-space<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>global-flycheck-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:diminish</span> flycheck-mode<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-majormodes" class="outline-2">
|
|
<h2 id="majormodes"><span class="section-number-2">12</span> Major Modes</h2>
|
|
<div class="outline-text-2" id="text-12">
|
|
</div><div id="outline-container-programming" class="outline-3">
|
|
<h3 id="programming"><span class="section-number-3">12.1</span> Programming</h3>
|
|
<div class="outline-text-3" id="text-12-1">
|
|
<p>
|
|
<a id="orgtarget7"></a>
|
|
</p>
|
|
</div>
|
|
<div id="outline-container-python" class="outline-4">
|
|
<h4 id="python"><span class="section-number-4">12.1.1</span> python</h4>
|
|
<div class="outline-text-4" id="text-12-1-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">python</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> python-mode
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"\\.py\\'"</span> . python-mode<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:python-mode</span> <span style="color: #268bd2;">()</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> show-trailing-whitespace t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">TODO: This was likely fixed and can probably be removed</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Somehow this is sometimes set to jedi:ac-setup which we</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">don't want. This binding avoids starting auto-complete mode.</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>jedi:setup-function nil<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>jedi:setup<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">XXX: This has become pretty annoying</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(add-hook 'before-save-hook 'pyimport-remove-unused t t)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Ensure company is active</span>
|
|
<span style="color: #268bd2;">(</span>company-mode +1<span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Only use company-jedi for completion</span>
|
|
<span style="color: #268bd2;">(</span>set <span style="color: #6c71c4;">(</span>make-local-variable 'company-backends<span style="color: #6c71c4;">)</span> '<span style="color: #6c71c4;">(</span>company-jedi<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Remove default python completion, as we are going to rely on</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">company-jedi.</span>
|
|
<span style="color: #268bd2;">(</span>remove-hook 'completion-at-point-functions
|
|
'python-completion-complete-at-point 'local<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">sphinx-doc</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-j"</span> python-mode-map<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'python-mode-hook #'imalison:python-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-pyimport" class="outline-5">
|
|
<h5 id="pyimport"><span class="section-number-5">12.1.1.1</span> pyimport</h5>
|
|
<div class="outline-text-5" id="text-12-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">pyimport</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> python-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c C-i"</span> . pyimport-insert-missing<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> pyimport-remove-unused<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-jedi" class="outline-5">
|
|
<h5 id="jedi"><span class="section-number-5">12.1.1.2</span> jedi</h5>
|
|
<div class="outline-text-5" id="text-12-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">company-jedi</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> python
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>jedi:goto-definition jedi-mode company-jedi<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> python-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-."</span> . jedi:goto-definition<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-,"</span> . jedi:goto-definition-pop-marker<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> jedi:complete-on-dot t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> jedi:imenu-create-index-function 'jedi:create-flat-imenu-index<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-go" class="outline-4">
|
|
<h4 id="go"><span class="section-number-4">12.1.2</span> go</h4>
|
|
<div class="outline-text-4" id="text-12-1-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">go-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"\\.go\\'"</span> . go-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:glide-novendor</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">projectile-with-default-dir</span> <span style="color: #859900;">(</span>projectile-project-root<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>shell-command-to-string <span style="color: #2aa198;">"glide novendor"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:go-mode-create-imenu-index</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #2aa198;">"Create and return an imenu index alist. Unlike the default</span>
|
|
<span style="color: #2aa198;"> alist created by go-mode, this method creates an alist where</span>
|
|
<span style="color: #2aa198;"> items follow a style that is consistent with other prog-modes."</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>patterns '<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"type"</span> <span style="color: #2aa198;">"^type *</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">(</span><span style="color: #2aa198;">[</span><span style="color: #b58900; font-weight: bold;">^</span><span style="color: #2aa198;"> \t\n\r\f]*</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">)</span><span style="color: #2aa198;">"</span> 1<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>type-index <span style="color: #268bd2;">(</span>imenu--generic-function patterns<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>func-index<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">save-excursion</span>
|
|
<span style="color: #b58900;">(</span>goto-char <span style="color: #268bd2;">(</span>point-min<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">while</span> <span style="color: #268bd2;">(</span>re-search-forward go-func-meth-regexp <span style="color: #6c71c4;">(</span>point-max<span style="color: #6c71c4;">)</span> t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>var <span style="color: #2aa198;">(</span>match-string-no-properties 1<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>func <span style="color: #2aa198;">(</span>match-string-no-properties 2<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>name <span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">if</span> var
|
|
<span style="color: #b58900;">(</span>concat <span style="color: #268bd2;">(</span>substring var 0 -1<span style="color: #268bd2;">)</span> <span style="color: #2aa198;">"."</span> func<span style="color: #b58900;">)</span>
|
|
func<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>beg <span style="color: #2aa198;">(</span>match-beginning 0<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>marker <span style="color: #2aa198;">(</span>copy-marker beg<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>item <span style="color: #2aa198;">(</span>cons name marker<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> func-index <span style="color: #859900;">(</span>cons item func-index<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>nconc type-index <span style="color: #b58900;">(</span>list <span style="color: #268bd2;">(</span>cons <span style="color: #2aa198;">"func"</span> func-index<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:go-workspace-path</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span>file-relative-name <span style="color: #859900;">(</span>projectile-project-root<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>concat <span style="color: #b58900;">(</span>file-name-as-directory
|
|
<span style="color: #268bd2;">(</span>imalison:get-go-path<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span> <span style="color: #2aa198;">"src"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:install-current-go-project</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>start-process
|
|
<span style="color: #2aa198;">"go install"</span> <span style="color: #2aa198;">"go install log"</span> <span style="color: #2aa198;">"go"</span> <span style="color: #2aa198;">"install"</span>
|
|
<span style="color: #859900;">(</span>concat <span style="color: #b58900;">(</span>file-name-as-directory <span style="color: #268bd2;">(</span>imalison:go-workspace-path<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span> <span style="color: #2aa198;">"..."</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:get-go-path</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>environment-go-path <span style="color: #268bd2;">(</span>getenv <span style="color: #2aa198;">"GOPATH"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">if</span> environment-go-path
|
|
<span style="color: #b58900;">(</span>file-name-as-directory <span style="color: #268bd2;">(</span>car <span style="color: #6c71c4;">(</span>s-split <span style="color: #2aa198;">":"</span> environment-go-path<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"~/go"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defmacro</span> <span style="color: #268bd2;">imalison:get-go-src</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&rest</span> paths<span style="color: #6c71c4;">)</span>
|
|
`<span style="color: #6c71c4;">(</span>imalison:join-paths <span style="color: #859900;">(</span>imalison:get-go-path<span style="color: #859900;">)</span> <span style="color: #2aa198;">"src"</span> ,@paths<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:let-advise-around</span> imalison:advise-normal-go-command
|
|
<span style="color: #6c71c4;">(</span>go-command <span style="color: #2aa198;">"go"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:go-mode-hook</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span>go-eldoc-setup<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>set <span style="color: #859900;">(</span>make-local-variable 'company-backends<span style="color: #859900;">)</span> '<span style="color: #859900;">(</span>company-go<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>make-local-variable 'projectile-globally-ignored-files<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>add-hook 'after-save-hook 'imalison:install-current-go-project nil
|
|
'yes-do-local<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>add-to-list 'projectile-globally-ignored-files
|
|
<span style="color: #2aa198;">"vendor"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package*</span>
|
|
gotest <span style="color: #2aa198;">"~/Projects/gotest.el"</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> go-mode-map
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"C-c t"</span> . imalison:gotest<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:gotest
|
|
go-test-current-test
|
|
go-test-current-file<span style="color: #859900;">)</span>
|
|
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:add-expected-test-name-for-suite</span> <span style="color: #b58900;">(</span>suite-name test-name<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>> <span style="color: #6c71c4;">(</span>length suite-name<span style="color: #6c71c4;">)</span> 0<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>concat <span style="color: #2aa198;">" -run Test"</span> suite-name<span style="color: #268bd2;">)</span>
|
|
<span style="color: #2aa198;">""</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> go-test-verbose t
|
|
go-test-additional-arguments-function
|
|
'imalison:add-expected-test-name-for-suite<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">company-go</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span> <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> company-go-show-annotation t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">go-projectile</span> <span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">go-eldoc</span> <span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">go-guru</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> go-mode-map
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"M-."</span> . go-guru-definition<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"M-,"</span> . pop-tag-mark<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:set-go-guru-scope</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> go-guru-scope <span style="color: #268bd2;">(</span>go-mode-parse-glide-novendor<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">go-mode-parse-glide-novendor</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span>s-join <span style="color: #2aa198;">","</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for path in <span style="color: #6c71c4;">(</span>s-split <span style="color: #2aa198;">"\n"</span> <span style="color: #859900;">(</span>imalison:glide-novendor<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
collect <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #859900;">(</span>string-equal path <span style="color: #2aa198;">"."</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>imalison:go-workspace-path<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>s-replace <span style="color: #2aa198;">"\./"</span> <span style="color: #2aa198;">(</span>imalison:go-workspace-path<span style="color: #2aa198;">)</span> path<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span>advice-add 'go-guru--set-scope-if-empty <span style="color: #657b83; font-weight: bold;">:before</span> 'imalison:set-go-guru-scope<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>advice-add 'go-guru-start <span style="color: #657b83; font-weight: bold;">:before</span> 'imalison:set-go-guru-scope<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>advice-add 'go-guru-definition <span style="color: #657b83; font-weight: bold;">:around</span> 'imalison:advise-normal-go-command<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>advice-add 'go-guru-definition <span style="color: #657b83; font-weight: bold;">:before</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span>
|
|
<span style="color: #268bd2;">(</span>with-no-warnings
|
|
<span style="color: #6c71c4;">(</span>ring-insert find-tag-marker-ring <span style="color: #859900;">(</span>point-marker<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>advice-add 'go-import-add <span style="color: #657b83; font-weight: bold;">:around</span> 'imalison:advise-normal-go-command<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> gofmt-command <span style="color: #2aa198;">"goimports"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-hook 'go-mode-hook 'imalison:go-mode-hook<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'before-save-hook 'gofmt-before-save t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-showdiffsoftestifyoutput" class="outline-5">
|
|
<h5 id="showdiffsoftestifyoutput"><span class="section-number-5">12.1.2.1</span> Show diffs of testify output</h5>
|
|
<div class="outline-text-5" id="text-12-1-2-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:testify-ediff-buffers</span> nil<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:purge-ediff-buffers</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for buffer in imalison:testify-ediff-buffers
|
|
do <span style="color: #268bd2;">(</span>kill-buffer buffer<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imalison:testify-ediff-buffers nil<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>add-hook 'ediff-cleanup-hook 'imalison:purge-ediff-buffers<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:go-testify-show-ediff</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>buffer <span style="color: #859900;">(</span>get-buffer-create <span style="color: #2aa198;">"*Testify JSON*"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
json-result<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>shell-command-on-region <span style="color: #6c71c4;">(</span>point-min<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>point-max<span style="color: #6c71c4;">)</span> <span style="color: #2aa198;">"parse_go_testify_for_emacs.py"</span> buffer<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">with-current-buffer</span> buffer
|
|
<span style="color: #6c71c4;">(</span>goto-char <span style="color: #859900;">(</span>point-min<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> json-result <span style="color: #859900;">(</span>json-read<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>actual-buffer <span style="color: #b58900;">(</span>generate-new-buffer <span style="color: #2aa198;">"*Testify Actual*"</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>expected-buffer <span style="color: #b58900;">(</span>generate-new-buffer <span style="color: #2aa198;">"*Testify Expected*"</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>add-to-list 'imalison:testify-ediff-buffers actual-buffer<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>add-to-list 'imalison:testify-ediff-buffers expected-buffer<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">with-current-buffer</span> actual-buffer
|
|
<span style="color: #859900;">(</span>insert <span style="color: #b58900;">(</span>cdr <span style="color: #268bd2;">(</span>assoc 'actual json-result<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">with-current-buffer</span> expected-buffer
|
|
<span style="color: #b58900;">(</span>insert <span style="color: #268bd2;">(</span>cdr <span style="color: #6c71c4;">(</span>assoc 'expected json-result<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>ediff-buffers actual-buffer expected-buffer<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:go-testify-show-icdiff</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>buffer <span style="color: #859900;">(</span>get-buffer-create <span style="color: #2aa198;">"*Testify Comparison*"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>shell-command-on-region <span style="color: #6c71c4;">(</span>point-min<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>point-max<span style="color: #6c71c4;">)</span> <span style="color: #2aa198;">"parse_go_testify_not_equal.py"</span> buffer<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">with-current-buffer</span> buffer
|
|
<span style="color: #6c71c4;">(</span>fundamental-ansi-mode<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>switch-to-buffer buffer<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-emacslisp" class="outline-4">
|
|
<h4 id="emacslisp"><span class="section-number-4">12.1.3</span> emacs-lisp</h4>
|
|
<div class="outline-text-4" id="text-12-1-3">
|
|
</div><div id="outline-container-elispslimenav" class="outline-5">
|
|
<h5 id="elispslimenav"><span class="section-number-5">12.1.3.1</span> elisp-slime-nav</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">elisp-slime-nav</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> elisp-slime-nav-mode
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span>diminish 'elisp-slime-nav-mode<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">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: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> elisp-slime-nav-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-."</span> . imalison:elisp-slime-nav<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-macrostep" class="outline-5">
|
|
<h5 id="macrostep"><span class="section-number-5">12.1.3.2</span> macrostep</h5>
|
|
<div class="outline-text-5" id="text-12-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">macrostep</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> lisp-mode-shared-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c e"</span> . macrostep-expand<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-emr" class="outline-5">
|
|
<h5 id="emr"><span class="section-number-5">12.1.3.3</span> emr</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">emr</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"M-RET"</span> . emr-show-refactor-menu<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'prog-mode-hook 'emr-initialize<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-editingconfiguration" class="outline-5">
|
|
<h5 id="editingconfiguration"><span class="section-number-5">12.1.3.4</span> Editing configuration</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-4">
|
|
<p>
|
|
Reduce indentation for some functions
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span>put 'use-package 'lisp-indent-function 1<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-checkdoc" class="outline-5">
|
|
<h5 id="checkdoc"><span class="section-number-5">12.1.3.5</span> Checkdoc</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> checkdoc-force-docstrings-flag nil
|
|
checkdoc-arguments-in-order-flag nil<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-edebug" class="outline-5">
|
|
<h5 id="edebug"><span class="section-number-5">12.1.3.6</span> edebug</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">edebug</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> edebug-trace t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-overseer" class="outline-5">
|
|
<h5 id="overseer"><span class="section-number-5">12.1.3.7</span> overseer</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-7">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">overseer</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-misc1" class="outline-5">
|
|
<h5 id="misc1"><span class="section-number-5">12.1.3.8</span> Misc</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imenu-elisp-sections</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imenu-prev-index-position-function nil<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imenu-space-replacement nil<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>add-to-list 'imenu-generic-expression
|
|
`<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"Package"</span>
|
|
,<span style="color: #2aa198;">"(use-package </span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">(</span><span style="color: #2aa198;">.+</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">)</span><span style="color: #2aa198;">$"</span> 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>add-to-list 'imenu-generic-expression
|
|
`<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"Section"</span>
|
|
,<span style="color: #6c71c4;">(</span>concat <span style="color: #2aa198;">";\\{1,4\\} =\\{10,80\\}\n;\\{1,4\\} \\{10,80\\}"</span>
|
|
<span style="color: #2aa198;">"</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">(</span><span style="color: #2aa198;">.+</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">)</span><span style="color: #2aa198;">$"</span><span style="color: #6c71c4;">)</span> <span style="color: #cb4b16; font-weight: bold;">1</span><span style="color: #268bd2; font-weight: bold;">)</span><span style="color: #cb4b16; font-weight: bold;"> t</span><span style="color: #b58900; font-weight: bold;">)</span><span style="color: #2aa198; font-weight: bold;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:maybe-remove-flycheck-checkdoc-checker</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #268bd2;">(</span>s-starts-with? <span style="color: #2aa198;">"*"</span> <span style="color: #6c71c4;">(</span>buffer-name<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>flycheck-disable-checker 'emacs-lisp-checkdoc<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>add-hook 'emacs-lisp-mode-hook 'imenu-elisp-sections<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>add-hook 'emacs-lisp-mode-hook <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> indent-tabs-mode nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> show-trailing-whitespace t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>add-hook 'flycheck-mode-hook 'imalison:maybe-remove-flycheck-checkdoc-checker<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-eros" class="outline-5">
|
|
<h5 id="eros"><span class="section-number-5">12.1.3.9</span> eros</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-9">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">eros</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>eros-mode<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'emacs-lisp-mode-hook 'eros-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-reevalutedefvarswhenrunningevallastsexp" class="outline-5">
|
|
<h5 id="reevalutedefvarswhenrunningevallastsexp"><span class="section-number-5">12.1.3.10</span> Reevalute defvars when running eval-last-sexp</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-10">
|
|
<p>
|
|
We noflet elisp–preceding-sexp to munge defvars into sexps only for
|
|
eval-last-sexp.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:maybe-setq-instead</span> <span style="color: #b58900;">(</span>fn <span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">noflet</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>elisp--preceding-sexp <span style="color: #859900;">(</span><span style="color: #b58900;">&rest</span> preceding-args<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>preceding-sexp <span style="color: #6c71c4;">(</span>apply this-fn preceding-args<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">and</span> <span style="color: #6c71c4;">(</span>listp preceding-sexp<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>equal <span style="color: #859900;">(</span>car preceding-sexp<span style="color: #859900;">)</span> 'defvar<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
`<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ,@<span style="color: #6c71c4;">(</span>cdr preceding-sexp<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
preceding-sexp<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>apply fn args<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>advice-add 'eval-last-sexp <span style="color: #657b83; font-weight: bold;">:around</span> 'imalison:maybe-setq-instead<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-inithook" class="outline-5">
|
|
<h5 id="inithook"><span class="section-number-5">12.1.3.11</span> Init hook</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-11">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:check-parens</span> nil<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:maybe-check-parens</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> imalison:check-parens
|
|
<span style="color: #268bd2;">(</span>check-parens<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:emacs-lisp-hook</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span>elisp-slime-nav-mode t<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>add-hook 'write-file-functions 'imalison:maybe-check-parens nil t<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>add-hook 'emacs-lisp-mode-hook 'imalison:emacs-lisp-hook<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-keybinds" class="outline-5">
|
|
<h5 id="keybinds"><span class="section-number-5">12.1.3.12</span> Keybinds</h5>
|
|
<div class="outline-text-5" id="text-12-1-3-12">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">emit-compose</span> imalison:copy-eval-last-sexp
|
|
kill-new prin1-to-string eval-last-sexp<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:eval-last-sexp
|
|
eval-region-or-last-sexp
|
|
imalison:copy-eval-last-sexp<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>define-key lisp-mode-shared-map <span style="color: #b58900;">(</span>kbd <span style="color: #2aa198;">"C-c C-c"</span><span style="color: #b58900;">)</span> 'eval-defun<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>define-key lisp-mode-shared-map <span style="color: #b58900;">(</span>kbd <span style="color: #2aa198;">"C-c o r"</span><span style="color: #b58900;">)</span> 'up-list-region<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>define-key lisp-mode-shared-map <span style="color: #b58900;">(</span>kbd <span style="color: #2aa198;">"C-c o o"</span><span style="color: #b58900;">)</span> 'up-list-back<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>define-key lisp-mode-shared-map <span style="color: #b58900;">(</span>kbd <span style="color: #2aa198;">"C-x C-e"</span><span style="color: #b58900;">)</span> 'imalison:eval-last-sexp<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-j"</span> lisp-interaction-mode-map<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-clojure" class="outline-4">
|
|
<h4 id="clojure"><span class="section-number-4">12.1.4</span> clojure</h4>
|
|
<div class="outline-text-4" id="text-12-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:clojure-fancify-symbols</span> <span style="color: #b58900;">(</span>mode<span style="color: #b58900;">)</span>
|
|
<span style="color: #2aa198;">"Pretty symbols for Clojure's anonymous functions and sets,</span>
|
|
<span style="color: #2aa198;"> like (λ [a] (+ a 5)), ƒ(+ % 5), and ∈{2 4 6}."</span>
|
|
<span style="color: #b58900;">(</span>font-lock-add-keywords mode
|
|
`<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"(</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">(</span><span style="color: #2aa198;">fn</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">)</span><span style="color: #2aa198;">[\n\[[:space:]]"</span>
|
|
<span style="color: #859900;">(</span>0 <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #268bd2;">(</span>compose-region <span style="color: #6c71c4;">(</span>match-beginning 1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>match-end 1<span style="color: #6c71c4;">)</span> <span style="color: #2aa198;">"λ"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"(</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">(</span><span style="color: #2aa198;">partial</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">)</span><span style="color: #2aa198;">[\[[:space:]]"</span>
|
|
<span style="color: #859900;">(</span>0 <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #268bd2;">(</span>compose-region <span style="color: #6c71c4;">(</span>match-beginning 1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>match-end 1<span style="color: #6c71c4;">)</span> <span style="color: #2aa198;">"Ƥ"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"(</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">(</span><span style="color: #2aa198;">comp</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">)</span><span style="color: #2aa198;">[\n\[[:space:]]"</span>
|
|
<span style="color: #859900;">(</span>0 <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #268bd2;">(</span>compose-region <span style="color: #6c71c4;">(</span>match-beginning 1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>match-end 1<span style="color: #6c71c4;">)</span> <span style="color: #2aa198;">"∘"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">(</span><span style="color: #2aa198;">#</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">)</span><span style="color: #2aa198;">("</span>
|
|
<span style="color: #859900;">(</span>0 <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #268bd2;">(</span>compose-region <span style="color: #6c71c4;">(</span>match-beginning 1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>match-end 1<span style="color: #6c71c4;">)</span> <span style="color: #2aa198;">"ƒ"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">(</span><span style="color: #2aa198;">#</span><span style="color: #859900; font-weight: bold;">\\</span><span style="color: #b58900; font-weight: bold;">)</span><span style="color: #2aa198;">{"</span>
|
|
<span style="color: #859900;">(</span>0 <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #268bd2;">(</span>compose-region <span style="color: #6c71c4;">(</span>match-beginning 1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>match-end 1<span style="color: #6c71c4;">)</span> <span style="color: #2aa198;">"∈"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">clojure-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> clojure-mode
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'magic-mode-alist '<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"#!.*boot\\s-*$"</span> . clojure-mode<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'auto-mode-alist '<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"\\.boot\\'"</span> . clojure-mode<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:clojure-mode-hook</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(cljr-add-keybindings-with-prefix "C-c C-m")</span>
|
|
<span style="color: #6c71c4;">(</span>clj-refactor-mode 1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #93a1a1;">;;</span><span style="color: #93a1a1;">for adding require/use/import statements</span>
|
|
<span style="color: #6c71c4;">(</span>yas-minor-mode 1<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:clojure-level-1-symobls</span>
|
|
'<span style="color: #6c71c4;">(</span>describe <span style="color: #268bd2;">it</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for symbol in imalison:clojure-level-1-symobls
|
|
do <span style="color: #6c71c4;">(</span>put-clojure-indent symbol 1<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'clojure-mode-hook 'imalison:clojure-mode-hook<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">dolist</span> <span style="color: #6c71c4;">(</span>m '<span style="color: #859900;">(</span>clojure-mode clojurescript-mode clojurec-mode clojurex-mode<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>imalison:clojure-fancify-symbols m<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-cider" class="outline-5">
|
|
<h5 id="cider"><span class="section-number-5">12.1.4.1</span> cider</h5>
|
|
<div class="outline-text-5" id="text-12-1-4-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">cider</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>cider-jack-in<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> cider-stacktrace-default-filters '<span style="color: #6c71c4;">(</span>tooling dup<span style="color: #6c71c4;">)</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: #2aa198;">"boot"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'clojure-mode-hook 'cider-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-cljrefactor" class="outline-5">
|
|
<h5 id="cljrefactor"><span class="section-number-5">12.1.4.2</span> clj-refactor</h5>
|
|
<div class="outline-text-5" id="text-12-1-4-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">clj-refactor</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> clj-refactor-mode<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-scala" class="outline-4">
|
|
<h4 id="scala"><span class="section-number-4">12.1.5</span> scala</h4>
|
|
<div class="outline-text-4" id="text-12-1-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">scala-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"\\.scala\\'"</span> . scala-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"\\.sc\\'"</span> . scala-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ensime</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:pin</span> melpa-stable
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> ensime-mode-map
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"M-,"</span> . ensime-pop-find-definition-stack<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> ensime-mode
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ensime-startup-snapshot-notification nil<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'scala-mode-hook 'ensime-scala-mode-hook<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> scala-indent:align-parameters t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-js" class="outline-4">
|
|
<h4 id="js"><span class="section-number-4">12.1.6</span> js</h4>
|
|
<div class="outline-text-4" id="text-12-1-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">tape-onlyify</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">save-excursion</span>
|
|
<span style="color: #268bd2;">(</span>move-end-of-line nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>re-search-backward <span style="color: #2aa198;">"^test"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>forward-sexp<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #6c71c4;">(</span>looking-at <span style="color: #2aa198;">".only"</span><span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #859900;">(</span>zap-to-char 1 <span style="color: #b58900;">(</span>string-to-char <span style="color: #2aa198;">"("</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span> <span style="color: #859900;">(</span>insert <span style="color: #2aa198;">"("</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>insert <span style="color: #2aa198;">".only"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">js2-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>js2-mode<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #2aa198;">"\\.js\\'"</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(("C-c b" . web-beautify-js)) TODO: to make this mode specific</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">and change binding</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> imalison:identifier-count 0<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:console-log-unique</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>identifier-string <span style="color: #268bd2;">(</span>int-to-string imalison:identifier-count<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>uuid <span style="color: #268bd2;">(</span>imalison:uuid<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>insert <span style="color: #b58900;">(</span>format <span style="color: #2aa198;">"console.log('%s//////////%s//////////');"</span> identifier-string uuid<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imalison:identifier-count <span style="color: #b58900;">(</span>+ imalison:identifier-count 1<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:js2-mode-hook</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Sensible defaults</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">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: #6c71c4;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(edconf-find-file-hook) ;; Make sure that editorconfig takes precedence</span>
|
|
<span style="color: #6c71c4;">(</span>tern-mode t<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> nil <span style="color: #859900;">(</span>skewer-mode<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span> <span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">TODO: reenable</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imenu-create-index-function
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span>imalison:flatten-imenu-index
|
|
<span style="color: #268bd2;">(</span>js2-mode-create-imenu-index<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'js2-mode-hook 'imalison:js2-mode-hook<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'js2-mode-hook 'js2-imenu-extras-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">js2-refactor</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> js2-mode
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>js2r-add-keybindings-with-prefix <span style="color: #2aa198;">"C-c C-m"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'js2-mode-hook #'js2-refactor-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">skewer-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> skewer-mode
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'css-mode-hook #'skewer-css-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'html-mode-hook #'skewer-html-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">tern</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> tern-mode
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">company-tern</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span> <span style="color: #268bd2;">(</span>add-to-list 'company-backends 'company-tern<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">delete-tern-process</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>delete-process <span style="color: #2aa198;">"tern"</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-rust" class="outline-4">
|
|
<h4 id="rust"><span class="section-number-4">12.1.7</span> rust</h4>
|
|
<div class="outline-text-4" id="text-12-1-7">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">rust-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"\\.rs\\'"</span> . rust-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:rust-mode-hook</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span>racer-mode 1<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">flycheck-rust</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span>add-hook 'flycheck-mode-hook #'flycheck-rust-setup<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">racer</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> racer-cmd <span style="color: #2aa198;">"~/.cargo/bin/racer"</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> racer-rust-src-path <span style="color: #2aa198;">"~/Projects/rust/src"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">cargo</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span>add-hook 'rust-mode-hook 'cargo-minor-mode<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'rust-mode-hook 'imalison:rust-mode-hook<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-haskell" class="outline-4">
|
|
<h4 id="haskell"><span class="section-number-4">12.1.8</span> haskell</h4>
|
|
<div class="outline-text-4" id="text-12-1-8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">haskell-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> haskell-mode
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> haskell-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c h"</span> . haskell-hoogle<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> haskell-hoogle-command <span style="color: #2aa198;">"hoogle"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Use notify.el (if you have it installed) at the end of running</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Cabal commands or generally things worth notifying.</span>
|
|
haskell-notify-p t
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Remove annoying error popups</span>
|
|
haskell-interactive-popup-errors nil
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Better import handling</span>
|
|
haskell-process-suggest-remove-import-lines t
|
|
haskell-process-auto-import-loaded-modules t
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Disable haskell-stylish-on-save, as it breaks flycheck highlighting.</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">NOTE: May not be true anymore - taksuyu 2015-10-06</span>
|
|
haskell-stylish-on-save nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> haskell-indent-offset 2<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">flycheck</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>delq 'haskell-stack-ghc flycheck-checkers<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'haskell-mode-hook 'turn-on-haskell-indent<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> haskell-tags-on-save t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-intero" class="outline-5">
|
|
<h5 id="intero"><span class="section-number-5">12.1.8.1</span> intero</h5>
|
|
<div class="outline-text-5" id="text-12-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">intero</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> haskell-mode
|
|
<span style="color: #657b83; font-weight: bold;">:config</span> <span style="color: #b58900;">(</span>add-hook 'haskell-mode-hook 'intero-mode<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-hindent" class="outline-5">
|
|
<h5 id="hindent"><span class="section-number-5">12.1.8.2</span> hindent</h5>
|
|
<div class="outline-text-5" id="text-12-1-8-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">hindent</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> haskell-mode
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> hindent-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c d"</span> . hindent-reformat-decl<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> hindent-style nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'haskell-mode-hook 'hindent-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-ghcmod" class="outline-5">
|
|
<h5 id="ghcmod"><span class="section-number-5">12.1.8.3</span> ghc-mod</h5>
|
|
<div class="outline-text-5" id="text-12-1-8-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ghc</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> haskell-mode
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ghc-debug t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'haskell-mode-hook 'ghc-init<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-companyghc" class="outline-5">
|
|
<h5 id="companyghc"><span class="section-number-5">12.1.8.4</span> company-ghc</h5>
|
|
<div class="outline-text-5" id="text-12-1-8-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">company-ghc</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span>add-to-list 'company-backends '<span style="color: #268bd2;">(</span>company-ghc <span style="color: #657b83; font-weight: bold;">:with</span> company-dabbrev-code<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-cc" class="outline-4">
|
|
<h4 id="cc"><span class="section-number-4">12.1.9</span> C/C++</h4>
|
|
<div class="outline-text-4" id="text-12-1-9">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">cc-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:cc-mode-hook</span> <span style="color: #268bd2;">()</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #6c71c4;">(</span>derived-mode-p 'c-mode 'c++-mode 'java-mode 'asm-mode<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>ggtags-mode 1<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ggtags</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> ggtags-mode-map
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"C-c g s"</span> . ggtags-find-other-symbol<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"C-c g h"</span> . ggtags-view-tag-history<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"C-c g r"</span> . ggtags-find-reference<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"C-c g f"</span> . ggtags-find-file<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"C-c g c"</span> . ggtags-create-tags<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"C-c g u"</span> . ggtags-update-tags<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"M-,"</span> . pop-tag-mark<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'c-mode-common-hook 'imalison:cc-mode-hook<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-c" class="outline-4">
|
|
<h4 id="c"><span class="section-number-4">12.1.10</span> C#</h4>
|
|
<div class="outline-text-4" id="text-12-1-10">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">csharp-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #2aa198;">"\\.cs\\'"</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-racket" class="outline-4">
|
|
<h4 id="racket"><span class="section-number-4">12.1.11</span> racket</h4>
|
|
<div class="outline-text-4" id="text-12-1-11">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">racket-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #2aa198;">"\\.rkt\\'"</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-dataconfigprotocol" class="outline-3">
|
|
<h3 id="dataconfigprotocol"><span class="section-number-3">12.2</span> Data/Config/Protocol</h3>
|
|
<div class="outline-text-3" id="text-12-2">
|
|
</div><div id="outline-container-thrift" class="outline-4">
|
|
<h4 id="thrift"><span class="section-number-4">12.2.1</span> thrift</h4>
|
|
<div class="outline-text-4" id="text-12-2-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">thrift</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> thrift-mode
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"\\.thrift\\'"</span> . thrift-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-protobuf" class="outline-4">
|
|
<h4 id="protobuf"><span class="section-number-4">12.2.2</span> protobuf</h4>
|
|
<div class="outline-text-4" id="text-12-2-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">protobuf-mode</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-jsonmode" class="outline-4">
|
|
<h4 id="jsonmode"><span class="section-number-4">12.2.3</span> json-mode</h4>
|
|
<div class="outline-text-4" id="text-12-2-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">json-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #2aa198;">"\\.json\\'"</span>
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span>add-hook 'json-mode-hook
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> indent-tabs-mode nil<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> js-indent-level 4<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-yamlmode" class="outline-4">
|
|
<h4 id="yamlmode"><span class="section-number-4">12.2.4</span> yaml-mode</h4>
|
|
<div class="outline-text-4" id="text-12-2-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">yaml-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"\\.yaml\\'"</span> . yaml-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"\\.yml\\'"</span> . yaml-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-esmode" class="outline-4">
|
|
<h4 id="esmode"><span class="section-number-4">12.2.5</span> es-mode</h4>
|
|
<div class="outline-text-4" id="text-12-2-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">es-mode</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-document" class="outline-3">
|
|
<h3 id="document"><span class="section-number-3">12.3</span> Document</h3>
|
|
<div class="outline-text-3" id="text-12-3">
|
|
</div><div id="outline-container-org" class="outline-4">
|
|
<h4 id="org"><span class="section-number-4">12.3.1</span> org</h4>
|
|
<div class="outline-text-4" id="text-12-3-1">
|
|
</div><div id="outline-container-config" class="outline-5">
|
|
<h5 id="config"><span class="section-number-5">12.3.1.1</span> config</h5>
|
|
<div class="outline-text-5" id="text-12-3-1-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">org</span>
|
|
<span style="color: #657b83; font-weight: bold;">:ensure</span> org-plus-contrib
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> org-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"C-e"</span> . end-of-visual-line<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">XXX: These should probably be moved to config, right?</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> org-startup-indented nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> org-startup-folded t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> org-edit-src-content-indentation 0<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> org-src-preserve-indentation t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> org-directory <span style="color: #2aa198;">"~/Dropbox/org"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> org-mobile-inbox-for-pull <span style="color: #2aa198;">"~/Dropbox/org/flagged.org"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> org-mobile-directory <span style="color: #2aa198;">"~/Dropbox/Apps/MobileOrg"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-goto-interface 'outline-path-completion
|
|
org-goto-max-level 10
|
|
org-export-headline-levels 3<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'org-mode-hook 'imalison:disable-linum-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'org-mode-hook <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #859900;">()</span> <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-todo-key-trigger t<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'org-agenda-mode-hook 'imalison:disable-linum-mode<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-archive-if</span> <span style="color: #6c71c4;">(</span>condition-function<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #859900;">(</span>funcall condition-function<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>next-point-marker
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">save-excursion</span> <span style="color: #859900;">(</span>org-forward-heading-same-level 1<span style="color: #859900;">)</span> <span style="color: #859900;">(</span>point-marker<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>org-archive-subtree<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-map-continue-from <span style="color: #268bd2;">(</span>marker-position next-point-marker<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-archive-if-completed</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>org-archive-if 'org-entry-is-done-p<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-archive-completed-in-buffer</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>org-map-entries 'org-archive-if-completed<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-defun</span> <span style="color: #268bd2;">imalison:make-org-template</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&key</span> <span style="color: #859900;">(</span>content <span style="color: #2aa198;">"%?"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">with-temp-buffer</span>
|
|
<span style="color: #859900;">(</span>org-mode<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>insert content<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>org-set-property <span style="color: #2aa198;">"CREATED"</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">with-temp-buffer</span>
|
|
<span style="color: #268bd2;">(</span>org-insert-time-stamp
|
|
<span style="color: #6c71c4;">(</span>org-current-effective-time<span style="color: #6c71c4;">)</span> t t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>buffer-substring-no-properties <span style="color: #b58900;">(</span>point-min<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>point-max<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:make-org-template-from-file</span> <span style="color: #6c71c4;">(</span>filename<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>imalison:make-org-template <span style="color: #859900;">(</span>imalison:get-string-from-file filename<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-defun</span> <span style="color: #268bd2;">imalison:make-org-todo-template</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #b58900;">&key</span> <span style="color: #859900;">(</span>content <span style="color: #2aa198;">"%?"</span><span style="color: #859900;">)</span> <span style="color: #859900;">(</span>creation-state <span style="color: #2aa198;">"TODO"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">with-temp-buffer</span>
|
|
<span style="color: #859900;">(</span>org-mode<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>org-insert-heading<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>insert content<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>org-todo creation-state<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>org-set-property <span style="color: #2aa198;">"CREATED"</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">with-temp-buffer</span>
|
|
<span style="color: #268bd2;">(</span>org-insert-time-stamp
|
|
<span style="color: #6c71c4;">(</span>org-current-effective-time<span style="color: #6c71c4;">)</span> t t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>remove-hook 'post-command-hook 'org-add-log-note<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>org-log-note-purpose 'state<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-log-note-return-to <span style="color: #6c71c4;">(</span>point-marker<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-log-note-marker <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #859900;">(</span>goto-char <span style="color: #2aa198;">(</span>org-log-beginning t<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>point-marker<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-log-note-state creation-state<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>org-add-log-note<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>buffer-substring-no-properties <span style="color: #b58900;">(</span>point-min<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>point-max<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-todo-force-notes</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>org-todo-log-states
|
|
<span style="color: #268bd2;">(</span>mapcar <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #859900;">(</span>state<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>list state 'note 'time<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>apply 'append org-todo-sets<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">cond</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>eq major-mode 'org-mode<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>org-todo<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>eq major-mode 'org-agenda-mode<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>org-agenda-todo<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-make-habit</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>org-set-property <span style="color: #2aa198;">"STYLE"</span> <span style="color: #2aa198;">"habit"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-insert-habit</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>org-insert-todo-heading nil<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>org-make-habit<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-todo-at-date</span> <span style="color: #6c71c4;">(</span>date<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #859900;">(</span>list <span style="color: #b58900;">(</span>org-time-string-to-time <span style="color: #268bd2;">(</span>org-read-date<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">cl-flet</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>org-current-effective-time <span style="color: #268bd2;">(</span><span style="color: #b58900;">&rest</span> r<span style="color: #268bd2;">)</span> date<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>org-today <span style="color: #268bd2;">(</span><span style="color: #b58900;">&rest</span> r<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>time-to-days date<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">cond</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>eq major-mode 'org-mode<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>org-todo<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>eq major-mode 'org-agenda-mode<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>org-agenda-todo<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:make-org-linked-todo-template</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span>imalison:make-org-todo-template <span style="color: #2aa198;">"%? %A"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-cmp-creation-times</span> <span style="color: #6c71c4;">(</span>a b<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>a-created <span style="color: #268bd2;">(</span>get-date-created-from-agenda-entry a<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>b-created <span style="color: #268bd2;">(</span>get-date-created-from-agenda-entry b<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>imalison:compare-int-list a-created b-created<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-agenda-done</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&optional</span> arg<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #2aa198;">"Mark current TODO as done.</span>
|
|
<span style="color: #2aa198;"> This changes the line at point, all other lines in the agenda referring to</span>
|
|
<span style="color: #2aa198;"> the same tree node, and the headline of the tree node in the Org-mode file."</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #2aa198;">"P"</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>org-agenda-todo <span style="color: #2aa198;">"DONE"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>org-mode org org-mobile-push org-mobile-pull org-agenda<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"\\.org\\'"</span> . org-mode<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c a"</span> . org-agenda<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c c"</span> . org-capture<span style="color: #268bd2;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:map</span> org-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c n t"</span> . org-insert-todo-heading<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c n s"</span> . org-insert-todo-subheading<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c n h"</span> . org-insert-habit<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c n m"</span> . org-make-habit<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c n l"</span> . org-store-link<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c n i"</span> . org-insert-link<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c C-t"</span> . org-todo<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c C-S-t"</span> . org-todo-force-notes<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-."</span> . elisp-slime-nav-find-elisp-thing-at-point<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-global-properties
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">quote</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span><span style="color: #2aa198;">"Effort_ALL"</span> . <span style="color: #2aa198;">"0:15 0:30 0:45 1:00 2:00 3:00 4:00 5:00 6:00 0:00"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"STYLE_ALL"</span> . <span style="color: #2aa198;">"habit"</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Record changes to todo states</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-todo-keywords
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>sequence <span style="color: #2aa198;">"IDEA(i!)"</span> <span style="color: #2aa198;">"RESEARCH(r!)"</span> <span style="color: #2aa198;">"TODO(t!)"</span> <span style="color: #2aa198;">"NEXT(n!)"</span>
|
|
<span style="color: #2aa198;">"STARTED(s!)"</span> <span style="color: #2aa198;">"WAIT(w!)"</span> <span style="color: #2aa198;">"BACKLOG(b!)"</span> <span style="color: #2aa198;">"|"</span>
|
|
<span style="color: #2aa198;">"DONE(d!)"</span> <span style="color: #2aa198;">"HANDLED(h!)"</span> <span style="color: #2aa198;">"EXPIRED(e!)"</span> <span style="color: #2aa198;">"CANCELED(c!)"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> helm-org-headings-fontify t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-todo-repeat-to-state <span style="color: #2aa198;">"TODO"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-agenda-span 10<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-agenda-start-day <span style="color: #2aa198;">"-2d"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-columns-default-format
|
|
<span style="color: #2aa198;">"%80ITEM(Task) %10Effort(Effort){:} %10CLOCKSUM"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-show-context-detail '<span style="color: #6c71c4;">(</span>org-goto . lineage<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>sp-local-pair 'org-mode <span style="color: #2aa198;">"~"</span> <span style="color: #2aa198;">"~"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-to-list
|
|
'org-src-lang-modes '<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"plantuml"</span> . plantuml<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>org-babel-do-load-languages
|
|
'org-babel-load-languages
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>sh . t<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>python . t<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>ruby . t<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>octave . t<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>sqlite . t<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>plantuml . t<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">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: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> nil
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Enable appointment notifications.</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">defadvice</span> <span style="color: #268bd2;">org-agenda-to-appt</span> <span style="color: #859900;">(</span>before wickedcool activate<span style="color: #859900;">)</span>
|
|
<span style="color: #2aa198;">"Clear the appt-time-msg-list."</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> appt-time-msg-list nil<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>appt-activate<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-agenda-to-appt-no-message</span> <span style="color: #859900;">()</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">shut-up</span> <span style="color: #b58900;">(</span>org-agenda-to-appt<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>run-at-time <span style="color: #2aa198;">"00:00"</span> 60 'org-agenda-to-appt-no-message<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Override the key definition for org-exit</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">TODO why does this cause an error</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(define-key org-agenda-mode-map "x" #'org-agenda-done)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">org-mode add-ons</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">org-present</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> org-present<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">org-pomodoro</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">variable configuration</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-modules 'org-habit<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-modules 'org-expiry<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-modules 'org-notify<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-src-fontify-natively t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-habit-graph-column 50<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-habit-show-habits-only-for-today t<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">My priority system:</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">A - Absolutely MUST, at all costs, be completed by the provided</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">due date. TODO: implement some type of extreme nagging</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">system that alerts in an intrusive way for overdue A</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">priority tasks.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">B - Should be given immediate attention if the due date is any</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">time in the next two days. Failure to meet due date would</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">be bad but not catastrophic.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">C - The highest priority to which tasks for which failure to</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">complete on time would not have considerable significant</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">consequences. There is still significant reason to prefer</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">the completion of these tasks sooner rather than later.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">D - Failure to complete within a few days (or ever) of any</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">deadline would be completely okay. As such, any deadline</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">present on such a task is necessarily self imposed. Still</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">probably worth doing</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">E - Potentially not even worth doing at all, but worth taking a</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">note about in case it comes up again, or becomes more</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">interesting later.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">F - Almost certainly not worth attempting in the immediate future.</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Just brain dump.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Priorities are somewhat contextual within each category. Things</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">in the gtd or work categories are generally regarded as much</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">more important than things with the same priority from the</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">dotfiles category.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Items without deadlines or scheduled times of a given priority</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">can be regarded as less important than items that DO have</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">deadlines of that same priority.</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-lowest-priority 69<span style="color: #268bd2;">)</span> <span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">The character E</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-completion-use-ido t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-enforce-todo-dependencies t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-deadline-warning-days 0<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-default-priority ?D<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-agenda-skip-scheduled-if-done t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-agenda-skip-deadline-if-done t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;;</span><span style="color: #93a1a1;">(add-to-list org-agenda-tag-filter-preset "+PRIORITY<\"C\"")</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-imenu-depth 10<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Stop starting agenda from deleting frame setup!</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-agenda-window-setup 'other-window<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>define-key mode-specific-map <span style="color: #6c71c4;">[</span>?a<span style="color: #6c71c4;">]</span> 'org-agenda<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-j"</span> org-mode-map<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">org-bullets</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span>add-hook 'org-mode-hook <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span> <span style="color: #268bd2;">(</span>org-bullets-mode 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">org-ehtml</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-ehtml-docroot <span style="color: #b58900;">(</span>expand-file-name <span style="color: #2aa198;">"~/Dropbox/org"</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-ehtml-allow-agenda t<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-ehtml-editable-headlines t<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-ehtml-everything-editable t<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Agenda setup.</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:org-gtd-file</span> <span style="color: #2aa198;">"~/org/gtd.org"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:org-habits-file</span> <span style="color: #2aa198;">"~/org/habits.org"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:org-calendar-file</span> <span style="color: #2aa198;">"~/org/calendar.org"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:org-inbox-file</span> <span style="color: #2aa198;">"~/org/inbox.org"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unless</span> <span style="color: #6c71c4;">(</span>boundp 'org-capture-templates<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">org-capture-templates</span> nil<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>imalison:add-to-org-agenda-files
|
|
<span style="color: #6c71c4;">(</span>list imalison:org-gtd-file imalison:org-habits-file
|
|
imalison:org-calendar-file imalison:org-inbox-file<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-capture-templates
|
|
`<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"t"</span> <span style="color: #2aa198;">"GTD Todo (Linked)"</span> entry <span style="color: #859900;">(</span>file ,imalison:org-gtd-file<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">function</span> imalison:make-org-linked-todo-template<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-capture-templates
|
|
`<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"g"</span> <span style="color: #2aa198;">"GTD Todo"</span> entry <span style="color: #859900;">(</span>file ,imalison:org-gtd-file<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">function</span> imalison:make-org-todo-template<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-capture-templates
|
|
`<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"y"</span> <span style="color: #2aa198;">"Calendar entry (Linked)"</span> entry
|
|
<span style="color: #859900;">(</span>file ,imalison:org-calendar-file<span style="color: #859900;">)</span>
|
|
<span style="color: #2aa198;">"* %? %A</span>
|
|
<span style="color: #2aa198;"> :PROPERTIES:</span>
|
|
<span style="color: #2aa198;"> :CREATED: %U</span>
|
|
<span style="color: #2aa198;"> :END:</span>
|
|
<span style="color: #2aa198;">%^T"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-capture-templates
|
|
`<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"c"</span> <span style="color: #2aa198;">"Calendar entry"</span> entry
|
|
<span style="color: #859900;">(</span>file ,imalison:org-calendar-file<span style="color: #859900;">)</span>
|
|
<span style="color: #2aa198;">"* %?</span>
|
|
<span style="color: #2aa198;"> :PROPERTIES:</span>
|
|
<span style="color: #2aa198;"> :CREATED: %U</span>
|
|
<span style="color: #2aa198;"> :END:</span>
|
|
<span style="color: #2aa198;">%^T"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-capture-templates
|
|
`<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"h"</span> <span style="color: #2aa198;">"Habit"</span> entry <span style="color: #859900;">(</span>file ,imalison:org-habits-file<span style="color: #859900;">)</span>
|
|
<span style="color: #2aa198;">"* TODO</span>
|
|
<span style="color: #2aa198;"> SCHEDULED: %^t</span>
|
|
<span style="color: #2aa198;"> :PROPERTIES:</span>
|
|
<span style="color: #2aa198;"> :CREATED: %U</span>
|
|
<span style="color: #2aa198;"> :STYLE: habit</span>
|
|
<span style="color: #2aa198;"> :END:"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>this-week-high-priority
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">The < in the following line works has behavior that is opposite</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">to what one might expect.</span>
|
|
'<span style="color: #b58900;">(</span>tags-todo <span style="color: #2aa198;">"+PRIORITY<\"C\"+DEADLINE<\"<+1w>\"DEADLINE>\"<+0d>\""</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>org-agenda-overriding-header
|
|
<span style="color: #2aa198;">"Upcoming high priority tasks:"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>due-today '<span style="color: #b58900;">(</span>tags-todo
|
|
<span style="color: #2aa198;">"+DEADLINE=<\"<+0d>\""</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>org-agenda-overriding-header
|
|
<span style="color: #2aa198;">"Due today:"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>recently-created '<span style="color: #b58900;">(</span>tags-todo
|
|
<span style="color: #2aa198;">"+CREATED=>\"<-3d>\""</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>org-agenda-overriding-header <span style="color: #2aa198;">"Recently created:"</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>org-agenda-cmp-user-defined 'org-cmp-creation-times<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>org-agenda-sorting-strategy '<span style="color: #859900;">(</span>user-defined-down<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>next '<span style="color: #b58900;">(</span>todo <span style="color: #2aa198;">"NEXT"</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>started '<span style="color: #b58900;">(</span>todo <span style="color: #2aa198;">"STARTED"</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>missing-deadline
|
|
'<span style="color: #b58900;">(</span>tags-todo <span style="color: #2aa198;">"-DEADLINE={.}/!"</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>org-agenda-overriding-header
|
|
<span style="color: #2aa198;">"These don't have deadlines:"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>missing-priority
|
|
'<span style="color: #b58900;">(</span>tags-todo <span style="color: #2aa198;">"-PRIORITY={.}/!"</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>org-agenda-overriding-header
|
|
<span style="color: #2aa198;">"These don't have priorities:"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-agenda-custom-commands
|
|
`<span style="color: #859900;">(</span><span style="color: #b58900;">(</span><span style="color: #2aa198;">"M"</span> <span style="color: #2aa198;">"Main agenda view"</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>agenda <span style="color: #2aa198;">""</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">(</span>org-agenda-overriding-header <span style="color: #2aa198;">"Agenda:"</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>org-agenda-ndays 5<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>org-deadline-warning-days 0<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
,due-today
|
|
,next
|
|
,started
|
|
,this-week-high-priority
|
|
,recently-created<span style="color: #268bd2;">)</span>
|
|
nil nil<span style="color: #b58900;">)</span>
|
|
,<span style="color: #b58900;">(</span>cons <span style="color: #2aa198;">"A"</span> <span style="color: #268bd2;">(</span>cons <span style="color: #2aa198;">"High priority upcoming"</span> this-week-high-priority<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
,<span style="color: #b58900;">(</span>cons <span style="color: #2aa198;">"d"</span> <span style="color: #268bd2;">(</span>cons <span style="color: #2aa198;">"Overdue tasks and due today"</span> due-today<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
,<span style="color: #b58900;">(</span>cons <span style="color: #2aa198;">"r"</span> <span style="color: #268bd2;">(</span>cons <span style="color: #2aa198;">"Recently created"</span> recently-created<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"h"</span> <span style="color: #2aa198;">"A, B priority:"</span> tags-todo <span style="color: #2aa198;">"+PRIORITY<\"C\""</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>org-agenda-overriding-header
|
|
<span style="color: #2aa198;">"High Priority:"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #2aa198;">"c"</span> <span style="color: #2aa198;">"At least priority C:"</span> tags-todo <span style="color: #2aa198;">"+PRIORITY<\"D\""</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>org-agenda-overriding-header
|
|
<span style="color: #2aa198;">"At least priority C:"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">What follows is a description of the significance of each of</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">the values available in `</span><span style="color: #268bd2; font-weight: bold;">org-todo-keywords</span><span style="color: #93a1a1;">'. All headings with</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">one of these keywords deal with the concept of the completion</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">of some task or collection of tasks to bring about a particular</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">state of affairs. In some cases, the actual tasks involved may</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">not be known at the time of task creation.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Incomplete States:</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">IDEA - This TODO exists in only the most abstract sense: it is</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">an imagined state of affairs that requires tasks that are</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">either not yet known, or have not thoroughly been considered.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">RESEARCH - This TODO needs to be investigated further before</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">action can be taken to achieve the desired outcome. It is not</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">known how much time and effort will be consumed in the actual</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">completion of the task.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">TODO - The scope and work involved in this TODO are well</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">understood, but for some reason or another, it is not something</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">that should be attempted in the immediate future. Typically</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">this is because the task is not considered a top priority, but</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">it may also be for some other reason.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">NEXT - This TODO is immediately actionable and should be</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">started in the immediate future.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">STARTED - Work on this TODO has already started, further work</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">is immediately actionable.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">WAIT - The work involved in this TODO is well understood, but</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">it is blocked for the time being.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">BACKLOG - While technically actionable, this task is not only</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">not worth pursuing in the immediate future, but the foreseable</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">future. It exists as a task mostly as a note/reminder, in case</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">it becomes higher priority in the future.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Complete States:</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">DONE - This TODO has been completed exactly as imagined.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">HANDLED - This TODO was completed in spirit, though not by the</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">means that were originally imagined/outlined in the TODO.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">EXPIRED - The owner of this TODO failed to take action on it</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">within the appropriate time period, and there is now no point in</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">attempting it.</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">CANCELED - For whatever reason, this TODO should no longer be</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">attempted. This TODO is typically used in contrast to the</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">EXPIRED TODO to indicate that the owner is not necessarily to</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">blame.</span>
|
|
<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-useframes" class="outline-5">
|
|
<h5 id="useframes"><span class="section-number-5">12.3.1.2</span> Use frames</h5>
|
|
<div class="outline-text-5" id="text-12-3-1-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">org</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-src-window-setup 'current-window<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #6c71c4;">(</span>imalison:use-frames-only<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span>setcdr <span style="color: #b58900;">(</span>assoc 'file org-link-frame-setup<span style="color: #b58900;">)</span> 'find-file-other-frame<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-setbackgroundcolorofsourceblocksforexport" class="outline-5">
|
|
<h5 id="setbackgroundcolorofsourceblocksforexport"><span class="section-number-5">12.3.1.3</span> Set Background Color of Source Blocks for Export</h5>
|
|
<div class="outline-text-5" id="text-12-3-1-3">
|
|
<p>
|
|
This was taken from <a href="http://emacs.stackexchange.com/questions/3374/set-the-background-of-org-exported-code-blocks-according-to-theme">here</a>.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">org</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:org-inline-css-hook</span> <span style="color: #6c71c4;">(</span>exporter<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #2aa198;">"Insert custom inline css to automatically set the</span>
|
|
<span style="color: #2aa198;">background of code to whatever theme I'm using's background"</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #859900;">(</span>eq exporter 'html<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>my-pre-bg <span style="color: #6c71c4;">(</span>face-background 'default<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>my-pre-fg <span style="color: #6c71c4;">(</span>face-foreground 'default<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span>
|
|
org-html-head-extra
|
|
<span style="color: #268bd2;">(</span>concat
|
|
org-html-head-extra
|
|
<span style="color: #6c71c4;">(</span>format <span style="color: #2aa198;">"<style type=\"text/css\">\n pre.src {background-color: %s; color: %s;}</style>\n"</span>
|
|
my-pre-bg my-pre-fg<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-hook 'org-export-before-processing-hook 'imalison:org-inline-css-hook<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-usemyowndefaultnamingschemefororgheadings" class="outline-5">
|
|
<h5 id="usemyowndefaultnamingschemefororgheadings"><span class="section-number-5">12.3.1.4</span> Use my own default naming scheme for org-headings</h5>
|
|
<div class="outline-text-5" id="text-12-3-1-4">
|
|
<p>
|
|
First we define a function that will generate a sanitized version of the heading
|
|
as its link target.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:org-get-raw-value</span> <span style="color: #b58900;">(</span>item<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #268bd2;">(</span>listp item<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>property-list <span style="color: #b58900;">(</span>cadr item<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> property-list <span style="color: #859900;">(</span>plist-get property-list <span style="color: #657b83; font-weight: bold;">:raw-value</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:sanitize-name</span> <span style="color: #b58900;">(</span>name<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>replace-regexp-in-string <span style="color: #2aa198;">"[</span><span style="color: #b58900; font-weight: bold;">^</span><span style="color: #2aa198;">[:alpha:]]"</span> <span style="color: #2aa198;">""</span> <span style="color: #268bd2;">(</span>s-downcase name<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:generate-name</span> <span style="color: #b58900;">(</span>datum cache<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>raw-value <span style="color: #859900;">(</span>imalison:org-get-raw-value datum<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> raw-value
|
|
<span style="color: #6c71c4;">(</span>imalison:sanitize-name raw-value<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This is the default implementation from org</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>type <span style="color: #268bd2;">(</span>org-element-type datum<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>format <span style="color: #2aa198;">"org%s%d"</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> type
|
|
<span style="color: #268bd2;">(</span>replace-regexp-in-string <span style="color: #2aa198;">"-"</span> <span style="color: #2aa198;">""</span> <span style="color: #6c71c4;">(</span>symbol-name type<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #2aa198;">"secondarystring"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">incf</span> <span style="color: #268bd2;">(</span>gethash type cache 0<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
This function replaces the default naming scheme with a call to
|
|
<code>imalison:generate-name</code>, and uses a slightly different uniquify approach.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ox</span>
|
|
<span style="color: #657b83; font-weight: bold;">:ensure</span> nil
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">org-export-get-reference</span> <span style="color: #268bd2;">(</span>datum info<span style="color: #268bd2;">)</span>
|
|
<span style="color: #2aa198;">"Return a unique reference for DATUM, as a string.</span>
|
|
<span style="color: #2aa198;">DATUM is either an element or an object. INFO is the current</span>
|
|
<span style="color: #2aa198;">export state, as a plist. Returned reference consists of</span>
|
|
<span style="color: #2aa198;">alphanumeric characters only."</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>type <span style="color: #b58900;">(</span>org-element-type datum<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>cache <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">or</span> <span style="color: #268bd2;">(</span>plist-get info <span style="color: #657b83; font-weight: bold;">:internal-references</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>h <span style="color: #2aa198;">(</span>make-hash-table <span style="color: #657b83; font-weight: bold;">:test</span> #'eq<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>plist-put info <span style="color: #657b83; font-weight: bold;">:internal-references</span> h<span style="color: #6c71c4;">)</span>
|
|
h<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>reverse-cache <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">or</span> <span style="color: #268bd2;">(</span>plist-get info <span style="color: #657b83; font-weight: bold;">:taken-internal-references</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>h <span style="color: #2aa198;">(</span>make-hash-table <span style="color: #657b83; font-weight: bold;">:test</span> 'equal<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>plist-put info <span style="color: #657b83; font-weight: bold;">:taken-internal-references</span> h<span style="color: #6c71c4;">)</span>
|
|
h<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">or</span> <span style="color: #859900;">(</span>gethash datum cache<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>name <span style="color: #6c71c4;">(</span>imalison:generate-name datum cache<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>number <span style="color: #6c71c4;">(</span>+ 1 <span style="color: #859900;">(</span>gethash name reverse-cache -1<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>new-name <span style="color: #6c71c4;">(</span>format <span style="color: #2aa198;">"%s%s"</span> name <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #2aa198;">(</span>< 0 number<span style="color: #2aa198;">)</span> number <span style="color: #2aa198;">""</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>puthash name number reverse-cache<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>puthash datum new-name cache<span style="color: #b58900;">)</span>
|
|
new-name<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orgprojectile" class="outline-5">
|
|
<h5 id="orgprojectile"><span class="section-number-5">12.3.1.5</span> org-projectile</h5>
|
|
<div class="outline-text-5" id="text-12-3-1-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">org-projectile</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> helm
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c n p"</span> . imalison:helm-org-todo<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>org-projectile:prompt<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-capture-templates
|
|
<span style="color: #6c71c4;">(</span>org-projectile:project-todo-entry
|
|
<span style="color: #2aa198;">"l"</span> <span style="color: #2aa198;">"* TODO %? %a\n"</span> <span style="color: #2aa198;">"Linked Project TODO"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-capture-templates <span style="color: #6c71c4;">(</span>org-projectile:project-todo-entry <span style="color: #2aa198;">"p"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-confirm-elisp-link-function nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>imalison:add-to-org-agenda-files <span style="color: #6c71c4;">(</span>org-projectile:todo-files<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">helm-source</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">helm-org</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:helm-org-todo</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&optional</span> arg<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #2aa198;">"P"</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>helm <span style="color: #657b83; font-weight: bold;">:sources</span> <span style="color: #859900;">(</span>list <span style="color: #b58900;">(</span>helm-source-org-capture-templates<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>org-projectile:helm-source
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> arg <span style="color: #6c71c4;">(</span>imalison:make-org-linked-todo-template<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>imalison:make-org-todo-template<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:candidate-number-limit</span> 99999
|
|
<span style="color: #657b83; font-weight: bold;">:buffer</span> <span style="color: #2aa198;">"*helm org capture templates*"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orgnotify" class="outline-5">
|
|
<h5 id="orgnotify"><span class="section-number-5">12.3.1.6</span> org-notify</h5>
|
|
<div class="outline-text-5" id="text-12-3-1-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">org-notify</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> org
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:org-notify-notification-handler</span> <span style="color: #6c71c4;">(</span>plist<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>sauron-add-event 'org-notify 4 <span style="color: #859900;">(</span>format <span style="color: #2aa198;">"%s, %s.\n"</span> <span style="color: #b58900;">(</span>plist-get plist <span style="color: #657b83; font-weight: bold;">:heading</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>org-notify-body-text plist<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-show-notification-handler 'imalison:org-notify-notification-handler<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>org-notify-add 'default '<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"1h"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> imalison:org-notify-notification-handler
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"2m"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 60<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-notify-add 'default '<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"100m"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> imalison:org-notify-notification-handler
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"2m"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 60<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-notify-add 'urgent-second '<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"3m"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> <span style="color: #859900;">(</span>-notify/window -ding<span style="color: #859900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"15s"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 10<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-notify-add 'minute '<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"5m"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"100s"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 70<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-notify-add '12hours
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"3m"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> <span style="color: #859900;">(</span>-notify/window -ding<span style="color: #859900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"15s"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 10<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"100m"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"2m"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 60<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"12h"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window <span style="color: #657b83; font-weight: bold;">:audible</span> nil
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"10m"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 200<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-notify-add '5days
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"100m"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"2m"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 60<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"2d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"15m"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 100<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"5d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"2h"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 200<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-notify-add 'long-20days
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"2d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"15m"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 60<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"5d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"2h"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 60<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"20d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -email <span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"2d"</span> <span style="color: #657b83; font-weight: bold;">:audible</span> nil<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-notify-add 'long-50days
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"4d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"30m"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 100<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"10d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"4h"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 200<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"50d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -email <span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"3d"</span> <span style="color: #657b83; font-weight: bold;">:audible</span> nil<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-notify-add 'long-100days
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"2d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"1h"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 200<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"10d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -notify/window
|
|
<span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"10h"</span> <span style="color: #657b83; font-weight: bold;">:duration</span> 300<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"50d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -email <span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"3d"</span> <span style="color: #657b83; font-weight: bold;">:audible</span> nil<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:time</span> <span style="color: #2aa198;">"100d"</span> <span style="color: #657b83; font-weight: bold;">:actions</span> -email <span style="color: #657b83; font-weight: bold;">:period</span> <span style="color: #2aa198;">"5d"</span> <span style="color: #657b83; font-weight: bold;">:audible</span> nil<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>org-notify-start 10<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orgreveal" class="outline-5">
|
|
<h5 id="orgreveal"><span class="section-number-5">12.3.1.7</span> org-reveal</h5>
|
|
<div class="outline-text-5" id="text-12-3-1-7">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ox-reveal</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> org
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-reveal-root
|
|
<span style="color: #268bd2;">(</span>imalison:join-paths <span style="color: #2aa198;">"file://"</span> imalison:projects-directory <span style="color: #2aa198;">"reveal.js"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orgcaldav" class="outline-5">
|
|
<h5 id="orgcaldav"><span class="section-number-5">12.3.1.8</span> org-caldav</h5>
|
|
<div class="outline-text-5" id="text-12-3-1-8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">org-caldav</span>
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> org-caldav-url <span style="color: #2aa198;">"https://www.google.com/calendar/dav"</span>
|
|
org-caldav-inbox imalison:org-inbox-file
|
|
org-caldav-files <span style="color: #6c71c4;">(</span>list imalison:org-calendar-file<span style="color: #6c71c4;">)</span>
|
|
org-icalendar-timezone <span style="color: #2aa198;">"America/Los_Angeles"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-tex" class="outline-4">
|
|
<h4 id="tex"><span class="section-number-4">12.3.2</span> TeX</h4>
|
|
<div class="outline-text-4" id="text-12-3-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">tex</span>
|
|
<span style="color: #657b83; font-weight: bold;">:ensure</span> auctex
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> TeX-mode
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:TeX-mode-hook</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span>turn-on-reftex<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>TeX-source-correlate-mode +1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>TeX-PDF-mode +1<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-j"</span> TeX-mode-map<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>TeX-global-PDF-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> TeX-auto-save t
|
|
TeX-parse-self t
|
|
TeX-save-query nil
|
|
TeX-PDF-mode t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>TeX-global-PDF-mode t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'TeX-mode-hook 'imalison:TeX-mode-hook<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-latex" class="outline-5">
|
|
<h5 id="latex"><span class="section-number-5">12.3.2.1</span> latex</h5>
|
|
<div class="outline-text-5" id="text-12-3-2-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">latex</span>
|
|
<span style="color: #657b83; font-weight: bold;">:ensure</span> auctex
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> tex
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-j"</span> LaTeX-mode-map<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-auctexlatexmk" class="outline-5">
|
|
<h5 id="auctexlatexmk"><span class="section-number-5">12.3.2.2</span> auctex-latexmk</h5>
|
|
<div class="outline-text-5" id="text-12-3-2-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">auctex-latexmk</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> tex
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> auctex-latexmk-inherit-TeX-PDF-mode t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>auctex-latexmk-setup<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-companyauctex" class="outline-5">
|
|
<h5 id="companyauctex"><span class="section-number-5">12.3.2.3</span> company-auctex</h5>
|
|
<div class="outline-text-5" id="text-12-3-2-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">company-auctex</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> tex
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span>company-auctex-init<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-markdownmode" class="outline-4">
|
|
<h4 id="markdownmode"><span class="section-number-4">12.3.3</span> markdown-mode</h4>
|
|
<div class="outline-text-4" id="text-12-3-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">markdown-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'markdown-mode-hook 'imalison:disable-linum-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-plantumlmode" class="outline-4">
|
|
<h4 id="plantumlmode"><span class="section-number-4">12.3.4</span> plantuml-mode</h4>
|
|
<div class="outline-text-4" id="text-12-3-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">plantuml-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> plantuml-mode
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"\\.puml\\'"</span> <span style="color: #2aa198;">"\\.plantuml\\'"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cond</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>equal system-type 'darwin<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>plantuml-dir
|
|
<span style="color: #6c71c4;">(</span>s-trim <span style="color: #859900;">(</span>shell-command-to-string <span style="color: #2aa198;">"brew --prefix plantuml"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>filename
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #859900;">(</span>file-exists-p plantuml-dir<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">--first</span> <span style="color: #2aa198;">(</span>s-ends-with? <span style="color: #2aa198;">".jar"</span> <span style="color: #268bd2;">it</span><span style="color: #2aa198;">)</span> <span style="color: #2aa198;">(</span>directory-files plantuml-dir<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>filepath <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> filename
|
|
<span style="color: #859900;">(</span>imalison:join-paths plantuml-dir filename<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> plantuml-jar-path filepath
|
|
org-plantuml-jar-path filepath<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>equal system-type 'gnu/linux<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>filepath <span style="color: #2aa198;">"/opt/plantuml/plantuml.jar"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> plantuml-jar-path filepath
|
|
org-plantuml-jar-path filepath<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list
|
|
'org-src-lang-modes '<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"plantuml"</span> . plantuml<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-wsdmode" class="outline-4">
|
|
<h4 id="wsdmode"><span class="section-number-4">12.3.5</span> wsd-mode</h4>
|
|
<div class="outline-text-4" id="text-12-3-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">wsd-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>wsd-mode<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-utility" class="outline-3">
|
|
<h3 id="utility"><span class="section-number-3">12.4</span> Utility</h3>
|
|
<div class="outline-text-3" id="text-12-4">
|
|
</div><div id="outline-container-restclient" class="outline-4">
|
|
<h4 id="restclient"><span class="section-number-4">12.4.1</span> restclient</h4>
|
|
<div class="outline-text-4" id="text-12-4-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">restclient</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"\\.restclient\\'"</span> . restclient-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">company-restclient</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-jqmode" class="outline-4">
|
|
<h4 id="jqmode"><span class="section-number-4">12.4.2</span> jq-mode</h4>
|
|
<div class="outline-text-4" id="text-12-4-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">jq-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #2aa198;">"\\.jq\\'"</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-sourcecontrol" class="outline-2">
|
|
<h2 id="sourcecontrol"><span class="section-number-2">13</span> Source Control</h2>
|
|
<div class="outline-text-2" id="text-13">
|
|
</div><div id="outline-container-magit" class="outline-3">
|
|
<h3 id="magit"><span class="section-number-3">13.1</span> magit</h3>
|
|
<div class="outline-text-3" id="text-13-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">magit</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> magit-status
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-x g"</span> . imalison:magit-status<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">emit-let-around</span> imalison:magit-status-traditional
|
|
magit-status
|
|
<span style="color: #6c71c4;">(</span>magit-display-buffer-function
|
|
'magit-display-buffer-traditional<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:magit-status
|
|
magit-status
|
|
imalison:magit-status-traditional<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:after-magit-visit-file</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #859900;">(</span>derived-mode-p 'org-mode<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>org-show-context 'magit-goto<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #6c71c4;">(</span>imalison:use-frames-only<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> magit-commit-show-diff t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-j"</span> magit-status-mode-map<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-j"</span> magit-hunk-section-map<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-j"</span> magit-file-section-map<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> magit-last-seen-setup-instructions <span style="color: #2aa198;">"1.4.0"</span>
|
|
magit-display-buffer-function
|
|
'magit-display-buffer-same-window-except-diff-v1<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>magit-auto-revert-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">TODO: Is this necessary now that signing is a git default</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">bound-and-true-p</span> imalison:gpg-key<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>add-to-list 'magit-commit-arguments
|
|
<span style="color: #859900;">(</span>format <span style="color: #2aa198;">"--gpg-sign=%s"</span> imalison:gpg-key<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-to-list 'org-show-context-detail '<span style="color: #6c71c4;">(</span>magit-goto . lineage<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>advice-add 'magit-diff-visit-file <span style="color: #657b83; font-weight: bold;">:after</span> 'imalison:after-magit-visit-file<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'magit-popup-mode-hook 'imalison:disable-show-trailing-whitespace<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-magithub" class="outline-4">
|
|
<h4 id="magithub"><span class="section-number-4">13.1.1</span> magithub</h4>
|
|
<div class="outline-text-4" id="text-13-1-1">
|
|
<p>
|
|
I've disabled magithub because it causes magit to be super slow
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">magithub</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:if</span> <span style="color: #b58900;">(</span>executable-find <span style="color: #2aa198;">"hub"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> magit<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-gitlink" class="outline-3">
|
|
<h3 id="gitlink"><span class="section-number-3">13.2</span> git-link</h3>
|
|
<div class="outline-text-3" id="text-13-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">git-link</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> git-link-use-commit t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-magitgitflow" class="outline-3">
|
|
<h3 id="magitgitflow"><span class="section-number-3">13.3</span> magit-gitflow</h3>
|
|
<div class="outline-text-3" id="text-13-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">magit-gitflow</span>
|
|
<span style="color: #657b83; font-weight: bold;">:diminish</span> magit-gitflow-mode
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> magit
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> magit-gitflow-popup-key <span style="color: #2aa198;">"C-k"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'magit-mode-hook 'turn-on-magit-gitflow<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-gittimemachine" class="outline-3">
|
|
<h3 id="gittimemachine"><span class="section-number-3">13.4</span> git-timemachine</h3>
|
|
<div class="outline-text-3" id="text-13-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">git-timemachine</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> git-timemachine<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-gitgutter" class="outline-3">
|
|
<h3 id="gitgutter"><span class="section-number-3">13.5</span> git-gutter</h3>
|
|
<div class="outline-text-3" id="text-13-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">git-gutter</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>global-git-gutter-mode -1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-gitoliteclone" class="outline-3">
|
|
<h3 id="gitoliteclone"><span class="section-number-3">13.6</span> gitolite-clone</h3>
|
|
<div class="outline-text-3" id="text-13-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">gitolite-clone</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">gitolite-clone-force-refresh</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>gitolite-clone-get-projects nil nil t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-gitconfigmode" class="outline-3">
|
|
<h3 id="gitconfigmode"><span class="section-number-3">13.7</span> gitconfig-mode</h3>
|
|
<div class="outline-text-3" id="text-13-7">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">gitconfig-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #2aa198;">"\\.?gitconfig.?.*\\'"</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-gitignoremode" class="outline-3">
|
|
<h3 id="gitignoremode"><span class="section-number-3">13.8</span> gitignore-mode</h3>
|
|
<div class="outline-text-3" id="text-13-8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">gitignore-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #2aa198;">"\\.?gitignore.?.*\\'"</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-github" class="outline-3">
|
|
<h3 id="github"><span class="section-number-3">13.9</span> github</h3>
|
|
<div class="outline-text-3" id="text-13-9">
|
|
</div><div id="outline-container-githubsearch" class="outline-4">
|
|
<h4 id="githubsearch"><span class="section-number-4">13.9.1</span> github-search</h4>
|
|
<div class="outline-text-4" id="text-13-9-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package</span> github-search
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>github-search-clone-repo github-search-user-clone-repo<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:get-appropriate-path-from-gh-repo-for-go</span> <span style="color: #6c71c4;">(</span>repo<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">go-mode</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">imalison:get-go-src</span> <span style="color: #2aa198;">"github.com"</span> <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">oref</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">oref</span> repo <span style="color: #657b83; font-weight: bold;">:owner</span><span style="color: #b58900;">)</span> <span style="color: #657b83; font-weight: bold;">:login</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">oref</span> repo <span style="color: #657b83; font-weight: bold;">:name</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:get-projects-directory-target-from-repo</span> <span style="color: #6c71c4;">(</span>repo<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>prospective-path
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #6c71c4;">(</span>equal <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">oref</span> repo language<span style="color: #859900;">)</span> <span style="color: #2aa198;">"Go"</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>imalison:get-appropriate-path-from-gh-repo-for-go repo<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>imalison:join-paths imalison:projects-directory <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">oref</span> repo <span style="color: #657b83; font-weight: bold;">:name</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #b58900;">(</span>file-exists-p prospective-path<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>funcall 'github-search-prompt-for-target-directory repo<span style="color: #b58900;">)</span>
|
|
prospective-path<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> github-search-get-target-directory-for-repo-function
|
|
'imalison:get-projects-directory-target-from-repo<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-githubclone" class="outline-4">
|
|
<h4 id="githubclone"><span class="section-number-4">13.9.2</span> github-clone</h4>
|
|
<div class="outline-text-4" id="text-13-9-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package*</span> github-clone <span style="color: #2aa198;">"~/Projects/github-clone.el"</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</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: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-githubnotifier" class="outline-4">
|
|
<h4 id="githubnotifier"><span class="section-number-4">13.9.3</span> github-notifier</h4>
|
|
<div class="outline-text-4" id="text-13-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">github-notifier</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>advice-add 'github-notifier-update <span style="color: #657b83; font-weight: bold;">:around</span> 'imalison:shut-up-around<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>github-notifier-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-githubbrowsefile" class="outline-4">
|
|
<h4 id="githubbrowsefile"><span class="section-number-4">13.9.4</span> github-browse-file</h4>
|
|
<div class="outline-text-4" id="text-13-9-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">github-browse-file</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> github-browse-file<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-magitghpulls" class="outline-4">
|
|
<h4 id="magitghpulls"><span class="section-number-4">13.9.5</span> magit-gh-pulls</h4>
|
|
<div class="outline-text-4" id="text-13-9-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">magit-gh-pulls</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:diminish</span> magit-gh-pulls-mode
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> magit
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-gist" class="outline-4">
|
|
<h4 id="gist"><span class="section-number-4">13.9.6</span> gist</h4>
|
|
<div class="outline-text-4" id="text-13-9-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">gist</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</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: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-programming1" class="outline-2">
|
|
<h2 id="programming1"><span class="section-number-2">14</span> Programming</h2>
|
|
<div class="outline-text-2" id="text-14">
|
|
</div><div id="outline-container-realgud" class="outline-3">
|
|
<h3 id="realgud"><span class="section-number-3">14.1</span> realgud</h3>
|
|
<div class="outline-text-3" id="text-14-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">realgud</span>
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> 10<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-emr1" class="outline-3">
|
|
<h3 id="emr1"><span class="section-number-3">14.2</span> emr</h3>
|
|
<div class="outline-text-3" id="text-14-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">emr</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> prog-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-RET"</span> . emr-show-refactor-menu<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span> <span style="color: #b58900;">(</span>emr-initialize<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-semantic" class="outline-3">
|
|
<h3 id="semantic"><span class="section-number-3">14.3</span> semantic</h3>
|
|
<div class="outline-text-3" id="text-14-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">semantic</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> semantic-mode
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'prog-mode-hook 'semantic-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-utility1" class="outline-2">
|
|
<h2 id="utility1"><span class="section-number-2">15</span> Utility</h2>
|
|
<div class="outline-text-2" id="text-15">
|
|
</div><div id="outline-container-term" class="outline-3">
|
|
<h3 id="term"><span class="section-number-3">15.1</span> term</h3>
|
|
<div class="outline-text-3" id="text-15-1">
|
|
<p>
|
|
The main thing I do here is restore a bunch of keybindings that are eliminated
|
|
in term-mode. This makes term-mode 1000% more useful
|
|
(especially having M-x and C-y available).
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">term</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:avy-term</span> <span style="color: #6c71c4;">(</span>arg<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #2aa198;">"P"</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>term-line-mode<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>imalison:avy arg<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:term-paste</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&optional</span> string<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>process-send-string
|
|
<span style="color: #859900;">(</span>get-buffer-process <span style="color: #b58900;">(</span>current-buffer<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">if</span> string string <span style="color: #b58900;">(</span>current-kill 0<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">helm</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">helm-kill-ring-for-term-actions</span>
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span><span style="color: #2aa198;">"Yank"</span> . imalison:term-paste<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"Delete"</span> . <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">(</span>_candidate<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for cand in <span style="color: #6c71c4;">(</span>helm-marked-candidates<span style="color: #6c71c4;">)</span>
|
|
do <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> kill-ring
|
|
<span style="color: #859900;">(</span>delete cand kill-ring<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">helm-source-kill-ring-for-term</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">helm-build-sync-source</span> <span style="color: #2aa198;">"Kill Ring"</span>
|
|
<span style="color: #657b83; font-weight: bold;">:init</span> <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #b58900;">()</span> <span style="color: #b58900;">(</span>helm-attrset 'last-command last-command<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:candidates</span> #'helm-kill-ring-candidates
|
|
<span style="color: #657b83; font-weight: bold;">:filtered-candidate-transformer</span> #'helm-kill-ring-transformer
|
|
<span style="color: #657b83; font-weight: bold;">:action</span> 'helm-kill-ring-for-term-actions
|
|
<span style="color: #657b83; font-weight: bold;">:persistent-action</span> 'ignore
|
|
<span style="color: #657b83; font-weight: bold;">:persistent-help</span> <span style="color: #2aa198;">"DoNothing"</span>
|
|
<span style="color: #657b83; font-weight: bold;">:migemo</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:multiline</span> t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">helm-show-kill-ring-for-term</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #2aa198;">"Preconfigured `</span><span style="color: #268bd2; font-weight: bold;">helm</span><span style="color: #2aa198;">' for `</span><span style="color: #268bd2; font-weight: bold;">kill-ring</span><span style="color: #2aa198;">'.</span>
|
|
<span style="color: #2aa198;">It is drop-in replacement of `</span><span style="color: #268bd2; font-weight: bold;">yank-pop</span><span style="color: #2aa198;">'.</span>
|
|
|
|
<span style="color: #2aa198;">First call open the kill-ring browser, next calls move to next line."</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>enable-recursive-minibuffers t<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>helm <span style="color: #657b83; font-weight: bold;">:sources</span> helm-source-kill-ring-for-term
|
|
<span style="color: #657b83; font-weight: bold;">:buffer</span> <span style="color: #2aa198;">"*helm kill ring*"</span>
|
|
<span style="color: #657b83; font-weight: bold;">:resume</span> 'noresume
|
|
<span style="color: #657b83; font-weight: bold;">:allow-nest</span> t<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:term-char-mode</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>term-char-mode<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>goto-char <span style="color: #859900;">(</span>point-max<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> term-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c C-k"</span> . imalison:term-char-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:map</span> term-raw-escape-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-x"</span> . helm-M-x<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-j"</span> . imalison:avy-term<span style="color: #268bd2;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:map</span> term-raw-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-x"</span> . helm-M-x<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-j"</span> . imalison:avy-term<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-:"</span> . eval-expression<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-y"</span> . imalison:term-paste<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-y"</span> . helm-show-kill-ring-for-term<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>define-key term-raw-map <span style="color: #6c71c4;">(</span>kbd <span style="color: #2aa198;">"C-h"</span><span style="color: #6c71c4;">)</span> help-map<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'term-mode-hook 'imalison:disable-linum-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'term-mode-hook 'imalison:disable-yas-minor-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'term-mode-hook 'imalison:disable-show-trailing-whitespace<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> term-buffer-maximum-size 0<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-termmanager" class="outline-3">
|
|
<h3 id="termmanager"><span class="section-number-3">15.2</span> term-manager</h3>
|
|
<div class="outline-text-3" id="text-15-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package</span> term-manager
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:set-escape-char</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&rest</span> _args<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span>term-escape-char<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>term-set-escape-char ?\C-x<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>advice-add
|
|
'term-manager-default-build-term <span style="color: #657b83; font-weight: bold;">:after</span> 'imalison:set-escape-char<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-termprojectile" class="outline-3">
|
|
<h3 id="termprojectile"><span class="section-number-3">15.3</span> term-projectile</h3>
|
|
<div class="outline-text-3" id="text-15-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">imalison:use-package*</span> term-projectile <span style="color: #2aa198;">"term-manager"</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"C-c 7"</span> . imalison:term-hydra-global/body<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</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: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">emit-prefix-selector</span> imalison:term
|
|
term-projectile-forward
|
|
term-projectile-create-new<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:term-hydra-original-default-directory</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defhydra</span> imalison:term-hydra-default-directory
|
|
<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:body-pre</span>
|
|
<span style="color: #859900;">(</span>term-projectile-default-directory-forward-restored<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #2aa198;">"term - default-directory"</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"s"</span> term-projectile-switch-to<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"f"</span> term-projectile-default-directory-forward-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"b"</span> term-projectile-default-directory-backward-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"c"</span> term-projectile-default-directory-create-new-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"d"</span> term-projectile-default-directory-forward-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"g"</span> imalison:term-hydra-global/body-restored <span style="color: #657b83; font-weight: bold;">:exit</span> t<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"p"</span> imalison:term-hydra-projectile/body-restored <span style="color: #657b83; font-weight: bold;">:exit</span> t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defhydra</span> imalison:term-hydra-projectile
|
|
<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:body-pre</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #b58900;">(</span>term-projectile-forward-restored<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #2aa198;">"term - projectile"</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"s"</span> term-projectile-switch-to<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"f"</span> term-projectile-forward-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"b"</span> term-projectile-backward-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"c"</span> term-projectile-create-new-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"d"</span> imalison:term-hydra-default-directory/body-restored <span style="color: #657b83; font-weight: bold;">:exit</span> t<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"g"</span> imalison:term-hydra-global/body-restored <span style="color: #657b83; font-weight: bold;">:exit</span> t<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"p"</span> term-projectile-forward-restored<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defhydra</span> imalison:term-hydra-global
|
|
<span style="color: #6c71c4;">(</span><span style="color: #657b83; font-weight: bold;">:body-pre</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imalison:term-hydra-original-default-directory
|
|
default-directory<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #2aa198;">"term - global"</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"s"</span> term-projectile-switch-to<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"f"</span> term-projectile-global-forward-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"b"</span> term-projectile-global-backward-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"c"</span> term-projectile-global-create-new-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"d"</span> imalison:term-hydra-default-directory/body-restored <span style="color: #657b83; font-weight: bold;">:exit</span> t<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"g"</span> term-projectile-global-forward-restored<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"p"</span> imalison:term-hydra-projectile/body-restored <span style="color: #657b83; font-weight: bold;">:exit</span> t<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>mapcar <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #859900;">(</span>term-projectile-function<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">defalias</span> <span style="color: #b58900;">(</span>imalison:concat-symbols term-projectile-function '-restored<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>default-directory imalison:term-hydra-original-default-directory<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>apply term-projectile-function args<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</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: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-crux" class="outline-3">
|
|
<h3 id="crux"><span class="section-number-3">15.4</span> crux</h3>
|
|
<div class="outline-text-3" id="text-15-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">crux</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c C-s"</span> . crux-sudo-edit<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c C-r"</span> . crux-eval-and-replace<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c o"</span> . crux-open-with<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>crux-reopen-as-root-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-kdeconnect" class="outline-3">
|
|
<h3 id="kdeconnect"><span class="section-number-3">15.5</span> kde-connect</h3>
|
|
<div class="outline-text-3" id="text-15-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">kdeconnect</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-chat" class="outline-2">
|
|
<h2 id="chat"><span class="section-number-2">16</span> Chat</h2>
|
|
<div class="outline-text-2" id="text-16">
|
|
</div><div id="outline-container-erc" class="outline-3">
|
|
<h3 id="erc"><span class="section-number-3">16.1</span> erc</h3>
|
|
<div class="outline-text-3" id="text-16-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">erc</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> erc
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(add-to-list 'erc-modules 'notifications)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">logging:</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">erc-colorize</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #6c71c4;">(</span>erc-colorize-mode 1<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-bitlbee" class="outline-3">
|
|
<h3 id="bitlbee"><span class="section-number-3">16.2</span> bitlbee</h3>
|
|
<div class="outline-text-3" id="text-16-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">bitlbee</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">bitlbee-password</span> <span style="color: #2aa198;">"geheim"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'erc-join-hook 'bitlbee-identify<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">bitlbee-identify</span> <span style="color: #6c71c4;">()</span>
|
|
<span style="color: #2aa198;">"If we're on the bitlbee server, send the identify command to the</span>
|
|
<span style="color: #2aa198;"> &bitlbee channel."</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">and</span> <span style="color: #b58900;">(</span>string= <span style="color: #2aa198;">"localhost"</span> erc-session-server<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>string= <span style="color: #2aa198;">"&bitlbee"</span> <span style="color: #268bd2;">(</span>buffer-name<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>erc-message <span style="color: #2aa198;">"PRIVMSG"</span> <span style="color: #b58900;">(</span>format <span style="color: #2aa198;">"%s identify %s"</span>
|
|
<span style="color: #268bd2;">(</span>erc-default-target<span style="color: #268bd2;">)</span>
|
|
bitlbee-password<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-slack" class="outline-3">
|
|
<h3 id="slack"><span class="section-number-3">16.3</span> slack</h3>
|
|
<div class="outline-text-3" id="text-16-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">slack</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-cooperation" class="outline-2">
|
|
<h2 id="cooperation"><span class="section-number-2">17</span> Cooperation</h2>
|
|
<div class="outline-text-2" id="text-17">
|
|
</div><div id="outline-container-togetherly" class="outline-3">
|
|
<h3 id="togetherly"><span class="section-number-3">17.1</span> togetherly</h3>
|
|
<div class="outline-text-3" id="text-17-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">togetherly</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-floobits" class="outline-3">
|
|
<h3 id="floobits"><span class="section-number-3">17.2</span> floobits</h3>
|
|
<div class="outline-text-3" id="text-17-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">floobits</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-rudel" class="outline-3">
|
|
<h3 id="rudel"><span class="section-number-3">17.3</span> rudel</h3>
|
|
<div class="outline-text-3" id="text-17-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">rudel</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-other1" class="outline-2">
|
|
<h2 id="other1"><span class="section-number-2">18</span> Other</h2>
|
|
<div class="outline-text-2" id="text-18">
|
|
</div><div id="outline-container-anzu" class="outline-3">
|
|
<h3 id="anzu"><span class="section-number-3">18.1</span> anzu</h3>
|
|
<div class="outline-text-3" id="text-18-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">anzu</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>global-anzu-mode +1<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>custom-set-variables
|
|
'<span style="color: #6c71c4;">(</span>anzu-mode-lighter <span style="color: #2aa198;">""</span><span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span>anzu-deactivate-region t<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span>anzu-search-threshold 1000<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span>anzu-replace-threshold 50<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">(</span>anzu-replace-to-string-separator <span style="color: #2aa198;">" => "</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>define-key isearch-mode-map <span style="color: #6c71c4;">[</span>remap isearch-query-replace<span style="color: #6c71c4;">]</span>
|
|
#'anzu-isearch-query-replace<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>define-key isearch-mode-map <span style="color: #6c71c4;">[</span>remap isearch-query-replace-regexp<span style="color: #6c71c4;">]</span>
|
|
#'anzu-isearch-query-replace-regexp<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-fontawesome" class="outline-3">
|
|
<h3 id="fontawesome"><span class="section-number-3">18.2</span> fontawesome</h3>
|
|
<div class="outline-text-3" id="text-18-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">fontawesome</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> helm-fontawesome<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-shellhistory" class="outline-3">
|
|
<h3 id="shellhistory"><span class="section-number-3">18.3</span> shell-history</h3>
|
|
<div class="outline-text-3" id="text-18-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">shell-history</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-iedit" class="outline-3">
|
|
<h3 id="iedit"><span class="section-number-3">18.4</span> iedit</h3>
|
|
<div class="outline-text-3" id="text-18-4">
|
|
<p>
|
|
I don't use iedit directly, but it is used by <a href="#emr">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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">iedit</span>
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-tramp" class="outline-3">
|
|
<h3 id="tramp"><span class="section-number-3">18.5</span> tramp</h3>
|
|
<div class="outline-text-3" id="text-18-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">tramp</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> tramp
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> tramp-default-method <span style="color: #2aa198;">"scp"</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-narrowindirect" class="outline-3">
|
|
<h3 id="narrowindirect"><span class="section-number-3">18.6</span> narrow-indirect</h3>
|
|
<div class="outline-text-3" id="text-18-6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">narrow-indirect</span>
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>define-key ctl-x-4-map <span style="color: #2aa198;">"nd"</span> 'ni-narrow-to-defun-indirect-other-window<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>define-key ctl-x-4-map <span style="color: #2aa198;">"nn"</span> 'ni-narrow-to-region-indirect-other-window<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>define-key ctl-x-4-map <span style="color: #2aa198;">"np"</span> 'ni-narrow-to-page-indirect-other-window<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-editorconfig" class="outline-3">
|
|
<h3 id="editorconfig"><span class="section-number-3">18.7</span> editorconfig</h3>
|
|
<div class="outline-text-3" id="text-18-7">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">editorconfig</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'editorconfig-exclude-modes '<span style="color: #6c71c4;">(</span>org-mode<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>editorconfig-mode 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-dtrtindent" class="outline-3">
|
|
<h3 id="dtrtindent"><span class="section-number-3">18.8</span> dtrt-indent</h3>
|
|
<div class="outline-text-3" id="text-18-8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">dtrt-indent</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> 'dtrt-indent-mode
|
|
<span style="color: #657b83; font-weight: bold;">:init</span> <span style="color: #b58900;">(</span>add-hook 'prog-mode-hook 'dtrt-indent-mode<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> dtrt-indent-active-mode-line-info <span style="color: #2aa198;">" [⟼]"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-indentguide" class="outline-3">
|
|
<h3 id="indentguide"><span class="section-number-3">18.9</span> indent-guide</h3>
|
|
<div class="outline-text-3" id="text-18-9">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">indent-guide</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>indent-guide-global-mode -1<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> indent-guide-delay 0.1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-rainbowdelimiters" class="outline-3">
|
|
<h3 id="rainbowdelimiters"><span class="section-number-3">18.10</span> rainbow-delimiters</h3>
|
|
<div class="outline-text-3" id="text-18-10">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">rainbow-delimiters</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> rainbow-delimiters-mode
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'prog-mode-hook <span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #859900;">()</span> <span style="color: #859900;">(</span>rainbow-delimiters-mode t<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-undotree" class="outline-3">
|
|
<h3 id="undotree"><span class="section-number-3">18.11</span> undo-tree</h3>
|
|
<div class="outline-text-3" id="text-18-11">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">undo-tree</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t <span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">this has been getting pretty annoying</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C--"</span> . undo-redo<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c u"</span> . undo-tree-visualize<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c r"</span> . undo-tree-redo<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span>diminish 'undo-tree-mode<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #93a1a1;">;;</span><span style="color: #93a1a1;">(setq undo-tree-visualizer-diff t) ;; This causes performance problems</span>
|
|
<span style="color: #268bd2;">(</span>global-undo-tree-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> undo-tree-visualizer-timestamps t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-recentf" class="outline-3">
|
|
<h3 id="recentf"><span class="section-number-3">18.12</span> recentf</h3>
|
|
<div class="outline-text-3" id="text-18-12">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">recentf</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> recentf-max-saved-items 1000
|
|
recentf-max-menu-items 1000<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>advice-add 'recentf-cleanup <span style="color: #657b83; font-weight: bold;">:around</span> 'imalison:shut-up-around<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>recentf-mode 1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-keychord" class="outline-3">
|
|
<h3 id="keychord"><span class="section-number-3">18.13</span> key-chord</h3>
|
|
<div class="outline-text-3" id="text-18-13">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">key-chord</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:disable-keychord-around</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">function</span> <span style="color: #b58900;">&rest</span> args<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>key-chord-mode-was-enabled <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">bound-and-true-p</span> key-chord-mode<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> key-chord-mode-was-enabled <span style="color: #859900;">(</span>key-chord-mode -1<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">condition-case</span> err <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #b58900;">(</span>apply function args<span style="color: #b58900;">)</span><span style="color: #859900;">)</span> <span style="color: #859900;">(</span><span style="color: #cb4b16; font-weight: bold;">error</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> key-chord-mode-was-enabled <span style="color: #859900;">(</span>key-chord-mode 1<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>advice-add 'key-chord-mode <span style="color: #657b83; font-weight: bold;">:around</span> 'imalison:shut-up-around<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>key-chord-mode 1<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>advice-add 'imalison:avy <span style="color: #657b83; font-weight: bold;">:around</span> 'imalison:disable-keychord-around<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>key-chord-define-global <span style="color: #2aa198;">"tg"</span> 'imalison:term-hydra/body<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>key-chord-define-global <span style="color: #2aa198;">"pj"</span> 'imalison:projectile-find-file<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>key-chord-define-global <span style="color: #2aa198;">"p["</span> 'projectile-switch-project<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>key-chord-define-global <span style="color: #2aa198;">"fj"</span> 'imalison:do-ag<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>key-chord-define-global <span style="color: #2aa198;">"jh"</span> 'imalison:avy<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-nodejsrepl" class="outline-3">
|
|
<h3 id="nodejsrepl"><span class="section-number-3">18.14</span> nodejs-repl</h3>
|
|
<div class="outline-text-3" id="text-18-14">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">nodejs-repl</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> nodejs-repl<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-calcmode" class="outline-3">
|
|
<h3 id="calcmode"><span class="section-number-3">18.15</span> calc-mode</h3>
|
|
<div class="outline-text-3" id="text-18-15">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">calc-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:ensure</span> nil
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> calc
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> calc-context-sensitive-enter t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-helmspotify" class="outline-3">
|
|
<h3 id="helmspotify"><span class="section-number-3">18.16</span> helm-spotify</h3>
|
|
<div class="outline-text-3" id="text-18-16">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">helm-spotify</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> helm-spotify<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-jabber" class="outline-3">
|
|
<h3 id="jabber"><span class="section-number-3">18.17</span> jabber</h3>
|
|
<div class="outline-text-3" id="text-18-17">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">jabber</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> jabber-connect
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> jabber-alert-presence-hooks nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">jabber-message-content-message</span> <span style="color: #6c71c4;">(</span>from buffer text<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">or</span> jabber-message-alert-same-buffer
|
|
<span style="color: #b58900;">(</span>not <span style="color: #268bd2;">(</span>memq <span style="color: #6c71c4;">(</span>selected-window<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>get-buffer-window-list buffer<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #b58900;">(</span>jabber-muc-sender-p from<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>format <span style="color: #2aa198;">"%s: %s"</span> <span style="color: #268bd2;">(</span>jabber-jid-resource from<span style="color: #268bd2;">)</span> text<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>format <span style="color: #2aa198;">"%s: %s"</span> <span style="color: #268bd2;">(</span>jabber-jid-displayname from<span style="color: #268bd2;">)</span> text<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> jabber-alert-message-function 'jabber-message-content-message<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-htmlize" class="outline-3">
|
|
<h3 id="htmlize"><span class="section-number-3">18.18</span> htmlize</h3>
|
|
<div class="outline-text-3" id="text-18-18">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">htmlize</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-calfw" class="outline-3">
|
|
<h3 id="calfw"><span class="section-number-3">18.19</span> calfw</h3>
|
|
<div class="outline-text-3" id="text-18-19">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">calfw</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">calfw-org</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-clocker" class="outline-3">
|
|
<h3 id="clocker"><span class="section-number-3">18.20</span> clocker</h3>
|
|
<div class="outline-text-3" id="text-18-20">
|
|
<p>
|
|
Not really sure what this is
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">clocker</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-deft" class="outline-3">
|
|
<h3 id="deft"><span class="section-number-3">18.21</span> deft</h3>
|
|
<div class="outline-text-3" id="text-18-21">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">deft</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> deft
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> deft-default-extension <span style="color: #2aa198;">"org"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> deft-extensions '<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"org"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> deft-use-filter-string-for-filename t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> deft-file-naming-rules '<span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>noslash . <span style="color: #2aa198;">"_"</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>nospace . <span style="color: #2aa198;">"_"</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>case-fn . downcase<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> deft-directory <span style="color: #2aa198;">"~/SparkleShare/org/notes"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-epg" class="outline-3">
|
|
<h3 id="epg"><span class="section-number-3">18.22</span> epg</h3>
|
|
<div class="outline-text-3" id="text-18-22">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">epg</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> shut-up
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">shut-up</span>
|
|
<span style="color: #268bd2;">(</span>epa-file-enable<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-pinentry" class="outline-3">
|
|
<h3 id="pinentry"><span class="section-number-3">18.23</span> pinentry</h3>
|
|
<div class="outline-text-3" id="text-18-23">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">pinentry</span>
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> 5
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span>pinentry-start<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-twitteringmode" class="outline-3">
|
|
<h3 id="twitteringmode"><span class="section-number-3">18.24</span> twittering-mode</h3>
|
|
<div class="outline-text-3" id="text-18-24">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">twittering-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> twittering-mode<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-matrixclient" class="outline-3">
|
|
<h3 id="matrixclient"><span class="section-number-3">18.25</span> matrix-client</h3>
|
|
<div class="outline-text-3" id="text-18-25">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">matrix-client</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t <span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">fails to load eieio on startup</span>
|
|
<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-mue" class="outline-3">
|
|
<h3 id="mue"><span class="section-number-3">18.26</span> mu4e</h3>
|
|
<div class="outline-text-3" id="text-18-26">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">eval-when-compile</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">s</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">mu4e-elisp-directory</span>
|
|
<span style="color: #268bd2;">(</span>s-trim <span style="color: #6c71c4;">(</span>shell-command-to-string <span style="color: #2aa198;">"mu4e_directory"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">mu4e</span>
|
|
<span style="color: #657b83; font-weight: bold;">:load-path</span> mu4e-elisp-directory
|
|
<span style="color: #657b83; font-weight: bold;">:ensure</span> nil
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>mu4e mu4e-view-message-with-msgid mu4e-update-index email<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"C-c 0"</span> . email<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">email</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&optional</span> arg<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #2aa198;">"P"</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #859900;">(</span>string-equal <span style="color: #b58900;">(</span>persp-name persp-curr<span style="color: #b58900;">)</span> <span style="color: #2aa198;">"email"</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #b58900;">(</span>delete-other-windows<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>mu4e<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #b58900;">(</span>persp-switch <span style="color: #2aa198;">"email"</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">or</span> <span style="color: #6c71c4;">(</span>not <span style="color: #859900;">(</span>mu4e-running-p<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span> arg<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>delete-other-windows<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>mu4e<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">enable inline images</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-view-show-images t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">show images</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-show-images t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Try to display html as text</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-view-prefer-html nil<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-html2text-command <span style="color: #2aa198;">"html2text -width 80 -nobs -utf8"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">use imagemagick, if available</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #6c71c4;">(</span>fboundp 'imagemagick-register-types<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>imagemagick-register-types<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mail-user-agent 'mu4e-user-agent<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">org-mu4e</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-compose-complete-only-after nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-maildir <span style="color: #2aa198;">"~/Mail"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-drafts-folder <span style="color: #2aa198;">"/[Gmail].Drafts"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-sent-folder <span style="color: #2aa198;">"/[Gmail].Sent Mail"</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-trash-folder <span style="color: #2aa198;">"/[Gmail].Trash"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-sent-messages-behavior 'delete<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-headers-skip-duplicates t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-update-interval <span style="color: #6c71c4;">(</span>* 60 20<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> message-kill-buffer-on-exit t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mail-user-agent 'mu4e-user-agent<span style="color: #268bd2;">)</span> <span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">make mu4e the default mail client</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">don't save message to Sent Messages, Gmail/IMAP takes care of this</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-sent-messages-behavior 'delete<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">allow for updating mail using 'U' in the main view:</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e-get-mail-command <span style="color: #2aa198;">"timeout 60 offlineimap"</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-hook 'mu4e-compose-mode-hook
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">my-do-compose-stuff</span> <span style="color: #859900;">()</span> <span style="color: #859900;">(</span>flyspell-mode<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>add-to-list 'mu4e-headers-actions '<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"view in browser"</span> . mu4e-action-view-in-browser<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'mu4e-view-actions '<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"view in browser"</span> . mu4e-action-view-in-browser<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">mu4e-view</span> <span style="color: #6c71c4;">(</span>msg headersbuf<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #2aa198;">"Display the message MSG in a new buffer, and keep in sync with HDRSBUF.</span>
|
|
<span style="color: #2aa198;"> 'In sync' here means that moving to the next/previous message in</span>
|
|
<span style="color: #2aa198;"> the the message view affects HDRSBUF, as does marking etc.</span>
|
|
|
|
<span style="color: #2aa198;"> As a side-effect, a message that is being viewed loses its 'unread'</span>
|
|
<span style="color: #2aa198;"> marking if it still had that."</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>embedded <span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">is it as an embedded msg (ie. message/rfc822 att)?</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #6c71c4;">(</span>gethash <span style="color: #859900;">(</span>mu4e-message-field msg <span style="color: #657b83; font-weight: bold;">:path</span><span style="color: #859900;">)</span>
|
|
mu4e~path-parent-docid-map<span style="color: #6c71c4;">)</span> <span style="color: #cb4b16; font-weight: bold;">t</span><span style="color: #268bd2; font-weight: bold;">)</span><span style="color: #b58900; font-weight: bold;">)</span>
|
|
<span style="color: #b58900;">(</span>buf
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> embedded
|
|
<span style="color: #6c71c4;">(</span>mu4e~view-embedded-winbuf<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>get-buffer-create mu4e~view-buffer-name<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">note: mu4e~view-mark-as-read will pseudo-recursively call mu4e-view again</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">by triggering mu4e~view again as it marks the message as read</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">with-current-buffer</span> buf
|
|
<span style="color: #b58900;">(</span>switch-to-buffer buf<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> mu4e~view-msg msg<span style="color: #b58900;">)</span>
|
|
<span style="color: #93a1a1;">;;</span><span style="color: #93a1a1;">(or embedded (not (mu4e~view-mark-as-read msg)))</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">or</span> <span style="color: #6c71c4;">(</span>mu4e~view-mark-as-read msg<span style="color: #6c71c4;">)</span> t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>inhibit-read-only t<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>erase-buffer<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>mu4e~delete-all-overlays<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>insert <span style="color: #859900;">(</span>mu4e-view-message-text msg<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>goto-char <span style="color: #859900;">(</span>point-min<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>mu4e~fontify-cited<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>mu4e~fontify-signature<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>mu4e~view-make-urls-clickable<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>mu4e~view-show-images-maybe msg<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span>
|
|
mu4e~view-buffer buf
|
|
mu4e~view-headers-buffer headersbuf<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> embedded <span style="color: #859900;">(</span>local-set-key <span style="color: #2aa198;">"q"</span> 'kill-buffer-and-window<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>mu4e-view-mode<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">smtpmail</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">alternatively, for emacs-24 you can use:</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> message-send-mail-function 'smtpmail-send-it
|
|
smtpmail-stream-type 'starttls
|
|
smtpmail-default-smtp-server <span style="color: #2aa198;">"smtp.gmail.com"</span>
|
|
smtpmail-smtp-server <span style="color: #2aa198;">"smtp.gmail.com"</span>
|
|
smtpmail-smtp-service 587<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-gmailmessagemode" class="outline-3">
|
|
<h3 id="gmailmessagemode"><span class="section-number-3">18.27</span> gmail-message-mode</h3>
|
|
<div class="outline-text-3" id="text-18-27">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">gmail-message-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-hammode" class="outline-3">
|
|
<h3 id="hammode"><span class="section-number-3">18.28</span> ham-mode</h3>
|
|
<div class="outline-text-3" id="text-18-28">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">ham-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ham-mode-html-to-markdown-command '<span style="color: #6c71c4;">(</span><span style="color: #2aa198;">"pandoc"</span> <span style="color: #2aa198;">"--from"</span> <span style="color: #2aa198;">"html"</span> <span style="color: #2aa198;">"--to"</span> <span style="color: #2aa198;">"markdown"</span> file<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-alert" class="outline-3">
|
|
<h3 id="alert"><span class="section-number-3">18.29</span> alert</h3>
|
|
<div class="outline-text-3" id="text-18-29">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">alert</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">alert-notifier-notify</span> <span style="color: #6c71c4;">(</span>info<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">if</span> alert-notifier-command
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>args
|
|
<span style="color: #6c71c4;">(</span>list <span style="color: #2aa198;">"-title"</span> <span style="color: #859900;">(</span>alert-encode-string <span style="color: #2aa198;">(</span>plist-get info <span style="color: #657b83; font-weight: bold;">:title</span><span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #2aa198;">"-activate"</span> <span style="color: #2aa198;">"org.gnu.Emacs"</span>
|
|
<span style="color: #2aa198;">"-message"</span> <span style="color: #859900;">(</span>alert-encode-string <span style="color: #2aa198;">(</span>plist-get info <span style="color: #657b83; font-weight: bold;">:message</span><span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #2aa198;">"-execute"</span> <span style="color: #859900;">(</span>format <span style="color: #2aa198;">"\"%s\""</span> <span style="color: #2aa198;">(</span>switch-to-buffer-command <span style="color: #b58900;">(</span>plist-get info <span style="color: #657b83; font-weight: bold;">:buffer</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>apply #'call-process alert-notifier-command nil nil nil args<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>alert-message-notify info<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">switch-to-buffer-command</span> <span style="color: #6c71c4;">(</span>buffer-name<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>emacsclient-command <span style="color: #859900;">(</span>format <span style="color: #2aa198;">"(switch-to-buffer \\\"%s\\\")"</span> buffer-name<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">emacsclient-command</span> <span style="color: #6c71c4;">(</span>command<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>format <span style="color: #2aa198;">"emacsclient --server-file='%s' -e '%s'"</span> server-name command<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> alert-default-style 'notifier<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-sauron" class="outline-3">
|
|
<h3 id="sauron"><span class="section-number-3">18.30</span> sauron</h3>
|
|
<div class="outline-text-3" id="text-18-30">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">sauron</span>
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> 5
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>sauron-start sauron-start-hidden<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #6c71c4;">(</span>eq system-type 'darwin<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> sauron-modules '<span style="color: #859900;">(</span>sauron-erc sauron-org sauron-notifications
|
|
sauron-twittering sauron-jabber sauron-identica<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">sauron-dbus-start</span> <span style="color: #859900;">()</span>
|
|
nil<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>makunbound 'dbus-path-emacs<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>sauron-start-hidden<span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This should really check (featurep 'dbus) but for some reason</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">this is always true even if support is not there.</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> sauron-prio-sauron-started 2<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> sauron-min-priority 3<span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(setq sauron-dbus-cookie t) ;; linux only?</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> sauron-separate-frame nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> sauron-nick-insensitivity 1<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">sauron:jabber-notify</span> <span style="color: #6c71c4;">(</span>origin priority message <span style="color: #b58900;">&optional</span> properties<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>funcall notify-function <span style="color: #2aa198;">"gtalk"</span> message<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">sauron:erc-notify</span> <span style="color: #6c71c4;">(</span>origin priority message <span style="color: #b58900;">&optional</span> properties<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>event <span style="color: #268bd2;">(</span>plist-get properties <span style="color: #657b83; font-weight: bold;">:event</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>funcall notify-function <span style="color: #2aa198;">"IRC"</span> message<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">sauron:mu4e-notify</span> <span style="color: #6c71c4;">(</span>origin priority message <span style="color: #b58900;">&optional</span> properties<span style="color: #6c71c4;">)</span>
|
|
nil<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">sauron:dbus-notify</span> <span style="color: #6c71c4;">(</span>origin priority message <span style="color: #b58900;">&optional</span> properties<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>funcall notify-function <span style="color: #2aa198;">"GMail"</span> message<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">sauron:dispatch-notify</span> <span style="color: #6c71c4;">(</span>origin priority message <span style="color: #b58900;">&optional</span> properties<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>handler <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cond</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>string= origin <span style="color: #2aa198;">"erc"</span><span style="color: #859900;">)</span> 'sauron:erc-notify<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>string= origin <span style="color: #2aa198;">"jabber"</span><span style="color: #859900;">)</span> 'sauron:jabber-notify<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>string= origin <span style="color: #2aa198;">"mu4e"</span><span style="color: #859900;">)</span> 'sauron:mu4e-notify<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>string= origin <span style="color: #2aa198;">"dbus"</span><span style="color: #859900;">)</span> 'sauron:dbus-notify<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>t <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #2aa198;">(</span><span style="color: #b58900;">&rest</span> r<span style="color: #2aa198;">)</span> nil<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>funcall handler origin priority message properties<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Prefering alert.el for now ;; (add-hook 'sauron-event-added-functions 'sauron:dispatch-notify)</span>
|
|
<span style="color: #268bd2;">(</span>sauron-start-hidden<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>add-hook 'sauron-event-added-functions 'sauron-alert-el-adapter<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-screenshot" class="outline-3">
|
|
<h3 id="screenshot"><span class="section-number-3">18.31</span> screenshot</h3>
|
|
<div class="outline-text-3" id="text-18-31">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">screenshot</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-libmpdee" class="outline-3">
|
|
<h3 id="libmpdee"><span class="section-number-3">18.32</span> libmpdee</h3>
|
|
<div class="outline-text-3" id="text-18-32">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">libmpdee</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-flyspell" class="outline-3">
|
|
<h3 id="flyspell"><span class="section-number-3">18.33</span> flyspell</h3>
|
|
<div class="outline-text-3" id="text-18-33">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">flyspell</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t <span style="color: #93a1a1;">; </span><span style="color: #93a1a1;">kind of annoying</span>
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> flyspell-issue-welcome-flag nil<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>diminish 'flyspell-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">bind-key</span> <span style="color: #2aa198;">"M-s"</span> 'flyspell-correct-word-before-point flyspell-mode-map<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unbind-key</span> <span style="color: #2aa198;">"C-;"</span> flyspell-mode-map<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">flyspell-emacs-popup-textual</span> <span style="color: #6c71c4;">(</span>event poss word<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #2aa198;">"A textual flyspell popup menu."</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>corrects <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> flyspell-sort-corrections
|
|
<span style="color: #6c71c4;">(</span>sort <span style="color: #859900;">(</span>car <span style="color: #2aa198;">(</span>cdr <span style="color: #b58900;">(</span>cdr poss<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span><span style="color: #859900;">)</span> 'string<<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>car <span style="color: #859900;">(</span>cdr <span style="color: #2aa198;">(</span>cdr poss<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>cor-menu <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #6c71c4;">(</span>consp corrects<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>mapcar <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #2aa198;">(</span>correct<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>list correct correct<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
corrects<span style="color: #6c71c4;">)</span>
|
|
'<span style="color: #6c71c4;">()</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>affix <span style="color: #268bd2;">(</span>car <span style="color: #6c71c4;">(</span>cdr <span style="color: #859900;">(</span>cdr <span style="color: #2aa198;">(</span>cdr poss<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
show-affix-info
|
|
<span style="color: #b58900;">(</span>base-menu <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span>save <span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">and</span> <span style="color: #268bd2;">(</span>consp affix<span style="color: #268bd2;">)</span> show-affix-info<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>list
|
|
<span style="color: #268bd2;">(</span>list <span style="color: #6c71c4;">(</span>concat <span style="color: #2aa198;">"Save affix: "</span>
|
|
<span style="color: #859900;">(</span>car affix<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
'save<span style="color: #268bd2;">)</span>
|
|
'<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"Accept (session)"</span> session<span style="color: #268bd2;">)</span>
|
|
'<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"Accept (buffer)"</span> buffer<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
'<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"Save word"</span> save<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"Accept (session)"</span> session<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"Accept (buffer)"</span> buffer<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #859900;">(</span>consp cor-menu<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>append cor-menu <span style="color: #2aa198;">(</span>cons <span style="color: #2aa198;">""</span> save<span style="color: #2aa198;">)</span><span style="color: #859900;">)</span>
|
|
save<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>menu <span style="color: #268bd2;">(</span>mapcar
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #859900;">(</span>arg<span style="color: #859900;">)</span> <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #2aa198;">(</span>consp arg<span style="color: #2aa198;">)</span> <span style="color: #2aa198;">(</span>car arg<span style="color: #2aa198;">)</span> arg<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
base-menu<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>cadr <span style="color: #b58900;">(</span>assoc <span style="color: #268bd2;">(</span>popup-menu* menu <span style="color: #657b83; font-weight: bold;">:scroll-bar</span> t<span style="color: #268bd2;">)</span> base-menu<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>fset 'flyspell-emacs-popup 'flyspell-emacs-popup-textual<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-webmode" class="outline-3">
|
|
<h3 id="webmode"><span class="section-number-3">18.34</span> web-mode</h3>
|
|
<div class="outline-text-3" id="text-18-34">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">web-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span><span style="color: #2aa198;">"\\.tmpl\\'"</span> . web-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"\\.cql\\'"</span> . web-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> web-mode-content-types-alist
|
|
'<span style="color: #6c71c4;">(</span><span style="color: #859900;">(</span><span style="color: #2aa198;">"gtl"</span> . <span style="color: #2aa198;">"\\.tmpl\\'"</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #2aa198;">"gtl"</span> . <span style="color: #2aa198;">"\\.cql\\'"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-helmthemes" class="outline-3">
|
|
<h3 id="helmthemes"><span class="section-number-3">18.35</span> helm-themes</h3>
|
|
<div class="outline-text-3" id="text-18-35">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">helm-themes</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-helmswoop" class="outline-3">
|
|
<h3 id="helmswoop"><span class="section-number-3">18.36</span> helm-swoop</h3>
|
|
<div class="outline-text-3" id="text-18-36">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">helm-swoop</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"C-S-s"</span> . helm-swoop<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> helm-swoop<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-perspective" class="outline-3">
|
|
<h3 id="perspective"><span class="section-number-3">18.37</span> perspective</h3>
|
|
<div class="outline-text-3" id="text-18-37">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">perspective</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>persp-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">persp-get-perspectives-for-buffer</span> <span style="color: #6c71c4;">(</span>buffer<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #2aa198;">"Get the names of all of the perspectives of which `buffer` is a member."</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for perspective being the hash-value of perspectives-hash
|
|
if <span style="color: #859900;">(</span>member buffer <span style="color: #b58900;">(</span>persp-buffers perspective<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
collect <span style="color: #859900;">(</span>persp-name perspective<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">persp-pick-perspective-by-buffer</span> <span style="color: #6c71c4;">(</span>buffer<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #2aa198;">"Select a buffer and go to the perspective to which that buffer</span>
|
|
<span style="color: #2aa198;"> belongs. If the buffer belongs to more than one perspective</span>
|
|
<span style="color: #2aa198;"> completion will be used to pick the perspective to switch to.</span>
|
|
<span style="color: #2aa198;"> Switch the focus to the window in which said buffer is displayed</span>
|
|
<span style="color: #2aa198;"> if such a window exists. Otherwise display the buffer in whatever</span>
|
|
<span style="color: #2aa198;"> window is active in the perspective."</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #859900;">(</span>list <span style="color: #b58900;">(</span>funcall persp-interactive-completion-function
|
|
<span style="color: #2aa198;">"Buffer: "</span> <span style="color: #268bd2;">(</span>mapcar 'buffer-name <span style="color: #6c71c4;">(</span>buffer-list<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">let*</span> <span style="color: #859900;">(</span><span style="color: #b58900;">(</span>perspectives <span style="color: #268bd2;">(</span>persp-get-perspectives-for-buffer <span style="color: #6c71c4;">(</span>get-buffer buffer<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>perspective <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #6c71c4;">(</span>> <span style="color: #859900;">(</span>length perspectives<span style="color: #859900;">)</span> 1<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>funcall persp-interactive-completion-function
|
|
<span style="color: #859900;">(</span>format <span style="color: #2aa198;">"Select the perspective in which you would like to visit %s."</span>
|
|
buffer<span style="color: #859900;">)</span>
|
|
perspectives<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>car perspectives<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #b58900;">(</span>string= <span style="color: #268bd2;">(</span>persp-name persp-curr<span style="color: #268bd2;">)</span> perspective<span style="color: #b58900;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This allows the opening of a single buffer in more than one window</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">in a single perspective.</span>
|
|
<span style="color: #b58900;">(</span>switch-to-buffer buffer<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>persp-switch perspective<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #6c71c4;">(</span>get-buffer-window buffer<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>set-frame-selected-window nil <span style="color: #859900;">(</span>get-buffer-window buffer<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>switch-to-buffer buffer<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">persp-mode-switch-buffers</span> <span style="color: #6c71c4;">(</span>arg<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #2aa198;">"P"</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">if</span> arg <span style="color: #859900;">(</span>call-interactively 'ido-switch-buffer<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>call-interactively 'persp-pick-perspective-by-buffer<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>define-key persp-mode-map <span style="color: #6c71c4;">(</span>kbd <span style="color: #2aa198;">"C-x b"</span><span style="color: #6c71c4;">)</span> 'persp-mode-switch-buffers<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"C-c 9"</span> . persp-switch<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-smex" class="outline-3">
|
|
<h3 id="smex"><span class="section-number-3">18.38</span> smex</h3>
|
|
<div class="outline-text-3" id="text-18-38">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">smex</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">Using helm-M-x instead</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> smex
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This is here because smex feels like part of ido</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #2aa198;">"M-x"</span> . smex<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-java" class="outline-3">
|
|
<h3 id="java"><span class="section-number-3">18.39</span> java</h3>
|
|
<div class="outline-text-3" id="text-18-39">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span>add-hook 'java-mode-hook
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #268bd2;">()</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> c-basic-offset 4
|
|
tab-width 4
|
|
indent-tabs-mode t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-androidmode" class="outline-3">
|
|
<h3 id="androidmode"><span class="section-number-3">18.40</span> android-mode</h3>
|
|
<div class="outline-text-3" id="text-18-40">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">android-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> s
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> android-mode-sdk-dir
|
|
<span style="color: #6c71c4;">(</span>s-trim <span style="color: #859900;">(</span>shell-command-to-string <span style="color: #2aa198;">"android_sdk_directory"</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-gradlemode" class="outline-3">
|
|
<h3 id="gradlemode"><span class="section-number-3">18.41</span> gradle-mode</h3>
|
|
<div class="outline-text-3" id="text-18-41">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">gradle-mode</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-jsxmode" class="outline-3">
|
|
<h3 id="jsxmode"><span class="section-number-3">18.42</span> jsx-mode</h3>
|
|
<div class="outline-text-3" id="text-18-42">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">jsx-mode</span>
|
|
<span style="color: #657b83; font-weight: bold;">:mode</span> <span style="color: #2aa198;">"\\.jsx\\'"</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-css" class="outline-3">
|
|
<h3 id="css"><span class="section-number-3">18.43</span> css</h3>
|
|
<div class="outline-text-3" id="text-18-43">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span>eval-after-load 'css-mode
|
|
'<span style="color: #b58900;">(</span>define-key css-mode-map <span style="color: #268bd2;">(</span>kbd <span style="color: #2aa198;">"C-c b"</span><span style="color: #268bd2;">)</span> 'web-beautify-css<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-robe" class="outline-3">
|
|
<h3 id="robe"><span class="section-number-3">18.44</span> robe</h3>
|
|
<div class="outline-text-3" id="text-18-44">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">robe</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> robe-mode
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span> <span style="color: #268bd2;">(</span>add-hook 'ruby-mode-hook 'robe-mode<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-rinari" class="outline-3">
|
|
<h3 id="rinari"><span class="section-number-3">18.45</span> rinari</h3>
|
|
<div class="outline-text-3" id="text-18-45">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">rinari</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> ruby-mode<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-helmgtags" class="outline-3">
|
|
<h3 id="helmgtags"><span class="section-number-3">18.46</span> helm-gtags</h3>
|
|
<div class="outline-text-3" id="text-18-46">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">helm-gtags</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">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: #2aa198;">"\C-cg"</span>
|
|
helm-gtags-suggested-key-mapping t<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">cl-loop</span> for hook in '<span style="color: #6c71c4;">(</span>dired-mode-hook eshell-mode-hook c-mode-hook
|
|
c++-mode-hook asm-mode-hook<span style="color: #6c71c4;">)</span>
|
|
do <span style="color: #6c71c4;">(</span>add-hook hook 'helm-gtags-mode<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:bind</span> <span style="color: #b58900;">(</span><span style="color: #657b83; font-weight: bold;">:map</span> helm-gtags-mode-map
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c g a"</span> . helm-gtags-tags-in-this-function<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-j"</span> . helm-gtags-select<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-."</span> . helm-gtags-dwim<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"M-,"</span> . helm-gtags-pop-stack<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c <"</span> . helm-gtags-previous-history<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #2aa198;">"C-c >"</span> . helm-gtags-next-history<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-sgmlmode" class="outline-3">
|
|
<h3 id="sgmlmode"><span class="section-number-3">18.47</span> sgml-mode</h3>
|
|
<div class="outline-text-3" id="text-18-47">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">sgml-mode</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">:bind ("C-c b" . web-beautify-html) TODO: mode specific, change binding</span>
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> sgml-mode<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-evil" class="outline-3">
|
|
<h3 id="evil"><span class="section-number-3">18.48</span> evil</h3>
|
|
<div class="outline-text-3" id="text-18-48">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">evil</span> <span style="color: #657b83; font-weight: bold;">:commands</span> <span style="color: #b58900;">(</span>evil-mode<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-hackernews" class="outline-3">
|
|
<h3 id="hackernews"><span class="section-number-3">18.49</span> hackernews</h3>
|
|
<div class="outline-text-3" id="text-18-49">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">hackernews</span> <span style="color: #657b83; font-weight: bold;">:commands</span> hackernews<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-appearance" class="outline-2">
|
|
<h2 id="appearance"><span class="section-number-2">19</span> Appearance</h2>
|
|
<div class="outline-text-2" id="text-19">
|
|
</div><div id="outline-container-basicconfig" class="outline-3">
|
|
<h3 id="basicconfig"><span class="section-number-3">19.1</span> Basic Config</h3>
|
|
<div class="outline-text-3" id="text-19-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> inhibit-startup-screen t<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span>blink-cursor-mode -1<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-themes" class="outline-3">
|
|
<h3 id="themes"><span class="section-number-3">19.2</span> Themes</h3>
|
|
<div class="outline-text-3" id="text-19-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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">solarized-theme</span>
|
|
<span style="color: #657b83; font-weight: bold;">:init</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> solarized-high-contrast-mode-line t<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> packages-appearance
|
|
'<span style="color: #b58900;">(</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: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>ensure-packages-installed packages-appearance<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-alltheicons" class="outline-3">
|
|
<h3 id="alltheicons"><span class="section-number-3">19.3</span> all-the-icons</h3>
|
|
<div class="outline-text-3" id="text-19-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">all-the-icons</span>
|
|
<span style="color: #657b83; font-weight: bold;">:demand</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-spaceline" class="outline-3">
|
|
<h3 id="spaceline"><span class="section-number-3">19.4</span> spaceline</h3>
|
|
<div class="outline-text-3" id="text-19-4">
|
|
</div><div id="outline-container-disablesrgbcolorspacetomakepowerlineseparatorswork" class="outline-4">
|
|
<h4 id="disablesrgbcolorspacetomakepowerlineseparatorswork"><span class="section-number-4">19.4.1</span> Disable sRGB colorspace to make powerline separators work</h4>
|
|
<div class="outline-text-4" id="text-19-4-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ns-use-srgb-colorspace nil<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-config1" class="outline-4">
|
|
<h4 id="config1"><span class="section-number-4">19.4.2</span> config</h4>
|
|
<div class="outline-text-4" id="text-19-4-2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">spaceline-config</span>
|
|
<span style="color: #657b83; font-weight: bold;">:ensure</span> spaceline
|
|
<span style="color: #657b83; font-weight: bold;">:commands</span> spaceline-compile
|
|
<span style="color: #657b83; font-weight: bold;">:preface</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">spaceline-gh-notifier-disable-default-notifier-modeline</span> <span style="color: #6c71c4;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>delq 'github-notifier-mode-line global-mode-string<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>advice-add 'github-notifier-mode <span style="color: #657b83; font-weight: bold;">:after</span>
|
|
'spaceline-gh-notifier-disable-default-notifier-modeline<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>advice-add 'github-notifier-update <span style="color: #657b83; font-weight: bold;">:after</span>
|
|
'spaceline-gh-notifier-disable-default-notifier-modeline<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> powerline-default-separator <span style="color: #6c71c4;">(</span>random-choice '<span style="color: #859900;">(</span>butt slant wave<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> spaceline-workspace-numbers-unicode t
|
|
spaceline-window-numbers-unicode t<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #6c71c4;">(</span>display-graphic-p<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq-default</span> powerline-default-separator 'wave<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq-default</span> powerline-default-separator 'utf-8<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">spaceline-define-segment</span> imalison:muni
|
|
<span style="color: #2aa198;">"Display the number of minutes until the next muni train comes"</span>
|
|
<span style="color: #6c71c4;">(</span>format <span style="color: #2aa198;">"🚇%s"</span> <span style="color: #859900;">(</span>imalison:get-cached-muni-time<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:when</span> active<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">spaceline-define-segment</span> spaceline-gh-notifier
|
|
<span style="color: #2aa198;">"Display the number of github notifications the user has"</span>
|
|
<span style="color: #6c71c4;">(</span>format <span style="color: #2aa198;">"✉%s"</span> github-notifier-unread-count<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:when</span> <span style="color: #6c71c4;">(</span>> github-notifier-unread-count 0<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>advice-add 'pl/separator-height <span style="color: #657b83; font-weight: bold;">:around</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">lambda</span> <span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">function</span> <span style="color: #b58900;">&rest</span> args<span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>+ <span style="color: #b58900;">(</span>apply function args<span style="color: #b58900;">)</span> 10<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This needs to be executed after setting the font because the separators</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">need to get regenerated</span>
|
|
<span style="color: #268bd2;">(</span>advice-add 'imalison:set-font-size <span style="color: #657b83; font-weight: bold;">:after</span> 'spaceline-compile<span style="color: #268bd2;">)</span>
|
|
|
|
<span style="color: #268bd2;">(</span>spaceline-helm-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">'spaceline-gh-notifier and 'imalison:muni disabled for now</span>
|
|
<span style="color: #268bd2;">(</span>spaceline-spacemacs-theme<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-pagebreaklines" class="outline-3">
|
|
<h3 id="pagebreaklines"><span class="section-number-3">19.5</span> page-break-lines</h3>
|
|
<div class="outline-text-3" id="text-19-5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">page-break-lines</span>
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> 1
|
|
<span style="color: #657b83; font-weight: bold;">:diminish</span> <span style="color: #b58900;">(</span>page-break-lines-mode<span style="color: #b58900;">)</span>
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span>add-to-list 'page-break-lines-modes 'prog-mode<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>global-page-break-lines-mode +1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-helmthemes1" class="outline-3">
|
|
<h3 id="helmthemes1"><span class="section-number-3">19.6</span> helm-themes</h3>
|
|
<div class="outline-text-3" id="text-19-6">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">helm-themes</span>
|
|
<span style="color: #657b83; font-weight: bold;">:after</span> helm<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-windownumber" class="outline-3">
|
|
<h3 id="windownumber"><span class="section-number-3">19.7</span> window-number</h3>
|
|
<div class="outline-text-3" id="text-19-7">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">window-number</span>
|
|
<span style="color: #657b83; font-weight: bold;">:defer</span> t<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-whitespacesetup" class="outline-3">
|
|
<h3 id="whitespacesetup"><span class="section-number-3">19.8</span> Whitespace Setup</h3>
|
|
<div class="outline-text-3" id="text-19-8">
|
|
<p>
|
|
Make whitespace-mode use just basic coloring:
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> whitespace-style
|
|
'<span style="color: #b58900;">(</span>spaces tabs newline space-mark tab-mark newline-mark<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">setq</span> whitespace-display-mappings
|
|
'<span style="color: #b58900;">(</span><span style="color: #268bd2;">(</span>space-mark 32 <span style="color: #6c71c4;">[</span>183<span style="color: #6c71c4;">]</span> <span style="color: #6c71c4;">[</span>46<span style="color: #6c71c4;">]</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>tab-mark 9 <span style="color: #6c71c4;">[</span>9655 9<span style="color: #6c71c4;">]</span> <span style="color: #6c71c4;">[</span>92 9<span style="color: #6c71c4;">]</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-colorizecompliationbuffers" class="outline-3">
|
|
<h3 id="colorizecompliationbuffers"><span class="section-number-3">19.9</span> Colorize Compliation Buffers</h3>
|
|
<div class="outline-text-3" id="text-19-9">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:colorize-compilation-buffer</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">let</span> <span style="color: #268bd2;">(</span><span style="color: #6c71c4;">(</span>was-read-only buffer-read-only<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">unwind-protect</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #859900;">(</span><span style="color: #859900; font-weight: bold;">when</span> was-read-only
|
|
<span style="color: #b58900;">(</span>read-only-mode -1<span style="color: #b58900;">)</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>ansi-color-apply-on-region <span style="color: #b58900;">(</span>point-min<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>point-max<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">when</span> was-read-only
|
|
<span style="color: #859900;">(</span>read-only-mode +1<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>add-hook 'compilation-filter-hook 'imalison:colorize-compilation-buffer<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-automaticthemechanger" class="outline-3">
|
|
<h3 id="automaticthemechanger"><span class="section-number-3">19.10</span> Automatic Theme Changer</h3>
|
|
<div class="outline-text-3" id="text-19-10">
|
|
<p>
|
|
Disabled for now
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">use-package</span> <span style="color: #268bd2; font-weight: bold;">theme-changer</span>
|
|
<span style="color: #657b83; font-weight: bold;">:disabled</span> t
|
|
<span style="color: #657b83; font-weight: bold;">:config</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">destructuring-bind</span> <span style="color: #6c71c4;">(</span>latitude longitude<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>imalison:get-lat-long<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> calendar-latitude latitude<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">setq</span> calendar-longitude longitude<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-fixansitermcolors" class="outline-3">
|
|
<h3 id="fixansitermcolors"><span class="section-number-3">19.11</span> Fix <code>ansi-term</code> Colors</h3>
|
|
<div class="outline-text-3" id="text-19-11">
|
|
<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: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">require</span> '<span style="color: #268bd2; font-weight: bold;">term</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:ansi-term-color-vector</span> ansi-term-color-vector<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:ansi-term-color-vector-broken?</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">--some</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">or</span> <span style="color: #6c71c4;">(</span>eq <span style="color: #268bd2;">it</span> 'unspecified<span style="color: #6c71c4;">)</span> <span style="color: #6c71c4;">(</span>not <span style="color: #859900;">(</span>symbolp <span style="color: #268bd2;">it</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>append ansi-term-color-vector nil<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:restore-ansi-term-color-vector</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&optional</span> force<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">or</span> force <span style="color: #6c71c4;">(</span>imalison:ansi-term-color-vector-broken?<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">setq</span> ansi-term-color-vector imalison:ansi-term-color-vector<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-afterloadthemehook" class="outline-3">
|
|
<h3 id="afterloadthemehook"><span class="section-number-3">19.12</span> After <code>load-theme</code> hook</h3>
|
|
<div class="outline-text-3" id="text-19-12">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:light-theme</span> 'solarized-light<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:dark-theme</span> 'flatland<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:after-load-theme</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> _args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #268bd2;">(</span>fboundp 'powerline-reset<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span>powerline-reset<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>set-face-background 'fringe <span style="color: #268bd2;">(</span>face-background 'default<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>imalison:restore-ansi-term-color-vector<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>advice-add 'load-theme <span style="color: #657b83; font-weight: bold;">:after</span> #'imalison:after-load-theme<span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-frameinitialization" class="outline-3">
|
|
<h3 id="frameinitialization"><span class="section-number-3">19.13</span> Frame Initialization</h3>
|
|
<div class="outline-text-3" id="text-19-13">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defvar</span> <span style="color: #268bd2;">imalison:linum-format</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:format-linum</span> <span style="color: #b58900;">(</span>line-text<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>propertize <span style="color: #268bd2;">(</span>format imalison:linum-format line-text<span style="color: #268bd2;">)</span> 'face 'linum<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span>make-variable-buffer-local 'imalison:linum-format<span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:linum-before-numbering-hook</span> <span style="color: #b58900;">()</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> imalison:linum-format
|
|
<span style="color: #268bd2;">(</span>concat <span style="color: #2aa198;">"%"</span> <span style="color: #6c71c4;">(</span>number-to-string
|
|
<span style="color: #859900;">(</span>max <span style="color: #b58900;">(</span>length
|
|
<span style="color: #268bd2;">(</span>number-to-string
|
|
<span style="color: #6c71c4;">(</span>count-lines <span style="color: #859900;">(</span>point-min<span style="color: #859900;">)</span> <span style="color: #859900;">(</span>point-max<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span> 3<span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span> <span style="color: #2aa198;">"d"</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:remove-fringe-and-hl-line-mode</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> _stuff<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>fboundp 'scroll-bar-mode<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>scroll-bar-mode -1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>fboundp 'tool-bar-mode<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>tool-bar-mode -1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>fboundp 'menu-bar-mode<span style="color: #268bd2;">)</span> <span style="color: #268bd2;">(</span>menu-bar-mode -1<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> linum-format 'imalison:format-linum<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>add-hook 'linum-before-numbering-hook 'imalison:linum-before-numbering-hook<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> left-margin-width 0<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">defvar-setq</span> hl-line-mode nil<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:appearance</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&optional</span> frame<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">interactive</span> <span style="color: #268bd2;">(</span>list nil<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #268bd2;">(</span>display-graphic-p<span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #6c71c4;">(</span><span style="color: #859900; font-weight: bold;">condition-case</span> error
|
|
<span style="color: #859900;">(</span>set-face-attribute 'default nil <span style="color: #657b83; font-weight: bold;">:font</span> <span style="color: #2aa198;">"source code pro"</span><span style="color: #859900;">)</span>
|
|
<span style="color: #859900;">(</span>'error <span style="color: #b58900;">(</span>message <span style="color: #2aa198;">"Error: %s, when setting font"</span> error<span style="color: #b58900;">)</span><span style="color: #859900;">)</span><span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>set-face-attribute 'default nil <span style="color: #657b83; font-weight: bold;">:weight</span> 'semi-bold<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>set-face-attribute
|
|
'default nil <span style="color: #657b83; font-weight: bold;">:height</span> imalison:default-font-size-pt<span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span>
|
|
<span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">progn</span>
|
|
<span style="color: #6c71c4;">(</span>load-theme 'source-code-pro t<span style="color: #6c71c4;">)</span>
|
|
<span style="color: #6c71c4;">(</span>message <span style="color: #2aa198;">"not setting font"</span><span style="color: #6c71c4;">)</span><span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span><span style="color: #859900; font-weight: bold;">setq</span> powerline-default-separator <span style="color: #268bd2;">(</span><span style="color: #859900; font-weight: bold;">if</span> <span style="color: #6c71c4;">(</span>display-graphic-p<span style="color: #6c71c4;">)</span> 'wave 'utf-8<span style="color: #268bd2;">)</span><span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>load-theme imalison:dark-theme t<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>spaceline-compile<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>imalison:remove-fringe-and-hl-line-mode<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-hookstoseteverythingup" class="outline-4">
|
|
<h4 id="hookstoseteverythingup"><span class="section-number-4">19.13.1</span> Hooks to set everything up</h4>
|
|
<div class="outline-text-4" id="text-19-13-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">defun</span> <span style="color: #268bd2;">imalison:initial-setup-hook</span> <span style="color: #b58900;">(</span><span style="color: #b58900;">&rest</span> args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>apply 'imalison:appearance args<span style="color: #b58900;">)</span>
|
|
<span style="color: #b58900;">(</span>remove-hook 'after-make-frame-functions 'imalison:initial-setup-hook<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">This is needed because you can't set the font or theme at daemon start-up.</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(when (display-graphic-p) (imalison:appearance))</span>
|
|
<span style="color: #2aa198;">(</span>add-hook 'after-init-hook 'imalison:appearance<span style="color: #2aa198;">)</span>
|
|
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">XXX: I think that after-init-hook is good enough</span>
|
|
<span style="color: #93a1a1;">;; </span><span style="color: #93a1a1;">(add-hook 'after-make-frame-functions 'imalison:initial-setup-hook)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-postinitcustom" class="outline-2">
|
|
<h2 id="postinitcustom"><span class="section-number-2">20</span> Post Init Custom</h2>
|
|
<div class="outline-text-2" id="text-20">
|
|
<div class="org-src-container">
|
|
<pre class="src src-emacs-lisp"><span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>file-exists-p custom-after-file<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>load custom-after-file<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
<span style="color: #2aa198;">(</span><span style="color: #859900; font-weight: bold;">when</span> <span style="color: #b58900;">(</span>file-exists-p machine-custom<span style="color: #b58900;">)</span> <span style="color: #b58900;">(</span>load machine-custom<span style="color: #b58900;">)</span><span style="color: #2aa198;">)</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="postamble" class="status">
|
|
<p class="author">Author: Ivan Malison</p>
|
|
<p class="date">Created: 2016-12-26 Mon 01:12</p>
|
|
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
|
</div>
|
|
</body>
|
|
</html>
|