<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title></title>
    <description>Random stuff, mostly Clojure/Emacs, I expect.</description>
    <link>https://philjackson.github.io</link>
    <atom:link href="https://philjackson.github.io/emacs.xml" rel="self" type="application/rss+xml" />
    
      <item>
        <title>Hydra for evil-mc</title>
        <description>&lt;p&gt;At least in Doom Emacs the default keybindings for evil-mc are really cumbersome, here’s a Hydra that makes things much easier:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;defhydra&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;my-mc-hydra&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:color&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;pink&lt;/span&gt;
                       &lt;span class=&quot;ss&quot;&gt;:hint&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;
                       &lt;span class=&quot;ss&quot;&gt;:pre&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-pause-cursors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;&quot;
^Match^            ^Line-wise^           ^Manual^
^^^^^^----------------------------------------------------
_Z_: match all     _J_: make &amp;amp; go down   _z_: toggle here
_m_: make &amp;amp; next   _K_: make &amp;amp; go up     _r_: remove last
_M_: make &amp;amp; prev   ^ ^                   _R_: remove all
_n_: skip &amp;amp; next   ^ ^                   _p_: pause/resume
_N_: skip &amp;amp; prev

Current pattern: %`evil-mc-pattern

&quot;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Z&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-make-all-cursors&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;s&quot;&gt;&quot;m&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-make-and-goto-next-match&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;s&quot;&gt;&quot;M&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-make-and-goto-prev-match&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;s&quot;&gt;&quot;n&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-skip-and-goto-next-match&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;s&quot;&gt;&quot;N&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-skip-and-goto-prev-match&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;s&quot;&gt;&quot;J&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-make-cursor-move-next-line&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;s&quot;&gt;&quot;K&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-make-cursor-move-prev-line&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;s&quot;&gt;&quot;z&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;+multiple-cursors/evil-mc-toggle-cursor-here&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;s&quot;&gt;&quot;r&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;+multiple-cursors/evil-mc-undo-cursor&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;s&quot;&gt;&quot;R&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-undo-all-cursors&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;s&quot;&gt;&quot;p&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;+multiple-cursors/evil-mc-toggle-cursors&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;s&quot;&gt;&quot;q&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-resume-cursors&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;quit&quot;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:color&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;blue&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;s&quot;&gt;&quot;&amp;lt;escape&amp;gt;&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-mc-resume-cursors&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;quit&quot;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:color&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;blue&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;Here’s how I map it in Doom:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;map!&lt;/span&gt;
 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:when&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;featurep!&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:editor&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;multiple-cursors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;ss&quot;&gt;:prefix&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;g&quot;&lt;/span&gt;
  &lt;span class=&quot;ss&quot;&gt;:nv&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;z&quot;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;my-mc-hydra/body&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;
</description>
        <pubDate>Tue, 16 May 2023 14:42:08 +0100</pubDate>
        <link>https://philjackson.github.io//emacs/hydra/doom/2023/05/16/hydra-for-multiple-cursors/</link>
        <guid isPermaLink="true">https://philjackson.github.io//emacs/hydra/doom/2023/05/16/hydra-for-multiple-cursors/</guid>
      </item>
    
      <item>
        <title>Keeping backups of every edited file</title>
        <description>&lt;p&gt;I recently ran &lt;code class=&quot;language-html highlighter-rouge&quot;&gt;rm -rf *&lt;/code&gt; in my home directory, which apart from being
very foolish, reminded me that I have backups of basically every file
I’ve edited:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;setq&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;backup-directory-alist&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;~/.backups&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
      &lt;span class=&quot;nv&quot;&gt;backup-by-copying&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;t&lt;/span&gt;
      &lt;span class=&quot;nv&quot;&gt;delete-old-versions&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;t&lt;/span&gt;
      &lt;span class=&quot;nv&quot;&gt;kept-new-versions&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;
      &lt;span class=&quot;nv&quot;&gt;kept-old-versions&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;
      &lt;span class=&quot;nv&quot;&gt;version-control&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;t&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;Most of those are self-explanatory, but the long-and-short of it is
that I end up with this sort of thing in &lt;code class=&quot;language-html highlighter-rouge&quot;&gt;~/.backups&lt;/code&gt; (for example):&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;-rw-r--r-- 1 phil phil      593 Nov  7  2020 &apos;!home!phil!.xinitrc.~1~&apos;
-rw-r--r-- 1 phil phil      593 Nov  8  2020 &apos;!home!phil!.xinitrc.~2~&apos;
-rw-r--r-- 1 phil phil      593 Nov  8  2020 &apos;!home!phil!.xinitrc.~3~&apos;
-rw-r--r-- 1 phil phil      593 Nov  8  2020 &apos;!home!phil!.xinitrc.~4~&apos;
-rw-r--r-- 1 phil phil      603 Nov  8  2020 &apos;!home!phil!.xinitrc.~5~&apos;
-rw-r--r-- 1 phil phil      603 Jan  7  2021 &apos;!home!phil!.xinitrc.~6~&apos;
-rw-r--r-- 1 phil phil      785 Oct  6 11:03 &apos;!home!phil!.xinitrc.~7~&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The backups rotate and actually don’t take up much space at all. Just
20Mb for a few years in my case.&lt;/p&gt;
</description>
        <pubDate>Mon, 31 Jan 2022 15:28:13 +0000</pubDate>
        <link>https://philjackson.github.io//emacs/backups/2022/01/31/keeping-backups-of-every-edited-file/</link>
        <guid isPermaLink="true">https://philjackson.github.io//emacs/backups/2022/01/31/keeping-backups-of-every-edited-file/</guid>
      </item>
    
      <item>
        <title>Delta for Git and Magit</title>
        <description>&lt;p&gt;I was just introduced to a &lt;a href=&quot;https://github.com/dandavison/delta&quot;&gt;tool called
Delta&lt;/a&gt; which is a pager you can
use with Git to give you Github-esque diffs.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/magit-delta.png&quot; alt=&quot;Magit and Delta&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Tiny bit of elisp to configure:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&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;magit-delta&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;:hook&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;magit-mode&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;magit-delta-mode&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;Delta itself is incredibly configurable and from the command line has
some nice features such as side-by-side diffs.&lt;/p&gt;
</description>
        <pubDate>Thu, 09 Sep 2021 14:58:52 +0100</pubDate>
        <link>https://philjackson.github.io//magit/git/emacs/delta/2021/09/09/delta-for-git-and-magit/</link>
        <guid isPermaLink="true">https://philjackson.github.io//magit/git/emacs/delta/2021/09/09/delta-for-git-and-magit/</guid>
      </item>
    
      <item>
        <title>Save all mu4e attachments</title>
        <description>&lt;p&gt;To save all attachments from an mu4e email to a particular directory,
you can use this
&lt;a href=&quot;https://gist.github.com/philjackson/aecfab1706f05079aec7000e328fd183&quot;&gt;handy snippet&lt;/a&gt;
for older versions of the client. For more modern mu4e versions, use the
&lt;a href=&quot;https://github.com/sje30/emacs/blob/master/mu4e-view-save-all-attachments.el&quot;&gt;elisp by @sj30&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Mon, 30 Aug 2021 20:14:34 +0100</pubDate>
        <link>https://philjackson.github.io//emacs/mu4e/email/2021/08/30/save-all-mu4e-attachments/</link>
        <guid isPermaLink="true">https://philjackson.github.io//emacs/mu4e/email/2021/08/30/save-all-mu4e-attachments/</guid>
      </item>
    
      <item>
        <title>Export an environment variable to Emacs</title>
        <description>&lt;p&gt;Handy function to export environment variables to Emacs from the command line:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;export-emacs &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;emacsclient &lt;span class=&quot;nt&quot;&gt;-e&lt;/span&gt; t&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;t&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
        return &lt;/span&gt;1
    &lt;span class=&quot;k&quot;&gt;fi

    for &lt;/span&gt;name &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do
        &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;eval echo&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&quot;\$&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;//&lt;span class=&quot;se&quot;&gt;\\\&quot;&lt;/span&gt;/&lt;span class=&quot;se&quot;&gt;\\\\&lt;/span&gt;042&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;
        emacsclient &lt;span class=&quot;nt&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;(setenv &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;)&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;/dev/null
    &lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Use it like this:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;BLAH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Some value&quot;&lt;/span&gt;
export-emacs BLAH
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And in emacs:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;getenv&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;BLAH&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;; =&amp;gt; &quot;Some value&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;update&lt;/em&gt;: A very kind soul &lt;a href=&quot;https://github.com/philjackson/philjackson.github.io/issues/1&quot;&gt;updated the
function&lt;/a&gt;
to handle quoting properly. Thanks,
&lt;a href=&quot;https://github.com/pcrama&quot;&gt;@pcrama&lt;/a&gt;!&lt;/p&gt;
</description>
        <pubDate>Mon, 26 Jul 2021 16:04:50 +0100</pubDate>
        <link>https://philjackson.github.io//emacs/shell/2021/07/26/export-an-environment-variable-to-emacs/</link>
        <guid isPermaLink="true">https://philjackson.github.io//emacs/shell/2021/07/26/export-an-environment-variable-to-emacs/</guid>
      </item>
    
      <item>
        <title>Using yadm via magit</title>
        <description>&lt;p&gt;&lt;a href=&quot;https://yadm.io/&quot;&gt;Yadm’s&lt;/a&gt; an amazing dotfile manager that’s basically
a thin wrapper around git and a bare repo. With it being a bare repo,
you’ll not be able to manage it directly with Magit so here’s a really
&lt;a href=&quot;https://www.reddit.com/r/emacs/comments/gjukb3/yadm_magit/&quot;&gt;smart tip I found&lt;/a&gt;
that will let you access it via Tramp:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&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;tramp&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;add-to-list&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;tramp-methods&lt;/span&gt;
               &lt;span class=&quot;o&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;yadm&quot;&lt;/span&gt;
                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;tramp-login-program&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;yadm&quot;&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;nv&quot;&gt;tramp-login-args&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;enter&quot;&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;nv&quot;&gt;tramp-login-env&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;SHELL&quot;&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;s&quot;&gt;&quot;/bin/sh&quot;&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;nv&quot;&gt;tramp-remote-shell&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;/bin/sh&quot;&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;nv&quot;&gt;tramp-remote-shell-args&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;-c&quot;&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;defun&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;yadm&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;nv&quot;&gt;interactive&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;nv&quot;&gt;magit-status&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;/yadm::&quot;&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;
</description>
        <pubDate>Sun, 25 Jul 2021 18:22:13 +0100</pubDate>
        <link>https://philjackson.github.io//yadm/emacs/magit/2021/07/25/using-yadm-via-magit/</link>
        <guid isPermaLink="true">https://philjackson.github.io//yadm/emacs/magit/2021/07/25/using-yadm-via-magit/</guid>
      </item>
    
      <item>
        <title>Load a random emacs theme on startup</title>
        <description>&lt;p&gt;To load a random emacs theme on startup (I restart daily) you can use
the following snippet. Just add your theme as a new function to
&lt;code class=&quot;language-html highlighter-rouge&quot;&gt;funs&lt;/code&gt;. If you don’t restart often, you could add a timer to change
themes while you’re going.&lt;/p&gt;

&lt;p&gt;My current favourite themes included.&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&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;doom-themes&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;:init&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;setq&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;doom-themes-enable-bold&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;t&lt;/span&gt;
              &lt;span class=&quot;nv&quot;&gt;doom-themes-enable-italic&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;ss&quot;&gt;:config&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;;; list of themes (just called as functions) which also contain&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;;; theme specific config&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;let*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;funs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;lambda&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;nv&quot;&gt;load-theme&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;doom-outrun-electric&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;k&quot;&gt;lambda&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;nv&quot;&gt;load-theme&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;doom-palenight&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;k&quot;&gt;lambda&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;nv&quot;&gt;load-theme&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;doom-challenger-deep&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;t&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;nv&quot;&gt;set-face-attribute&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;markdown-code-face&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;
                                       &lt;span class=&quot;ss&quot;&gt;:background&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;#32333d&quot;&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;nv&quot;&gt;set-face-attribute&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;font-lock-comment-face&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;
                                       &lt;span class=&quot;ss&quot;&gt;:foreground&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;#999&quot;&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;k&quot;&gt;lambda&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;nv&quot;&gt;load-theme&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;doom-dracula&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;t&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;nv&quot;&gt;set-face-attribute&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;ivy-minibuffer-match-face-1&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;
                                       &lt;span class=&quot;ss&quot;&gt;:foreground&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;pink&quot;&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;nv&quot;&gt;rand&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;random&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;funs&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;funcall&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;nth&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;rand&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;funs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;;; any global theme config goes here&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;set-face-attribute&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;show-paren-match&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:foreground&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;#111&quot;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:background&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;orange&quot;&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;nv&quot;&gt;doom-themes-org-config&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;
</description>
        <pubDate>Sun, 11 Jul 2021 21:16:34 +0100</pubDate>
        <link>https://philjackson.github.io//emacs/themes/doom/2021/07/11/load-a-random-emacs-theme-on-startup/</link>
        <guid isPermaLink="true">https://philjackson.github.io//emacs/themes/doom/2021/07/11/load-a-random-emacs-theme-on-startup/</guid>
      </item>
    
      <item>
        <title>Start evil substitution on selection</title>
        <description>&lt;p&gt;Here’s a little evil operator that will fill in the first part of an
evil/ex substitution with the region / visual / object. This allows
you to replace objects quickly without having to type out the ex
command in full.&lt;/p&gt;

&lt;p&gt;If I’ve missed something like this that’s built-in, let me know.&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-define-operator&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;start-ex-sub-on-region&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;beg&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;end&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;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;region&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;buffer-substring&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;beg&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;end&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;nv&quot;&gt;evil-ex&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;concat&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;%s/&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;replace-regexp-in-string&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;\/&quot;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;\\\\/&quot;&lt;/span&gt;
                                                     &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;regexp-quote&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;region&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
                     &lt;span class=&quot;s&quot;&gt;&quot;/&quot;&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;I bind this globally to &lt;code class=&quot;language-html highlighter-rouge&quot;&gt;&quot;,s&quot;&lt;/code&gt; with:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-global-set-key&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;normal&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;kbd&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;,s&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;start-ex-sub-on-region&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;
</description>
        <pubDate>Sun, 11 Jul 2021 11:23:27 +0100</pubDate>
        <link>https://philjackson.github.io//evil/emacs/2021/07/11/start-evil-substitution-on-selection/</link>
        <guid isPermaLink="true">https://philjackson.github.io//evil/emacs/2021/07/11/start-evil-substitution-on-selection/</guid>
      </item>
    
      <item>
        <title>Search specific extensions with counsel-projectile-rg</title>
        <description>&lt;p&gt;If you’re in a monorepo searching through stuff can be a bit chaotic. Here’s a way of narrowing down to specific file extensions with &lt;code class=&quot;language-html highlighter-rouge&quot;&gt;counsel-projectile-rg&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;search-specific-glob&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;nv&quot;&gt;interactive&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;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;glob&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;ivy-completing-read&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Glob?: &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;*.cljs&quot;&lt;/span&gt;
                                                 &lt;span class=&quot;s&quot;&gt;&quot;*.clj&quot;&lt;/span&gt;
                                                 &lt;span class=&quot;s&quot;&gt;&quot;*.md&quot;&lt;/span&gt;
                                                 &lt;span class=&quot;s&quot;&gt;&quot;*.styl&quot;&lt;/span&gt;
                                                 &lt;span class=&quot;s&quot;&gt;&quot;*.css&quot;&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;nv&quot;&gt;counsel-projectile-rg&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;concat&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;--glob &quot;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;glob&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;First it’ll list the extensions with Ivy, then lets you input a search term as normal.&lt;/p&gt;
</description>
        <pubDate>Fri, 25 Jun 2021 22:31:02 +0100</pubDate>
        <link>https://philjackson.github.io//emacs/search/rg/2021/06/25/search-specific-extensions-with-counsel-projectile-rg/</link>
        <guid isPermaLink="true">https://philjackson.github.io//emacs/search/rg/2021/06/25/search-specific-extensions-with-counsel-projectile-rg/</guid>
      </item>
    
      <item>
        <title>Using the CIDER debugger in Evil</title>
        <description>&lt;p&gt;When using &lt;a href=&quot;https://github.com/emacs-evil/evil&quot;&gt;evil&lt;/a&gt; and
&lt;a href=&quot;https://github.com/clojure-emacs/cider&quot;&gt;CIDER&lt;/a&gt; together, you might
find that rebinding the keys required to control the debugger is a
pain. Luckily, you don’t actually have to, you can just enter insert
mode instead:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;my-cider-debug-toggle-insert-state&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;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;cider--debug-mode&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;;; Checks if you&apos;re entering the debugger&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-insert-state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;;; If so, turn on evil-insert-state&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;evil-normal-state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;;; Otherwise, turn on normal-state&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;add-hook&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;cider--debug-mode-hook&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;my-cider-debug-toggle-insert-state&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;Borrowed from &lt;a href=&quot;https://emacs.stackexchange.com/questions/20804&quot;&gt;here.&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 06 Jun 2021 17:00:40 +0100</pubDate>
        <link>https://philjackson.github.io//emacs/evil/cider/debugging/2021/06/06/using-the-cider-debugger-in-evil/</link>
        <guid isPermaLink="true">https://philjackson.github.io//emacs/evil/cider/debugging/2021/06/06/using-the-cider-debugger-in-evil/</guid>
      </item>
    
      <item>
        <title>Widescreen emacs and vertical splits</title>
        <description>&lt;p&gt;On a widescreen monitor, especially the really wide ones, it’s nice to
have only vertical splits. This snippet will give bias to vertical splits:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;my-split-window-sensibly&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;&amp;amp;optional&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;&quot;replacement `split-window-sensibly&apos; function which prefers
vertical splits&quot;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;interactive&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;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;window&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;window&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;selected-window&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;or&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;window-splittable-p&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;window&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;t&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;nv&quot;&gt;with-selected-window&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;window&lt;/span&gt;
               &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;split-window-right&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;and&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;window-splittable-p&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;window&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;nv&quot;&gt;with-selected-window&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;window&lt;/span&gt;
               &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;split-window-below&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;k&quot;&gt;setq&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;split-window-preferred-function&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;#&apos;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;my-split-window-sensibly&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;
