<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>fASCIIsm: For the Love of Text</title>
    <description>The fASCIIsm blog.</description>
    <link>http://fasciism.com/</link>
    <atom:link href="http://fasciism.com/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Thu, 04 Aug 2022 04:51:59 +0000</pubDate>
    <lastBuildDate>Thu, 04 Aug 2022 04:51:59 +0000</lastBuildDate>
    <generator>Jekyll v3.9.2</generator>
    
      <item>
        <title>Spellcheck Dictionaries</title>
        <description>&lt;p&gt;
I first tackled spellchecking &lt;a href=&quot;https://fasciism.com/2017/01/16/spellchecking/&quot;&gt;way back&lt;/a&gt; at the start of this blog, but I only configured the files and languages, not the dictionaries and environment. Three work laptops later, this has become a problem. First I'll install Hunspell on the MacBook:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
% brew install hunspell
...
==&amp;gt; Caveats
Dictionary files (*.aff and *.dic) should be placed in
~/Library/Spelling/ or /Library/Spelling/.
&lt;/pre&gt;

&lt;p&gt;
Then I'll fetch the &lt;a href=&quot;https://extensions.libreoffice.org/extensions/english-dictionaries&quot;&gt;dictionaries&lt;/a&gt; and extract them where I want them to go, non-standard as that may be:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
% mkdir ~/.hunspell

% file dict-en-20200501.oxt
dict-en-20200501.oxt: Zip archive data, at least v2.0 to extract

% unzip dict-en-20200501.oxt
Archive:  dict-en-20200501.oxt
  ...
  inflating: en_CA.aff
  inflating: en_CA.dic
  inflating: en_US.aff
  inflating: en_US.dic
  ...
&lt;/pre&gt;

&lt;p&gt;
Having to worry about different shells (Bash, Zsh, Eshell) using different startup files for setting environment variables annoyed me, so I decided I'm going to have a &lt;code&gt;~/.environment&lt;/code&gt; file that I make my shells all read from. While I could have used &lt;code&gt;~/.profile&lt;/code&gt; and then told Zsh to read from it, I'd rather a file no tool is going to get clever with and mangle.
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
% cat ~/.environment
# Required by Hunspell
export DICPATH=&quot;$HOME/.hunspell&quot;

% cat ~/.profile
source ~/.environment

% cat ~/.zshenv
source ~/.environment
&lt;/pre&gt;

&lt;p&gt;
Deleting all but those four files, since those are the languages (dialects) in which I write, I make then need to test that they're active. First I ensure I have a fresh session and then:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
% hunspell -D
SEARCH PATH:
.::/Users/mak/.hunspell:...

AVAILABLE DICTIONARIES (path is not mandatory for -d option):
/Users/mak/.hunspell/en_CA
/Users/mak/.hunspell/en_US
&lt;/pre&gt;

&lt;p&gt;
Next, I &lt;a href=&quot;https://en.wikipedia.org/wiki/Eating_your_own_dog_food&quot;&gt;dogfood&lt;/a&gt; Hunspell by running it on its own README, and after ignoring the many false-positives I found an actual mistake:
&lt;/p&gt;


&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;https://fasciism.com/img/2020-05-18-spellcheck-dictionaries.png&quot; alt=&quot;2020-05-18-spellcheck-dictionaries.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;
Hunspell was still screaming about not being able to find dictionaries, so I need to be pulling things out of shell environment variables properly. There's a package for exactly that:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;exec-path-from-shell&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (add-to-list 'exec-path-from-shell-variables &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;DICPATH&quot;&lt;/span&gt;)
  (exec-path-from-shell-initialize))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
And now I'm save from spelling mistakes once again.
&lt;/p&gt;
</description>
        <pubDate>Mon, 18 May 2020 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2020/05/18/spellcheck-dictionaries/</link>
        <guid isPermaLink="true">http://fasciism.com/2020/05/18/spellcheck-dictionaries/</guid>
        
        
      </item>
    
      <item>
        <title>Org Blog Templates</title>
        <description>&lt;p&gt;
I was considering what part of my workflow to improve next when I remembered that I've had to type &lt;code&gt;#+begin_&lt;/code&gt; and &lt;code&gt;#+end_&lt;/code&gt; a lot recently. I looked at &lt;code&gt;org-structure-template-alist&lt;/code&gt;, but realized that if I wanted to start using templating in my workflows then it should be something universal, not something only useful within org-mode. Enter YASnippet:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;yasnippet&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:mode&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/emacs.[dp]/snippets/[&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;/]*/&quot;&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; yas-snippet-dirs '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.d/snippets&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.p/snippets&quot;&lt;/span&gt;))
  (yas-global-mode t))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
A great project exists called &lt;a href=&quot;https://github.com/AndreaCrotti/yasnippet-snippets&quot;&gt;yasnippet-snippets&lt;/a&gt;, containing snippets for most programming languages. While that's a great reasource, I'd much rather import and customize the snippets I like and intend to use than import a massive collection of them. I've hardwired YASnippet to look in both my public (&lt;code&gt;~/.emacs.d&lt;/code&gt;) and my private (&lt;code&gt;~/.emacs.p&lt;/code&gt;) configurations for snippets. This allows me to keep, for example, templates for my emails and Git commits private.
&lt;/p&gt;

&lt;p&gt;
Most snippets I have seen online begin with &lt;code&gt;# -*- mode: snippet -*-&lt;/code&gt;, which tells Emacs to use the major mode &lt;code&gt;snippet-mode&lt;/code&gt; for the file's buffer. I dislike using such things, and instead have used the &lt;code&gt;:mode&lt;/code&gt; keyword to enable the major mode for all files within subdirectories of &lt;code&gt;yas-snippet-dirs&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;
Now to make three templates that reduce the effort of writing these blog posts ever so slightly. First up is a source block, which is used for both executing code (as above) and displaying code without executing it (as below):
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-snippet&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;# name: src block&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;# key: &amp;lt;s&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;# --&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;#+begin_src ${&lt;/span&gt;&lt;span style=&quot;color: #cb4b16; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;:emacs-lisp}&lt;/span&gt;
&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;0&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;#+end_src&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-snippet&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;# name: example block&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;# key: &amp;lt;e&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;# --&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;#+begin_example&lt;/span&gt;
&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;0&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;#+end_example&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-snippet&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;# name: verse block&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;# key: &amp;lt;v&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;# --&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;#+begin_verse&lt;/span&gt;
&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;0&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;#+end_verse&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
The relevant difference between example and verse blocks, for my purposes, is that example blocks don't wrap text, while verse blocks do.
&lt;/p&gt;

&lt;p&gt;
Now typing &lt;code&gt;&amp;lt;s[TAB]&lt;/code&gt; expands the &lt;code&gt;src block&lt;/code&gt; template if I'm in an &lt;code&gt;org-mode&lt;/code&gt; buffer.
&lt;/p&gt;
</description>
        <pubDate>Sun, 17 May 2020 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2020/05/17/org-blog-templates/</link>
        <guid isPermaLink="true">http://fasciism.com/2020/05/17/org-blog-templates/</guid>
        
        
      </item>
    
      <item>
        <title>Accumulate, Don't Poll</title>
        <description>&lt;p&gt;
We're in the middle of the pandemic. This is my tenth year of working from home. My three kids and wife are all in the house with me, as all activities are cancelled and have been for two months. My brain has been melting, and refreshing the aggregators and social media sites I favour is more problematic than it used to be. The solution seems clear to me: accumulate, don't poll.
&lt;/p&gt;

&lt;p&gt;
When I was keeping my programs separate, I had a dedicated tmux window for Newsbeuter, which is an &lt;span class=&quot;underline&quot;&gt;amazing&lt;/span&gt; feed reader that is best described as &quot;The Mutt of Feed Readers&quot;. It's good, but it's not Emacs.
&lt;/p&gt;

&lt;p&gt;
Elfeed is almost exactly like Newsbeuter, except by virtue of being inside Emacs I can customize its behaviours more conveniently, and get integration into Org.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;elfeed&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I don't set a key for Elfeed because I'd rather invoke it with &lt;code&gt;M-x elfeed&lt;/code&gt;. I try to save keybindings for things that I do constantly, and as part of a workflow. I should be checking Elfeed a couple times a day, ideally. I'll start by adding a few feeds that I want to make sure I get everything they publish.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; elfeed-feeds
      '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;https://fasciism.com/feed.xml&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;https://leahneukirchen.org/trivium/index.atom&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;https://www.daemonology.net/blog/index.rss&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;https://www.spinellis.gr/blog/dds-blog-rss.xml&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;http://n-gate.com/index.atom&quot;&lt;/span&gt;))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
With that small bit of configuration done, we already have something that looks usable:
&lt;/p&gt;


&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;https://fasciism.com/img/2020-05-13-accumulate-dont-poll.png&quot; alt=&quot;2020-05-13-accumulate-dont-poll.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;
The normal navigation/search keys work as expected, &lt;code&gt;Enter&lt;/code&gt; opens an entry into an &lt;code&gt;*elfeed-entry*&lt;/code&gt; buffer with metadata at the top including a link to the post, images are displayed, hitting &lt;code&gt;Enter&lt;/code&gt; on links opens them in Firefox, and &lt;code&gt;q&lt;/code&gt; kills the buffer.
&lt;/p&gt;

&lt;p&gt;
I was happy enough with the defaults that I lost an hour to reading my feeds while writing this post. I can almost feel my brain solidifying again. Now I just need to get Twitter and Reddit managed better.
&lt;/p&gt;
</description>
        <pubDate>Wed, 13 May 2020 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2020/05/13/accumulate-dont-poll/</link>
        <guid isPermaLink="true">http://fasciism.com/2020/05/13/accumulate-dont-poll/</guid>
        
        
      </item>
    
      <item>
        <title>Tangling Tolerantly</title>
        <description>&lt;p&gt;
The posts on this blog/configuration, including this one, &lt;a href=&quot;https://fasciism.com/2017/01/01/emacs-bankruptcy/&quot;&gt;do&lt;/a&gt; &lt;a href=&quot;https://fasciism.com/2017/01/02/literate-configuration/&quot;&gt;not&lt;/a&gt; &lt;a href=&quot;https://fasciism.com/2017/03/01/gnus-kill-files/&quot;&gt;contain&lt;/a&gt; &lt;a href=&quot;https://fasciism.com/2017/07/19/git-over-here/&quot;&gt;code&lt;/a&gt; that I want to be executed. Sometimes this is because the code belongs elsewhere (e.g., &lt;code&gt;init.el&lt;/code&gt;), other times it's because I'm doing some sort of round-up or story. This entry is both.
&lt;/p&gt;

&lt;p&gt;
The core of my &lt;code&gt;init.el&lt;/code&gt; is (roughly) the following:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::load-literate-config&lt;/span&gt; (dir &lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; regex)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;dolist&lt;/span&gt; (org (directory-files dir t (concat regex &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;.*\\.org$&quot;&lt;/span&gt;)))
    (org-babel-load-file org)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
&lt;code&gt;org-babel-load-file&lt;/code&gt; throws an error if it tangles a file, but the result has no executable code in it, so it neglects to write the output file, and then tries to load the file. This is probably desirable behaviour for some users, but not for me. I've been getting around this by adding the following section to the bottom of the affected posts:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-org&quot;&gt;&lt;span style=&quot;color: #586e75; font-style: italic; text-decoration: underline;&quot;&gt;#+BEGIN_SRC emacs-lisp :exports none&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;This block exists solely to prevent errors.&lt;/span&gt;
&lt;span style=&quot;color: #586e75; font-style: italic; text-decoration: overline;&quot;&gt;#+END_SRC&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
That's ugly. Let's fix it. The first way I thought to fix it was to create the output file unconditionally before invoking the tangler:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::load-literate-config&lt;/span&gt; (dir &lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; regex)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;dolist&lt;/span&gt; (org (directory-files dir t (concat regex &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;.*\\.org$&quot;&lt;/span&gt;)))
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Some posts don't contain any executable code, so no file is created. Make&lt;/span&gt;
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;an empty file with the expected name.&lt;/span&gt;
    (write-region &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&quot;&lt;/span&gt; nil (concat (file-name-sans-extension org) &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;.el&quot;&lt;/span&gt;))
    (org-babel-load-file org)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
After deleting all my &lt;code&gt;*.el&lt;/code&gt; files I restarted my Emacs to find a default installation. Having not seen such a thing in years, I immediately screamed in horror and took a few minutes to calm down. Default Emacs is ugly. After I'd relaxed, finished my lemon ginger tea, and spent some time focusing on my breathing I resumed my pursuit of slightly nicer blog post files. To figure out what went wrong, I ran &lt;code&gt;C-h f org-babel-load-file&lt;/code&gt; and read:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
org-babel-load-file is an autoloaded interactive compiled Lisp function in&lt;br /&gt;
‘org.el’.&lt;br /&gt;
&lt;br /&gt;
(org-babel-load-file FILE &amp;amp;optional COMPILE)&lt;br /&gt;
&lt;br /&gt;
Load Emacs Lisp source code blocks in the Org FILE.&lt;br /&gt;
This function exports the source code using ‘org-babel-tangle’&lt;br /&gt;
and then loads the resulting file using ‘load-file’.  With&lt;br /&gt;
optional prefix argument COMPILE, the tangled Emacs Lisp file is&lt;br /&gt;
byte-compiled before it is loaded.&lt;br /&gt;
&lt;/p&gt;

&lt;p&gt;
Following the link to &lt;code&gt;org.el&lt;/code&gt; brought me to the function's definition, which is (roughly):
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;org-babel-load-file&lt;/span&gt; (file &lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; compile)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let*&lt;/span&gt; ((tangled-file (concat (file-name-sans-extension file) &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;.el&quot;&lt;/span&gt;)))
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;unless&lt;/span&gt; (org-file-newer-than-p
             tangled-file
             (file-attribute-modification-time (file-attributes file)))
      (org-babel-tangle-file file tangled-file &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;emacs-lisp&quot;&lt;/span&gt;))
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; compile
        (byte-compile-file tangled-file 'load))
    (load-file tangled-file)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
&lt;code&gt;org-babel-load-file&lt;/code&gt; doesn't tangle a file if the &lt;code&gt;.org&lt;/code&gt; file is older than the &lt;code&gt;.el&lt;/code&gt; file, so making a blank &lt;code&gt;.el&lt;/code&gt; file before calling the tangler was never going to work. The straightforward fix that I could see for this was to reimplement &lt;code&gt;org-babel-load-file&lt;/code&gt; inside &lt;code&gt;mak::load-literate-config&lt;/code&gt;. So this is what I ended up with:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::load-literate-config&lt;/span&gt; (dir &lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; regex)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;dolist&lt;/span&gt; (org-file (directory-files dir t (concat regex &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;.*\\.org$&quot;&lt;/span&gt;)))
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;This is a customized implementation of org-babel-load-file.&lt;/span&gt;
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let*&lt;/span&gt; ((el-file (concat (file-name-sans-extension org-file) &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;.el&quot;&lt;/span&gt;)))
      (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;unless&lt;/span&gt; (org-file-newer-than-p
               el-file
               (file-attribute-modification-time (file-attributes org-file)))
        (org-babel-tangle-file org-file el-file &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;emacs-lisp&quot;&lt;/span&gt;))
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Some blog posts don't have any runnable code, and so do not produce a&lt;/span&gt;
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;file when tangled.&lt;/span&gt;
      (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (file-exists-p el-file)
          (load-file el-file)))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Complexity has to live somewhere, and I'd rather it live in my &lt;code&gt;init.el&lt;/code&gt; with comments surrounding it than be scattered throughout my blog posts waiting for me to trip over the problem again.
&lt;/p&gt;
</description>
        <pubDate>Tue, 12 May 2020 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2020/05/12/tangling-tolerantly/</link>
        <guid isPermaLink="true">http://fasciism.com/2020/05/12/tangling-tolerantly/</guid>
        
        
      </item>
    
      <item>
        <title>Org Export Jekyll Backend</title>
        <description>&lt;p&gt;
Since I started this blog I've been using a &lt;a href=&quot;https://fasciism.com/2017/01/25/batch-jekyll-publishing/&quot;&gt;sketchy method&lt;/a&gt; to add the necessary YAML headers to exported Org-mode files for Jekyll. It's a pain, and I screwed it up yesterday and discovered that the titles for previous blog posts weren't always proper. The reason for that is the titles were based on the file names, and those don't contain all the proper capitalization and punctuation. Poka-yoke dictates that I must now create either guardrails or automation to prevent me from screwing this up in future, and also use this as an opportunity to learn something.
&lt;/p&gt;

&lt;p&gt;
Org-mode has many backends that export to different formats, but it also allows backends to derive from other backends. This blog had been &lt;a href=&quot;https://fasciism.com/2017/01/05/self-publishing/&quot;&gt;using&lt;/a&gt; the HTML backend. What I'd like to have is an exporter that allows me to have custom export options translated into a YAML header for use by Jekyll, with defaults. For example:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-org&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;#+TITLE:&lt;/span&gt; &lt;span style=&quot;color: #93a1a1; font-size: 130%; font-weight: bold;&quot;&gt;Org Export Jekyll Backend&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
And the output written to the fASCIIsm Jekyll repository would be:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-yaml&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;---&lt;/span&gt;
&lt;span style=&quot;color: #268bd2;&quot;&gt;title&lt;/span&gt;:  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Org Export Jekyll Backend&quot;&lt;/span&gt;
&lt;span style=&quot;color: #268bd2;&quot;&gt;layout&lt;/span&gt;: post
&lt;span style=&quot;color: #586e75;&quot;&gt;---&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Reading through the documentation, I discovered the following variable that does exactly what I want:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
org-export-options-alist is a variable defined in ‘ox.el’.&lt;br /&gt;
&amp;#x2026;&lt;br /&gt;
Alist between export properties and ways to set them.&lt;br /&gt;
&lt;br /&gt;
The key of the alist is the property name, and the value is a list&lt;br /&gt;
like (KEYWORD OPTION DEFAULT BEHAVIOR) where:&lt;br /&gt;
&lt;br /&gt;
KEYWORD is a string representing a buffer keyword, or nil.  Each&lt;br /&gt;
&amp;#xa0;&amp;#xa0;property defined this way can also be set, during subtree&lt;br /&gt;
&amp;#xa0;&amp;#xa0;export, through a headline property named after the keyword&lt;br /&gt;
&amp;#xa0;&amp;#xa0;with the &quot;EXPORT_&quot; prefix (i.e. DATE keyword and EXPORT&lt;sub&gt;DATE&lt;/sub&gt;&lt;br /&gt;
&amp;#xa0;&amp;#xa0;property).&lt;br /&gt;
OPTION is a string that could be found in an #+OPTIONS: line.&lt;br /&gt;
DEFAULT is the default value for the property.&lt;br /&gt;
BEHAVIOR determines how Org should handle multiple keywords for&lt;br /&gt;
&amp;#xa0;&amp;#xa0;the same property.  It is a symbol among:&lt;br /&gt;
&amp;#xa0;&amp;#xa0;nil       Keep old value and discard the new one.&lt;br /&gt;
&amp;#xa0;&amp;#xa0;t         Replace old value with the new one.&lt;br /&gt;
&lt;/p&gt;

&lt;p&gt;
The documentation for this variable also notes that &lt;code&gt;#+TITLE&lt;/code&gt; is already defined for all exporters, meaning we only need to define &lt;code&gt;#+LAYOUT&lt;/code&gt; and give it our desired default.
&lt;/p&gt;

&lt;p&gt;
The &lt;code&gt;template&lt;/code&gt; hook in the &lt;code&gt;translate-alist&lt;/code&gt; defined the final output function of an exporter. By redefining this, while leaving all other hooks alone, we cause the exporter to fall back to using the HTML backend for everything except the final output.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;org&lt;/span&gt;)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;ox-publish&lt;/span&gt;)

(org-export-define-derived-backend 'jekyll 'html
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:options-alist&lt;/span&gt;
  '((nil &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;LAYOUT&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;post&quot;&lt;/span&gt; t))
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:translate-alist&lt;/span&gt;
  '((template . org-jekyll-template)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Next, I &lt;del&gt;stole&lt;/del&gt; &lt;del&gt;liberated&lt;/del&gt; &lt;del&gt;borrowed&lt;/del&gt; &lt;del&gt;blindly copied&lt;/del&gt; took inspiration from the template functions in &lt;a href=&quot;https://code.orgmode.org/bzg/org-mode/src/master/lisp/ox-beamer.el&quot;&gt;org-mode/lisp/ox-beamer.el&lt;/a&gt; and &lt;a href=&quot;https://code.orgmode.org/bzg/org-mode/src/master/contrib/lisp/ox-confluence.el&quot;&gt;org-mode/contrib/lisp/ox-confluence.el&lt;/a&gt; to produce a function that outputs the HTMLified content with a YAML header in front:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;org-jekyll-template&lt;/span&gt; (contents info)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((title (org-export-data (plist-get info &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:title&lt;/span&gt;) info))
        (layout (org-export-data (plist-get info &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:layout&lt;/span&gt;) info)))
    (concat &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;---\n&quot;&lt;/span&gt;
            (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;title:  \&quot;%s\&quot;\n&quot;&lt;/span&gt; title)
            (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;layout: post\n&quot;&lt;/span&gt; layout)
            &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;---\n\n&quot;&lt;/span&gt;
            contents)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Since testing is good I took another function from &lt;code&gt;org-mode/contrib/lisp/ox-confluence.el&lt;/code&gt;:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;org-jekyll-export-as-jekyll&lt;/span&gt; (&lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; async subtreep visible-only body-only ext-plist)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Export current buffer to a text buffer.&lt;/span&gt;

