<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" >

  <title>Erik L. Arneson — Writer and Software Developer</title>
  <subtitle>Erik L. Arneson is a freelance writer and software developer with WordPress experience. He is located in Portland, Oregon.</subtitle>
  <generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator>
  <link href="https://arnesonium.com/feeds/markdown.xml" rel="self" type="application/atom+xml" />
  <link href="https://arnesonium.com/" rel="alternate" type="text/html" />
  <updated>2026-06-18T15:03:10+00:00</updated>
  <id>https://arnesonium.com/feeds/markdown.xml</id>
  <author>
    <name>Erik L. Arneson</name>
  </author>
      <entry>
        
        <title>Yasnippet and Emacs for Writing</title>
        <author>
          <name>Erik L. Arneson</name>
        </author>        
        <link href="https://arnesonium.com/2022/09/yasnippet-emacs-writing" rel="alternate" type="text/html" title="Yasnippet and Emacs for Writing" />
        <updated>2022-09-28T00:00:00+00:00</updated>
        <id>https://arnesonium.com/2022/09/yasnippet-emacs-writing</id>
          <category term="emacs" />
        
          <category term="writing" />
        
          <category term="lisp" />
        
          <category term="org-mode" />
        
          <category term="markdown" />
        
          <category term="podcast" />
        <content type="html" xml:base="https://arnesonium.com/2022/09/yasnippet-emacs-writing">&lt;p&gt;As a &lt;a href=&quot;/writing/&quot;&gt;freelance writer&lt;/a&gt;, I need to be ready to deliver high quality copy in a timely fashion. My editor of choice for writing is
Emacs. I have found that &lt;a href=&quot;https://github.com/joaotavora/yasnippet&quot;&gt;Yasnippet&lt;/a&gt; templates have streamlined my writing process.
&lt;!--more--&gt;&lt;/p&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#what-is-yasnippet&quot; id=&quot;markdown-toc-what-is-yasnippet&quot;&gt;What is Yasnippet?&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#installing-yasnippet&quot; id=&quot;markdown-toc-installing-yasnippet&quot;&gt;Installing Yasnippet&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#markdown-and-jekyll&quot; id=&quot;markdown-toc-markdown-and-jekyll&quot;&gt;Markdown and Jekyll&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#bonus-snippets&quot; id=&quot;markdown-toc-bonus-snippets&quot;&gt;Bonus Snippets&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#org-mode-templates&quot; id=&quot;markdown-toc-org-mode-templates&quot;&gt;Org Mode Templates&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#org2blog-and-podcast-show-notes&quot; id=&quot;markdown-toc-org2blog-and-podcast-show-notes&quot;&gt;org2blog and Podcast Show Notes&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#more-bonus-snippets&quot; id=&quot;markdown-toc-more-bonus-snippets&quot;&gt;More Bonus Snippets&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#writing-faster-is-writing-smarter&quot; id=&quot;markdown-toc-writing-faster-is-writing-smarter&quot;&gt;Writing Faster is Writing Smarter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;what-is-yasnippet&quot;&gt;What is Yasnippet?&lt;/h2&gt;

&lt;p&gt;As a templating system for Emacs, Yasnippet is well known by programmers. It can quickly expand
function definitions, control structures, and other templates into blocks of source code. Source code is just text.&lt;/p&gt;

&lt;p&gt;Since most of my writing originates in text format, templates are great for speeding up document
creation and avoiding common errors and omissions.&lt;/p&gt;

&lt;h2 id=&quot;installing-yasnippet&quot;&gt;Installing Yasnippet&lt;/h2&gt;

&lt;p&gt;With &lt;a href=&quot;https://github.com/jwiegley/use-package&quot;&gt;use-package&lt;/a&gt;, you can get started quickly with Yasnippet by including the following in your
Emacs init file.&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;use-package&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;yasnippet&lt;/span&gt;
  &lt;span class=&quot;ss&quot;&gt;:ensure&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;t&lt;/span&gt;
  &lt;span class=&quot;ss&quot;&gt;:config&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;yas-global-mode&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;use-package&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;yasnippet-snippets&lt;/span&gt;
  &lt;span class=&quot;ss&quot;&gt;:ensure&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;t&lt;/span&gt;
  &lt;span class=&quot;ss&quot;&gt;:after&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;yasnippet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For more detailed installation instructions, &lt;a href=&quot;https://joaotavora.github.io/yasnippet/&quot;&gt;check the Yasnippet documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;markdown-and-jekyll&quot;&gt;Markdown and Jekyll&lt;/h2&gt;

&lt;p&gt;This blog is primarily written in Markdown for Jekyll, which means that each file needs a YAML block at the top with specific
information. I have a template that looks like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# -*- mode: snippet -*-
# name: blogtop
# key: blogtop
# --
---
title: ${1:Title}
author: &quot;Erik L. Arneson&quot;
layout: post
permalink: `(format-time-string &quot;/%Y/%m/&quot;)`$2
comments: ${3:$$(yas-choose-value &apos;(&quot;true&quot; &quot;false&quot;))}
tags:
    - $4