</description>
        <pubDate>Sun, 06 Jun 2021 13:14:51 +0100</pubDate>
        <link>https://philjackson.github.io//emacs/widescreen/2021/06/06/wide-screen-emacs/</link>
        <guid isPermaLink="true">https://philjackson.github.io//emacs/widescreen/2021/06/06/wide-screen-emacs/</guid>
      </item>
    
      <item>
        <title>Having Smartparens commands work with Evil-mc</title>
        <description>&lt;p&gt;&lt;a href=&quot;https://hungyi.net/posts/how-to-evil-mc-smartparens/&quot;&gt;As described
here&lt;/a&gt;, when
using &lt;a href=&quot;https://github.com/gabesoft/evil-mc&quot;&gt;evil-mc&lt;/a&gt;, it’s very
frustrating when a &lt;a href=&quot;https://github.com/Fuco1/smartparens&quot;&gt;Smartparens&lt;/a&gt;
command works on only the first of the multiple cursors. Here’s how to
fix that:&lt;/p&gt;

&lt;div class=&quot;language-elisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;syntax&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;dolist&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;cmd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;sp-up-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-copy-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-down-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-join-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-kill-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-next-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-split-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-wrap-curly&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-wrap-round&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-raise-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-clone-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-wrap-square&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-splice-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-end-of-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-forward-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-backward-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-convolute-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-transpose-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-kill-whole-line&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-beginning-of-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-forward-barf-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-forward-slurp-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-backward-barf-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-backward-slurp-sexp&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-splice-sexp-killing-forward&lt;/span&gt;
               &lt;span class=&quot;nv&quot;&gt;sp-splice-sexp-killing-backward&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;nv&quot;&gt;add-to-list&lt;/span&gt;
     &lt;span class=&quot;ss&quot;&gt;&apos;evil-mc-custom-known-commands&lt;/span&gt;
     &lt;span class=&quot;o&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;cmd&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:default&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;evil-mc-execute-call&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;
</description>
        <pubDate>Sat, 05 Jun 2021 00:38:51 +0100</pubDate>
        <link>https://philjackson.github.io//elisp/evil-mc/smartparens/emacs/2021/06/05/smartparens-and-evil-mc/</link>
        <guid isPermaLink="true">https://philjackson.github.io//elisp/evil-mc/smartparens/emacs/2021/06/05/smartparens-and-evil-mc/</guid>
      </item>
    
  </channel>
</rss>