&lt;span style=&quot;color: #2aa198;&quot;&gt;For information on arguments, see `&lt;/span&gt;&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;org-export-to-buffer&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;'.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (org-export-to-buffer 'jekyll &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;*org JEKYLL Export*&quot;&lt;/span&gt;
    async subtreep visible-only body-only ext-plist (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; () (text-mode))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Running this function via &lt;code&gt;M-x org-export-jekyll-as-jekyll&lt;/code&gt;, this blog post/config file renders:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-yaml&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;---&lt;/span&gt;
&lt;span style=&quot;color: #268bd2;&quot;&gt;title&lt;/span&gt;:  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Org Export Jekyll Backend&quot;&lt;/span&gt;
&lt;span style=&quot;color: #268bd2;&quot;&gt;layout&lt;/span&gt;: post
&lt;span style=&quot;color: #586e75;&quot;&gt;---&lt;/span&gt;

&amp;lt;p&amp;gt;
Since I started this blog I've been using a...
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Exporting to buffers is good for testing, but exporting to files is necessary for the project interface.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;org-jekyll-publish-to-jekyll&lt;/span&gt; (plist filename pub-dir)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Publish an org file to Jekyll.&lt;/span&gt;

&lt;span style=&quot;color: #2aa198;&quot;&gt;For information on arguments, see `&lt;/span&gt;&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;org-publish-org-to&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;'.&quot;&lt;/span&gt;
  (org-publish-org-to 'jekyll filename &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;.html&quot;&lt;/span&gt; plist pub-dir))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Finally, I need to get the Org-mode project reconfigured to use our new exporter. Going back to our &lt;a href=&quot;https://fasciism.com/2017/01/05/self-publishing/&quot;&gt;previous setup&lt;/a&gt; and copying and editing the project's declaration is easier than altering the existing declaration. We can also fix a long-standing goof about the location of images.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;provide&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;ox-jekyll&lt;/span&gt;)

&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Set up blog for export as an Org-mode project.&lt;/span&gt;
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; org-publish-project-alist
      '((&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;fasciism-posts&quot;&lt;/span&gt;
         &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:base-directory&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.d/&quot;&lt;/span&gt;
         &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:base-extension&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;org&quot;&lt;/span&gt;
         &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:publishing-directory&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/src/fasciism/_posts/&quot;&lt;/span&gt;
         &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:publishing-function&lt;/span&gt; org-jekyll-publish-to-jekyll)
        (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;fasciism-images&quot;&lt;/span&gt;
         &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:base-directory&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.d/images/&quot;&lt;/span&gt;
         &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:base-extension&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;gif&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;jpg&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;png&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;svg&quot;&lt;/span&gt;
         &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:publishing-directory&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/src/fasciism/img/&quot;&lt;/span&gt;
         &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:publishing-function&lt;/span&gt; org-publish-attachment)
        (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;fasciism&quot;&lt;/span&gt;
         &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:components&lt;/span&gt; (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;fasciism-posts&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;fasciism-images&quot;&lt;/span&gt;))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now I can use &lt;code&gt;C-c C-e&lt;/code&gt; to access the Org Export Dispatcher to export either this post or this whole blog.
&lt;/p&gt;
</description>
        <pubDate>Sun, 10 May 2020 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2020/05/10/org-export-jekyll-backend/</link>
        <guid isPermaLink="true">http://fasciism.com/2020/05/10/org-export-jekyll-backend/</guid>
        
        
      </item>
    
      <item>
        <title>MacBook</title>
        <description>&lt;p&gt;
I have just realized tonight that I've been sitting on all kinds of posts that I thought I'd already published. Expect updates, finally!
&lt;/p&gt;

&lt;p&gt;
When I have to be away from my beloved Kinesis Advantage 2, with its glorious blank keycaps and Dvorak keymap, I find myself on one of two MacBooks for work. As many others have noted, the Caps Lock key is a pox upon keyboard everywhere, and I universally rebind it to Control:
&lt;/p&gt;


&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;http://fasciism.com/img/2020-05-09-macbook.png&quot; alt=&quot;2020-05-09-macbook.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;
My muscle memory on normal, lame keyboard also expects to find Alt (Meta) just to the left of the space bar, to I take care of that with a bit of Elisp:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; mac-command-key-is-meta t)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; mac-command-modifier 'meta)

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; mac-option-key-is-meta nil)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; mac-option-modifier nil)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Sat, 09 May 2020 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2020/05/09/macbook/</link>
        <guid isPermaLink="true">http://fasciism.com/2020/05/09/macbook/</guid>
        
        
      </item>
    
      <item>
        <title>Git Over Here</title>
        <description>&lt;p&gt;
Before we begin, I'm going to be using a lot of snippets from Git's configuration file(s). I originally used &lt;code&gt;BEGIN_EXAMPLE&lt;/code&gt; to render these as preformatted blocks, but after some research I discovered that the following code will create a new 'source language' with which we can view those snippets.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(add-to-list 'org-src-lang-modes '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;gitconfig&quot;&lt;/span&gt; . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;conf-unix&quot;&lt;/span&gt;))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I found that mode's name by opening &lt;code&gt;~/.gitconfig&lt;/code&gt; and typing &lt;code&gt;C-h v major-mode&lt;/code&gt; to view the value.
&lt;/p&gt;

&lt;p&gt;
With my new job using GitHub for its development workflow, suddenly maintaining a separate work identity in Git matters. Since we have dozens of repositories, setting my identify in each one was getting very tedious and error-prone. Git now has a feature that permits including files into its configuration based on the directory of the repository. This by having the following within my &lt;code&gt;~/.gitconfig&lt;/code&gt;:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-gitconfig&quot;&gt;[includeIf &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;gitdir/i:~/go/&quot;&lt;/span&gt;]
      &lt;span style=&quot;color: #268bd2;&quot;&gt;path&lt;/span&gt; = ~/.gitconfig.work
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Note the use of &lt;code&gt;gitdir/i&lt;/code&gt;, since I am on a Macbook which I just discovered treats path components in a case-insensitive manner, so we use this instead of &lt;code&gt;gitdir&lt;/code&gt; just in case. The contents of &lt;code&gt;~/.gitconfig.work&lt;/code&gt; are:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-gitconfig&quot;&gt;[&lt;span style=&quot;color: #b58900;&quot;&gt;user&lt;/span&gt;]
      &lt;span style=&quot;color: #268bd2;&quot;&gt;email&lt;/span&gt; = &amp;lt;my-work-email&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Additionally, there are some files that I create locally (e.g., &lt;code&gt;TAGS&lt;/code&gt;) that I do not want to be considered by Git. Adding these to each repo sucks, so I'm now taking advantage of the following in &lt;code&gt;~/.gitconfig&lt;/code&gt;, which does just what it says on the tin:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-gitconfig&quot;&gt;[&lt;span style=&quot;color: #b58900;&quot;&gt;core&lt;/span&gt;]
      &lt;span style=&quot;color: #268bd2;&quot;&gt;excludesfile&lt;/span&gt; = ~/.gitignore.global
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Finally, some of the setup scripts I've been running into try to clone private repositories from GitHub over HTTPS, requiring usernames and passwords. Since I'm a firm believer in the user of SSH keys whenever possible, but don't want to (or don't have the power to) fix all these scripts, I have found another handy Git feature that forces specified transports for certain hosts:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-gitconfig&quot;&gt;[url &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;git@github.com:&quot;&lt;/span&gt;]
      &lt;span style=&quot;color: #268bd2;&quot;&gt;insteadOf&lt;/span&gt; = https://github.com/
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Wed, 19 Jul 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/07/19/git-over-here/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/07/19/git-over-here/</guid>
        
        
      </item>
    
      <item>
        <title>Filesystem Hierarchy Standard</title>
        <description>&lt;p&gt;