---

$0
&amp;lt;!--more--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Not only does this template save me from needing to remember the format of the YAML block, but it ensures that frequently forgetten items
are included, such as the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;permalink&lt;/code&gt; setting and the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;

&lt;h3 id=&quot;bonus-snippets&quot;&gt;Bonus Snippets&lt;/h3&gt;

&lt;p&gt;The &lt;a href=&quot;https://github.com/AndreaCrotti/yasnippet-snippets&quot;&gt;official snippet collection&lt;/a&gt; contains a bunch of extra Markdown templates. 
&lt;a href=&quot;https://github.com/AndreaCrotti/yasnippet-snippets/tree/master/snippets/markdown-mode&quot;&gt;Check them out here.&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;org-mode-templates&quot;&gt;Org Mode Templates&lt;/h2&gt;

&lt;p&gt;My &lt;a href=&quot;https://orgmode.org/&quot;&gt;Org Mode&lt;/a&gt; files are more complex. Many writing clients expect deliveries in Microsoft Word files, but
I also frequently find myself needing to produce OpenDocument files, HTML, and even Markdown. The headers for these files need to support
all of these options.&lt;/p&gt;

&lt;p&gt;I use the following template to support all of the Org Mode configuration and options I require.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# -*- mode: snippet -*-
# name: header
# key: header
# --
#+TITLE: $1
#+LANGUAGE: ${2:en}
#+AUTHOR: ${3:$$(yas/choose-value &apos;(&quot;Erik L. Arneson&quot; &quot;Some Other Name&quot;))}
#+EMAIL: ${4:$$(yas/choose-value &apos;(&quot;list-of-email-addresses&quot;))}${5:
#+DESCRIPTION: $6}${7:
#+KEYWORDS: $8}
#+OPTIONS: num:nil toc:nil
#+ODT_STYLES_FILE: ${9:$$(yas/choose-value &apos;(&quot;list-of-template-files&quot;))}
#+bibliography: /path/to/MyLibrary.bib
#+cite_export: csl ${10:$$(yas/choose-value &apos;(&quot;chicago-fullnote-bibliography.csl&quot; &quot;modern-language-association.csl&quot; &quot;apa.csl&quot;))}
#+WWG: ${11:$$(yas/choose-value &apos;(&quot;0&quot; &quot;250&quot; &quot;500&quot; &quot;1000&quot;))}

$0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;org2blog-and-podcast-show-notes&quot;&gt;org2blog and Podcast Show Notes&lt;/h3&gt;

&lt;p&gt;I also use Org Mode to publish to WordPress websites using &lt;a href=&quot;https://github.com/org2blog/org2blog&quot;&gt;org2blog&lt;/a&gt;. For one of these websites, I
write show notes for podcast episodes. I use a template that looks like this.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# -*- mode: snippet -*-
# name: podcast
# key: podcast
# --
* $1
  :PROPERTIES:
  :POST_TAGS: $2
  :BLOG:      arnemancy
  :CATEGORY:  Podcast
  :POST_DATE: `(format-time-string &quot;[%Y-%m-%d %a %H:%M]&quot; nil nil)`
  :END:

$0

** Links

** Credits

#+begin_export html
Support me on Patreon: &amp;lt;a rel=&quot;payment&quot; href=&quot;https://www.patreon.com/arnemancy&quot;&amp;gt;https://www.patreon.com/arnemancy&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;
#+end_export
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This template reminds me of important items I need to include in all show notes, like links, credits, and a Patreon link.&lt;/p&gt;

&lt;h3 id=&quot;more-bonus-snippets&quot;&gt;More Bonus Snippets&lt;/h3&gt;

&lt;p&gt;The official snippet collection also contains a bunch of Org Mode snippets. &lt;a href=&quot;https://github.com/AndreaCrotti/yasnippet-snippets/tree/master/snippets/org-mode&quot;&gt;Here is the whole
list.&lt;/a&gt; Since Org Mode contains so many complicated
structures like source blocks and optional keywords, these are great time savers. There are also snippets for supporting
&lt;a href=&quot;https://github.com/yjwen/org-reveal&quot;&gt;org-reveal&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;writing-faster-is-writing-smarter&quot;&gt;Writing Faster is Writing Smarter&lt;/h2&gt;

&lt;p&gt;Don’t let your tools get in the way of your writing. Frequently, Emacs is portrayed as cumbersome and filled with obscure keybindings and
weird commands. However, I have found that it is an excellent tool for writing. Yasnippet templates let me get started on new documents
quickly without fretting over different syntaxes for configuration.&lt;/p&gt;

&lt;p&gt;And Yasnippet is just one of the tools I use when writing with Emacs. I will discuss more of these tools in the future.&lt;/p&gt;</content>
      </entry>
    
</feed>
