<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>emre şahin's digital garden 🍃 - Writing</title>
    <link>https://emresahin.net/categories/writing/</link>
    <description>Posts in the Writing category</description>
    <language>en</language>
    <managingEditor>contact@emresahin.net (Emre Şahin)</managingEditor>
    <lastBuildDate>Tue, 29 Sep 2026 14:57:43 +0000</lastBuildDate>
    <atom:link href="https://emresahin.net/categories/writing/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>Digital Garden</title>
      <published>2023-09-05T18:03:00+00:00</published>
      <updated>2023-09-05T18:03:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Tue, 05 Sep 2023 18:03:00 +0000</pubDate>
      <link>https://emresahin.net/digital-garden/</link>
      <guid isPermaLink="true">https://emresahin.net/digital-garden/</guid>
      <description>I have begun to consider this site as a digital garden after reading this : Tom Critchlow, a consultant who has been cultivating his digital garden for years, spells out the main difference between old-school blogging and digital gardening. “With blogging, you’re talking to a large audience,” he ...</description>
      <category>Personal</category>
      <category>Writing</category>
      <category>digital-garden</category>
      <category>blog</category>
      <category>knowledge-management</category>
      <category>self-improvement</category>
      <content:encoded><![CDATA[<p>I have begun to consider this site as a <em>digital garden</em> after <a href="https://www.technologyreview.com/2020/09/03/1007716/digital-gardens-let-you-cultivate-your-own-little-bit-of-the-internet/">reading this</a>:</p>
<blockquote>
<p>Tom Critchlow, a consultant who has been cultivating his digital garden for years, spells out the main difference between old-school blogging and digital gardening. “With blogging, you’re talking to a large audience,” he says. “With digital gardening, you’re talking to yourself. You focus on what you want to cultivate over time.”</p>
</blockquote>
<p>This site doesn’t have any significance except being a collection of notes to myself.</p>]]></content:encoded>
    </item>
    <item>
      <title>Cat for Writers</title>
      <published>2014-07-06T21:00:00+00:00</published>
      <updated>2014-07-06T21:00:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sun, 06 Jul 2014 21:00:00 +0000</pubDate>
      <link>https://emresahin.net/cat-for-writers/</link>
      <guid isPermaLink="true">https://emresahin.net/cat-for-writers/</guid>
      <description>I write every day. Every day, I write. I have a quota of words to fill, and after each sleep session, I sit in front of my keyboard and begin typing. I used to use Emacs for this—the One True Editor. Yet, it has one flaw that disrupted my writing routine: it has too many features. When I encounte...</description>
      <category>Tools</category>
      <category>Writing</category>
      <category>Cat</category>
      <category>Ed</category>
      <category>Emacs</category>
      <category>Org-mode</category>
      <category>Writing</category>
      <category>Bash</category>
      <category>Scripts</category>
      <content:encoded><![CDATA[<p>I write every day. Every day, I write. I have a quota of words to fill, and after each sleep session, I sit in front of my keyboard and begin typing.</p>
<p>I used to use <a href="http://en.wikipedia.org/wiki/GNU_Emacs">Emacs</a> for this—the One True Editor. Yet, it has one flaw that disrupted my writing routine: it has too many features. When I encountered writer’s block or an idea I couldn’t quite articulate, I would start tinkering with the editor instead. Emacs is like a friend, and one should keep friends away from the workplace; otherwise, no work gets done.</p>
<p>For this reason, I began writing with <a href="http://en.wikipedia.org/wiki/Ed_(text_editor)"><code>ed</code></a> some time ago. <code>ed</code> is not my friend; it’s <em>the</em> standard editor. It’s also the grandfather of <a href="http://en.wikipedia.org/wiki/Vi"><code>vi</code></a>, but fathers should not bear the vices of their sons.</p>
<p><strong>Note from 2024:</strong> Ten years after writing this post, I’m editing it with Neovim, the grandson of all these tools.</p>
<p><code>ed</code> was very nice to write with. It doesn’t have many features. It prints a <code>0</code> when it opens, I type <code>i</code> to insert text, and then I write whatever I like. When I put a lonely <code>.</code> on a line, it understands that I’ve finished my words. Then, with <code>w</code>, I save the file to disk and see its length—length in bytes, as every true writer nowadays should know.</p>
<p><code>ed</code> is minimal, and while I occasionally get frustrated by its modal behavior, that’s exactly why I was happy to write with it.</p>
<p>However, I eventually decided that even pressing those few command keys was too much. <code>i</code>, <code>.</code>, and <code>w</code>—one can forget them easily. And it seemed I had a tendency to learn more of its commands, which are passed down to its grandchildren. God save us from the vices of <code>vi</code>.</p>
<p>Then, I decided to concoct a script that uses <code>cat</code>. Everyone knows writers like cats, and I like <code>cat</code> too; it concatenates text into files and is also used to print their content. It’s much simpler than <code>ed</code>—much simpler. It is not an ambiguous dork like <code>ed</code>; it’s a simple animal that writes into files whatever I type into it.</p>
<p>It was easy to check the file size in words after I finished. I wrote a <code>while</code> loop to continue until I reached my daily quota. The script creates a new file, adds an <a href="http://orgmode.org">Org-mode</a> header, and includes the contents of the clipboard just after the title so I can include notes. <code>cat</code> exits with <code>Ctrl-D</code>, and when it finishes, the script checks the word count. If I’m still short of my daily target, it appends a <code>-----</code> separator and opens the file again. <em>You have to finish your words, whether your brain bleeds or your cat dies.</em></p>
<p>The effect? I began using it today, so I’m still not sure about the long-term impact, but there’s certainly nothing to distract me. When I used Emacs, the <code>info</code> pages were highly entertaining—I was just finishing the command-line options of GNU Backgammon when I decided to switch. Modern programs are so customizable that I can’t even finish reading their manuals.</p>
<p>The script is shown below. It asks for a filename; if you don’t provide one, it creates one based on the date. It has some minor changes from the version I use, as I tend to name my files differently and I haven’t tested this specific version thoroughly, but here it is. Copy and paste it into a file named <code>write-with-cat</code>, make it executable with <code>chmod +x write-with-cat</code>, and run it. You’ll need a Unix-like system (even my mom uses Debian, you know).</p>
<p>The second part of the script, which I’ve commented out, copies the written material to a repository and commits it using Mercurial.</p>
<pre><code class="language-bash">#!/bin/bash

WORDSIZE=600

echo "Please set a (tentative) name?"
read response
if [ -z "$response" ] ; then
    dirname=work-`date +%y-%m-%d`-$RANDOM
else
    dirname=work-${response}
fi

tempdirname="/tmp/$dirname"
mkdir $tempdirname
docname="$tempdirname/index.org"

selection=`xsel -ob`
cat &gt; $docname &lt;&lt;EOF
#+TITLE: $response
#+AUTHOR:
#+DATE: `date`

$selection
EOF

clear
cat $docname

while [ `wc -w "$docname" | cut -f 1 -d ' '` -le $WORDSIZE ] ; do
    cat &gt;&gt; $docname
    echo "\n-----" &gt;&gt; "$docname"
    wc -w "$docname"
done
</code></pre>]]></content:encoded>
    </item>
  </channel>
</rss>