As I dedicate myself to Eshell more, especially on this Macbook which violates all my muscle memory in Terminal.app, a few tweaks are needed to be able to find all my commands:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::flatten-list&lt;/span&gt; (l)
  (apply #'append l))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::locally-installed-programs&lt;/span&gt; ()
  (mak::flatten-list
   (mapcar
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; (d) (list (concat d &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/bin&quot;&lt;/span&gt;)
                      (concat d &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/sbin&quot;&lt;/span&gt;)))
    (directory-files &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/local&quot;&lt;/span&gt; t directory-files-no-dot-files-regexp))))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::generate-path-env-var&lt;/span&gt; ()
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;The order of this list is critical:&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;1) Scripts I wrote myself&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;2) Programs installed privately (source)&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;3) Programs installed privately (golang)&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;4) Programs installed system-wide&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;5) Stock OS commands&lt;/span&gt;
  (mapcar #'expand-file-name
         (mak::flatten-list
          `((&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/bin&quot;&lt;/span&gt;)
            ,(mak::locally-installed-programs)
            (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/go/bin&quot;&lt;/span&gt;)
            (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/usr/local/bin&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/usr/local/sbin&quot;&lt;/span&gt;)
            (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/usr/bin&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/usr/sbin&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/bin&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/sbin&quot;&lt;/span&gt;)))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Let's use IELM to test those functions, since we've not used it before and it's neat to see.
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
ELISP&amp;gt; (mak::flatten-list '((a) (b c) (d e f) (g (h) i)))
(a b c d e f g
   (h)
   i)

ELISP&amp;gt; (mak::locally-installed-programs)
(&quot;/Users/mak/local/emacs/bin&quot; &quot;/Users/mak/local/emacs/sbin&quot;)

ELISP&amp;gt; (mak::generate-path-env-var)
(&quot;/Users/mak/bin&quot; &quot;/Users/mak/local/emacs/bin&quot; &quot;/Users/mak/local/emacs/sbin&quot; ...)
&lt;/pre&gt;

&lt;p&gt;
You'll notice that flatten only goes one level deep. I'm okay with that for now, but I anticipate Future Me hating Present Me for this.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::set-path-env-var&lt;/span&gt; ()
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (setenv &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;PATH&quot;&lt;/span&gt;
          (string-join (mak::generate-path-env-var) &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;:&quot;&lt;/span&gt;)))

(add-hook 'eshell-mode-hook 'mak::set-path-env-var)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
And there we have it! Eshell will now generate and set the appropriate &lt;code&gt;$PATH&lt;/code&gt; variable when it starts.
&lt;/p&gt;
</description>
        <pubDate>Tue, 18 Jul 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/07/18/filesystem-hierarchy-standard/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/07/18/filesystem-hierarchy-standard/</guid>
        
        
      </item>
    
      <item>
        <title>Go Big Or Go Home</title>
        <description>&lt;p&gt;
As part of using a Macbook for my new job, I've come to dislike the behaviour of apps not taking up the full screen on startup. Coming from the land of tiling window managers, I've finally had to break down and force Emacs to be fullscreen on start. The below code ensures that the first frame created by Emacs will be maximized, while other frames will have the size the OS decides.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(add-to-list 'initial-frame-alist '(fullscreen . maximized))
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Mon, 17 Jul 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/07/17/go-big-or-go-home/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/07/17/go-big-or-go-home/</guid>
        
        
      </item>
    
      <item>
        <title>Epileptic Trees</title>
        <description>&lt;p&gt;
While I don't always have threading enabled in my email, when I do it's nice to have something pretty. So let's start by defining a seasonal symbol for the root of the tree.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::seasonal-tree&lt;/span&gt; ()
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let*&lt;/span&gt; ((month (format-time-string &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%b&quot;&lt;/span&gt;))
         (tree (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;cond&lt;/span&gt; ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Jan&quot;&lt;/span&gt;) ?&amp;#127794;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Feb&quot;&lt;/span&gt;) ?&amp;#127794;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Mar&quot;&lt;/span&gt;) ?&amp;#127793;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Apr&quot;&lt;/span&gt;) ?&amp;#127793;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;May&quot;&lt;/span&gt;) ?&amp;#127793;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Jun&quot;&lt;/span&gt;) ?&amp;#127795;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Jul&quot;&lt;/span&gt;) ?&amp;#127795;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Aug&quot;&lt;/span&gt;) ?&amp;#127795;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Sep&quot;&lt;/span&gt;) ?&amp;#127795;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Oct&quot;&lt;/span&gt;) ?&amp;#127794;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Nov&quot;&lt;/span&gt;) ?&amp;#127794;)
                     ((equal month &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Dec&quot;&lt;/span&gt;) ?&amp;#127876;))))
    (set-fontset-font t tree &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Noto Emoji&quot;&lt;/span&gt; nil 'prepend)
    tree))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
We've used the same trick here as for the Eshell prompt. While this has worked so far, at some point we'll have to declare that the entire range of emoji should be rendered using the Noto Emoji font.
&lt;/p&gt;

&lt;p&gt;
Now we declare the symbols used to create the tree.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq-default&lt;/span&gt; gnus-sum-thread-tree-false-root (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%c &quot;&lt;/span&gt; (mak::seasonal-tree))
              gnus-sum-thread-tree-root       (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%c &quot;&lt;/span&gt; (mak::seasonal-tree))
              gnus-sum-thread-tree-indent          &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot; &quot;&lt;/span&gt;
              gnus-sum-thread-tree-vertical        &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&amp;#9474;&quot;&lt;/span&gt;
              gnus-sum-thread-tree-leaf-with-other &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&amp;#9500;&amp;#9658; &quot;&lt;/span&gt;
              gnus-sum-thread-tree-single-leaf     &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&amp;#9584;&amp;#9658; &quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
One thing that I hadn't given much thought to before now is that the threading in Gnus always seemed wrong to me. It turns out that's because it was performing threading by &lt;i&gt;subject&lt;/i&gt;, not by &lt;i&gt;reference&lt;/i&gt;. This means that when I received automated emails with the same subject, they would be grouped into a thread. We can fix this easily:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq-default&lt;/span&gt; gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This allows my email to look much more sane to me, only threading messages that are actually related, to look similar to the following, except it's more spread out in reality:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
January 10   [REDACTED]  🌱 BSidesWpg 2017
January 10   [REDACTED]  ╰►
January 10   [REDACTED]   ├►
January 15   [REDACTED]   │╰►
January 23   [REDACTED]   │ ╰►
January 23   [REDACTED]   │  ╰►
January 24   [REDACTED]   │   ├►
January 24   [REDACTED]   │   │├►
January 24   [REDACTED]   │   ││├►
January 25   [REDACTED]   │   │││╰►
January 24   [REDACTED]   │   ││╰►
January 24   [REDACTED]   │   │╰►
January 24   [REDACTED]   │   ╰►
January 10   [REDACTED]   ╰►
...          ...          ...
February 05  Audible.com  Thank you for shopping at Audible
February 20  Audible.com  Thank you for shopping at Audible
&lt;/pre&gt;

&lt;p&gt;
Finally, I want to force Summary buffers to be sorted by date. Specifically, any time you enter a buffer Gnus will start you at the top, so the most recent articles should be there. Additionally, if there is a thread full of older messages, and one relatively new message, I want the entire thread to be placed into the Summary buffer according to the date of the newest message.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq-default&lt;/span&gt; gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This results in the following sort, in which the thread is sorted according to its newest article (January 25), not the root of the thread (January 10):
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
January 25   [REDACTED]  [SkullSpace-Announce] ...
January 10   [REDACTED]  🌱 BSidesWpg 2017
January 10   [REDACTED]  ╰►
January 10   [REDACTED]   ├►
January 15   [REDACTED]   │╰►
January 23   [REDACTED]   │ ╰►
January 23   [REDACTED]   │  ╰►
January 24   [REDACTED]   │   ├►
January 24   [REDACTED]   │   │├►
January 24   [REDACTED]   │   ││├►
January 25   [REDACTED]   │   │││╰►
January 24   [REDACTED]   │   ││╰►
January 24   [REDACTED]   │   │╰►
January 24   [REDACTED]   │   ╰►
January 10   [REDACTED]   ╰►
January 24   [REDACTED]  [SkullSpace-Announce] ...
&lt;/pre&gt;

&lt;p&gt;
That's enough for today!
&lt;/p&gt;
</description>
        <pubDate>Fri, 07 Apr 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/04/07/epileptic-trees/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/04/07/epileptic-trees/</guid>
        
        
      </item>
    
      <item>
        <title>Flipping Tables</title>
        <description>&lt;p&gt;
The default style of the Gnus summary buffers has been bugging me, so I've changed it to something more palatable.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; gnus-user-date-format-alist
      '(((gnus-seconds-today)           . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Today&quot;&lt;/span&gt;)
        ((+ 86400 (gnus-seconds-today)) . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Yesterday&quot;&lt;/span&gt;)
        (604800                         . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%A&quot;&lt;/span&gt;)
        ((gnus-seconds-month)           . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%A %d&quot;&lt;/span&gt;)
        ((gnus-seconds-year)            . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%B %d&quot;&lt;/span&gt;)
        (t                              . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%Y-%m-%d&quot;&lt;/span&gt;)))

&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;U: Unread indicator&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;R: Mark&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;z: Indicates +/- for above/below default score&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;f: Sender&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;B: Tree display&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;s: Subject if root of thread or different from root&lt;/span&gt;
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; gnus-summary-line-format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%U%R%z  %-17,17&amp;amp;user-date;  %-40,40f %B%s\n&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Thu, 06 Apr 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/04/06/flipping-tables/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/04/06/flipping-tables/</guid>
        
        
      </item>
    
      <item>
        <title>Back In The Saddle</title>
        <description>&lt;p&gt;
Sorry for the lull. The last month has been particularly distracting. One thing that has been bugging me over the last month, during which I lived in email a lot, is the inconsistency in presentation between my personal mail and my Gmail caused by not having them both declared in &lt;code&gt;gnus-secondary-select-methods&lt;/code&gt;. So let's fix this without re-declaring the configuration of my personal mail.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; gnus-secondary-select-methods
      (cons gnus-select-method
            gnus-secondary-select-methods))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
A minor change, but now all of my mail folders are properly prefixed with the &lt;code&gt;nnimap+&amp;lt;name&amp;gt;&lt;/code&gt; specifier, instead of only the Gmail folders appearing that way. We also need to unset the primary select method, otherwise having the same server specified twice could get confusing. We do this using the &lt;code&gt;nnnil&lt;/code&gt; backend which acts as a dummy.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; gnus-select-method '(nnnil &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&quot;&lt;/span&gt;))
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Wed, 05 Apr 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/04/05/back-in-the-saddle/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/04/05/back-in-the-saddle/</guid>
        
        
      </item>
    
      <item>
        <title>Implausibility Of Gnus</title>
        <description>&lt;p&gt;
I tend to ignore my Gmail account since I only use it for Google/Android-related things. I should probably pay more attention to it, and so I've decided to add it to my Gnus setup. Whether this is a good idea, or whether it would be preferable to instead forward all email from Gmail to my personal mail server is a problem for Future Me. That guy can handle anything.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(add-to-list 'gnus-secondary-select-methods
             '(nnimap &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;gmail&quot;&lt;/span&gt;
                      (nnimap-address &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;imap.gmail.com&quot;&lt;/span&gt;)
                      (nnimap-server-port &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;imaps&quot;&lt;/span&gt;)
                      (nnimap-stream ssl)
                      (nnmail-expiry-target &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;nnimap+gmail:[Gmail]/Trash&quot;&lt;/span&gt;)
                      (nnmail-expiry-wait immediate)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This configuration didn't work for me at first, constantly giving me an authentication error, despite copying-and-pasting my password from my password manager. It turns out that due to my use of two-factor authentication, I needed to create an application-specific password for Gnus to access Gmail. Slightly annoying, but I still highly recommend password managers and two-factor authentication.
&lt;/p&gt;

&lt;p&gt;
I don't have a need to send anything from Gmail, yet, so we'll stick with IMAP for now.
&lt;/p&gt;

&lt;p&gt;
Also, collective nouns amuse me.
&lt;/p&gt;
</description>
        <pubDate>Sat, 04 Mar 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/03/04/implausibility-of-gnus/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/03/04/implausibility-of-gnus/</guid>
        
        
      </item>
    
      <item>
        <title>Misery Loves Company</title>
        <description>&lt;p&gt;
Now that I've been using Gnus for all my personal email, I've been using Message mode a lot. One thing I need to do very frequently is CC or BCC people or groups. For example, I run a few non-profits and frequently have to CC the &lt;code&gt;organizers@&lt;/code&gt; list for our group with any email representing the non-profit to keep the other directors informed. While Message mode is awesome because I can simply type in the names of new headers, I would find it slightly more convenient of the headers I commonly use were already there. And if there's one thing Emacs is about, it's making things slightly more convenient:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; message-default-mail-headers &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Cc: \nBcc: \n&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I also run my own mail server for my extended family since I've gotten &lt;code&gt;kolybabi.com&lt;/code&gt; for us. This means that if anything goes wrong with the server, I need to hear about it. So I'll enable debugging on sending mail.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; smtpmail-debug-info t)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Fri, 03 Mar 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/03/03/misery-loves-company/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/03/03/misery-loves-company/</guid>
        
        
      </item>
    
      <item>
        <title>Colour Eshell Prompt</title>
        <description>&lt;p&gt;
I had never considered before today how to change the colour of some text. I had messed with applying faces to fonts before when making major modes, but I had never looked into styling a specific string. It turns out to be easy:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(propertize STRING &amp;amp;rest PROPERTIES)&lt;br  /&gt;
&lt;br  /&gt;
Return a copy of STRING with text properties added.&lt;br  /&gt;
First argument is the string to copy.&lt;br  /&gt;
Remaining arguments form a sequence of PROPERTY VALUE pairs for text properties to add to the result.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
We could leave &lt;code&gt;mak::last-command-status&lt;/code&gt; alone, and then advise the function to manipulate its output, but that will inevitably confuse me some day when I am debugging something. So we'll just add a simple &lt;code&gt;propertize&lt;/code&gt; call to make the exit code of a command even more visible:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::last-command-status&lt;/span&gt; ()
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((c eshell-last-command-status))
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;when&lt;/span&gt; (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;and&lt;/span&gt; c (not (eq 0 c)))
      (propertize (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;?%d &quot;&lt;/span&gt; c) 'face '(&lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:foreground&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;red&quot;&lt;/span&gt;)))))
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Thu, 02 Mar 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/03/02/colour-eshell-prompt/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/03/02/colour-eshell-prompt/</guid>
        
        
      </item>
    
      <item>
        <title>Gnus Kill Files</title>
        <description>&lt;p&gt;
Gnus uses newsgroups as its central metaphor. As an individual that never really experienced newsgroups, for which I am sad, some concepts are a little foreign to me. One concept is that of a kill file.
&lt;/p&gt;

&lt;p&gt;
Newsgroups were in some sense a shared mailbox, or an RSS feed of emails, arranged in a hierarchy. Individuals could 'subscribe' to a group by telling their newsreader to pull down the current 'feed' and storing the new posts to the local computer. There was a lot more to this, including only downloading headers, propagation between servers, and varying retention periods between servers. The aspect of these oldschool newsgroups that I care about today are kill files.
&lt;/p&gt;

&lt;p&gt;
A newsreader's kill file instructed it to kill (delete/ignore) certain messages in newsgroups. This was done to filter out topics of which the user had no interest, and to mute users considered abusive or annoying. Gnus supports kill files, but they are deprecated. In my case, my mail server adds &lt;code&gt;X-Spam-Status&lt;/code&gt; as a header to all incoming email. Deleting email that my mail server has determined is spam is a classic use of a kill file:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;gnus-kill&lt;/span&gt;)
(gnus-kill &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;X-Spam-Status&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Yes&quot;&lt;/span&gt;)
(gnus-expunge &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;X&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This example doesn't make much sense without reading the documentation of the two commands:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(gnus-kill FIELD REGEXP &amp;amp;optional EXE-COMMAND ALL SILENT)&lt;br  /&gt;
&lt;br  /&gt;
If FIELD of an article matches REGEXP, execute COMMAND.&lt;br  /&gt;
&lt;br  /&gt;
Optional 1st argument COMMAND is default (gnus-summary-mark-as-read nil &quot;X&quot;).&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
So this means that since we did not pass an &lt;code&gt;EXE-COMMAND&lt;/code&gt; argument, the messages were set as read and marked with an &lt;code&gt;X&lt;/code&gt;.
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(gnus-expunge MARKS)&lt;br  /&gt;
&lt;br  /&gt;
Remove lines marked with MARKS.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
And this means that the &lt;code&gt;X&lt;/code&gt;-marked messages are deleted.
&lt;/p&gt;

&lt;p&gt;
Now that we understand kill files, it's time for the punchline: We're not going to use them. The reason is that Gnus has a more modern facility that is recommended by the manual:
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;
In short, kill processing is a lot slower (and I do mean a lot) than score processing, so it might be a good idea to rewrite your kill files into score files.
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;
So I'm working on getting my Gnus to work with score files. But I'm saving that for another day.
&lt;/p&gt;
</description>
        <pubDate>Wed, 01 Mar 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/03/01/gnus-kill-files/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/03/01/gnus-kill-files/</guid>
        
        
      </item>
    
      <item>
        <title>New Business</title>
        <description>&lt;p&gt;
Let's finish off February with something I'm trying to make a part of my life: workflows. You can call them checklists, but I'm going to stick with the more generic term of workflow since I don't want to narrow how I think about their usage. The majority of tasks in my life are repetitive. What I want is a simple way of writing an Org-mode file, dropping it a specific directory, and being able to create an instance of that template that Org will operate on.
&lt;/p&gt;

&lt;p&gt;
Let's start by creating the workflow template instantiation function, and binding it to my Org-mode keymap:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defvar&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;org-workflow-dir&lt;/span&gt;
  (concat org-directory &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/workflows&quot;&lt;/span&gt;)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Directory in which my workflows are stored.&quot;&lt;/span&gt;)

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::org-new-workflow&lt;/span&gt; (template)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;
   &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Choose a workflow template.&lt;/span&gt;
   (list (read-file-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Workflow: &quot;&lt;/span&gt; (concat org-workflow-dir &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/templates/&quot;&lt;/span&gt;))))
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Generate the template's file name.&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let*&lt;/span&gt; ((datetime (format-time-string &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%F::%T&quot;&lt;/span&gt;))
         (filename (file-name-nondirectory template))
         (workflow (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%s/active/%s::%s&quot;&lt;/span&gt; org-workflow-dir datetime filename)))
    (copy-file template workflow)
    (find-file workflow)))

(define-key mak::org-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;w&quot;&lt;/span&gt;) 'mak::org-new-workflow)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now when I chord &lt;code&gt;C-c o w&lt;/code&gt;, I will be able to choose a workflow template with Helm, and a new file matching the current date and time, suffixed with the template's file name, will be created, 'activated', and opened in a buffer. By activated, I mean that the template will exposed to Org-mode's Agenda. An example file name is &lt;code&gt;2017-02-28::01:06:33::month-end.org&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;
We need to make Agenda aware of where the Org-mode files I want it to use are kept. For now I will include &lt;span class=&quot;underline&quot;&gt;all&lt;/span&gt; files in my &lt;code&gt;~/org&lt;/code&gt; directory, since there is no reason to do otherwise. I suspect that I will eventually reach a point where the number of files Org is processing will require me to archive some files, but I'm not there yet. And when I do reach that point, creating a way to archive a file to &lt;code&gt;~/org/workflows/archive&lt;/code&gt; should be easy.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; org-agenda-files
      (list org-directory
            (concat org-workflow-dir &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/active&quot;&lt;/span&gt;)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Finally, I want to create two Agenda views: calendar and tasks.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::org-agenda-calendar&lt;/span&gt; (&lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; arg)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;P&quot;&lt;/span&gt;)
  (org-agenda arg &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;a&quot;&lt;/span&gt;))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::org-agenda-tasks&lt;/span&gt; (&lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; arg)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;P&quot;&lt;/span&gt;)
  (org-agenda arg &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;t&quot;&lt;/span&gt;))

(define-key mak::org-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;a&quot;&lt;/span&gt;) 'mak::org-agenda-calendar)
(define-key mak::org-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;t&quot;&lt;/span&gt;) 'mak::org-agenda-tasks)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
As usual, there's more to do here, but the perfect is the enemy of the good. This is usable, and does what I need for now.
&lt;/p&gt;
</description>
        <pubDate>Tue, 28 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/28/new-business/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/28/new-business/</guid>
        
        
      </item>
    
      <item>
        <title>Failure To Launch</title>
        <description>&lt;p&gt;
I have recently come across a useful addition for my Eshell prompt. I have a love of a simple prompt, but one thing I think it is worthwhile to add is a warning when the previous command exited with a non-zero exit status.
&lt;/p&gt;

&lt;p&gt;
This will be the first time we replace the definition of a function. Thanks to Lisp being great, this is effortless.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;;;&lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;(require 'esh-io)&lt;/span&gt;
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::last-command-status&lt;/span&gt; ()
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((c eshell-last-command-status))
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;when&lt;/span&gt; (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;and&lt;/span&gt; c (not (eq 0 c)))
      (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;?%d &quot;&lt;/span&gt; c))))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::eshell-prompt&lt;/span&gt; ()
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (concat (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (not (eq 0 (current-column)))
              &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\n&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&quot;&lt;/span&gt;)
          (mak::last-command-status)
          (mak::ghost-or-percent)
          &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot; &quot;&lt;/span&gt;))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Then we update the prompt regex to match our new prompt format:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; eshell-prompt-regexp (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;^\(?[0-9]+ \)\?%s &quot;&lt;/span&gt; (mak::ghost-or-percent)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
And take the new prompt for a spin.
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
👻 false
?1 👻 false
?1 👻 true
👻 true
👻 false
?1 👻 true
👻
&lt;/pre&gt;

&lt;p&gt;
There we go. I don't need the current directory in the prompt, because I can find that in a heartbeat. I don't need the current Git branch in the prompt, because I do everything with Magit. This will be useful in that while I can find the information if I need, checking the exit status is something I never think to do.
&lt;/p&gt;

&lt;p&gt;
One glitch that testing revealed is that if I run a command that exits with a non-zero status, kill the Eshell buffer, and create a new Eshell buffer, the prompt will be &lt;code&gt;?1 👻&lt;/code&gt;. This indicates that Eshell does not clear the &lt;code&gt;eshell-last-command-status&lt;/code&gt; variable on initialization. I'm not going to fix this in my code, because I feel like it should be fixed in Eshell. Maybe I'll submit a bug report for it when I have some free time.
&lt;/p&gt;
</description>
        <pubDate>Mon, 27 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/27/failure-to-launch/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/27/failure-to-launch/</guid>
        
        
      </item>
    
      <item>
        <title>Bird By Bird</title>
        <description>&lt;p&gt;
Continuing with my plan to make 2017 the Year of Structure, I need to start using Org-mode beyond this blog. I've been chasing the perfect Org-mode setup, putting off using it until I've designed my system fully. That's dumb, I'm dumb, time to get started. As Anne Lamot teaches, I need to embrace &quot;Shitty First Drafts&quot;.
&lt;/p&gt;

&lt;p&gt;
I'm going to make &lt;code&gt;~/org&lt;/code&gt; the base directory for all my Org-mode usage. I realize that this is the default value, but I find comfort in being explicit at this point.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; org-directory &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/org&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
The next thing I want to do is make a keymap. Many people seem to give Org-mode features top level keybindings such as &lt;code&gt;C-c c&lt;/code&gt; for capturing. I don't feel the need to do that (yet?), so I've decided to use a keymap bound to &lt;code&gt;C-c o&lt;/code&gt;. I could bind things globally without using a keymap, but the keymap feels like the right choice.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; mak::org-mode-map (make-sparse-keymap))
(global-set-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-c o&quot;&lt;/span&gt;) mak::org-mode-map)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I feel like the obvious first feature to set up is Capture. Org-mode's capture facility pops up a buffer in which I can choose a (user-defined) template, and then fill in whatever I want captured. I can then chord &lt;code&gt;C-c C-c&lt;/code&gt;, the general &quot;do what I mean&quot; command in Org-mode, and the information I've input will be whisked away and saved safely, returning me to whatever I was doing.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(define-key mak::org-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;c&quot;&lt;/span&gt;) 'org-capture)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I currently have a system that I've been using for a year or two where I send myself emails such as &lt;code&gt;mak+capture@kolybabi.com&lt;/code&gt; and then manage my captures/todos as a series of email messages. While I don't have a system to properly manage those emails in my current configuration, I plan to keep that capture method and integrate Gnus and Org-mode to make it work.
&lt;/p&gt;

&lt;p&gt;
For the saving of these captures, I'd like the file to be named less generically than the default of &lt;code&gt;notes.org&lt;/code&gt;:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; org-default-notes-file (concat org-directory &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/capture.org&quot;&lt;/span&gt;))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
When chording &lt;code&gt;C-c o c&lt;/code&gt; from this blog post, I now see a buffer with the following:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
Select a capture template
=========================

[t]     Task
---------------------------------------
[C]     Customize org-capture templates
[q]     Abort
&lt;/pre&gt;

&lt;p&gt;
And after hitting &lt;code&gt;t&lt;/code&gt; to create a generic task, I get the following in a temporary buffer:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
** TODO
   [2017-02-26 Sun]
   [[file:~/.emacs.d/2017-02-26-bird-by-bird.org]]
&lt;/pre&gt;

&lt;p&gt;
Now I have a way to effortlessly capture when I'm in Emacs, but not elsewhere. So there we go, I've started using Org-mode in earnest. Time to figure out what &lt;span class=&quot;underline&quot;&gt;doesn't&lt;/span&gt; work for me, and fix that. How long could that process &lt;span class=&quot;underline&quot;&gt;possibly&lt;/span&gt; take&amp;#x2026;?
&lt;/p&gt;
</description>
        <pubDate>Sun, 26 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/26/bird-by-bird/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/26/bird-by-bird/</guid>
        
        
      </item>
    
      <item>
        <title>Company Capital</title>
        <description>&lt;p&gt;
One day into using Company and I admit that I'm enjoying it a great deal. One issue that hit me in the first day was that configuration files had completion suggestions, but capitalization of keywords was not being maintained. It turns out that Company maintains a list of modes in which it should preserve capitalization. So if you spend your days fiddling with configuration files, like I do, the following tweak is required:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;company-dabbrev-code&lt;/span&gt;)
(add-to-list 'company-dabbrev-code-modes 'conf-mode)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I suspect I'll find more modes to add to &lt;code&gt;company-dabbrev-code-modes&lt;/code&gt; over time.
&lt;/p&gt;
</description>
        <pubDate>Sat, 25 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/25/company-capital/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/25/company-capital/</guid>
        
        
      </item>
    
      <item>
        <title>Had Me At Hello</title>
        <description>&lt;p&gt;
I've wanted to try Company-Mode for a while, so I enabled it today. It's one of the rare packages available in ELPA as opposed to MELPA. Company is a completion framework that offers a popup list after a delay (or immediately when called) in the current buffer.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;company&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; elpa
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:diminish&lt;/span&gt; company-mode
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (add-hook 'after-init-hook 'global-company-mode))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
That's all the configuration it needs to start. From this point on I'll have popups whenever there are several options for a prefix that I've typed, or a dim suffix inline.
&lt;/p&gt;
</description>
        <pubDate>Fri, 24 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/24/had-me-at-hello/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/24/had-me-at-hello/</guid>
        
        
      </item>
    
      <item>
        <title>Lead Bullets</title>
        <description>&lt;p&gt;
I'm punting it today due to time constraints. Here's a short bit of Org-mode configuration that I've seen other places and have adopted.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;org-bullets&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (add-hook 'org-mode-hook (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; ()
                             (org-bullets-mode 1))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This package changes the bullets used by Org-mode to make them visibly different at different levels. I've kept the default set of bullets provided by the package for the moment, but that may change as I start to use Org-mode more heavily.
&lt;/p&gt;

&lt;p&gt;
Another important change is telling Org-mode to hide leading bullets in headers so that you don't see five bullets prefixing a fifth-level header:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; org-hide-leading-stars t)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
It's important to note that even with these changes, the actual text representation of the heading doesn't change: the file still has the same asterisks as always underneath it all. This is especially important for me, since I frequently write parts of emails in Org-mode, and then copy-and-paste them into O365. For now, at least. In the end, these configuration changes result in the following styling:
&lt;/p&gt;


&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;http://fasciism.com/img/2017-02-23-lead-bullets.png&quot; alt=&quot;2017-02-23-lead-bullets.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;
</description>
        <pubDate>Thu, 23 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/23/lead-bullets/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/23/lead-bullets/</guid>
        
        
      </item>
    
      <item>
        <title>Gnusfeeds</title>
        <description>&lt;p&gt;
I have used Newsbeuter happily for many years, since it is the Mutt of feed readers, and I love Mutt. However, in moving my life to Emacs I looked at some Emacs feed readers. I discovered Elfeed, and enjoyed it for a while. I've also attempted to use the RSS feed reader built into Gnus (via &lt;code&gt;G R&lt;/code&gt;), but I really didn't like that. So I'm currently using Gwene as an NNTP source for Gnus. Gwene translates RSS and Atom feeds on the Internet into Newsgroups. This lowers the burden on individual sites, and has the benefit of not disclosing your IP to the sites.
&lt;/p&gt;

&lt;p&gt;
Setting up Gwene was really easy:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;gnus&lt;/span&gt;)
(add-to-list 'gnus-secondary-select-methods '(nntp &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;news.gwene.org&quot;&lt;/span&gt;))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Once that configuration is in place, I reloaded Gnus by quitting it and re-entering it for good measure. Then I hit &lt;code&gt;^&lt;/code&gt; (&lt;code&gt;gnus-group-enter-server-mode&lt;/code&gt;) which brought up the server buffer:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
{nnfolder:archive} (opened)&lt;br  /&gt;
{nndraft:} (opened)&lt;br  /&gt;
{nntp:news.gwene.org} (opened)&lt;br  /&gt;
{nnimap:kolybabi} (opened)&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
By hitting &lt;code&gt;&amp;lt;enter&amp;gt;&lt;/code&gt; on &lt;code&gt;nntp:news.gwene.org&lt;/code&gt; I can browse the list of newsgroups available on the server, and to toggle subscribing I can hit &lt;code&gt;u&lt;/code&gt; (&lt;code&gt;gnus-group-unsubscribe-group&lt;/code&gt;):
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(gnus-group-unsubscribe-group GROUP &amp;amp;optional LEVEL SILENT)&lt;br  /&gt;
&lt;br  /&gt;
Toggle subscription to GROUP.&lt;br  /&gt;
Killed newsgroups are subscribed. If SILENT, don’t try to update the group line.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
These are the newsgroups to which I am currently subscribed:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
nntp+news.gwene.org:gmane.comp.security.langsec&lt;br  /&gt;
nntp+news.gwene.org:gmane.comp.security.nmap.devel&lt;br  /&gt;
nntp+news.gwene.org:gmane.comp.security.nmap.general&lt;br  /&gt;
nntp+news.gwene.org:gmane.org.hackerspaces.skullspace.announce&lt;br  /&gt;
nntp+news.gwene.org:gmane.org.hackerspaces.skullspace.general&lt;br  /&gt;
nntp+news.gwene.org:gwene.com.blogspot.lcamtuf&lt;br  /&gt;
nntp+news.gwene.org:gwene.com.cryptography.engineering.blog&lt;br  /&gt;
nntp+news.gwene.org:gwene.com.devttys0&lt;br  /&gt;
nntp+news.gwene.org:gwene.com.fasciism&lt;br  /&gt;
nntp+news.gwene.org:gwene.electronics.bunniestudios.blog&lt;br  /&gt;
nntp+news.gwene.org:gwene.net.boingboing&lt;br  /&gt;
nntp+news.gwene.org:gwene.net.might.matt.articles&lt;br  /&gt;
nntp+news.gwene.org:gwene.net.music4program&lt;br  /&gt;
nntp+news.gwene.org:gwene.org.chneukirchen.blog&lt;br  /&gt;
nntp+news.gwene.org:gwene.org.chneukirchen.trivium.index&lt;br  /&gt;
nntp+news.gwene.org:gwene.org.emacsen.planet&lt;br  /&gt;
nntp+news.gwene.org:gwene.org.jwz.blog&lt;br  /&gt;
&lt;/p&gt;
</description>
        <pubDate>Wed, 22 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/22/gnusfeeds/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/22/gnusfeeds/</guid>
        
        
      </item>
    
      <item>
        <title>Gnus Scale</title>
        <description>&lt;p&gt;
One thing that started bugging me immediately upon using Gnus was the prompt for how many messages I wanted to load from my inbox when it had more than 200 messages in it. It turns out that this behaviour is controlled by &lt;code&gt;gnus-large-newsgroup&lt;/code&gt;, described as:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
The number of articles which indicates a large newsgroup.&lt;br  /&gt;
&lt;br  /&gt;
If the number of articles in a newsgroup is greater than this value, confirmation is required for selecting the newsgroup.&lt;br  /&gt;
&lt;br  /&gt;
If it is nil, no confirmation is required.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
So let's stop this right now:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; gnus-large-newsgroup nil)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now I feel less like Gnus is judging me for the size of my inbox.
&lt;/p&gt;
</description>
        <pubDate>Tue, 21 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/21/gnus-scale/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/21/gnus-scale/</guid>
        
        
      </item>
    
      <item>
        <title>Gnus Sounds Like News</title>
        <description>&lt;p&gt;
I literally &lt;i&gt;just&lt;/i&gt; got the joke of the name while writing this entry. Sometimes I'm a little late to the party.
&lt;/p&gt;

&lt;p&gt;
Anyways, Gnus is one of the many email and news readers available in Emacs. While others are reputed to be much more sane, straightforward, and easy to configure, I've been planning to switch from Mutt to Gnus for many years now. Some of the people whose opinions I respect espouse Gnus, so I'm going to try to live with it. Fingers crossed!
&lt;/p&gt;

&lt;p&gt;
The first and most obvious thing that we want to do with a newsreader is define my identity. While I have a few identities I'd like to use with Gnus, my primary one is:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; user-mail-address &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;mak@kolybabi.com&quot;&lt;/span&gt;
      user-full-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Mak Kolybabi&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
And with that, I realize that this is the first time I've named myself. &lt;a href=&quot;http://mogigoma.com/&quot;&gt;Hi, I'm Mak!&lt;/a&gt; I like long walks and configurable systems. Next we need to tell the system how to send email.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; send-mail-function 'smtpmail-send-it
      smtpmail-smtp-server &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;mail.kolybabi.com&quot;&lt;/span&gt;
      smtpmail-stream-type 'starttls
      smtpmail-smtp-service 587)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now that we can send email, it is critical for me to not be able to &lt;i&gt;easily&lt;/i&gt; send mail accidentally. I'm the kind of person that has his IRSSI (IRC client) configured to require I hold &lt;code&gt;M-Enter&lt;/code&gt; to send, for safety. Let's require a confirmation before sending an email:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; message-confirm-send t)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
We can test sending an email with &lt;code&gt;C-x m&lt;/code&gt;, which opens a buffer populated with the fields of an email. Once that test has confirmed that I can send email, I'll configure the reading of email.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; gnus-select-method
      '(nnimap &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;kolybabi&quot;&lt;/span&gt;
               (nnimap-address &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;mail.kolybabi.com&quot;&lt;/span&gt;)
               (nnimap-server-port &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;imaps&quot;&lt;/span&gt;)
               (nnimap-stream ssl)
               (nnmail-expiry-target &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;nnimap+kolybabi:trash&quot;&lt;/span&gt;)
               (nnmail-expiry-wait immediate)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
The credentials to log into SMTP and IMAP are stored in a separate file, &lt;code&gt;~/.authinfo&lt;/code&gt;, and look like this:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
machine mail.kolybabi.com login mak.kolybabi password hunter2 port imaps
machine mail.kolybabi.com login mak.kolybabi password hunter2 port 587
&lt;/pre&gt;

&lt;p&gt;
Don't fret, my password isn't really &lt;a href=&quot;http://bash.org/?244321&quot;&gt;hunter2&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
In retrospect, that wasn't much to configure at all. I'm sure there will be much more tweaking later, especially since I'd like to add certificate pinning for my mail server for additional protection, and move my credentials into &lt;code&gt;~/.authinfo.gpg&lt;/code&gt;. But for now, this setup is &lt;i&gt;functional&lt;/i&gt;, even if it's not yet &lt;i&gt;comfortable&lt;/i&gt;.
&lt;/p&gt;
</description>
        <pubDate>Mon, 20 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/20/gnus-sounds-like-news/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/20/gnus-sounds-like-news/</guid>
        
        
      </item>
    
      <item>
        <title>Jump Around</title>
        <description>&lt;p&gt;
Another package that I've installed in the past but rarely used was Ace-Jump-Mode. The problem is that I never found a good keybinding for it, and so I rarely remembered to use it. Since Avy has carried on where Ace-Jump-Mode left off, I'm using it instead:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;avy&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:bind&lt;/span&gt;
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;M-`&quot;&lt;/span&gt; . avy-goto-char-2)
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (avy-setup-default)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; avy-keys '(?e ?t ?u ?h ?o ?n ?i ?d)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
&lt;a href=&quot;http://emacsrocks.com/e10.html&quot;&gt;Emacs Rocks&lt;/a&gt; has a great introduction to the idea of Avy, although it talks about Ace-Jump-Mode specifically. One important thing about Avy is that it defaults to Qwerty home row shortcuts for the candidates, but I prefer Dvorak home row shortcuts. This is easily remedied by altering &lt;code&gt;avy-keys&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;
I spent some time using &lt;code&gt;avy-goto-char&lt;/code&gt; at first, but quickly changed to &lt;code&gt;avy-goto-char-2&lt;/code&gt;. The problem is that if you only use one character, then there are many, many choices. You then have to look at what Avy has named the candidate your were intending, then read and type two letters. I found it much better to start by reading two characters and then typing them, then (usually) only having to read and type another character to indicate the selection. YMMV.
&lt;/p&gt;
</description>
        <pubDate>Sun, 19 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/19/jump-around/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/19/jump-around/</guid>
        
        
      </item>
    
      <item>
        <title>Dired Subdirs</title>
        <description>&lt;p&gt;
I've found that the presence of certain files and directories in Dired buffers is annoying. I spent some time considering adding the ability for certain directories to use my Dired limiting, but found &lt;code&gt;dired-omit-mode&lt;/code&gt; instead:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;dired-x&lt;/span&gt;)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; mak::dired-omit-files
      '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;^\\.$&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;^\\.\\.$&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;^\\.git$&quot;&lt;/span&gt;))
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; dired-omit-files
      (mapconcat #'identity mak::dired-omit-files &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&lt;/span&gt;))
(add-hook 'dired-mode-hook (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; () (dired-omit-mode)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Dired omit mode prevents a number of files and directories from being shown by default in Dired. These include revision control directories (e.g., &lt;code&gt;CVS&lt;/code&gt;, &lt;code&gt;.git&lt;/code&gt;, &lt;code&gt;.svn&lt;/code&gt;) and derived files (e.g., &lt;code&gt;.elc&lt;/code&gt;, &lt;code&gt;.o&lt;/code&gt;). The mode can be disabled in cases where viewing the omitted entries is desirable.
&lt;/p&gt;

&lt;p&gt;
I have also been finding useful the ability to include a subdirectory in the view of its parent. What I've been frustrated by is the inconvenience of its default keybinding: &lt;code&gt;$&lt;/code&gt;. I've bound this to &lt;code&gt;&amp;lt;tab&amp;gt;&lt;/code&gt; to make it feel more like Org-mode.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(define-key dired-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&amp;lt;tab&amp;gt;&quot;&lt;/span&gt;) 'dired-hide-subdir)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Sat, 18 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/18/dired-subdirs/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/18/dired-subdirs/</guid>
        
        
      </item>
    
      <item>
        <title>Bull And Bear</title>
        <description>&lt;p&gt;
It's amazing how choosing the right keybinding for a feature can change your opinion of that feature. I've thought Expand-Region was neat for a long time, and it has been in my configuration at various points, but I've never used it on a regular basis, until now.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;expand-region&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:bind&lt;/span&gt;
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-&amp;lt;prior&amp;gt;&quot;&lt;/span&gt; . er/expand-region)
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-&amp;lt;next&amp;gt;&quot;&lt;/span&gt; . er/contract-region))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
On both my laptop keyboard and my Kinesis Advantage, the &lt;code&gt;Page Up&lt;/code&gt; and &lt;code&gt;Page Down&lt;/code&gt; keys are very accessible. At the time of me writing this, I have used &lt;code&gt;er/expand-region&lt;/code&gt; over 400 times in the last two weeks, which I'd estimate is an order of magnitude more than the entire time before that.
&lt;/p&gt;

&lt;p&gt;
Here's the great &lt;a href=&quot;http://emacsrocks.com/e09.html&quot;&gt;Emacs Rocks&lt;/a&gt; video demonstrating Expand-Region.
&lt;/p&gt;
</description>
        <pubDate>Fri, 17 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/17/bull-and-bear/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/17/bull-and-bear/</guid>
        
        
      </item>
    
      <item>
        <title>Quantified Self</title>
        <description>&lt;p&gt;
One thing I've always liked about the Windows Add/Remove Programs interface is that it provides you a date that the installed program was last used. When paring down the number of programs on a Windows computer, that date is helpful to gauge whether a program is useful enough to keep around. Since the number of Emacs packages tends to sprawl over time, I have installed the Keyfreq package to track the commands I use:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;keyfreq&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:init&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; keyfreq-file &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.p/keyfreq/statistics&quot;&lt;/span&gt;
        keyfreq-file-lock &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.p/keyfreq/lockfile&quot;&lt;/span&gt;)
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (keyfreq-mode 1)
  (keyfreq-autosave-mode 1))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
When I first installed this package, I didn't honestly think it would be that useful. But since installing it, I have used its output to appreciate how much my usage of certain commands is changing.
&lt;/p&gt;
</description>
        <pubDate>Thu, 16 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/16/quantified-self/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/16/quantified-self/</guid>
        
        
      </item>
    
      <item>
        <title>Dired Limiting</title>
        <description>&lt;p&gt;
For me, a great feature of Emacs is narrowing, and a indispensable feature of Gnus is limiting. I'd like to have the same feature, or a close approximation with similar bindings, in Dired. I've waited this long to implement it because I wanted to have a stack just like Gnus.
&lt;/p&gt;

&lt;p&gt;
First, we need to create a buffer-local variable to represent the stack of limits that have been applied.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(add-hook 'dired-mode-hook
          (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; ()
            (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defvar-local&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::dired-limit-stack&lt;/span&gt; nil)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Next, we create a macro. I've never made a macro before, but it seems to work. The reason I have made it is that Undo-Tree provides two useful functions: &lt;code&gt;undo-tree-save-to-register&lt;/code&gt; and &lt;code&gt;undo-tree-restore-state-from-register&lt;/code&gt;. Registers are extremely useful, and are global, so I don't want my code to clobber any of their values. So I have made the &lt;code&gt;with-register&lt;/code&gt; macro that permits me to borrow a register for the duration of the sexp.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defmacro&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;with-register&lt;/span&gt; (register &lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;rest&lt;/span&gt; body)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Execute the forms in body without allowing contents of register to change.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((original (gensym))
        (result (gensym)))
    `(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((,result nil))
       (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; ,original (get-register ,register))
       (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; ,result (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;progn&lt;/span&gt; ,@body))
       (set-register ,register ,original)
       ,result)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Since this is the first register I've ever made, there are a few things I'd like to discuss. Macros generate code, and so it is bad form to use static variable names anywhere in the generated code. The solution for this is &lt;code&gt;gensym&lt;/code&gt;:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(gensym &amp;amp;optional PREFIX)&lt;br  /&gt;
&lt;br  /&gt;
Generate a new uninterned symbol.&lt;br  /&gt;
The name is made by appending a number to PREFIX, default &quot;G&quot;.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
If you're a Lisp enthusiast, I recommend you go read about &lt;code&gt;gensym&lt;/code&gt; alternatives like fexpr and hygienic macros, which are much fancier than what we're doing here. Another odd thing we're doing here is saving the result of evaluating the &lt;code&gt;body&lt;/code&gt;, this is because this macro could conceivably used in some way that depends on its value, so to avoid surprises we have made that possible. Finally, we used the backquote syntax, and its children comma and splice. When generating code, especially with &lt;code&gt;gensym&lt;/code&gt;, you need to have control over evaluation to allow you to determine how many levels of dereferencing you're using. This is done by using the backquote, preventing evaluation of the sexp to which it is applied. You'll notice that after the initial &lt;code&gt;let&lt;/code&gt; establishing our dynamically-generated symbol names, we never again use &lt;code&gt;original&lt;/code&gt; or &lt;code&gt;result&lt;/code&gt; without a comma to give it a dereference. This ensures that the code we're generating doesn't contain the name &lt;code&gt;result&lt;/code&gt; or &lt;code&gt;original&lt;/code&gt;, but instead the &lt;code&gt;G&lt;/code&gt;-prefixed symbol name. Last of all, the =,@= splice notation unpacks the list, promoting all its elements to the level at which the =,@= was called.
&lt;/p&gt;

&lt;p&gt;
That was a lot of words, so here's an example:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(macroexpand
  '(with-register ?a
     (set-register ?a &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Monkeys&quot;&lt;/span&gt;)
     (message (get-register ?a))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Executing the &lt;code&gt;macroexpand&lt;/code&gt; above generates the following code, which has been reformatted for readability:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((G177 nil))
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; G176 (get-register 97))
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; G177 (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;progn&lt;/span&gt;
               (set-register 97 &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Monkeys&quot;&lt;/span&gt;)
               (message ...)))
  (set-register 97 G176)
  G177)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Looks good! Next, we need to create the function that applies a new limit. This function must save the current buffer state to the stack, and then execute the limiting action. Unfortunately, marks are not preserved across limiting actions, but are restored when the limit is popped.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;undo-tree&lt;/span&gt;)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::dired-push-limit&lt;/span&gt; (dired-mark-function)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Limit the buffer to display a subset of files and directories.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Save buffer state prior to applying limit.&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;with-register&lt;/span&gt; ?q
    (undo-tree-save-state-to-register ?q)
    (add-to-list 'mak::dired-limit-stack (get-register ?q)))
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Clear all marks.&lt;/span&gt;
  (dired-unmark-all-marks)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Mark files we wish to view.&lt;/span&gt;
  (call-interactively dired-mark-function)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Invert which files are marked.&lt;/span&gt;
  (dired-toggle-marks)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Remove all marked files.&lt;/span&gt;
  (dired-do-kill-lines))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now we perform the pop, which is pretty easy. We just need to have a guard against the stack being empty, and the rest is restoring state.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::dired-pop-limit&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Pop the most recent limit from the dired-limit-ring.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;unless&lt;/span&gt; mak::dired-limit-stack
    (&lt;span style=&quot;color: #cb4b16; font-weight: bold;&quot;&gt;user-error&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;No limit currently is in effect.&quot;&lt;/span&gt;))
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Restore buffer state to before we applied the limit.&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;with-register&lt;/span&gt; ?q
    (set-register ?q (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;pop&lt;/span&gt; mak::dired-limit-stack))
    (undo-tree-restore-state-from-register ?q)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
We finish things off by binding to keys that seem sensible.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;dired-x&lt;/span&gt;)

&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;These bindings correspond to the default &quot;*&quot; bindings in Dired.&lt;/span&gt;
(define-key dired-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/ .&quot;&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; ()
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
    (mak::dired-push-limit 'dired-mark-extension)))
(define-key dired-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/ /&quot;&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; ()
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
    (mak::dired-push-limit 'dired-mark-directories)))
(define-key dired-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/ *&quot;&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; ()
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
    (mak::dired-push-limit 'dired-mark-executables)))
(define-key dired-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/ %&quot;&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; ()
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
    (mak::dired-push-limit 'dired-mark-files-regexp)))
(define-key dired-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/ g&quot;&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; ()
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
    (mak::dired-push-limit 'dired-mark-files-containing-regexp)))
(define-key dired-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/ s&quot;&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; ()
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
    (mak::dired-push-limit 'dired-mark-files-containing-regexp)))

&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;This binding is straight out of Gnus.&lt;/span&gt;
(define-key dired-mode-map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/ w&quot;&lt;/span&gt;) 'mak::dired-pop-limit)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
It's not perfect, and the inability to preserve marks when applying more limits is unfortunate, but I'm quite happy with this for now. After writing this, I discovered &lt;a href=&quot;https://github.com/fuco1/dired-hacks&quot;&gt;Dired-Hacks&lt;/a&gt; which implements a very similar feature called &lt;a href=&quot;https://github.com/fuco1/dired-hacks#dired-filter&quot;&gt;dired-filter.&lt;/a&gt; As I use Dired more, I may add that to my configuration, but for now my cheap hack works for me.
&lt;/p&gt;
</description>
        <pubDate>Wed, 15 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/15/dired-limiting/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/15/dired-limiting/</guid>
        
        
      </item>
    
      <item>
        <title>Reader Appreciation</title>
        <description>&lt;p&gt;
Some things can only get done if you stop worrying about whether the results will matter or have actual benefits. This blog and my Master's degree are two such things. For this blog at least, I have had five different readers contact me about various posts in its seven week lifetime. I'm calling that a rousing success!
&lt;/p&gt;

&lt;p&gt;
Today's post is dedicated to the thing that I have received the most comments about: &lt;code&gt;use-package&lt;/code&gt;. The excellent Use-Package library, featured heavily this month, has a number of features that I have retroactively edited into my blog.
&lt;/p&gt;

&lt;p&gt;
First, Use-Package offers a &lt;code&gt;:mode&lt;/code&gt; keyword that allows you to bind a mode to a file extension:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;lua-mode&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:mode&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\\.nse$&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This is much more convenient than the alternative:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;lua-mode&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (add-to-list 'auto-mode-alist '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\\.nse$&quot;&lt;/span&gt; . lua-mode)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Use-Package offers an &lt;code&gt;:interpreter&lt;/code&gt; keyword which is similar, but applies to the &lt;a href=&quot;https://en.wikipedia.org/wiki/Shebang_(Unix)&quot;&gt;shebang&lt;/a&gt; line as opposed to the file extension. It also uses a macro for both the &lt;code&gt;:init&lt;/code&gt; and &lt;code&gt;:config&lt;/code&gt; keywords to allow multiple forms without the use of &lt;code&gt;progn&lt;/code&gt;. Given that I've already used &lt;code&gt;progn&lt;/code&gt; in those sections four times this month, that's a great feature, and I've changed earlier posts to take advantage of it.
&lt;/p&gt;

&lt;p&gt;
Another change of note is that I have also gone back and removed the &lt;code&gt;&amp;lt;tab&amp;gt;&lt;/code&gt; completion binding from Helm. It turns out that using the right arrow key is a better experience for me. I'm still working out whether the actions offered by Helm under the &lt;code&gt;&amp;lt;tab&amp;gt;&lt;/code&gt; menu are particularly useful for me.
&lt;/p&gt;

&lt;p&gt;
Finally, I just want to say that everyone who has contacted me has been wonderful and helpful. I honestly look forward to future emails/tweets pointing out errors and simplifications in my posts.
&lt;/p&gt;
</description>
        <pubDate>Tue, 14 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/14/reader-appreciation/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/14/reader-appreciation/</guid>
        
        
      </item>
    
      <item>
        <title>Copenhagen Interpretation</title>
        <description>&lt;p&gt;
Emacs has an excellent undo system, once you get the hang of it. But as with all things Emacs, it could be better!
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;undo-tree&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; elpa
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:diminish&lt;/span&gt; undo-tree-mode
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:bind&lt;/span&gt;
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-z&quot;&lt;/span&gt; . undo)
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;M-z&quot;&lt;/span&gt; . undo-tree-redo)
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-M-z&quot;&lt;/span&gt; . undo-tree-visualize)
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (global-undo-tree-mode)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; undo-tree-visualizer-diff t))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Let's see how the undo tree looks for this buffer:
&lt;/p&gt;


&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;http://fasciism.com/img/2017-02-13-copenhagen-interpretation.png&quot; alt=&quot;2017-02-13-copenhagen-interpretation.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;
As you can see, I've performed several undo and redo operations at this point, and can navigate through them. If I choose any node in the undo tree, I will be presented with an explanatory diff telling me what that node's change represents in a small window.
&lt;/p&gt;
</description>
        <pubDate>Mon, 13 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/13/copenhagen-interpretation/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/13/copenhagen-interpretation/</guid>
        
        
      </item>
    
      <item>
        <title>Dired Here</title>
        <description>&lt;p&gt;
One thing that occurs frequently in my Emacs usage is opening a Dired buffer based on the current context of the file I am in. For example, when editing this file I would like &lt;code&gt;C-x d&lt;/code&gt; to a Dired buffer representing &lt;code&gt;~/.emacs.d&lt;/code&gt;, and ensure that the buffer represents the current state of the filesystem. The default is for &lt;code&gt;C-x d&lt;/code&gt; to require confirmation of the location, and to not refresh the Dired buffer if it already exists.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::dired-here&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Make an up-to-date Dired buffer for the current location.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (dired &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;.&quot;&lt;/span&gt;)
  (revert-buffer))

(global-set-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-x d&quot;&lt;/span&gt;) 'mak::dired-here)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
While this is a minor change, it is satisfying.
&lt;/p&gt;
</description>
        <pubDate>Sun, 12 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/12/dired-here/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/12/dired-here/</guid>
        
        
      </item>
    
      <item>
        <title>Kill Ring</title>
        <description>&lt;p&gt;
I've been using the fabulous browse-kill-ring package for years, but I just discovered that Helm has a similar feature. I now prefer Helm's &lt;code&gt;show-kill-ring&lt;/code&gt;, since it is based on filtering candidates from the kill ring using matching, just like the rest of Helm. It's also nice to pare down the number of packages in use occasionally, since the tendency is for one's configuration to grow not shrink.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(global-set-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;M-y&quot;&lt;/span&gt;) 'helm-show-kill-ring)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I've bound &lt;code&gt;M-y&lt;/code&gt; to this feature, which is normally &lt;code&gt;yank-pop&lt;/code&gt;, since if I'm looking for a different item from the kill ring than I already have, it's probably not going to be the first alternate. Creating keyboard macros using registers instead of the kill ring has taught me this.
&lt;/p&gt;
</description>
        <pubDate>Sat, 11 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/11/kill-ring/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/11/kill-ring/</guid>
        
        
      </item>
    
      <item>
        <title>Magit Is Magic</title>
        <description>&lt;p&gt;
I stopped doing development for a living three years ago, having moved into security consulting and penetration testing since. Now that I'm setting up Emacs again, I can't believe how much I have missed &lt;a href=&quot;https://magit.vc/&quot;&gt;Magit&lt;/a&gt;. While Org-mode and Gnus are the main killer apps for Emacs, they are sprawling. Magit is extremely fast, tight, focused, and beautiful. As mentioned &lt;a href=&quot;http://fasciism.com/2017/02/09/cue-ball/&quot;&gt;yesterday&lt;/a&gt;, I have been doing some open source development recently, and one thing I believe in when making contributions to the code of others is tight diffs. Magit makes it so that the use of a &lt;code&gt;git add -p&lt;/code&gt; equivalent is very accessible.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;magit&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:bind&lt;/span&gt;
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-c C-g&quot;&lt;/span&gt; . magit-status))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Magit's maintainer is very active, new releases are frequent. I love Magit so much that I contribute to the &lt;a href=&quot;https://www.patreon.com/tarsius&quot;&gt;maintainer's Patreon&lt;/a&gt;. It's really that good.
&lt;/p&gt;
</description>
        <pubDate>Fri, 10 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/10/magit-is-magic/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/10/magit-is-magic/</guid>
        
        
      </item>
    
      <item>
        <title>Cue Ball</title>
        <description>&lt;p&gt;
An unscheduled dive into the world of &lt;a href=&quot;https://nmap.org/book/nse.html&quot;&gt;Nmap Scripting&lt;/a&gt; last night has caused me to need Emacs to be configured to handle Lua code. As usual, packages are there to make life better:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;lua-mode&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:mode&lt;/span&gt;
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\\.nse$&quot;&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (add-hook 'lua-mode-hook
            (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; ()
              (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; lua-indent-level 2
                    lua-documentation-url &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;http://www.lua.org/manual/5.3/manual.html&quot;&lt;/span&gt;
                    lua-default-application &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;lua5.3&quot;&lt;/span&gt;))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
The default indentation in Lua mode is 3 spaces, which seems insane to me, and needs to be 2 spaces to match every bit of Lua I've ever seen. The default documentation is for version 5.1, and the default interpreter on my system is version 5.2, but Nmap embeds version 5.3. The documentation URL allows me to use &lt;code&gt;C-c C-f&lt;/code&gt; on a function or keyword to open its documentation in the browser. Finally, Nmap uses a non-standard file extension, &lt;code&gt;.nse&lt;/code&gt; for Nmap Scripting Engine, which we need to make Emacs aware of.
&lt;/p&gt;

&lt;p&gt;
The results of last night's Nmap programming can be found &lt;a href=&quot;https://svn.nmap.org/nmap/scripts/tls-ticketbleed.nse&quot;&gt;here&lt;/a&gt;, if you're interested.
&lt;/p&gt;
</description>
        <pubDate>Thu, 09 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/09/cue-ball/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/09/cue-ball/</guid>
        
        
      </item>
    
      <item>
        <title>At The Helm</title>
        <description>&lt;p&gt;
No, I couldn't just call this post &quot;Helm&quot;. The terrible title I chose called to me, and so I acquiesced. Helm is the most invasive package I've installed thus far. It replaces the majority of commands where user input is expected (e.g., &lt;code&gt;C-x b&lt;/code&gt;, &lt;code&gt;C-x C-f&lt;/code&gt;, &lt;code&gt;C-x k&lt;/code&gt;, &lt;code&gt;M-x&lt;/code&gt;) with its own version. Helms commands offer lists of candidates, shown in a pop-up window, which can be filtered, navigated, and selected. This is far more powerful than the default commands, and I find it useful.
&lt;/p&gt;

&lt;p&gt;
An instance of &lt;code&gt;C-x C-f&lt;/code&gt; (&lt;code&gt;helm-find-files&lt;/code&gt;) appears as follows:
&lt;/p&gt;


&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;http://fasciism.com/img/2017-02-08-at-the-helm.png&quot; alt=&quot;2017-02-08-at-the-helm.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;
Now let's get that package in the system.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;helm&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:diminish&lt;/span&gt; helm-mode
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:bind&lt;/span&gt;
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;M-x&quot;&lt;/span&gt; . helm-M-x)
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-x C-f&quot;&lt;/span&gt; . helm-find-files)
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:init&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; helm-mode-fuzzy-match t)
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (helm-mode 1))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Fuzzy matching has been enabled, which requires more processing of a list of candidates, but I have used this feature in the past and appreciated it. To explain be example, I can type &lt;code&gt;C-h v hmfm&lt;/code&gt; looking for &lt;code&gt;helm-mode-fuzzy-match&lt;/code&gt; and the list of candidates will include every variable that matches the regex &lt;code&gt;.*h.*m.*f.*m.*&lt;/code&gt;, which is a lot of candidates. As always, if this annoys me later I can disable it effortlessly.
&lt;/p&gt;

&lt;p&gt;
When I initially installed Helm, I limited its use to &lt;code&gt;M-x&lt;/code&gt;, but found that I enjoyed it a great deal. I have used Interactive Do (Ido) in earlier times, but I like Helm better. There's also Ivy which is the new kid on the block, but until Helm pisses me off someday it has my (fickle) loyalty.
&lt;/p&gt;
</description>
        <pubDate>Wed, 08 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/08/at-the-helm/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/08/at-the-helm/</guid>
        
        
      </item>
    
      <item>
        <title>Switching Windows</title>
        <description>&lt;p&gt;
Emacs frequently has more than one window open, and &lt;code&gt;C-x o&lt;/code&gt; can be used to switch between them. &lt;code&gt;C-x o&lt;/code&gt; is far less useful when you have three or more windows open, since you need to use it multiple times to reach the desired window. The Ace-Window package improves this situation by allowing you to navigate directly to a window.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;ace-window&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; elpa
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:diminish&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:bind&lt;/span&gt;
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;M-o&quot;&lt;/span&gt; . ace-window)
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; aw-keys '(?e ?t ?u ?h ?o ?n ?i ?d)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I've bound the keys for different windows based on the &lt;a href=&quot;https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard&quot;&gt;Dvorak keyboard layout&lt;/a&gt; that I use with my Kinesis Advantage keyboard, prioritizing the strongest fingers. The effect of this package can be seen below:
&lt;/p&gt;



&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;http://fasciism.com/img/2017-02-07-switching-windows.png&quot; alt=&quot;2017-02-07-switching-windows.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;
</description>
        <pubDate>Tue, 07 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/07/switching-windows/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/07/switching-windows/</guid>
        
        
      </item>
    
      <item>
        <title>Jiminy Cricket</title>
        <description>&lt;p&gt;
Emacs keybindings are not simple. But they are discoverable and memorable, once you get past the initial shock at least. The Guide-Key package helps with that by popping up a new window displaying a list of keys available at the current moment.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;guide-key&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:diminish&lt;/span&gt; guide-key-mode
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:init&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; guide-key/guide-key-sequence
        '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-c&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-x r&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-x 4&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-x 5&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-x 8&quot;&lt;/span&gt;))
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (guide-key-mode 1))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
For instance, while writing this blog I can press &lt;code&gt;C-x r&lt;/code&gt; and receive a list of possibilities shown below:
&lt;/p&gt;


&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;http://fasciism.com/img/2017-02-06-jiminy-cricket.png&quot; alt=&quot;2017-02-06-jiminy-cricket.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;
You'll notice that we used the &lt;code&gt;:diminish&lt;/code&gt; option above, with the name of the minor mode as its value. That indicates that Diminish should omit the minor mode from the mode line entirely. Alternatively, I could have offered an abbreviation such as &lt;code&gt;GK&lt;/code&gt;.
&lt;/p&gt;
</description>
        <pubDate>Mon, 06 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/06/jiminy-cricket/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/06/jiminy-cricket/</guid>
        
        
      </item>
    
      <item>
        <title>Diminishing Returns</title>
        <description>&lt;p&gt;
For all of the minor modes that I use, I enable them globally. This may change in the future, as can anything, but for now I have no need to know which minor modes are enabled, because the answer is &quot;All the ones I like.&quot; Diminish is a package that allows the replacement or omission of mode names in the mode line.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;diminish&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Diminish built-in modes we've already enabled.&lt;/span&gt;
  (diminish 'flyspell-mode)
  (diminish 'visual-line-mode)
  (diminish 'whitespace-mode))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Since we have not yet installed any new minor modes, we will diminish only those which are part of the base system. In future entries we will use &lt;code&gt;:diminish&lt;/code&gt; in &lt;code&gt;use-package&lt;/code&gt; to include packages in the list that Diminish affects.
&lt;/p&gt;
</description>
        <pubDate>Sun, 05 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/05/diminishing-returns/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/05/diminishing-returns/</guid>
        
        
      </item>
    
      <item>
        <title>Solarized</title>
        <description>&lt;p&gt;
I have been in love with the &lt;a href=&quot;http://ethanschoonover.com/solarized&quot;&gt;Solarized&lt;/a&gt; colour scheme(s) since I first laid eyes on them. Before I found Solarized, I would always opt for harsh, high-contrast colour schemes consisting solely of bright colours on black backgrounds. What I like about Solarized is that it claims to be non-arbitrary. Most colour schemes have the feel that everything was picked because the author just liked the look of it. Solarized appears to have some method, though not one which I can understand. So, in summary, SCIENCE!
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;solarized-theme&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:init&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; solarized-distinct-fringe-background t
        solarized-use-variable-pitch nil
        solarized-high-contrast-mode-line t
        x-underline-at-descent-line t)
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:config&lt;/span&gt;
  (load-theme 'solarized-light)
  (load-theme 'solarized-dark))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
First, an explanation of the reason I load the light and then the dark version of Solarized. I do this so that both themes are 'approved' by Emacs, meaning that in &lt;code&gt;~/.emacs.p/custom.el&lt;/code&gt; &amp;#x2013; where I store my Customization settings, see &lt;a href=&quot;http://fasciism.com/2017/01/02/literate-configuration/&quot;&gt;Day 2&lt;/a&gt; &amp;#x2013; the hashes for the themes are stored as follows:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(custom-set-variables
 '(custom-safe-themes
   (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;quote&lt;/span&gt;
    (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&amp;lt;hash-for-solarized-light&amp;gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&amp;lt;hash-for-solarized-dark&amp;gt;&quot;&lt;/span&gt; default))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This means that whenever I choose to switch between the two versions of the theme, due to the lighting in the environment or the content of a buffer, I needn't worry about warning dialogs. The rest of the settings ensure that Solarized doesn't visually affect other aspects of the Emacs instance.
&lt;/p&gt;
</description>
        <pubDate>Sat, 04 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/04/solarized/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/04/solarized/</guid>
        
        
      </item>
    
      <item>
        <title>Htmlize</title>
        <description>&lt;p&gt;
For a couple of weeks now I've actually had Htmlize installed in my Emacs. The reason for this is that it automatically enables Org-mode's export functions to add syntax highlighting to code blocks. You may have noticed that the blog got slightly less ugly in the recent past, this is why.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;htmlize&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
The above call to &lt;code&gt;use-package&lt;/code&gt; installs the Htmlize package if it's missing, and forces the use of MELPA Stable as its repository. As mentioned earlier, I try to stick to stable packages whenever possible. Emacs is 'mission critical' to my life, so I can't afford the time and frustration caused by unstable packages. &lt;code&gt;use-package&lt;/code&gt; has many more, interesting options that we will use in the coming days.
&lt;/p&gt;
</description>
        <pubDate>Fri, 03 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/03/htmlize/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/03/htmlize/</guid>
        
        
      </item>
    
      <item>
        <title>Ouroboros</title>
        <description>&lt;p&gt;
As you might have guessed, writing my Emacs configuration in this style leads me to need to reload the system often to ensure that things are in the correct order as I make new drafts and go back to fix mistakes. So far I have been handling this by manually calling &lt;code&gt;M-x kill-emacs&lt;/code&gt; and running the program anew. Now that we have packages available, &lt;a href=&quot;https://github.com/iqbalansari/restart-emacs&quot;&gt;restart-emacs&lt;/a&gt; gives us a better way:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::restart-emacs-or-release-file&lt;/span&gt; ()
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; server-buffer-clients
      (server-edit)
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;when&lt;/span&gt; (y-or-n-p &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Restart Emacs? &quot;&lt;/span&gt;)
      (restart-emacs '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;--debug-init&quot;&lt;/span&gt;)))))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;use-package&lt;/span&gt; &lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;restart-emacs&lt;/span&gt;
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:ensure&lt;/span&gt; t
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:pin&lt;/span&gt; melpa-stable
  &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:bind&lt;/span&gt;
  (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-x C-c&quot;&lt;/span&gt; . mak::restart-emacs-or-release-file))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
On &lt;a href=&quot;http://fasciism.com/2017/01/03/simplified-confirmations/&quot;&gt;Day 3&lt;/a&gt; we changed confirmations to &lt;code&gt;y-or-n-p&lt;/code&gt;, and on &lt;a href=&quot;http://fasciism.com/2017/01/04/no-escape/&quot;&gt;Day 4&lt;/a&gt; we removed the keybinding that exited Emacs. Now we change our setup to ensure that if we hit &lt;code&gt;C-x C-c&lt;/code&gt; Emacs will restart itself, unless it is within a buffer (and frame for my configuration) created by emacsclient, in which case it will return from emacsclient.
&lt;/p&gt;
</description>
        <pubDate>Thu, 02 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/02/ouroboros/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/02/ouroboros/</guid>
        
        
      </item>
    
      <item>
        <title>Package Fever</title>
        <description>&lt;p&gt;
I've been holding off on adding packages to my configuration until I had been at this for a month. So it's finally time to celebrate a month of daily blogging by adding every major package repository to my configuration:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;package&lt;/span&gt;)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; package-archives
      '((&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;melpa-stable&quot;&lt;/span&gt; . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;https://stable.melpa.org/packages/&quot;&lt;/span&gt;)
        (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;marmalade&quot;&lt;/span&gt; . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;https://marmalade-repo.org/packages/&quot;&lt;/span&gt;)
        (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;melpa&quot;&lt;/span&gt; . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;https://melpa.org/packages/&quot;&lt;/span&gt;)
        (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;elpa&quot;&lt;/span&gt; . &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;https://elpa.gnu.org/packages/&quot;&lt;/span&gt;)))
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; package-enable-at-startup nil)
(package-initialize)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Note that instead of using &lt;code&gt;add-to-list&lt;/code&gt; I have used &lt;code&gt;setq&lt;/code&gt;. This is because for no functional reason, I just like seeing &lt;code&gt;elpa&lt;/code&gt; instead of &lt;code&gt;gnu&lt;/code&gt; as the name of the core Emacs repo. Whenever possible, I will try and use packages from the &lt;code&gt;elpa&lt;/code&gt; repository first, then &lt;code&gt;melpa-stable&lt;/code&gt;, then &lt;code&gt;melpa&lt;/code&gt;, then &lt;code&gt;marmalade&lt;/code&gt;. I have nothing against Marmalade, and placing it last is not a statement about its quality or trustworthiness, I just like MELPA's idea of having a stable repository.
&lt;/p&gt;

&lt;p&gt;
There are many, many packages to choose from, and it's been hard living without them for the first month of this blog. So let's start slow, by installing the package &lt;code&gt;use-package&lt;/code&gt; that will enable us to easily use and configure other packages.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;unless&lt;/span&gt; (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;eval-when-compile&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;use-package&lt;/span&gt;))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This tells Emacs to download &lt;code&gt;use-package&lt;/code&gt; if it's not already installed. For most of this week we will revel in silly little cosmetic changes that make me happy.
&lt;/p&gt;
</description>
        <pubDate>Wed, 01 Feb 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/02/01/package-fever/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/02/01/package-fever/</guid>
        
        
      </item>
    
      <item>
        <title>Automated Blog Posting</title>
        <description>&lt;p&gt;
To celebrate one full month of blogging, I have written a function that will post the HTML and Org files that comprise each day's blog entry automatically with Midnight, as seen earlier this month.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::fasciism-post-daily-blog&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Posts daily blog in HTML and Org format to respective GitHub repos.&quot;&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Publish the project to ensure the HTML file is on disk.&lt;/span&gt;
  (org-publish-project &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;fasciism&quot;&lt;/span&gt; t)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Set up the common one-liner to publish a file.&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((cmd (string-join
              '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;cd %s&quot;&lt;/span&gt;
                &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;git add %s-*.%s&quot;&lt;/span&gt;
                &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;git commit -m 'Daily blog post.'&quot;&lt;/span&gt;
                &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;git push&quot;&lt;/span&gt;)
              &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot; &amp;amp;&amp;amp; &quot;&lt;/span&gt;))
        (date (format-time-string &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%F&quot;&lt;/span&gt;)))
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Publish the HTML file.&lt;/span&gt;
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((file (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;_posts/%s&quot;&lt;/span&gt; date)))
      (shell-command
       (format cmd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/src/fasciism&quot;&lt;/span&gt; file &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;html&quot;&lt;/span&gt;)
       &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;*fasciism-blog-post::html*&quot;&lt;/span&gt;))
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Publish the Org file.&lt;/span&gt;
    (shell-command
     (format cmd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.d&quot;&lt;/span&gt; date &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;org&quot;&lt;/span&gt;)
     &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;*fasciism-blog-post::org*&quot;&lt;/span&gt;)))

(add-hook 'midnight-mode 'mak::fasciism-post-daily-blog)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
And with that, we've made it! An entire month sticking to the built-in features of Emacs and using it every day. Tomorrow I will lift that self-imposed restriction and dive into the wide world of packages.
&lt;/p&gt;
</description>
        <pubDate>Tue, 31 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/31/automated-blog-posting/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/31/automated-blog-posting/</guid>
        
        
      </item>
    
      <item>
        <title>Tabs Vs Spaces</title>
        <description>&lt;p&gt;
I love a good holy war, one in which neither side can ever be right so it gives us something to argue about forever. I find that delightful. Today I'm going to fix something that has been driving me bonkers all month as I write lots of Elisp code: tabs as indentation.
&lt;/p&gt;

&lt;p&gt;
In the tabs vs. spaces war, I'm strictly a fence-sitter. I use both for different languages, but the use of tabs for a language with complex indentation like Elisp is madness. Let's start by disabling tabs as indentation globally.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq-default&lt;/span&gt; indent-tabs-mode nil)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
We need to use &lt;code&gt;setq-default&lt;/code&gt; because &lt;code&gt;indent-tabs-mode&lt;/code&gt;'s help notes that its value becomes buffer-local once set.
&lt;/p&gt;

&lt;p&gt;
For a few programming languages that have relatively simple formatting (C, C++, and Java), I prefer tabs. But I haven't programmed in any of those languages recently, so we can deal with them another day.
&lt;/p&gt;
</description>
        <pubDate>Mon, 30 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/30/tabs-vs-spaces/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/30/tabs-vs-spaces/</guid>
        
        
      </item>
    
      <item>
        <title>Hobo Code</title>
        <description>&lt;p&gt;
Continuing my love of semi-nonsensical blog entry titles only tangentially related to the topic in any way&amp;#x2026;
&lt;/p&gt;

&lt;p&gt;
I have some boxes at work that I need to log into frequently. Now that I'm trying to use Eshell instead of &lt;code&gt;xterm&lt;/code&gt;, I need to set up Tramp properly. Tramp is an Emacs mode that abstracts the connection to another machine in such a way that editing files, running remote commands, and navigating remote directories with Dired all work.
&lt;/p&gt;

&lt;p&gt;
The first thing I needed to do to make Tramp work was to add the following line to the top of my &lt;code&gt;~/.zshrc&lt;/code&gt;. This line checks for terminals that are 'dumb', meaning they lack advanced features or are likely not normal terminal emulators, and if so: disables Zsh's line-editing facilities, sets the prompt to a traditional style, and stops processing the remainder of the configuration file.
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
#######################################################
# Emacs Tramp
#######################################################
[[ $TERM == &quot;dumb&quot; ]] &amp;amp;&amp;amp; unsetopt zle &amp;amp;&amp;amp; PS1='$ ' &amp;amp;&amp;amp; return
&lt;/pre&gt;

&lt;p&gt;
Once the above line is in place, Eshell immediately works:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
👻 cd /ssh:stormy:
👻 pwd
/ssh:stormy:/home/fasciism
👻 cat ../../etc/motd
 _____ _
/  ___| |
\ `--.| |_ ___  _ __ _ __ ___  _   _
 `--. | __/ _ \| '__| '_ ` _ \| | | |
/\__/ | || (_) | |  | | | | | | |_| |
\____/ \__\___/|_|  |_| |_| |_|\__, |
                                __/ |
Stormageddon: Dark Lord of All |___/
https://www.youtube.com/watch?v=bWK61bkQ-ME
&lt;/pre&gt;

&lt;p&gt;
Eshell and Tramp ignore all the login banners and message-of-the-day (MOTD) information from the remote system. From this point on, you can execute commands on the remote system since you are effectively SSH'd into it:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
👻 hostname
stormy
👻 cat /etc/hostname
aboyne
&lt;/pre&gt;

&lt;p&gt;
It's important to know that absolute paths still refer to the system on which Emacs resides, while relative paths refer to the current working directory of Eshell (i.e., the remote host). If I attempt to run &lt;code&gt;find-file&lt;/code&gt; on the remote machine to edit the MOTD, the buffer will be marked as read-only
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
👻 find-file ../../etc/motd
#&amp;lt;buffer motd&amp;gt;
👻 (with-current-buffer &quot;motd&quot; buffer-read-only)
t
&lt;/pre&gt;

&lt;p&gt;
Thankfully, Tramp also supports elevating our privilege via &lt;code&gt;sudo&lt;/code&gt; on local and remote hosts. The downside is that this operation requires a horrific syntax. Using &lt;code&gt;sudo ffap&lt;/code&gt; isn't an option either, since &lt;code&gt;sudo&lt;/code&gt; opens a new shell on the remote machine through which Emacs has no special relationship.
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
👻 sudo find-file ../../etc/motd
[sudo] password for fasciism: [redacted]
sudo: find-file: command not found
&lt;/pre&gt;

&lt;p&gt;
However, using Tramp's &lt;code&gt;sudo&lt;/code&gt; syntax and multi-hop capabilities, we can use &lt;code&gt;C-x C-f /ssh:stormy|sudo:stormy:/etc/motd&lt;/code&gt;, type in the password, and start editing the MOTD in Emacs, resulting in:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
👻 cat ../../etc/motd
 _____ _
/  ___| |
\ `--.| |_ ___  _ __ _ __ ___  _   _
 `--. | __/ _ \| '__| '_ ` _ \| | | |
/\__/ | || (_) | |  | | | | | | |_| |
\____/ \__\___/|_|  |_| |_| |_|\__, |
                                __/ |
SUDO VIA TRAMP APPEARS TO WORK |___/
https://www.youtube.com/watch?v=bWK61bkQ-ME
&lt;/pre&gt;

&lt;p&gt;
Since this syntax is so ungainly, I've decided to make two emacs functions &lt;code&gt;f&lt;/code&gt; (an alias for &lt;code&gt;find-file&lt;/code&gt;) and &lt;code&gt;f!&lt;/code&gt; which tries to edit the file using sudo (locally or remote).
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::get-buffer-path&lt;/span&gt; (&lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; name)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Finds the current path, including for Eshell buffers where it is the working directory.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;b&quot;&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;with-current-buffer&lt;/span&gt; name
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (eq major-mode 'eshell-mode)
        (substring-no-properties default-directory)
      (buffer-file-name))))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::get-buffer-tramp-context&lt;/span&gt; (&lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; name)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Finds a buffer's Tramp context based on its file name.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;b&quot;&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((path (mak::get-buffer-path name)))
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Match single and chained contexts.&lt;/span&gt;
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (string-match &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;^&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;ssh&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;:[&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;:|]+&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;ssh&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;:[&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;:|]+&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;*:&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&lt;/span&gt; path)
        (match-string 1 path)
      (&lt;span style=&quot;color: #cb4b16; font-weight: bold;&quot;&gt;user-error&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Failed to find Tramp context in path %s.&quot;&lt;/span&gt; path))))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::get-last-hop-from-tramp-context&lt;/span&gt; (ctx)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Finds the last host or user@host hop in a Tramp context.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (string-match &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;[/:]&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;(?:&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;ssh&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;:]+&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;:$&quot;&lt;/span&gt; ctx)
      (match-string 1 ctx)
      (&lt;span style=&quot;color: #cb4b16; font-weight: bold;&quot;&gt;user-error&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Failed to find last hop in context %s.&quot;&lt;/span&gt; ctx)))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::tramp-remote-find-file-with-sudo&lt;/span&gt; (file)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Attempts to open a file using Tramp and Sudo.&quot;&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;We need to currently be within a Tramp 'context'.&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let*&lt;/span&gt; ((ctx (mak::get-buffer-tramp-context (current-buffer)))
         (hop (mak::get-last-hop-from-tramp-context ctx)))
    (find-file (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%s|sudo:%s:%s&quot;&lt;/span&gt;
                       (substring ctx 0 -1)
                       hop
                       file))))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;eshell/f&lt;/span&gt; (file)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;An alias for find-file.&quot;&lt;/span&gt;
  (find-file file))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;eshell/f!&lt;/span&gt; (file)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;An alias for find-file-with-sudo.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (equal &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/&quot;&lt;/span&gt; (substring file 0 1))
      (find-file (concat &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;/sudo::&quot;&lt;/span&gt; file))
    (mak::tramp-remote-find-file-with-sudo file)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
And with this we now have an easy way to edit either local (absolute) or remote (relative) files with much less typing.
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
👻 f! /etc/motd
#&amp;lt;buffer motd::&amp;gt;
👻 f! ../../etc/motd
#&amp;lt;buffer motd::/ssh:stormy:&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
While the determination of whether to access the local or remote file isn't ideal, it's not bad for a couple hours of work. I can always touch up the logic in a future entry.
&lt;/p&gt;
</description>
        <pubDate>Sun, 29 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/29/hobo-code/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/29/hobo-code/</guid>
        
        
      </item>
    
      <item>
        <title>Web Browser</title>
        <description>&lt;p&gt;
Just a minor configuration change today. I've noticed that when I trigger URLs in Emacs in various modes my web browser doesn't pop up properly. I've looked at a few options for fixing this, and the most straightforward one is this:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; browse-url-browser-function 'browse-url-generic
      browse-url-generic-program &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;firefox&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
That is all. Good day to you.
&lt;/p&gt;
</description>
        <pubDate>Sat, 28 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/28/web-browser/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/28/web-browser/</guid>
        
        
      </item>
    
      <item>
        <title>Eshell Kill Previous Output</title>
        <description>&lt;p&gt;
One thing that I do frequently is run a command that produces a lot of output, often &lt;code&gt;curl&lt;/code&gt; or &lt;code&gt;nmap&lt;/code&gt;, which I would rather not run again. This means that instead or re-running the command and redirecting the output to the kill ring or clipboard, I have to carefully select the output from the buffer and then &lt;code&gt;M-w&lt;/code&gt;  (&lt;code&gt;kill-ring-save&lt;/code&gt;) it. That's more effort than I'd like, so I made a function to select the previous command's output and add it to the kill ring:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;eshell/kill-previous-output&lt;/span&gt; (&lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; nth)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Copies the output of the previous command to the kill ring.&lt;/span&gt;
&lt;span style=&quot;color: #2aa198;&quot;&gt;When nth is set, it will copy the nth previous command.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;save-excursion&lt;/span&gt;
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Move to the end of the eshell buffer.&lt;/span&gt;
    (goto-char (point-max))
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Move to the start of the last prompt.&lt;/span&gt;
    (search-backward-regexp eshell-prompt-regexp nil nil nth)
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Move to the start of the line, before the prompt.&lt;/span&gt;
    (beginning-of-line)
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Remember this position as the end of the region.&lt;/span&gt;
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((end (point)))
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Move to the start of the last prompt.&lt;/span&gt;
      (search-backward-regexp eshell-prompt-regexp)
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Move one line below the prompt, where the output begins.&lt;/span&gt;
      (next-line)
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Find first line that's not blank.&lt;/span&gt;
      (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;while&lt;/span&gt; (looking-at &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;^[[:space:]]*$&quot;&lt;/span&gt;)
        (beginning-of-line)
        (next-line))
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Copy region to kill ring.&lt;/span&gt;
      (copy-region-as-kill (point) end)
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Output stats on what was copied as a sanity check.&lt;/span&gt;
      (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Copied %s words to kill ring.&quot;&lt;/span&gt; (count-words-region (point) end)))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This function doesn't use Eshell's builtin functions, because they break in the common case of the previous command containing a newline. Here's why:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;eshell-next-prompt&lt;/span&gt; (n)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Move to end of Nth next prompt in the buffer.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;p&quot;&lt;/span&gt;)
  (forward-paragraph n)
  (eshell-skip-prompt))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
As you can see, the call to &lt;code&gt;forward-paragraph&lt;/code&gt; messes things up for my use case.
&lt;/p&gt;
</description>
        <pubDate>Fri, 27 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/27/eshell-kill-previous-output/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/27/eshell-kill-previous-output/</guid>
        
        
      </item>
    
      <item>
        <title>Eshell Customizations</title>
        <description>&lt;p&gt;
After trying to use Eshell for the month, I've been fine-tuning its behaviour so that I can tolerate it. There's more work to do, but the first step is to create a command that gets the &lt;code&gt;*eshell*&lt;/code&gt; buffer out of the way, taking me back to whatever I was just doing. In mosts modes &lt;code&gt;q&lt;/code&gt; is bound to &lt;code&gt;bury-buffer&lt;/code&gt;, which sends the current buffer to the back of the list of buffers.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;eshell/q&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Send the *eshell* buffer to the back of buffer list.&quot;&lt;/span&gt;
  (bury-buffer))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I've also found that I'd much rather use Dired instead of Eshell for many tasks. At the same time, it's convenient to be able to quickly switch between the two, so here we add a binding to the &lt;code&gt;e&lt;/code&gt; key in Dired and add the &lt;code&gt;d&lt;/code&gt; command in Eshell.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;eshell/d&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Open a dired instance of the current working directory.&quot;&lt;/span&gt;
  (dired &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;.&quot;&lt;/span&gt;))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;dired&lt;/span&gt;)
(define-key dired-mode-map &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;e&quot;&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Force the creation of a new Eshell instance at this path.&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; ()
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
    (eshell t)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Forcing a creation of a new Eshell ensures it has the same directory as Dired.
&lt;/p&gt;

&lt;p&gt;
Finally, now that I have started using the &lt;code&gt;~/.emacs.p&lt;/code&gt; directory for all of my private files I want Eshell's files to be stored there. I also increased &lt;code&gt;eshell-history-size&lt;/code&gt; to a ridiculous number. If that gets ungainly in the future, I'll reduce it.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; eshell-history-size 100000
      eshell-directory-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.p/eshell&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Thu, 26 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/26/eshell-customizations/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/26/eshell-customizations/</guid>
        
        
      </item>
    
      <item>
        <title>Batch Jekyll Publishing</title>
        <description>&lt;p&gt;
Every time I export the blog from Org-mode to HTML, I need to go through new entries and add the YAML header that Jekyll (this blog's site generator) uses. I'm tired of doing that, so it's time to automate it.
&lt;/p&gt;

&lt;p&gt;
First we add the symbol for our not-yet-defined function to the property list that defines this Org project. A property list is a flat list of the form &lt;code&gt;(:param1 value1 ... :paramN valueN)&lt;/code&gt;.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;List contains ((&quot;fasciism&quot; ...)) before proper plist begins.&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;cdar = (cdr (car ...)), removing first element of list.&lt;/span&gt;
(plist-put (cdar org-publish-project-alist)
           &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:completion-function&lt;/span&gt;
           'mak::fasciism-project-export-completion)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This method for accessing &lt;code&gt;org-publish-project-alist&lt;/code&gt; depends on the blog being the first project. While a terrible way to do things, it'll work since Emacs loads these blog entries in sequence so that later additions to my Org projects won't cause this to fail.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::fasciism-project-export-completion&lt;/span&gt; (&lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;rest&lt;/span&gt; project)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Ensure the YAML header exists on blog entries.&quot;&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;In Org v8, we check a dynamically-scoped variable.&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;In Org v9, we get a parameter passed to us.&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;unless&lt;/span&gt; project
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; project project-plist))
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let*&lt;/span&gt; ((dir (plist-get project &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:publishing-directory&lt;/span&gt;))
         (files (directory-files dir t &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\\.html$&quot;&lt;/span&gt;)))
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;For each HTML file.&lt;/span&gt;
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;dolist&lt;/span&gt; (file files)
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Create a temporary buffer tied to the HTML file.&lt;/span&gt;
      (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;with-temp-file&lt;/span&gt; file
       (insert-file-contents file)
         &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Check for YAML header, inserting if absent.&lt;/span&gt;
         (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;unless&lt;/span&gt; (equal (buffer-substring 1 5) &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;---\n&quot;&lt;/span&gt;)
           (insert &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;---\n&quot;&lt;/span&gt;
                   &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;layout: post\n&quot;&lt;/span&gt;
                   &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;---\n&quot;&lt;/span&gt;
                   &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\n&quot;&lt;/span&gt;))))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
While most of the functions used above will be recognizable to your average programmer, I want to take a moment to discuss &lt;code&gt;let*&lt;/code&gt;. We've used &lt;code&gt;let&lt;/code&gt; before when we needed to create temporary variables, so why do I use &lt;code&gt;let*&lt;/code&gt; here? It's because &lt;code&gt;let*&lt;/code&gt; allows me to create a variable that references the value assigned to a previous variable in the same assignment list. Specifically, we define &lt;code&gt;dir&lt;/code&gt;, and then we use &lt;code&gt;dir&lt;/code&gt; in the definition of &lt;code&gt;files&lt;/code&gt;. We could have made the definition of &lt;code&gt;files&lt;/code&gt; longer, but I prefer this method of breaking it up into smaller assignments that accrete.
&lt;/p&gt;
</description>
        <pubDate>Wed, 25 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/25/batch-jekyll-publishing/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/25/batch-jekyll-publishing/</guid>
        
        
      </item>
    
      <item>
        <title>X509 Mode</title>
        <description>&lt;p&gt;
As part of my job, I often have to look at X.509 (SSL/TLS) certificates. I almost never want to see them in their raw state, a blob of unintelligible Base64 or binary. When opening an image in Emacs, the image is displayed in the window by default, and &lt;code&gt;C-c C-c&lt;/code&gt; toggles between the image and its representation on disk. I want to have the same thing for X.509 certificates.
&lt;/p&gt;

&lt;p&gt;
First we create the most important thing for any mode, the hook that facilitates customization.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defvar&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;x509-certificate-mode-hook&lt;/span&gt; nil)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Then we build a function that can take a buffer and pipe it through the &lt;code&gt;openssl x509&lt;/code&gt; command. This function needs to be smart enough to detect errors and undo any damage it causes on error.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;x509-certificate-parse-command&lt;/span&gt; (encoding)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Parse the buffer using OpenSSL's x509 command and the specified encoding.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((errbuf (generate-new-buffer-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;*x509-parse-error*&quot;&lt;/span&gt;)))
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Try to parse buffer using specified encoding.&lt;/span&gt;
    (shell-command-on-region
     (point-min)
     (point-max)
     (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;openssl x509 -text -noout -inform %s&quot;&lt;/span&gt; encoding)
     (buffer-name)
     t
     errbuf)
    &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Check for failure, represented by the existence of errbuf.&lt;/span&gt;
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (get-buffer errbuf)
        &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Restore buffer to original state.&lt;/span&gt;
        (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;progn&lt;/span&gt;
          (kill-buffer errbuf)
          (insert x509-certificate-mode-text)
          nil)
      t)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Next we need a pair of functions that can transform the buffer between parsed and raw states. Two variables will be needed, which should be local to the buffer: one to hold the raw buffer contents, and another to track the current state of the buffer.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;x509-certificate-parse&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Parse the buffer as a certificate, trying multiple encodings.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (not (eq x509-certificate-mode-display &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:raw&lt;/span&gt;))
      (&lt;span style=&quot;color: #cb4b16; font-weight: bold;&quot;&gt;error&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;The buffer is not in :raw mode, it's in %s mode.&quot;&lt;/span&gt;
             x509-certificate-mode-display)
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((modified (buffer-modified-p)))
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Save the contents of the buffer.&lt;/span&gt;
      (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; x509-certificate-mode-text (buffer-string))
      (read-only-mode -1)
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Try to convert the buffer through different formats.&lt;/span&gt;
      (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (not (x509-certificate-parse-command &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;pem&quot;&lt;/span&gt;))
          (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (not (x509-certificate-parse-command &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;der&quot;&lt;/span&gt;))
              (&lt;span style=&quot;color: #cb4b16; font-weight: bold;&quot;&gt;error&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Failed to parse buffer as X.509 certificate.&quot;&lt;/span&gt;)))
      (read-only-mode 1)
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Restore previous modification state.&lt;/span&gt;
      (set-buffer-modified-p modified)
      (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; x509-certificate-mode-display &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:parsed&lt;/span&gt;))))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;x509-certificate-raw&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Revert buffer to unparsed contents.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (not (eq x509-certificate-mode-display &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:parsed&lt;/span&gt;))
      (&lt;span style=&quot;color: #cb4b16; font-weight: bold;&quot;&gt;error&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;The buffer is not in :parsed mode, it's in %s mode.&quot;&lt;/span&gt;
             x509-certificate-mode-display)
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((modified (buffer-modified-p)))
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Delete the buffer, which currently contains the parsed format.&lt;/span&gt;
      (read-only-mode -1)
      (erase-buffer)
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Convert the buffer into its raw format.&lt;/span&gt;
      (insert x509-certificate-mode-text)
      (read-only-mode 1)
      &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Restore previous modification state.&lt;/span&gt;
      (set-buffer-modified-p modified)
      (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; x509-certificate-mode-display &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:raw&lt;/span&gt;))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
With the transformation functions in place, we would like a keybinding to easily toggle between them. This is done by making a function that dispatches based on the state variable. We also create a keybinding for this mode, instead of tainting the global key map with our function.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;x509-certificate-toggle-display&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Toggle between raw and parsed displays of the buffer.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;cond&lt;/span&gt; ((eq x509-certificate-mode-display &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:parsed&lt;/span&gt;)
         (x509-certificate-raw))
        ((eq x509-certificate-mode-display &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:raw&lt;/span&gt;)
         (x509-certificate-parse))
        (t
         (&lt;span style=&quot;color: #cb4b16; font-weight: bold;&quot;&gt;error&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Variable x509-certificate-mode-display is in an unknown state: %s&quot;&lt;/span&gt;
                x509-certificate-mode-display))))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defvar&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;x509-certificate-mode-map&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((map (make-keymap)))
    (define-key map (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-c C-c&quot;&lt;/span&gt;) 'x509-certificate-toggle-display)
    map)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Keymap for X.509 Certificate major mode&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Calling modes manually via &lt;code&gt;M-x&lt;/code&gt; is a pain, so we add likely extensions to a list that maps them to our new major mode. Certificates often have wacky extensions, though, so we also provide a regular expression to match text at the beginning of the buffer.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(add-to-list 'auto-mode-alist '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\\.&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;der&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;crt&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;pem&lt;/span&gt;&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;$&quot;&lt;/span&gt; . x509-certificate-mode))
(add-to-list 'magic-mode-alist '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;-----BEGIN CERTIFICATE-----&quot;&lt;/span&gt; . x509-certificate-mode))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Finally, we create our major mode and register it in the Emacs environment. Overly verbose comments are inline.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;x509-certificate-mode&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Major mode for viewing X.509 certificates&quot;&lt;/span&gt;
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Ensure this function is callable by M-x.&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Clear the slate.&lt;/span&gt;
  (kill-all-local-variables)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Use our key map just for this buffer&lt;/span&gt;
  (use-local-map x509-certificate-mode-map)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Set the symbol (computer-recognizable) and name (human-visible).&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; major-mode 'x509-certificate-mode
        mode-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;X.509&quot;&lt;/span&gt;)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Create the two buffer-local variables on which our functions depend.&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defvar-local&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;x509-certificate-mode-display&lt;/span&gt; &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:raw&lt;/span&gt;
    &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Current display mode of the data&quot;&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defvar-local&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;x509-certificate-mode-text&lt;/span&gt; nil
    &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Original text of the buffer&quot;&lt;/span&gt;)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Run the customization hooks.&lt;/span&gt;
  (run-hooks 'x509-certificate-mode-hook)
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Perform the initial parse of the buffer&lt;/span&gt;
  (x509-certificate-parse))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;provide&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;x509-certificate-mode&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
And that's it, not much to it. From this point forward I will look at parsed certificates in Emacs by default. This makes me ridiculously happy.
&lt;/p&gt;
</description>
        <pubDate>Tue, 24 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/24/x509-mode/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/24/x509-mode/</guid>
        
        
      </item>
    
      <item>
        <title>I Am Your Everywhere</title>
        <description>&lt;p&gt;
I've been using Mutt for my email, but turning off the exit key for Emacs has made using Mutt inconvenient. The reason is that Mutt, like all decent programs, allows you to compose emails in the editor of your choice. For me, this ends up being Emacs in a terminal. Unfortunately when I am done composing an email, I need to exit Emacs to return control to Mutt&amp;#x2026; which is something I've made harder for myself.
&lt;/p&gt;

&lt;p&gt;
The obvious solution for this made me think of a line from &lt;a href=&quot;https://www.youtube.com/watch?v=uLM5BWTYonI&amp;feature=youtu.be&amp;t=4m30s&quot;&gt;JourneyQuest&lt;/a&gt;, &quot;I'm your everywhere!&quot; Emacs offers &lt;code&gt;server-mode&lt;/code&gt;, which allows &lt;code&gt;emacsclient&lt;/code&gt; to use an existing Emacs instance for editing. All we have to do is enable server mode:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(server-mode)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now I can change my normal declaration of &lt;code&gt;$EDITOR&lt;/code&gt; from &lt;code&gt;emacs -nw&lt;/code&gt; to: &lt;code&gt;emacsclient --alternate-editor=vi --create-frame&lt;/code&gt;. This allows me to use vi if something goes wrong. I have no problem with vi, it's great, but Emacs is my preference. This also creates a new frame, which is what most people would call a window. Creating a new frame, which appears in my current view, is superior to making me change my virtual desktop from the Mutt terminal over to the dedicated Emacs virtual desktop.
&lt;/p&gt;

&lt;p&gt;
Of course I hope to stop using Mutt, moving my full email workflow into Emacs, but we're going slow and steady.
&lt;/p&gt;
</description>
        <pubDate>Mon, 23 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/23/i-am-your-everywhere/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/23/i-am-your-everywhere/</guid>
        
        
      </item>
    
      <item>
        <title>Removing Safeties</title>
        <description>&lt;p&gt;
This blog is not focused on the specifics of Emacs lisp, but as we use new concepts I'll try and talk about them briefly. In elisp, symbols are not tied to a single meaning. They are nuanced, and may have variables, functions, or properties attached to them. We previously used this when we ran &lt;code&gt;(fset 'yes-or-no-p 'y-or-n-p)&lt;/code&gt; to change the function associated with a symbol. All of the times we've run &lt;code&gt;setq&lt;/code&gt; we have been setting the value associated with a symbol. Today we'll be setting the property associated with a symbol.
&lt;/p&gt;

&lt;p&gt;
Let's fool around with this a bit. First we make a function, and disable it.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::test-disabling&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;XXX-MAK: DEMO FUNCTION&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (message &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Disabled: %s&quot;&lt;/span&gt;
           (get 'mak::test-disabling 'disabled)))

(put 'mak::test-disabling 'disabled &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;This function has been disabled as a demonstration.&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now let's run the function non-interactively, by calling it from elisp as opposed to a &lt;code&gt;M-x&lt;/code&gt; or a keybinding, and see what happens.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(mak::test-disabling)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This prints the message &lt;code&gt;Disabled: This function has been disabled as a demonstration.&lt;/code&gt; as expected. Next we'll bind it to a key, only inside the current buffer for safety, and then trigger the key to see what happens.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(local-set-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-M-D&quot;&lt;/span&gt;) 'mak::test-disabling)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
This results in the following buffer being displayed:
&lt;/p&gt;


&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;http://fasciism.com/img/2017-01-22-removing-safeties.png&quot; alt=&quot;2017-01-22-removing-safeties.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;
Once I enter &lt;code&gt;y&lt;/code&gt;, the function executes and displays &lt;code&gt;Disabled: nil&lt;/code&gt;. Now that we have a good handle on this, let's clean up the mess we just made:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(fmakunbound 'mak::test-disabling)
(local-unset-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-M-D&quot;&lt;/span&gt;))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
We could have used functions we already knew to bind things to &lt;code&gt;nil&lt;/code&gt;, but the functions above are more appropriate and have the potential to be more thorough.
&lt;/p&gt;

&lt;p&gt;
Now, let's take the safeties off. We'll start with the region-based case adjustments. We've not discussed the region, so just think of it as the highlighted selection. These commands are constantly useful to me when I'm tidying up text from other sources.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(put 'downcase-region  'disabled nil)
(put 'upcase-region    'disabled nil)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
The narrowing functions allow a buffer to alter its display to only include the desired text. This is useful both for blocking out distracting elements of a buffer, such as everything except a single function or paragraph, and for making and running keyboard macros without risking damage to unrelated sections of the buffer.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(put 'narrow-to-region 'disabled nil)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Finally, the ability to set a goal column is useful when dealing with column-based data, and for keyboard macros. Setting a goal column means that when the point (cursor) enters a new line, it will attempt (if the line is long enough) to place itself at the specified column.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(put 'set-goal-column  'disabled nil)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Sun, 22 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/22/removing-safeties/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/22/removing-safeties/</guid>
        
        
      </item>
    
      <item>
        <title>Waiting For Tonight</title>
        <description>&lt;p&gt;
Midnight mode clears out the list of buffers to trim Emacs down. It does this daily, to buffers that have not been accessed recently, to buffers that are likely to be temporary.
&lt;/p&gt;

&lt;p&gt;
The first thing I need to do is protect certain critical buffers from Midnight's selection. I'd be livid if any tramp or eshell buffers got nuked:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;midnight&lt;/span&gt;)
(add-to-list 'clean-buffer-list-kill-never-regexps &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\\`\\*tramp::.*\\*\\`&quot;&lt;/span&gt;)
(add-to-list 'clean-buffer-list-kill-never-regexps &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\\`\\*eshell::.*\\*\\`&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I don't think that keeping buffers around for the default three days is necessary:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; clean-buffer-list-delay-general 1)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Set the culling to occur when I'm least likely to be awake:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(midnight-delay-set 'midnight-delay &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;4:30am&quot;&lt;/span&gt;)
(midnight-mode t)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now that I've got midnight-mode to clean up after me, I might just stop closing buffers. We'll see.
&lt;/p&gt;

&lt;p&gt;
Midnight mode will be especially useful when I automate the posting of this blog, and the creation of checklists.
&lt;/p&gt;
</description>
        <pubDate>Sat, 21 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/21/waiting-for-tonight/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/21/waiting-for-tonight/</guid>
        
        
      </item>
    
      <item>
        <title>Cycling Home</title>
        <description>&lt;p&gt;
I have noticed the configurations of many others use a function similar to the one below to add some intelligence to moving to the start of a line. It seems like a good idea.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::cycle-bol-boi&lt;/span&gt; ()
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Cycle between beginning of line and beginning of indentation.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((orig (point)))
    (back-to-indentation)
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;when&lt;/span&gt; (= orig (point))
      (move-beginning-of-line 1))))

(global-set-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-a&quot;&lt;/span&gt;) 'mak::cycle-bol-boi)
(global-set-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&amp;lt;home&amp;gt;&quot;&lt;/span&gt;) 'mak::cycle-bol-boi)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Fri, 20 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/20/cycling-home/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/20/cycling-home/</guid>
        
        
      </item>
    
      <item>
        <title>One Coding System To Rule Them All</title>
        <description>&lt;p&gt;
Since the year 2010, I've felt like I live in the future. Strangely, 2000 and 2001 didn't have quite the same effect. Regardless, we do live in the future so it's time to accept that ASCII has been superseded. This originally came from &lt;a href=&quot;https://thraxys.wordpress.com/2016/01/13/utf-8-in-emacs-everywhere-forever/&quot;&gt;this blog post.&lt;/a&gt;
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;when&lt;/span&gt; (display-graphic-p)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
With that done, it's time to use &lt;code&gt;C-x 8 RET 0950&lt;/code&gt; to test our settings with a Unicode code point that looks similar to the Emacs logo: &lt;a href=&quot;http://www.fileformat.info/info/unicode/char/0950/index.htm&quot;&gt;ॐ&lt;/a&gt;.
&lt;/p&gt;
</description>
        <pubDate>Thu, 19 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/19/one-coding-system-to-rule-them-all/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/19/one-coding-system-to-rule-them-all/</guid>
        
        
      </item>
    
      <item>
        <title>Visualizing Tabs</title>
        <description>&lt;p&gt;
Normally &lt;code&gt;&amp;lt;backspace&amp;gt;&lt;/code&gt; is bound to &lt;code&gt;backward-delete-char-untabify&lt;/code&gt;, meaning that if you have the cursor to the right of a tab, and then backspace, it will convert the tab into 8 spaces and remove one. I don't find that intuitive. I'd prefer that backspace delete a single character, whatever it may be.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(global-set-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&amp;lt;backspace&amp;gt;&quot;&lt;/span&gt;) 'backward-delete-char)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I'd also like to be able to tell if a file is indented with tabs or spaces. I like tabs for indentation, and spaces for alignment, personally. Let's enable &lt;code&gt;whitespace-mode&lt;/code&gt;, allowing us to see a variety of whitespace-related issues:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; whitespace-style '(face trailing tabs empty space-after-tab tab-mark))
(add-hook 'text-mode-hook 'whitespace-mode)
(add-hook 'prog-mode-hook 'whitespace-mode)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now we will see tabs as &lt;code&gt;»&lt;/code&gt;, and trailing spaces and lines in the file will appear red.
&lt;/p&gt;

&lt;p&gt;
By default, &lt;code&gt;M-SPC&lt;/code&gt; turns a run of whitespace into a single space, and &lt;code&gt;M-\&lt;/code&gt; turns a run of whitespace into nothing. It's more useful to have a single key binding for this that cycles through those options, and back to nothing.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(global-set-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;M-SPC&quot;&lt;/span&gt;) 'cycle-spacing)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Wed, 18 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/18/visualizing-tabs/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/18/visualizing-tabs/</guid>
        
        
      </item>
    
      <item>
        <title>There Can Be Only One</title>
        <description>&lt;p&gt;
Once thing you start running into when you have many buffers is colliding names. For instance, if I open up two files &lt;code&gt;~/foo/test&lt;/code&gt; and &lt;code&gt;~/bar/test&lt;/code&gt; I would have two buffers named &lt;code&gt;test&amp;lt;1&amp;gt;&lt;/code&gt; and &lt;code&gt;test&amp;lt;2&amp;gt;&lt;/code&gt;. This depends on the version of Emacs, but is not very attractive.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;uniquify&lt;/span&gt;)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; uniquify-buffer-name-style 'post-forward
      uniquify-separator &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;::&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now those two buffers would be named &lt;code&gt;test::foo&lt;/code&gt; and &lt;code&gt;test::bar&lt;/code&gt;, which I find more palatable.
&lt;/p&gt;
</description>
        <pubDate>Tue, 17 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/17/there-can-be-only-one/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/17/there-can-be-only-one/</guid>
        
        
      </item>
    
      <item>
        <title>Spellchecking</title>
        <description>&lt;p&gt;
We're over two weeks into this whole blogging debacle, I guess it's time to start actually spellchecking my blog posts. I'm adapting this from &lt;a href=&quot;http://blog.binchen.org/posts/what-s-the-best-spell-check-set-up-in-emacs.html&quot;&gt;What's the best spell check setup in emacs&lt;/a&gt;, which was updated within the last month. Looking into Hunspell versus Aspell, it turns out that the latter is unmaintained while the former had a release in the last month.
&lt;/p&gt;

&lt;p&gt;
The first thing I need to ensure is that both American and Canadian spellings work, because I have to write in both styles, constantly.
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
👻 echo color colour | hunspell -a -d en_CA,en_US
@(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.3)
*
*
&lt;/pre&gt;

&lt;p&gt;
Seems like Hunspell does what I need.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; ispell-program-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;hunspell&quot;&lt;/span&gt;
      ispell-local-dictionary &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;en_CA&quot;&lt;/span&gt;
      ispell-local-dictionary-alist
      '((&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;en_CA&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;[[:alpha:]]&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;[&lt;/span&gt;&lt;span style=&quot;color: #b58900; font-weight: bold;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #2aa198;&quot;&gt;[:alpha:]]&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;[']&quot;&lt;/span&gt; nil (&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;-d&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;en_CA,en_US&quot;&lt;/span&gt;) nil utf-8)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'prog-mode-hook 'flyspell-prog-mode)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Mon, 16 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/16/spellchecking/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/16/spellchecking/</guid>
        
        
      </item>
    
      <item>
        <title>Picking Up Where We Left Off</title>
        <description>&lt;p&gt;
One nice feature I've experienced in some Vim installations is the editor remembering where my cursor was the last time I viewed a file. Emacs can do that, too:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; save-place-file &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.d/saved-point-places&quot;&lt;/span&gt;
      save-place-forget-unreadable-files nil)
(save-place-mode t)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Sun, 15 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/15/picking-up-where-we-left-off/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/15/picking-up-where-we-left-off/</guid>
        
        
      </item>
    
      <item>
        <title>Backups And Autosave</title>
        <description>&lt;p&gt;
Since clearing my configuration, my filesystem has started to drown in &lt;code&gt;*~&lt;/code&gt; files and the occasional &lt;code&gt;#*#&lt;/code&gt; file. This is a result of Emacs's default safety net, which I do not appreciate.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; auto-save-default nil  &lt;span style=&quot;color: #586e75;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Prevent *~  files&lt;/span&gt;
      make-backup-files nil) &lt;span style=&quot;color: #586e75;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Prevent #*# files&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I'm sure I'll live to regret this. You'll notice that I used the more compact form of setting multiple variables this time. I'm going to stick with that from now on.
&lt;/p&gt;
</description>
        <pubDate>Sat, 14 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/14/backups-and-autosave/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/14/backups-and-autosave/</guid>
        
        
      </item>
    
      <item>
        <title>Remembering History</title>
        <description>&lt;p&gt;
I don't exit Emacs often, but when I do it is bothersome to lose recently used commands and filenames. As usual, others have felt this way and mitigated the issue with the creation of &lt;code&gt;savehist-mode&lt;/code&gt;:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(savehist-mode &amp;amp;optional ARG)&lt;br  /&gt;
&lt;br  /&gt;
Toggle saving of minibuffer history (Savehist mode). With a prefix argument ARG, enable Savehist mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.&lt;br  /&gt;
&lt;br  /&gt;
When Savehist mode is enabled, minibuffer history is saved periodically and when exiting Emacs. When Savehist mode is enabled for the first time in an Emacs session, it loads the previous minibuffer history from ‘savehist-file’.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
While saving the text in the minibuffer is a good start, there are a number of other aspects of a session that I would like to be saved. Surprising nobody, the variable &lt;code&gt;savehist-additional-variables&lt;/code&gt; addresses this:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
List of additional variables to save.&lt;br  /&gt;
&lt;br  /&gt;
Each element is a symbol whose value will be persisted across Emacs sessions that use Savehist. The contents of variables should be printable with the Lisp printer. You don’t need to add minibuffer history variables to this list, all minibuffer histories will be saved automatically as long as ‘savehist-save-minibuffer-history’ is non-nil.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
So let's add every history-related variable that I can find. This will even maintain the clipboard and its history (&lt;code&gt;kill-ring&lt;/code&gt;).
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; savehist-file &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.p/savehist&quot;&lt;/span&gt;)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; savehist-additional-variables
      '(buffer-name-history
        compile-command
        extended-command-history
        file-name-history
        kill-ring
        regexp-search-ring
        search-ring))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now that we've configured the mode, we activate it:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(savehist-mode 1)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Henceforth I don't need to worry about losing previously-entered commands/parameters on my rare exits from Emacs. I'll probably have to add more variables later.
&lt;/p&gt;
</description>
        <pubDate>Fri, 13 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/13/remembering-history/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/13/remembering-history/</guid>
        
        
      </item>
    
      <item>
        <title>Unfill Paragraph</title>
        <description>&lt;p&gt;
I've been into plain text for fifteen years now, and for much of that time I adhered to the rule of maintaining an eighty-character column width. While I usually continue to adhere to that for comments in source code, I've recently softened my stance when it comes to other text. This change occurred during the writing of the thesis proposal for my Master's degree (currently in progress). It turns out that viewing diffs (even word diffs) is difficult when text changes reflow the paragraph onto different lines. So as a result of my newly-found love for text that is easily diffed, I sought out a way to turn paragraphs containing line breaks into a single, unbroken line.
&lt;/p&gt;

&lt;p&gt;
In Emacs, the process of reflowing text to fit between the left margin and a chosen column is called 'filling'. Emacs maintains a variable, &lt;code&gt;fill-column&lt;/code&gt;, which defaults to &lt;code&gt;70&lt;/code&gt;. This variable is used by &lt;code&gt;fill-paragraph&lt;/code&gt; (bound to &lt;code&gt;M-q&lt;/code&gt;) and together they are used to reflow text into a given column size. Frequently, both in fixing my thesis proposal and copying snippets of text into this blog, I need to reflow text as though it had an infinite column width, and the below does just that:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Originally by Stefan Monnier &lt;a href=&quot;mailto:foo%40acm.org&quot;&gt;&amp;lt;foo@acm.org&amp;gt;&lt;/a&gt;&lt;/span&gt;
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::unfill-paragraph&lt;/span&gt; (&lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; region)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Takes a multi-line paragraph and makes it into a single line of text.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt; (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;progn&lt;/span&gt; (barf-if-buffer-read-only) '(t)))
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((fill-column (point-max)))
    (fill-paragraph nil region)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Since &lt;code&gt;fill-paragraph&lt;/code&gt; is bound to &lt;code&gt;M-q&lt;/code&gt;, binding its complement to &lt;code&gt;M-Q&lt;/code&gt; seems appropriate:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(global-set-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;M-Q&quot;&lt;/span&gt;) 'mak::unfill-paragraph)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I don't want text to scroll horizontally in a window, nor do I wish for it to wrap in the middle of a word. &lt;code&gt;visual-line-mode&lt;/code&gt; takes care of that. Here we add a hook to all modes that inherit from &lt;code&gt;text-mode&lt;/code&gt;, which is most writing/programming modes, that enables &lt;code&gt;visual-line-mode&lt;/code&gt; in their buffers:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(add-hook 'text-mode-hook 'turn-on-visual-line-mode)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I still use &lt;code&gt;fill-paragraph&lt;/code&gt; on occasion, so we will give it a more modern value:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq-default&lt;/span&gt; fill-column 80)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I use &lt;code&gt;setq-default&lt;/code&gt; here instead of &lt;code&gt;setq&lt;/code&gt; because some variables are global, and some are local to the buffer in which they are set. &lt;code&gt;setq-default&lt;/code&gt; provides a default value for buffer-local values, like &lt;code&gt;fill-column&lt;/code&gt;.
&lt;/p&gt;
</description>
        <pubDate>Thu, 12 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/12/unfill-paragraph/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/12/unfill-paragraph/</guid>
        
        
      </item>
    
      <item>
        <title>Whitespace After Periods</title>
        <description>&lt;p&gt;
Emacs uses a number of heuristics to induce structure on buffer text. One of these heuristics is that, by default, a single space is not the end of a sentence, but is an abbreviation. This interpretation of periods prevents Emacs from wrapping text after periods with only a single space.
&lt;/p&gt;

&lt;p&gt;
I don't put two spaces after my periods, and I like using word-wrapping.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; sentence-end-double-space nil)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Reading through the variables documentation using the &lt;code&gt;describe-variable&lt;/code&gt; help facility (&lt;code&gt;C-h v sentence-end-double-space&lt;/code&gt;), we find other variables of interest:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
Non-nil means a single space does not end a sentence.&lt;br  /&gt;
&lt;br  /&gt;
This is relevant for filling.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
Filling will be discussed tomorrow, and is known elsewhere as reflowing.
&lt;/p&gt;
</description>
        <pubDate>Wed, 11 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/11/whitespace-after-periods/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/11/whitespace-after-periods/</guid>
        
        
      </item>
    
      <item>
        <title>Cursor Craving Attention</title>
        <description>&lt;p&gt;
The blinking cursor is in some ways a useful feedback mechanism: it draws your attention to it and indicates that the terminal hasn't stalled. Personally, I don't want it drawing my attention, since attention is a precious, limited, and fleeting resource. I also use the GUI almost exclusively, so terminal stalls aren't as frequent.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(blink-cursor-mode -1)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Tue, 10 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/10/cursor-craving-attention/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/10/cursor-craving-attention/</guid>
        
        
      </item>
    
      <item>
        <title>Ghost In The Eshell</title>
        <description>&lt;p&gt;
A problem with fonts and unicode is that many of the characters have no glyphs in a given font. This is going to bite us immediately unless we address it somehow. Our solution, &lt;a href=&quot;http://ergoemacs.org/emacs/emacs_list_and_set_font.html&quot;&gt;inspired by Ergo Emacs&lt;/a&gt;, is to switch to a different font when rendering emoji. I've chosen to use &lt;a href=&quot;https://www.google.com/get/noto/&quot;&gt;Google Noto&lt;/a&gt; as my font for this, since it is dedicated to full Unicode coverage:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::ghost-or-percent&lt;/span&gt; ()
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)                                                   &lt;span style=&quot;color: #586e75;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Allow call via M-x or binding&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((ghost &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&amp;#128123;&quot;&lt;/span&gt;)                                              &lt;span style=&quot;color: #586e75;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;My desired prompt&lt;/span&gt;
        (percent &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;%&quot;&lt;/span&gt;))                                            &lt;span style=&quot;color: #586e75;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;My fallback prompt&lt;/span&gt;
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;and&lt;/span&gt; (display-graphic-p)                                  &lt;span style=&quot;color: #586e75;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Are we in the GUI?&lt;/span&gt;
             (member &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Noto Emoji&quot;&lt;/span&gt; (font-family-list)))            &lt;span style=&quot;color: #586e75;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Do we have the emoji font?&lt;/span&gt;
        (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;progn&lt;/span&gt; (set-fontset-font t ?&amp;#128123; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Noto Emoji&quot;&lt;/span&gt; nil 'prepend) &lt;span style=&quot;color: #586e75;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Use the emoji font for the ghost&lt;/span&gt;
               ghost)                                             &lt;span style=&quot;color: #586e75;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Return desired prompt&lt;/span&gt;
      percent)))                                                  &lt;span style=&quot;color: #586e75;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Return fallback prompt&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I like my prompts simple. Prior to this, my prompt has been a lone percent sign for the last decade. I'm keeping the percent sign as a fallback in case I'm on a terminal, or a host missing the Noto Emoji font.
&lt;/p&gt;

&lt;p&gt;
The &lt;code&gt;set-fontset-font&lt;/code&gt; call is the heart of the above function, so let's look at its description:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(set-fontset-font NAME TARGET FONT-SPEC &amp;amp;optional FRAME ADD)&lt;br  /&gt;
&lt;br  /&gt;
Modify fontset NAME to use FONT-SPEC for TARGET characters.&lt;br  /&gt;
&lt;br  /&gt;
NAME is &amp;#x2026; t for the default fontset.&lt;br  /&gt;
&lt;br  /&gt;
TARGET may be a single character to use FONT-SPEC for.&lt;br  /&gt;
&lt;br  /&gt;
FONT-SPEC may one of these:&lt;br  /&gt;
&amp;#xa0;* A font name string.&lt;br  /&gt;
&lt;br  /&gt;
Optional 4th argument FRAME is a frame or nil for the selected frame that is concerned in the case that NAME is nil.&lt;br  /&gt;
&lt;br  /&gt;
Optional 5th argument ADD, if non-nil, specifies how to add FONT-SPEC to the font specifications for TARGET previously set. If it is ‘prepend’, FONT-SPEC is prepended. If it is ‘append’, FONT-SPEC is appended. By default, FONT-SPEC overrides the previous settings.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
The end result of this is that we've configured Emacs to always display the ghost emoji in the Noto Emoji font.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::eshell-prompt&lt;/span&gt; ()
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  (concat (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;if&lt;/span&gt; (not (eq 0 (current-column)))
            &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\n&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&quot;&lt;/span&gt;)
          (mak::ghost-or-percent)
          &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot; &quot;&lt;/span&gt;))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; eshell-prompt-function 'mak::eshell-prompt)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Eshell has special behaviour when you have the point after the prompt, honouring input as commands, so we need to explain to it how to recognize our newly-customized prompt.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; eshell-prompt-regexp (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;^%s &quot;&lt;/span&gt; (mak::ghost-or-percent)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Finally, we'll expand my war on welcome messages into Eshell:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; eshell-banner-message &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
From here I can run &lt;code&gt;M-x eshell&lt;/code&gt; and have a functional shell inside Emacs.
&lt;/p&gt;
</description>
        <pubDate>Mon, 09 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/09/ghost-in-the-eshell/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/09/ghost-in-the-eshell/</guid>
        
        
      </item>
    
      <item>
        <title>War On Mice</title>
        <description>&lt;p&gt;
Continuing our war on mice (or in my case a Logitech M570 Trackball which I love dearly) inside Emacs, we will unbind most mouse events. We'll still allow scrolling, just in case we have a use for it.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::silent&lt;/span&gt; (&lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;rest&lt;/span&gt; ignored)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;interactive&lt;/span&gt;)
  nil)

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::mouse-disable&lt;/span&gt; (&lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;rest&lt;/span&gt; ignored)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;dolist&lt;/span&gt; (event '(&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;down-&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;drag-&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;double-&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;triple-&quot;&lt;/span&gt;))
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;dotimes&lt;/span&gt; (button 3)
      (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let&lt;/span&gt; ((key (format &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&amp;lt;%smouse-%d&amp;gt;&quot;&lt;/span&gt; event (1+ button))))
        &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Bind to a function that returns nil.&lt;/span&gt;
        &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Binding to nil would unbind the key, resulting in errors when used.&lt;/span&gt;
        &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Alternatively, we could bind to individual lambdas, but we don't.&lt;/span&gt;
        (global-set-key (kbd key) 'mak::silent)))))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Emacs Lisp, like most Lisp dialects, allows almost any character in a function name. Since this is a personal function, I have prefixed it with my first name and used C++'s namespace notation, despite that notation having no semantic meaning to Emacs Lisp. Since each Emacs frame requires mouse events to be disabled separately, we need to advise the Emacs function responsible for creating frames.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Run for first frame.&lt;/span&gt;
(mak::mouse-disable)

&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Run in the context of subsequently created frames.&lt;/span&gt;
(advice-add 'make-frame-command &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:before&lt;/span&gt; #'mak::mouse-disable)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Advising is a Lisp concept that allows hooking a function before, after, or around (before and after) its execution. It is extremely useful for customizing behaviour.
&lt;/p&gt;
</description>
        <pubDate>Sun, 08 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/08/war-on-mice/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/08/war-on-mice/</guid>
        
        
      </item>
    
      <item>
        <title>Decluttering</title>
        <description>&lt;p&gt;
Until somewhat recently I exclusively used Emacs in a terminal emulator, but now I understand the benefits the GUI offers: more colours, inline graphics, different fonts, and the fringe. We'll get to all of those in due time. The parts of the GUI that I'm not interested in are those which are intended to be used via the mouse.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;when&lt;/span&gt; (display-graphic-p)
  (menu-bar-mode -1)
  (tool-bar-mode -1)
  (scroll-bar-mode -1))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Since I'll still occasionally use Emacs in a terminal emulator, these interface elements are only disabled when Emacs is running in a GUI. Trying to disable them in the terminal, where they don't exist, will cause the startup customization process to error out. To learn about &lt;code&gt;display-graphic-p&lt;/code&gt;, we'll use a different help facility designed specifically for retrieving the docstrings of functions: &lt;code&gt;describe-function&lt;/code&gt; (&lt;code&gt;C-h f display-graphic-p&lt;/code&gt;):
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(display-graphic-p &amp;amp;optional DISPLAY)&lt;br  /&gt;
&lt;br  /&gt;
Return non-nil if DISPLAY is a graphic display.&lt;br  /&gt;
&lt;br  /&gt;
Graphical displays are those which are capable of displaying several frames and several different fonts at once. This is true for displays that use a window system such as X, and false for text-only terminals. DISPLAY can be a display name, a frame, or nil (meaning the selected frame's display).&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
By this point Emacs is looking appropriately svelte, especially compared to where we started:
&lt;/p&gt;


&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;http://fasciism.com/img/2017-01-07-before-and-after.png&quot; alt=&quot;2017-01-07-before-and-after.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;
</description>
        <pubDate>Sat, 07 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/07/decluttering/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/07/decluttering/</guid>
        
        
      </item>
    
      <item>
        <title>Welcome Wagon</title>
        <description>&lt;p&gt;
Even though I rarely close Emacs, when it starts up a splash buffer named &lt;code&gt;GNU Emacs&lt;/code&gt; is displayed:
&lt;/p&gt;


&lt;div class=&quot;figure&quot;&gt;
&lt;p&gt;&lt;img src=&quot;http://fasciism.com/img/2017-01-06-gnu-emacs-buffer.png&quot; alt=&quot;2017-01-06-gnu-emacs-buffer.png&quot; /&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;
This is unnecessary for me, so I'll disable it:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; inhibit-startup-screen t
      inhibit-startup-message t)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
In addition to the splash screen, I feel no need to be told what the &lt;code&gt;*scratch*&lt;/code&gt; buffer is for with it saying this each time:
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
&lt;/pre&gt;

&lt;p&gt;
We can force the &lt;code&gt;*scratch*&lt;/code&gt; buffer to start blank with:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; initial-scratch-message nil)
&lt;/pre&gt;
&lt;/div&gt;
</description>
        <pubDate>Fri, 06 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/06/welcome-wagon/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/06/welcome-wagon/</guid>
        
        
      </item>
    
      <item>
        <title>Self Publishing</title>
        <description>&lt;p&gt;
I previously mentioned that the sources for these blog entries are actually my configuration files. This means I'm actually living through this slow configuration process day by day. In truth, I have to live a couple days ahead of the blog to stay sane, but that will get better as things progress. One item that has been in place since day one is the export configuration for my Org-mode files. While on the first day I published the code that turns Org-mode files into live Elisp files, below is the setting that turns Org-mode files into Web pages.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;org&lt;/span&gt;)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;ox-publish&lt;/span&gt;)
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;ox-html&lt;/span&gt;)

&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Set up blog for export as an Org-mode project.&lt;/span&gt;
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; org-publish-project-alist
      '((&lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;fasciism&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:base-directory&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.d/&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:publishing-directory&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/src/fasciism/_posts/&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:base-extension&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;org&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:sub-superscript&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:toc&lt;/span&gt; nil
        &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:publishing-function&lt;/span&gt; org-html-publish-to-html
        &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:html-extension&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;html&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #839496; font-weight: bold;&quot;&gt;:body-only&lt;/span&gt; t)))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
First, the &lt;code&gt;require&lt;/code&gt; lines import the libraries necessary for the export process. I have not configured this process as much as I'd like, causing the blog to be ugly right now. We'll revisit this configuration at a later date by simply over-writing the value of &lt;code&gt;org-publish-project-alist&lt;/code&gt; in a later blog entry.
&lt;/p&gt;

&lt;p&gt;
To perform the publishing, I run &lt;code&gt;M-x org-publish-current-file&lt;/code&gt;:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(org-publish-current-file &amp;amp;optional FORCE ASYNC)&lt;br  /&gt;
&lt;br  /&gt;
Publish the current file.&lt;br  /&gt;
&lt;br  /&gt;
With prefix argument FORCE, force publish the file. When optional argument ASYNC is non-nil, publishing will be done asynchronously, in another process.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
We'll talk about prefix arguments at a later date. For now, running this command populates the &lt;code&gt;_posts&lt;/code&gt; directory of the Jekyll project that produces this blog.
&lt;/p&gt;

&lt;p&gt;
As of today, this blog has a Twitter account, &lt;a href=&quot;https://twitter.com/fasciism&quot;&gt;@fasciism&lt;/a&gt;.
&lt;/p&gt;
</description>
        <pubDate>Thu, 05 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/05/self-publishing/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/05/self-publishing/</guid>
        
        
      </item>
    
      <item>
        <title>No Escape</title>
        <description>&lt;p&gt;
As part of my dedication to staying in Emacs, I feel that I should endeavour to keep it open all of the time. While I can normally manage this, my mind occasionally wanders and reflexes take over and I find myself unintentionally chording the exit sequence. First, let's use the &lt;code&gt;describe-key&lt;/code&gt; help facility (&lt;code&gt;C-h k&lt;/code&gt;) to discover what is bound to the exit sequence (&lt;code&gt;C-h k C-x C-c&lt;/code&gt;):
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
C-x C-c runs the command save-buffers-kill-terminal (found in global-map), which is an interactive compiled Lisp function in ‘files.el’.&lt;br  /&gt;
&lt;br  /&gt;
It is bound to C-x C-c, &amp;lt;menu-bar&amp;gt; &amp;lt;file&amp;gt; &amp;lt;exit-emacs&amp;gt;.&lt;br  /&gt;
&lt;br  /&gt;
(save-buffers-kill-terminal &amp;amp;optional ARG)&lt;br  /&gt;
&lt;br  /&gt;
Offer to save each buffer, then kill the current connection.&lt;br  /&gt;
If the current frame has no client, kill Emacs itself.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
We can unbind the key using &lt;code&gt;global-unset-key&lt;/code&gt;:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(global-unset-key (kbd &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;C-x C-c&quot;&lt;/span&gt;))
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Now when we chord &lt;code&gt;C-x C-c&lt;/code&gt; we will receive a message in the minibuffer stating &quot;C-x C-c is undefined&quot;. Now since my goal is only to prevent myself from unintentionally exiting Emacs, I should mention that I can still trigger the function that closes emacs (&lt;code&gt;exit-emacs&lt;/code&gt;) by calling it directly with &lt;code&gt;M-x save-buffers-kill-emacs&lt;/code&gt;. Let's look at the help for &lt;code&gt;M-x&lt;/code&gt;, which is used to execute any command that is configured as being interactively callable:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(execute-extended-command PREFIXARG &amp;amp;optional COMMAND-NAME TYPED)&lt;br  /&gt;
&lt;br  /&gt;
This function is for interactive use only; in Lisp code use ‘command-execute’ instead.&lt;br  /&gt;
&lt;br  /&gt;
Read a command name, then read the arguments and call the command.&lt;br  /&gt;
To pass a prefix argument to the command you are invoking, give a prefix argument to ‘execute-extended-command’.&lt;br  /&gt;
&lt;/p&gt;
</description>
        <pubDate>Wed, 04 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/04/no-escape/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/04/no-escape/</guid>
        
        
      </item>
    
      <item>
        <title>Simplified Confirmations</title>
        <description>&lt;p&gt;
There are many great choices for the first real customization to make to a stock Emacs configuration, but I've chosen one that to me most represents taking the safety off: simplifying confirmations via &lt;code&gt;yes-or-no-p&lt;/code&gt;. Lisp has a tradition of using the &lt;code&gt;p&lt;/code&gt;-suffix to denote predicates, statements which can be either true or false. Emacs offers excellent built-in help facilities, one of which searches the documentation of symbols (i.e., docstrings) for a pattern. Using this help facility, called &lt;code&gt;apropos-documentation&lt;/code&gt; (&lt;code&gt;C-h d yes-or-no-p&lt;/code&gt;), describes the function of interest as:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(yes-or-no-p PROMPT)&lt;br  /&gt;
&lt;br  /&gt;
Ask user a yes-or-no question. Return t if answer is yes, and nil if the answer is no. PROMPT is the string to display to ask the question. It should end in a space; `yes-or-no-p' adds &quot;(yes or no) &quot; to it.&lt;br  /&gt;
&lt;br  /&gt;
The user must confirm the answer with RET, and can edit it until it has been confirmed.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
Typing &lt;code&gt;yes&lt;/code&gt; and &lt;code&gt;no&lt;/code&gt; quickly becomes tiresome. Thankfully there's &lt;code&gt;y-or-n-p&lt;/code&gt;, described as:
&lt;/p&gt;

&lt;p class=&quot;verse&quot;&gt;
(y-or-n-p PROMPT)&lt;br  /&gt;
&lt;br  /&gt;
Ask user a &quot;y or n&quot; question. Return t if answer is &quot;y&quot;. PROMPT is the string to display to ask the question. It should end in a space; `y-or-n-p' adds &quot;(y or n) &quot; to it.&lt;br  /&gt;
&lt;br  /&gt;
No confirmation of the answer is requested; a single character is enough. SPC also means yes, and DEL means no.&lt;br  /&gt;
&lt;/p&gt;

&lt;p&gt;
This feels dangerous, but Emacs has great undo capabilities and the convenience is appreciable, so let's pull the trigger.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(fset 'yes-or-no-p 'y-or-n-p)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
The reason that I've used &lt;code&gt;fset&lt;/code&gt; above is that symbols have separate function and value cells, similar to how Lisp uses address (&lt;code&gt;car&lt;/code&gt;) and data (&lt;code&gt;cdr&lt;/code&gt;) cells.
&lt;/p&gt;
</description>
        <pubDate>Tue, 03 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/03/simplified-confirmations/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/03/simplified-confirmations/</guid>
        
        
      </item>
    
      <item>
        <title>Literate Configuration</title>
        <description>&lt;p&gt;
The first file that Emacs runs when it loads is &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. This file is written using &lt;a href=&quot;https://en.wikipedia.org/wiki/Emacs_Lisp&quot;&gt;Emacs Lisp (elisp)&lt;/a&gt;. It is important to get one thing clear in your head: Emacs is just a Lisp runtime. This means that while Emacs is primarily considered a text editor, that's just its user interface, not its application.
&lt;/p&gt;

&lt;p&gt;
The init file that I'm using right now takes every various files with the &lt;code&gt;.org&lt;/code&gt; extension and converts them to the correspondingly named &lt;code&gt;.el&lt;/code&gt; file, and then evaluates the files altering the Emacs active session. Comments are prefixed with &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html&quot;&gt;varying numbers of semicolons&lt;/a&gt;. In classic Unix fashion, &lt;a href=&quot;https://en.wikipedia.org/wiki/Lions%2527_Commentary_on_UNIX_6th_Edition,_with_Source_Code#.22You_are_not_expected_to_understand_this.22&quot;&gt;you are not expected to understand this&lt;/a&gt;.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;init.el --- Where all the magic begins&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;;&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Originally from:&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;;     &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;http://orgmode.org/worg/org-contrib/babel/intro.html#literate-emacs-init&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;;&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;This file loads Org-mode and then loads the rest of our Emacs initialization&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;from Emacs lisp embedded in literate Org-mode files.&lt;/span&gt;

&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Load up Org Mode and (now included) Org Babel for elisp embedded in Org Mode&lt;/span&gt;
&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;files.&lt;/span&gt;

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;defun&lt;/span&gt; &lt;span style=&quot;color: #268bd2;&quot;&gt;mak::load-literate-config&lt;/span&gt; (dir &lt;span style=&quot;color: #b58900;&quot;&gt;&amp;amp;optional&lt;/span&gt; regex)
  &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;Load and evaluate the files in dir matching regex, except blacklisted files.&quot;&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;unless&lt;/span&gt; regex
    (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; regex &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;&quot;&lt;/span&gt;))
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;dolist&lt;/span&gt; (org (directory-files dir t (concat regex &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;.*\\.org$&quot;&lt;/span&gt;)))
    (org-babel-load-file org)))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; dotfiles-dir (file-name-directory (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;or&lt;/span&gt; (buffer-file-name) load-file-name)))

(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;let*&lt;/span&gt; ((org-dir (expand-file-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;lisp&quot;&lt;/span&gt;
        (expand-file-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;org&quot;&lt;/span&gt;
         (expand-file-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;src&quot;&lt;/span&gt;
          dotfiles-dir))))
       (org-contrib-dir (expand-file-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;lisp&quot;&lt;/span&gt;
        (expand-file-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;contrib&quot;&lt;/span&gt;
         (expand-file-name &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;..&quot;&lt;/span&gt;
          org-dir))))
       (load-path (append (list org-dir org-contrib-dir)
                          (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;or&lt;/span&gt; load-path nil))))
  &lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Load up Org-mode and Org-babel.&lt;/span&gt;
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;org-install&lt;/span&gt;)
  (&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;require&lt;/span&gt; '&lt;span style=&quot;color: #268bd2; font-weight: bold;&quot;&gt;ob-tangle&lt;/span&gt;))

&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Load the customization variables from another file.&lt;/span&gt;
(&lt;span style=&quot;color: #859900; font-weight: bold;&quot;&gt;setq&lt;/span&gt; custom-file &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.p/custom.el&quot;&lt;/span&gt;)
(load custom-file 'noerror)

&lt;span style=&quot;color: #586e75;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #586e75;&quot;&gt;Load up all literate org-mode files matching the regex in each directory.&lt;/span&gt;
(mak::load-literate-config &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.d&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;\[0-9\]\\{4\\}-\[0-9\]\\{2\\}-\[0-9\]\\{2\\}-&quot;&lt;/span&gt;)
(mak::load-literate-config &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.d/drafts&quot;&lt;/span&gt; &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;YYYY-MM-DD-&quot;&lt;/span&gt;)
(mak::load-literate-config &lt;span style=&quot;color: #2aa198;&quot;&gt;&quot;~/.emacs.p&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
I have edited the bottom of the file to only import my blog posts, both published and unscheduled drafts, and my private configuration files.
&lt;/p&gt;
</description>
        <pubDate>Mon, 02 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/02/literate-configuration/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/02/literate-configuration/</guid>
        
        
      </item>
    
      <item>
        <title>Emacs Bankruptcy</title>
        <description>&lt;p&gt;
I have decided to claim &lt;a href=&quot;https://en.wikipedia.org/wiki/Email_bankruptcy&quot;&gt;Emacs bankruptcy&lt;/a&gt;, not because Emacs is groaning under the weight of all my customizations, but because I feel there is something instructive to be gained from watching someone build up their configuration slowly. I have personally declared 2017 to be &quot;The Year of Structure&quot; in my life, and part of that will be loading my life entirely into Emacs, and writing about it.
&lt;/p&gt;

&lt;p&gt;
Over time, I will likely have to go back and fix earlier entries as I realize mistakes that I've made, so none of these blog entries are immutable. You have been warned. The reason for this is that the primary source material for most posts exists as &lt;a href=&quot;http://orgmode.org/&quot;&gt;Org-mode&lt;/a&gt; files inside my &lt;code&gt;~/.emacs.d&lt;/code&gt; directory. I am also making the &lt;a href=&quot;https://github.com/fasciism/dot-emacs/&quot;&gt;source files&lt;/a&gt; for this blog publicly available.
&lt;/p&gt;

&lt;p&gt;
Tomorrow's post will contain the core of the Org-to-HTML+Elisp process.
&lt;/p&gt;
</description>
        <pubDate>Sun, 01 Jan 2017 00:00:00 +0000</pubDate>
        <link>http://fasciism.com/2017/01/01/emacs-bankruptcy/</link>
        <guid isPermaLink="true">http://fasciism.com/2017/01/01/emacs-bankruptcy/</guid>
        
        
      </item>
    
  </channel>
</rss>
