main
   1<!DOCTYPE html>
   2<html lang="en">
   3<head>
   4<!-- Oct 07, 2022 -->
   5<meta charset="utf-8" />
   6<meta name="viewport" content="width=device-width, initial-scale=1" />
   7<title>My Emacs System</title>
   8<meta name="author" content="Vincent Demeester" />
   9<meta name="generator" content="Org Mode" />
  10<link rel='icon' type='image/x-icon' href='/images/favicon.ico'/>
  11<meta name='viewport' content='width=device-width, initial-scale=1'>
  12<link rel='stylesheet' href='/css/new.css' type='text/css'/>
  13<link rel='stylesheet' href='/css/syntax.css' type='text/css'/>
  14<link href='/index.xml' rel='alternate' type='application/rss+xml' title='Vincent Demeester' />
  15</head>
  16<body>
  17<main id="content" class="content">
  18<header>
  19<h1 class="title">My Emacs System</h1>
  20<p class="subtitle" role="doc-subtitle">A attempt to document my emacs setup 🙃</p>
  21</header><p>
  22Emacs is the best editor possible, at least for me, especially with the killer <a href="org_mode.html">org-mode</a>
  23module.
  24</p>
  25
  26<p>
  27I do all in a lot in Emacs:
  28</p>
  29<ul class="org-ul">
  30<li>task and calendar management using <a href="org_mode.html">org-mode</a>.</li>
  31<li>mail using <a href="gnus.html">gnus</a>.</li>
  32<li>programming in different languages (<a href="elisp.html">elisp</a>, <a href="go.html">go</a>, <a href="bash.html">bash</a>, …)</li>
  33<li>interactive shell using either <a href="eshell.html">eshell</a> or <a href="vterm.html">vterm</a>.</li>
  34</ul>
  35
  36<p>
  37This is my attempt to document my Emacs setup, inspired by <a href="https://writequit.org/eos/eos.html">The Emacs Operating System
  38(EOS)</a> or <a href="http://doc.rix.si/cce/cce.html">Complete Computing Environment</a> and other litterate configurations, see
  39<a href="#Inspirations">Inspirations</a>. In a gist, this is the litterate version of the <a href="config_configurations.html">configurations</a> available in
  40my <a href="https://git.sr.ht/~vdemeester/home">monorepo</a>.
  41</p>
  42
  43<nav id="table-of-contents" role="doc-toc">
  44<h2>Table of Contents</h2>
  45<div id="text-table-of-contents" role="doc-toc">
  46<ul>
  47<li><a href="#What%20is%20this">What is this</a></li>
  48<li><a href="#Why%20using%20GNU%2FEmacs%20%3F">Why using GNU/Emacs ?</a></li>
  49<li><a href="#Assumptions">Assumptions</a></li>
  50<li><a href="#Keybinding">Keybinding</a></li>
  51<li><a href="#COPYING">COPYING</a></li>
  52<li><a href="#Base%20settings">Base settings</a></li>
  53<li><a href="#Configurations">Configurations</a></li>
  54<li><a href="#Nix%28eries%29">Nix(eries)</a></li>
  55<li><a href="#Inspirations">Inspirations</a></li>
  56<li><a href="#Links">Links</a></li>
  57</ul>
  58</div>
  59</nav>
  60
  61<section id="outline-container-What%20is%20this" class="outline-2">
  62<h2 id="What%20is%20this">What is this</h2>
  63<div class="outline-text-2" id="text-What%20is%20this">
  64<p>
  65The present document, referred to in the source code version as <code>emacs.org</code>, contains the
  66bulk of my configurations for GNU Emacs. It is designed using principles of &ldquo;literate
  67programming&rdquo;: a combination of ordinary language and inline code blocks. Emacs knows how
  68to parse this file properly so as to evaluate only the elisp (&ldquo;Emacs Lisp&rdquo;) included
  69herein. The rest is for humans to make sense of my additions and their underlying
  70rationale.
  71</p>
  72
  73<blockquote>
  74<p>
  75Literate programming allows us to be more expressive and deliberate. Not only we can use
  76typography to its maximum potential, but can also employ techniques such as internal links
  77between sections. This makes the end product much better for end users, than a terse
  78script.
  79</p>
  80</blockquote>
  81
  82<p>
  83I switched back and forth on using <code>org-mode</code> and literate programming, so why re-using
  84it. First, I think I went for it the wrong way the first time. I copied part of the
  85configuration from elsewhere, sometimes without really needing what I was copying. for
  86some reason I think this is a common pattern when configuring Emacs. You start by using a
  87distribution (Doom Emacs, Spacemacs, …) or by copying configuration from all over the
  88place. Slowly but surely you realize this was a mistake as you didn&rsquo;t learn anything, so
  89you <b>reboot</b> your configuration.
  90</p>
  91</div>
  92</section>
  93
  94
  95<section id="outline-container-Why%20using%20GNU%2FEmacs%20%3F" class="outline-2">
  96<h2 id="Why%20using%20GNU%2FEmacs%20%3F">Why using GNU/Emacs ?</h2>
  97<div class="outline-text-2" id="text-Why%20using%20GNU%2FEmacs%20%3F">
  98<p>
  99This is a question I thought I needed to answer, or at least, document why I am choosing
 100GNU/Emacs as my primary editor. <a href="https://protesilaos.com/">Protesilaos Stavrou</a> has a <a href="https://protesilaos.com/codelog/2019-12-20-vlog-switch-emacs/">video</a> about it, really
 101interesting.
 102</p>
 103
 104<p>
 105There is a lot of reasons but for me, the following are the main ones:
 106</p>
 107<ul class="org-ul">
 108<li><b>Open Source</b>: this is a &ldquo;of course&rdquo;, but my editor <span class="underline">has to be</span> open-sourced. This seems
 109to be the norm these days anyway (and for a long time, with <code>vim</code>).</li>
 110<li><b>Lightweight</b>: the editor should be relatively lightweight. I don&rsquo;t want a full browser
 111loaded to edit files, and I want to be able to run it in a terminal, on a server. <code>vim</code>
 112can do that (and sometimes, <code>vim</code> or <code>vi</code> is enough 👼).</li>
 113<li><b>Extensible</b>: to be honest, this is the most important reason. I want to be able to
 114extend my editor as much as possible.</li>
 115</ul>
 116
 117<p>
 118GNU/Emacs checks all the boxes for me. Even though GNU/Emacs is probably not as
 119lightweight as <code>vim</code>, it is definitely lightweight compared to all the Electron-based
 120editors (vscode, …). It is of course open-source, and since ages (almost as old as I am
 121😅). And best of all, GNU/Emacs is extensible as you couldn&rsquo;t dream of. Emacs is a lisp
 122interpreter, and it is designed to be extended in order to meet the user&rsquo;s
 123needs. <i>Extensibility</i> is the quintessential Emacs quality. You can modify any piece of
 124elisp <i>in real time</i>.
 125</p>
 126
 127<p>
 128I&rsquo;m also a huge fan of <i>text-based</i> software, a.k.a. do whatever you can using text :
 129reading mails, news, organizing notes and todos, all can be done in text. And GNU/Emacs
 130shines at this. For emails and news, you&rsquo;ve got Gnus built-in, for notes and todos, the
 131wonderful <code>org-mode</code> is the best thing on earth (seriously, this is the <b>one</b> mode that
 132made me switch from <code>vim</code>).
 133</p>
 134</div>
 135</section>
 136
 137<section id="outline-container-Assumptions" class="outline-2">
 138<h2 id="Assumptions">Assumptions</h2>
 139<div class="outline-text-2" id="text-Assumptions">
 140<p>
 141I&rsquo;ll make a few assumption in the following document (that may or may not be true):
 142</p>
 143
 144<ul class="org-ul">
 145<li><a href="https://nixos.org/nix/"><code>nix</code></a> is available, either from <a href="https://nixos.org">NixOS</a> or via an install of nix. I&rsquo;ll try my best to
 146support non-nix environment, but it&rsquo;s definitely not my current focus.
 147<ul class="org-ul">
 148<li>As I am making the assumption that <code>nix</code> is available, I am also making the assumption
 149that all the library required are already present (in my <a href="https://github.com/vdemeester/home"><code>home</code></a>, there is a file
 150called <a href="https://github.com/vdemeester/home/blob/master/modules/profiles/emacs.nix"><code>emacs.nix</code></a> that encapsulate those dependencies). This is why, by default
 151<b>use-package</b> doesn&rsquo;t use the <code>ensure</code> option in 99% of the configuration.</li>
 152</ul></li>
 153<li>Any function I wrote is going to be prefixed by <code>vde/</code> so that it doesn&rsquo;t conflicts with
 154function that would have been defined elsewhere.</li>
 155<li>Any function imported from another configuration, without any change, should be kept as
 156is and/or prefixed by an unique id. I&rsquo;ll try to make sure to link to the configuration
 157too.</li>
 158</ul>
 159</div>
 160</section>
 161<section id="outline-container-Keybinding" class="outline-2">
 162<h2 id="Keybinding">Keybinding</h2>
 163<div class="outline-text-2" id="text-Keybinding">
 164<p>
 165As it is detailed in each part of this configuration, I am trying to setup keybinding in a
 166<i>mnemonics</i> way so it&rsquo;s easy to remember (and use). This is what <a href="https://www.spacemacs.org/">spacemacs</a> does with evil
 167keybindings (aka vim-like keybindings). I am staying with the <i>standard</i> emacs keybinding
 168as much as possible (as there is already some mnemonics in there).
 169</p>
 170
 171<p>
 172There are countless jokes and comics on Emacs’s seemingly ridiculous keybindings. Good
 173laughs indeed, but at the end of day, it’s not incomprehensible. It has well-defined
 174conventions listed at <a href="https://www.gnu.org/software/emacs/manual/html%5Fnode/elisp/Key-Binding-Conventions.html">Emacs Key Bindings Convention</a>. In summary, the general rules are:
 175</p>
 176
 177<ul class="org-ul">
 178<li><code>C-x</code> reserved for Emacs native essential keybindings: buffer, window, frame, file, directory, etc…</li>
 179<li><code>C-c</code> reserved for user and major mode:
 180<ul class="org-ul">
 181<li><code>C-c letter</code> reserved for user. <code>&lt;F5&gt;</code>-<code>&lt;F9&gt;</code> reserved for user.</li>
 182<li><code>C-c C-letter</code> reserved for major mode.</li>
 183</ul></li>
 184<li>Don’t rebind <code>C-g</code>, <code>C-h</code> and <code>ESC</code>.</li>
 185</ul>
 186
 187<p>
 188To give a small example, most of my personal <code>org-mode</code> keybinding will start with <code>C-c
 189o</code>, as it is reserved for user, and <code>o</code> is for <code>org-mode</code>. For version control, it&rsquo;s gonna
 190be <code>C-c v</code>, for projects it&rsquo;s gonna be <code>C-c p</code>, etc…
 191</p>
 192
 193<table>
 194
 195
 196<colgroup>
 197<col  class="org-left">
 198
 199<col  class="org-left">
 200</colgroup>
 201<thead>
 202<tr>
 203<th scope="col" class="org-left">prefix</th>
 204<th scope="col" class="org-left">&ldquo;mode&rdquo;</th>
 205</tr>
 206</thead>
 207<tbody>
 208<tr>
 209<td class="org-left">&lt;F1&gt;</td>
 210<td class="org-left">&#xa0;</td>
 211</tr>
 212
 213<tr>
 214<td class="org-left">&lt;F2&gt;</td>
 215<td class="org-left">&#xa0;</td>
 216</tr>
 217
 218<tr>
 219<td class="org-left">&lt;F3&gt;</td>
 220<td class="org-left"><i>built-in</i> Register macro(s)</td>
 221</tr>
 222
 223<tr>
 224<td class="org-left">&lt;F4&gt;</td>
 225<td class="org-left"><i>built-in</i> Plays macro(s)</td>
 226</tr>
 227
 228<tr>
 229<td class="org-left">&lt;F5&gt;</td>
 230<td class="org-left"><code>revert-buffer</code></td>
 231</tr>
 232
 233<tr>
 234<td class="org-left">&lt;F6&gt;</td>
 235<td class="org-left">&#xa0;</td>
 236</tr>
 237
 238<tr>
 239<td class="org-left">&lt;F7&gt;</td>
 240<td class="org-left">&#xa0;</td>
 241</tr>
 242
 243<tr>
 244<td class="org-left">&lt;F8&gt;</td>
 245<td class="org-left">&#xa0;</td>
 246</tr>
 247
 248<tr>
 249<td class="org-left">&lt;F9&gt;</td>
 250<td class="org-left">&#xa0;</td>
 251</tr>
 252
 253<tr>
 254<td class="org-left">&lt;F10&gt;</td>
 255<td class="org-left">&#xa0;</td>
 256</tr>
 257
 258<tr>
 259<td class="org-left">&lt;F11&gt;</td>
 260<td class="org-left">&#xa0;</td>
 261</tr>
 262
 263<tr>
 264<td class="org-left">&lt;F12&gt;</td>
 265<td class="org-left">&#xa0;</td>
 266</tr>
 267
 268<tr>
 269<td class="org-left"><code>C-c b</code></td>
 270<td class="org-left">Bookmarks (<code>bookmark-plus</code>)</td>
 271</tr>
 272
 273<tr>
 274<td class="org-left"><code>C-c h</code></td>
 275<td class="org-left">Help (<code>helpful</code>, …)</td>
 276</tr>
 277
 278<tr>
 279<td class="org-left"><code>C-c n</code></td>
 280<td class="org-left">Navigation (<code>avy</code>, …)</td>
 281</tr>
 282
 283<tr>
 284<td class="org-left"><code>C-c o</code></td>
 285<td class="org-left">Org mode</td>
 286</tr>
 287
 288<tr>
 289<td class="org-left"><code>C-c p</code></td>
 290<td class="org-left">Projects (<code>projectile</code>, …)</td>
 291</tr>
 292
 293<tr>
 294<td class="org-left"><code>C-c v</code></td>
 295<td class="org-left">Version control (<code>vc</code>, <code>magit</code>, …)</td>
 296</tr>
 297
 298<tr>
 299<td class="org-left"><code>C-c w</code></td>
 300<td class="org-left">Window management (<code>ace-window</code>, …)</td>
 301</tr>
 302
 303<tr>
 304<td class="org-left"><code>C-x p</code></td>
 305<td class="org-left">Bookmarks (<code>bookmark-plus</code>, …)</td>
 306</tr>
 307</tbody>
 308</table>
 309
 310<p>
 311This table is not complete and I don&rsquo;t intend to keep it complete here. Instead, there
 312should be a table like this on each configuration file to describe what this config brings
 313as keybinding.
 314</p>
 315
 316<p>
 317See also:
 318</p>
 319<ul class="org-ul">
 320<li><a href="https://karl-voit.at/2018/07/08/emacs-key-bindings/">https://karl-voit.at/2018/07/08/emacs-key-bindings/</a></li>
 321<li><a href="https://www.masteringemacs.org/article/mastering-key-bindings-emacs">https://www.masteringemacs.org/article/mastering-key-bindings-emacs</a></li>
 322<li><a href="http://www.wilfred.me.uk/blog/2018/01/06/the-emacs-guru-guide-to-key-bindings/">http://www.wilfred.me.uk/blog/2018/01/06/the-emacs-guru-guide-to-key-bindings/</a></li>
 323</ul>
 324</div>
 325</section>
 326<section id="outline-container-COPYING" class="outline-2">
 327<h2 id="COPYING">COPYING</h2>
 328<div class="outline-text-2" id="text-COPYING">
 329<p>
 330Copyright (c) 2013-2020 Vincent Demeester &lt;vincent@sbr.pm&gt;
 331</p>
 332
 333<p>
 334This file is free software: you can redistribute it and/or modify it
 335under the terms of the GNU General Public License as published by the
 336Free Software Foundation, either version 3 of the License, or (at
 337your option) any later version.
 338</p>
 339
 340<p>
 341This file is distributed in the hope that it will be useful, but
 342WITHOUT ANY WARRANTY; without even the implied warranty of
 343MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 344General Public License for more details.
 345</p>
 346
 347<p>
 348You should have received a copy of the GNU General Public License
 349along with this file.  If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.
 350</p>
 351</div>
 352</section>
 353<section id="outline-container-Base%20settings" class="outline-2">
 354<h2 id="Base%20settings">Base settings</h2>
 355<div class="outline-text-2" id="text-Base%20settings">
 356<p>
 357This section contains configurations that are needed prior to the setup of everything
 358else. Anything that needs to be configured first should be in there, this includes the
 359<code>init.el</code> and <code>early-init.el</code> files content.
 360</p>
 361</div>
 362
 363<div id="outline-container-Early%20initialization" class="outline-3">
 364<h3 id="Early%20initialization">Early initialization</h3>
 365<div class="outline-text-3" id="text-Early%20initialization">
 366<p>
 367Starting with Emacs 27, an <code>early-init.el</code> file can be used to do early configuration
 368and optimization.
 369</p>
 370
 371<blockquote>
 372<p>
 373Emacs can now be configured using an early init file. The file is called <code>early-init.el</code>,
 374in <code>user-emacs-directory</code>. It is loaded very early in the startup process: before
 375graphical elements such as the tool bar are initialized, and before the package manager is
 376initialized. The primary purpose is to allow customizing how the package system is
 377initialized given that initialization now happens before loading the regular init file
 378(see below).
 379</p>
 380
 381<p>
 382We recommend against putting any customizations in this file that don&rsquo;t need to be set up
 383before initializing installed add-on packages, because the early init file is read too
 384early into the startup process, and some important parts of the Emacs session, such as
 385&rsquo;window-system&rsquo; and other GUI features, are not yet set up, which could make some
 386customization fail to work.
 387</p>
 388</blockquote>
 389
 390<p>
 391We can use this to our advantage and optimize the initial loading of emacs.
 392</p>
 393
 394<ul class="org-ul">
 395<li><p>
 396Before Emacs 27, the init file was responsible for initializing the package manager by
 397calling `package-initialize&rsquo;.  Emacs 27 changed the default behavior: It now calls
 398`package-initialize&rsquo; before loading the init file.
 399</p>
 400
 401<div class="org-src-container">
 402<pre class="src src-emacs-lisp">(<span class="org-keyword">setq</span> package-enable-at-startup nil)
 403</pre>
 404</div></li>
 405
 406<li><p>
 407Let&rsquo;s inhibit resizing the frame at early stage.
 408</p>
 409
 410<div class="org-src-container">
 411<pre class="src src-emacs-lisp">(<span class="org-keyword">setq</span> frame-inhibit-implied-resize t)
 412</pre>
 413</div></li>
 414
 415<li><p>
 416I never use the <i>menu-bar</i>, or the <i>tool-bar</i> or even the <i>scroll-bar</i>, so we can safely
 417disable those very very early.
 418</p>
 419
 420<div class="org-src-container">
 421<pre class="src src-emacs-lisp">(menu-bar-mode -1)
 422(tool-bar-mode -1)
 423(scroll-bar-mode -1)
 424(horizontal-scroll-bar-mode -1)
 425</pre>
 426</div></li>
 427
 428<li><p>
 429Finally we can try to avoid garbage collection at startup. The garbage collector can
 430easily double startup time, so we suppress it at startup by turning up <code>gc-cons-threshold</code>
 431(and perhaps <code>gc-cons-percentage</code>) temporarily.
 432</p>
 433
 434<div class="org-src-container">
 435<pre class="src src-emacs-lisp">(<span class="org-keyword">setq</span> gc-cons-threshold 402653184
 436      gc-cons-percentage 0.6)
 437</pre>
 438</div></li>
 439
 440<li><p>
 441Another small optimization concerns on <code>file-name-handler-alist</code> : on every .el and .elc
 442file loaded during start up, it has to runs those regexps against the filename ; setting
 443it to <code>nil</code> and after initialization finished put the value back make the initialization
 444process quicker.
 445</p>
 446
 447<div class="org-src-container">
 448<pre class="src src-emacs-lisp">(<span class="org-keyword">defvar</span> <span class="org-variable-name">file-name-handler-alist-original</span> file-name-handler-alist)
 449(<span class="org-keyword">setq</span> file-name-handler-alist nil)
 450</pre>
 451</div>
 452
 453<p>
 454However, it is important to reset it eventually. Not doing so will cause garbage
 455collection freezes during long-term interactive use. Conversely, a <code>gc-cons-threshold</code>
 456that is too small will cause stuttering. This will be done at the end.
 457</p></li>
 458
 459<li><p>
 460It&rsquo;s also possible to put the theme <b>and</b> the font in <code>early-init.el</code> to speed the
 461start.
 462</p>
 463
 464<div class="org-src-container">
 465<pre class="src src-emacs-lisp">(<span class="org-keyword">defvar</span> <span class="org-variable-name">contrib/after-load-theme-hook</span> nil
 466  <span class="org-doc">"Hook run after a color theme is loaded using `</span><span class="org-doc"><span class="org-constant">load-theme</span></span><span class="org-doc">'."</span>)
 467
 468(<span class="org-keyword">defun</span> <span class="org-function-name">contrib/run-after-load-theme-hook</span> (<span class="org-builtin">&amp;rest</span> _)
 469  <span class="org-doc">"Run `</span><span class="org-doc"><span class="org-constant">contrib/after-load-theme-hook</span></span><span class="org-doc">'."</span>
 470  (run-hooks 'contrib/after-load-theme-hook))
 471
 472(advice-add #'load-theme <span class="org-builtin">:after</span> #'contrib/run-after-load-theme-hook)
 473(<span class="org-keyword">require</span> '<span class="org-constant">modus-operandi-theme</span>)
 474
 475(<span class="org-keyword">defun</span> <span class="org-function-name">vde/modus-operandi</span> ()
 476  <span class="org-doc">"Enable some Modus Operandi variables and load the theme.</span>
 477<span class="org-doc">This is used internally by `</span><span class="org-doc"><span class="org-constant">vde/modus-themes-toggle</span></span><span class="org-doc">'."</span>
 478  (<span class="org-keyword">setq</span> modus-operandi-theme-slanted-constructs t
 479        modus-operandi-theme-bold-constructs t
 480        modus-operandi-theme-subtle-diffs t
 481        modus-operandi-theme-rainbow-headings t
 482        modus-operandi-theme-section-headings nil
 483        modus-operandi-theme-scale-headings nil
 484        modus-operandi-theme-fringes 'subtle <span class="org-comment-delimiter">; </span><span class="org-comment">{nil,'subtle,'intense}</span>
 485        modus-operandi-theme-mode-line '3d <span class="org-comment-delimiter">; </span><span class="org-comment">{nil,'3d,'moody}</span>
 486        modus-operandi-theme-3d-modeline t
 487        modus-operandi-theme-faint-syntax nil
 488        modus-operandi-theme-intense-hl-line t
 489        modus-operandi-theme-intense-paren-match t
 490        modus-operandi-theme-prompts 'subtle <span class="org-comment-delimiter">; </span><span class="org-comment">{nil,'subtle,'intense}</span>
 491        modus-operandi-theme-completions 'opinionated <span class="org-comment-delimiter">; </span><span class="org-comment">{nil,'moderate,'opinionated}</span>
 492        modus-operandi-theme-diffs 'desaturated <span class="org-comment-delimiter">; </span><span class="org-comment">{nil,'desaturated,'fg-only}</span>
 493        modus-operandi-theme-org-blocks 'greyscale <span class="org-comment-delimiter">; </span><span class="org-comment">{nil,'greyscale,'rainbow}</span>
 494        modus-operandi-theme-variable-pitch-headings nil
 495        modus-operandi-theme-rainbow-headings t
 496        modus-operandi-theme-section-headings nil
 497        modus-operandi-theme-scale-headings t
 498        modus-operandi-theme-scale-1 1.05
 499        modus-operandi-theme-scale-2 1.1
 500        modus-operandi-theme-scale-3 1.15
 501        modus-operandi-theme-scale-4 1.2)
 502  (load-theme 'modus-operandi t))
 503
 504(<span class="org-keyword">defun</span> <span class="org-function-name">vde/modus-operandi-custom</span> ()
 505  <span class="org-doc">"Customize modus-operandi theme"</span>
 506  (<span class="org-keyword">if</span> (member 'modus-operandi custom-enabled-themes)
 507      (modus-operandi-theme-with-color-variables <span class="org-comment-delimiter">; </span><span class="org-comment">this macro allows us to access the colour palette</span>
 508        (custom-theme-set-faces
 509         'modus-operandi
 510         `(whitespace-tab ((,class (<span class="org-builtin">:background</span> <span class="org-string">"#ffffff"</span> <span class="org-builtin">:foreground</span> <span class="org-string">"#cccccc"</span>))))
 511         `(whitespace-space ((,class (<span class="org-builtin">:background</span> <span class="org-string">"#ffffff"</span> <span class="org-builtin">:foreground</span> <span class="org-string">"#cccccc"</span>))))
 512         `(whitespace-hspace ((,class (<span class="org-builtin">:background</span> <span class="org-string">"#ffffff"</span> <span class="org-builtin">:foreground</span> <span class="org-string">"#cccccc"</span>))))
 513         `(whitespace-newline ((,class (<span class="org-builtin">:background</span> <span class="org-string">"#ffffff"</span> <span class="org-builtin">:foreground</span> <span class="org-string">"#cccccc"</span>))))
 514         `(whitespace-indentation ((,class (<span class="org-builtin">:background</span> <span class="org-string">"#ffffff"</span> <span class="org-builtin">:foreground</span> <span class="org-string">"#cccccc"</span>))))
 515         ))))
 516
 517(add-hook 'contrib/after-load-theme-hook 'vde/modus-operandi-custom)
 518(vde/modus-operandi)
 519
 520(<span class="org-keyword">defconst</span> <span class="org-variable-name">font-height</span> 130
 521  <span class="org-doc">"Default font-height to use."</span>)
 522(<span class="org-keyword">defconst</span> <span class="org-variable-name">font-family-mono</span> <span class="org-string">"Ubuntu Mono"</span>
 523  <span class="org-doc">"Default monospace font-family to use."</span>)
 524(<span class="org-keyword">defconst</span> <span class="org-variable-name">font-family-sans</span> <span class="org-string">"Ubuntu Sans"</span>
 525  <span class="org-doc">"Default sans font-family to use."</span>)
 526<span class="org-comment-delimiter">;; </span><span class="org-comment">Middle/Near East: &#1513;&#1500;&#1493;&#1501;, &#1575;&#1604;&#1587;&#1617;&#1604;&#1575;&#1605; &#1593;&#1604;&#1610;&#1603;&#1605;</span>
 527(<span class="org-keyword">when</span> (member <span class="org-string">"Noto Sans Arabic"</span> (font-family-list))
 528  (set-fontset-font t 'arabic <span class="org-string">"Noto Sans Arabic"</span>))
 529(<span class="org-keyword">when</span> (member <span class="org-string">"Noto Sans Hebrew"</span> (font-family-list))
 530  (set-fontset-font t 'arabic <span class="org-string">"Noto Sans Hebrew"</span>))
 531<span class="org-comment-delimiter">;; </span><span class="org-comment">Africa: &#4640;&#4619;&#4637;</span>
 532(<span class="org-keyword">when</span> (member <span class="org-string">"Noto Sans Ethiopic"</span> (font-family-list))
 533  (set-fontset-font t 'ethiopic <span class="org-string">"Noto Sans Ethiopic"</span>))
 534
 535<span class="org-comment-delimiter">;; </span><span class="org-comment">If font-family-mono or font-family-sans are not available, use the default Emacs face</span>
 536(<span class="org-keyword">when</span> (member font-family-mono (font-family-list))
 537  (set-face-attribute 'default nil
 538                      <span class="org-builtin">:family</span> font-family-mono
 539                      <span class="org-builtin">:height</span> font-height)
 540  (set-face-attribute 'fixed-pitch nil
 541                      <span class="org-builtin">:family</span> font-family-mono))
 542(<span class="org-keyword">when</span> (member font-family-sans (font-family-list))
 543  (set-face-attribute 'variable-pitch nil
 544                      <span class="org-builtin">:family</span> font-family-sans
 545                      <span class="org-builtin">:weight</span> 'regular))
 546
 547<span class="org-comment-delimiter">;; </span><span class="org-comment">Ignore X resources; its settings would be redundant with the other settings</span>
 548<span class="org-comment-delimiter">;; </span><span class="org-comment">in this file and can conflict with later config (particularly where the</span>
 549<span class="org-comment-delimiter">;; </span><span class="org-comment">cursor color is concerned).</span>
 550(advice-add #'x-apply-session-resources <span class="org-builtin">:override</span> #'ignore)
 551</pre>
 552</div></li>
 553
 554<li><p>
 555Reseting garbage collection and file-name-handler values.
 556</p>
 557
 558<div class="org-src-container">
 559<pre class="src src-emacs-lisp">(add-hook 'after-init-hook
 560          `(<span class="org-keyword">lambda</span> ()
 561             (<span class="org-keyword">setq</span> gc-cons-threshold 67108864 <span class="org-comment-delimiter">; </span><span class="org-comment">64mb</span>
 562                   gc-cons-percentage 0.1
 563                   file-name-handler-alist file-name-handler-alist-original)
 564             (garbage-collect)) <span class="org-warning">t)</span>
 565</pre>
 566</div></li>
 567</ul>
 568</div>
 569</div>
 570
 571<div id="outline-container-Initialization" class="outline-3">
 572<h3 id="Initialization">Initialization</h3>
 573<div class="outline-text-3" id="text-Initialization">
 574<p>
 575I am using the <a href="https://archive.casouri.cat/note/2020/painless-transition-to-portable-dumper/index.html">portable dump</a> feature (<i>to speed things up</i>) <b>but</b> I want to also start
 576without <code>pdump</code>, so I need to take both cases into account.
 577</p>
 578
 579<div class="org-src-container">
 580<pre class="src src-emacs-lisp">(<span class="org-keyword">defvar</span> <span class="org-variable-name">sbr-dumped</span> nil
 581  <span class="org-doc">"non-nil when a dump file is loaded (because dump.el sets this variable)."</span>)
 582
 583(<span class="org-keyword">defmacro</span> <span class="org-function-name">sbr-if-dump</span> (then <span class="org-builtin">&amp;rest</span> else)
 584  <span class="org-doc">"Evaluate IF if running with a dump file, else evaluate ELSE."</span>
 585  (<span class="org-keyword">declare</span> (indent 1))
 586  `(<span class="org-keyword">if</span> sbr-dumped
 587       ,then
 588     ,@else))
 589
 590(sbr-if-dump
 591    (<span class="org-keyword">progn</span>
 592      (global-font-lock-mode)
 593      (transient-mark-mode)
 594      (<span class="org-keyword">setq</span> load-path sbr-dumped-load-path))
 595  <span class="org-comment-delimiter">;; </span><span class="org-comment">add load-path&#8217;s and load autoload files</span>
 596  (package-initialize))
 597</pre>
 598</div>
 599
 600<p>
 601First thing first, let&rsquo;s define a <code>emacs-start-time</code> constant to be able to compute the
 602time Emacs took to start.
 603</p>
 604
 605<div class="org-src-container">
 606<pre class="src src-emacs-lisp">(<span class="org-keyword">defconst</span> <span class="org-variable-name">emacs-start-time</span> (current-time))
 607</pre>
 608</div>
 609
 610<p>
 611My configuration do not support Emacs version lower than 26.
 612</p>
 613
 614<div class="org-src-container">
 615<pre class="src src-emacs-lisp">(<span class="org-keyword">let</span> ((minver 26))
 616  (<span class="org-keyword">unless</span> (&gt;= emacs-major-version minver)
 617    (<span class="org-warning">error</span> <span class="org-string">"Your Emacs is too old -- this configuration requires v%s or higher"</span> minver)))
 618</pre>
 619</div>
 620
 621<p>
 622One thing though, I am currently not necessarily running Emacs 27, so I am going to need
 623to have the same configuration in <code>init.el</code> for a little bit of time.
 624</p>
 625
 626<p>
 627<i>Note: the lowest emacs version I wanna support is 26 (as of today, might evolve)</i>
 628</p>
 629
 630<div class="org-src-container">
 631<pre class="src src-emacs-lisp"><span class="org-comment-delimiter">;; </span><span class="org-comment">load early-init.el before Emacs 27.0</span>
 632(<span class="org-keyword">unless</span> (&gt;= emacs-major-version 27)
 633  (message <span class="org-string">"Early init: Emacs Version &lt; 27.0"</span>)
 634  (load (expand-file-name <span class="org-string">"early-init.el"</span> user-emacs-directory)))
 635</pre>
 636</div>
 637
 638<p>
 639We also want our configuration to be working the same on any computer, this means we want
 640to define every option by ourselves, not relying on default files (<code>default.el</code>) that
 641would be set by our distribution. This is where <code>inhibit-default-init</code> comes into play,
 642setting it to non-nil inhibit loading the <code>default</code> library.
 643</p>
 644
 645<p>
 646We also want to inhibit some initial default start messages and screen. The default screen
 647will be as bare as possible.
 648</p>
 649
 650<div class="org-src-container">
 651<pre class="src src-emacs-lisp">(<span class="org-keyword">setq</span> inhibit-default-init t)           <span class="org-comment-delimiter">; </span><span class="org-comment">Disable the site default settings</span>
 652
 653(<span class="org-keyword">setq</span> inhibit-startup-message t
 654      inhibit-startup-screen t)
 655</pre>
 656</div>
 657
 658<p>
 659Let&rsquo;s also use <code>y</code> or <code>n</code> instead of <code>yes</code> and <code>no</code> when exiting Emacs.
 660</p>
 661
 662<div class="org-src-container">
 663<pre class="src src-emacs-lisp">(<span class="org-keyword">setq</span> confirm-kill-emacs #'y-or-n-p)
 664</pre>
 665</div>
 666
 667<p>
 668One last piece to the puzzle is the default mode. Setting it to fundamental-mode means we
 669won&rsquo;t load any <i>heavy</i> mode at startup (like <code>org-mode</code>). We also want this scratch buffer
 670to be empty, so let&rsquo;s set it as well
 671</p>
 672
 673<div class="org-src-container">
 674<pre class="src src-emacs-lisp">(<span class="org-keyword">setq</span> initial-major-mode 'fundamental-mode
 675      initial-scratch-message nil)
 676</pre>
 677</div>
 678</div>
 679</div>
 680
 681<div id="outline-container-Unicode%20all%20the%20way" class="outline-3">
 682<h3 id="Unicode%20all%20the%20way">Unicode all the way</h3>
 683<div class="outline-text-3" id="text-Unicode%20all%20the%20way">
 684<p>
 685By default, all my systems are configured and support <code>utf-8</code>, so let&rsquo;s just make it a
 686default in Emacs ; and handle special case on demand.
 687</p>
 688
 689<div class="org-src-container">
 690<pre class="src src-emacs-lisp">(prefer-coding-system 'utf-8)
 691(set-default-coding-systems 'utf-8)
 692(set-language-environment 'utf-8)
 693(set-selection-coding-system 'utf-8)
 694(set-terminal-coding-system 'utf-8)
 695</pre>
 696</div>
 697</div>
 698</div>
 699
 700<div id="outline-container-Package%20management%20with%20%3Duse-package%3D" class="outline-3">
 701<h3 id="Package%20management%20with%20%3Duse-package%3D">Package management with <code>use-package</code></h3>
 702<div class="outline-text-3" id="text-Package%20management%20with%20%3Duse-package%3D">
 703<p>
 704<code>use-package</code> is a tool that streamlines the configuration of packages. It handles
 705everything from assigning key bindings, setting the value of customisation options,
 706writing hooks, declaring a package as a dependency for another, and so on.
 707</p>
 708
 709<blockquote>
 710<p>
 711The <code>use-package</code> macro allows you to isolate package configuration in your <code>.emacs</code> file
 712in a way that is both performance-oriented and, well, tidy.  I created it because I have
 713over 80 packages that I use in Emacs, and things were getting difficult to manage.  Yet
 714with this utility my total load time is around 2 seconds, with no loss of functionality!
 715</p>
 716</blockquote>
 717
 718<p>
 719With <code>use-package</code> we can improve the start-up performance of Emacs in a few fairly simple
 720ways. Whenever a command is bound to a key it is configured to be loaded only once
 721invoked. Otherwise we can specify which functions should be autoloaded by means of the
 722<code>:commands</code> keyword.
 723</p>
 724
 725<p>
 726We need to setup the emacs package system and install <code>use-package</code> if not present
 727already.
 728</p>
 729
 730<div class="org-src-container">
 731<pre class="src src-emacs-lisp">(<span class="org-keyword">require</span> '<span class="org-constant">package</span>)
 732
 733(<span class="org-keyword">setq</span> package-archives
 734      '((<span class="org-string">"melpa"</span> . <span class="org-string">"http://melpa.org/packages/"</span>)
 735        (<span class="org-string">"org"</span> . <span class="org-string">"https://orgmode.org/elpa/"</span>)
 736        (<span class="org-string">"gnu"</span> . <span class="org-string">"https://elpa.gnu.org/packages/"</span>)))
 737
 738(<span class="org-keyword">setq</span> package-archive-priorities
 739      '((<span class="org-string">"melpa"</span> .  3)
 740        (<span class="org-string">"org"</span> . 2)
 741        (<span class="org-string">"gnu"</span> . 1)))
 742
 743(<span class="org-keyword">require</span> '<span class="org-constant">tls</span>)
 744
 745<span class="org-comment-delimiter">;; </span><span class="org-comment">From https://github.com/hlissner/doom-emacs/blob/5dacbb7cb1c6ac246a9ccd15e6c4290def67757c/core/core-packages.el#L102</span>
 746(<span class="org-keyword">setq</span> gnutls-verify-error (not (getenv <span class="org-string">"INSECURE"</span>)) <span class="org-comment-delimiter">; </span><span class="org-comment">you shouldn't use this</span>
 747      tls-checktrust gnutls-verify-error
 748      tls-program (list <span class="org-string">"gnutls-cli --x509cafile %t -p %p %h"</span>
 749                        <span class="org-comment-delimiter">;; </span><span class="org-comment">compatibility fallbacks</span>
 750                        <span class="org-string">"gnutls-cli -p %p %h"</span>
 751                        <span class="org-string">"openssl s_client -connect %h:%p -no_ssl2 -no_ssl3 -ign_eof"</span>))
 752
 753<span class="org-comment-delimiter">;; </span><span class="org-comment">Initialise the packages, avoiding a re-initialisation.</span>
 754(<span class="org-keyword">unless</span> (<span class="org-keyword">bound-and-true-p</span> package--initialized)
 755  (<span class="org-keyword">setq</span> package-enable-at-startup nil)
 756  (package-initialize))
 757
 758(<span class="org-keyword">setq</span> load-prefer-newer t)              <span class="org-comment-delimiter">; </span><span class="org-comment">Always load newer compiled files</span>
 759(<span class="org-keyword">setq</span> ad-redefinition-action 'accept)   <span class="org-comment-delimiter">; </span><span class="org-comment">Silence advice redefinition warnings</span>
 760
 761<span class="org-comment-delimiter">;; </span><span class="org-comment">Init `</span><span class="org-comment"><span class="org-constant">delight</span></span><span class="org-comment">'</span>
 762(<span class="org-keyword">unless</span> (package-installed-p 'delight)
 763  (package-refresh-contents)
 764  (package-install 'delight))
 765
 766<span class="org-comment-delimiter">;; </span><span class="org-comment">Configure `</span><span class="org-comment"><span class="org-constant">use-package</span></span><span class="org-comment">' prior to loading it.</span>
 767(<span class="org-keyword">eval-and-compile</span>
 768  (<span class="org-keyword">setq</span> use-package-always-ensure nil)
 769  (<span class="org-keyword">setq</span> use-package-always-defer nil)
 770  (<span class="org-keyword">setq</span> use-package-always-demand nil)
 771  (<span class="org-keyword">setq</span> use-package-expand-minimally nil)
 772  (<span class="org-keyword">setq</span> use-package-enable-imenu-support t))
 773
 774(<span class="org-keyword">unless</span> (package-installed-p 'use-package)
 775  (package-refresh-contents)
 776  (package-install 'use-package))
 777
 778(<span class="org-keyword">eval-when-compile</span>
 779  (<span class="org-keyword">require</span> '<span class="org-constant">use-package</span>))
 780</pre>
 781</div>
 782</div>
 783</div>
 784<div id="outline-container-Early%20environment%20setup" class="outline-3">
 785<h3 id="Early%20environment%20setup">Early environment setup</h3>
 786<div class="outline-text-3" id="text-Early%20environment%20setup">
 787<p>
 788I want to <b>force</b> <code>=SSH_AUTH_SOCK</code> in Emacs to use my gpg-agent.
 789</p>
 790
 791<div class="org-src-container">
 792<pre class="src src-emacs-lisp">(setenv <span class="org-string">"SSH_AUTH_SOCK"</span> <span class="org-string">"/run/user/1000/gnupg/S.gpg-agent.ssh"</span>)
 793</pre>
 794</div>
 795</div>
 796</div>
 797
 798<div id="outline-container-%3Dcustom.el%3D" class="outline-3">
 799<h3 id="%3Dcustom.el%3D"><code>custom.el</code></h3>
 800<div class="outline-text-3" id="text-%3Dcustom.el%3D">
 801<p>
 802When you install a package or use the various customisation interfaces to tweak things to
 803your liking, Emacs will append a piece of elisp to your init file. I prefer to have that
 804stored in a separate file.
 805</p>
 806
 807<div class="org-src-container">
 808<pre class="src src-emacs-lisp">(<span class="org-keyword">defconst</span> <span class="org-variable-name">vde/custom-file</span> (locate-user-emacs-file <span class="org-string">"custom.el"</span>)
 809  <span class="org-doc">"File used to store settings from Customization UI."</span>)
 810
 811(use-package cus-edit
 812  <span class="org-builtin">:config</span>
 813  (<span class="org-keyword">setq</span>
 814   custom-file vde/custom-file
 815   custom-buffer-done-kill nil          <span class="org-comment-delimiter">; </span><span class="org-comment">Kill when existing</span>
 816   custom-buffer-verbose-help nil       <span class="org-comment-delimiter">; </span><span class="org-comment">Remove redundant help text</span>
 817   custom-unlispify-tag-names nil       <span class="org-comment-delimiter">; </span><span class="org-comment">Show me the real variable name</span>
 818   custom-unlispify-menu-entries nil)
 819  (<span class="org-keyword">unless</span> (file-exists-p custom-file)
 820    (write-region <span class="org-string">""</span> nil custom-file))
 821
 822  (load vde/custom-file 'no-error 'no-message))
 823</pre>
 824</div>
 825</div>
 826</div>
 827
 828<div id="outline-container-Remove%20built-in%20%3Dorg-mode%3D" class="outline-3">
 829<h3 id="Remove%20built-in%20%3Dorg-mode%3D">Remove built-in <code>org-mode</code></h3>
 830<div class="outline-text-3" id="text-Remove%20built-in%20%3Dorg-mode%3D">
 831<p>
 832I want to make sure I am using the installed version of <code>orgmode</code> (from my org
 833configuration) instead of the built-in one. To do that safely, let&rsquo;s remove the built-in
 834version out of the load path.
 835</p>
 836
 837<div class="org-src-container">
 838<pre class="src src-emacs-lisp">(<span class="org-keyword">require</span> '<span class="org-constant">cl-seq</span>)
 839(<span class="org-keyword">setq</span> load-path
 840      (cl-remove-if
 841       (<span class="org-keyword">lambda</span> (x)
 842         (string-match-p <span class="org-string">"org$"</span> x))
 843       load-path))
 844</pre>
 845</div>
 846</div>
 847</div>
 848
 849<div id="outline-container-Loading%20configuration%20files" class="outline-3">
 850<h3 id="Loading%20configuration%20files">Loading configuration files</h3>
 851<div class="outline-text-3" id="text-Loading%20configuration%20files">
 852<p>
 853This <code>org-mode</code> document <i>tangles</i> into several files in different folders :
 854</p>
 855<ul class="org-ul">
 856<li><code>config</code> for my configuration</li>
 857<li><code>lisp</code> for imported code or library I&rsquo;ve written and not yet published</li>
 858</ul>
 859
 860<p>
 861I used to load them by hand in the <code>init.el</code> file, which is very cumbersome, so let&rsquo;s try
 862to automatically load them. I want to first load the file in the <code>lisp</code> folder as they are
 863potentially used by my configuration (in <code>config</code>).
 864</p>
 865
 866<p>
 867Let&rsquo;s define some functions that would do the job.
 868</p>
 869
 870<div class="org-src-container">
 871<pre class="src src-emacs-lisp">(<span class="org-keyword">defun</span> <span class="org-function-name">vde/el-load-dir</span> (dir)
 872  <span class="org-doc">"Load el files from the given folder"</span>
 873  (<span class="org-keyword">let</span> ((files (directory-files dir nil <span class="org-string">"</span><span class="org-string"><span class="org-warning">\</span></span><span class="org-string">.el$"</span>)))
 874    (<span class="org-keyword">while</span> files
 875      (load-file (concat dir (<span class="org-keyword">pop</span> files))))))
 876
 877(<span class="org-keyword">defun</span> <span class="org-function-name">vde/short-hostname</span> ()
 878  <span class="org-doc">"Return hostname in short (aka wakasu.local -&gt; wakasu)"</span>
 879  (string-match <span class="org-string">"[0-9A-Za-z-]+"</span> system-name)
 880  (substring system-name (match-beginning 0) (match-end 0)))
 881</pre>
 882</div>
 883
 884<p>
 885Let&rsquo;s define some constants early, based on the system, and the environment, to be able to
 886use those later on to skip some package or change some configuration accordingly.
 887</p>
 888
 889<div class="org-src-container">
 890<pre class="src src-emacs-lisp">(<span class="org-keyword">defconst</span> <span class="org-variable-name">*sys/gui*</span>
 891  (display-graphic-p)
 892  <span class="org-doc">"Are we running on a GUI Emacs ?"</span>)
 893(<span class="org-keyword">defconst</span> <span class="org-variable-name">*sys/linux*</span>
 894  (eq system-type 'gnu/linux)
 895  <span class="org-doc">"Are we running on a GNU/Linux system?"</span>)
 896(<span class="org-keyword">defconst</span> <span class="org-variable-name">*sys/mac*</span>
 897  (eq system-type 'darwin)
 898  <span class="org-doc">"Are we running on a Mac system?"</span>)
 899(<span class="org-keyword">defconst</span> <span class="org-variable-name">*sys/root*</span>
 900  (string-equal <span class="org-string">"root"</span> (getenv <span class="org-string">"USER"</span>))
 901  <span class="org-doc">"Are you a ROOT user?"</span>)
 902(<span class="org-keyword">defconst</span> <span class="org-variable-name">*nix*</span>
 903  (executable-find <span class="org-string">"nix"</span>)
 904  <span class="org-doc">"Do we have nix? (aka are we running in NixOS or a system using nixpkgs)"</span>)
 905(<span class="org-keyword">defconst</span> <span class="org-variable-name">*rg*</span>
 906  (executable-find <span class="org-string">"rg"</span>)
 907  <span class="org-doc">"Do we have ripgrep?"</span>)
 908(<span class="org-keyword">defconst</span> <span class="org-variable-name">*gcc*</span>
 909  (executable-find <span class="org-string">"gcc"</span>)
 910  <span class="org-doc">"Do we have gcc?"</span>)
 911(<span class="org-keyword">defconst</span> <span class="org-variable-name">*git*</span>
 912  (executable-find <span class="org-string">"git"</span>)
 913  <span class="org-doc">"Do we have git?"</span>)
 914
 915(<span class="org-keyword">defvar</span> <span class="org-variable-name">*sys/full*</span>
 916  (member (vde/short-hostname) '(<span class="org-string">"wakasu"</span> <span class="org-string">"naruhodo"</span>)) <span class="org-comment-delimiter">; </span><span class="org-comment">"naruhodo" &lt;- put naruhodo back in</span>
 917  <span class="org-doc">"Is it a full system ?"</span>)
 918(<span class="org-keyword">defvar</span> <span class="org-variable-name">*sys/light*</span>
 919  (not *sys/full*)
 920  <span class="org-doc">"Is it a light system ?"</span>)
 921</pre>
 922</div>
 923
 924<p>
 925Now, in order to load <code>lisp</code> and <code>config</code> files, it&rsquo;s just a matter of calling this
 926function with the right argument.
 927</p>
 928
 929<div class="org-src-container">
 930<pre class="src src-emacs-lisp">(add-to-list 'load-path (concat user-emacs-directory <span class="org-string">"lisp/"</span>))
 931(add-to-list 'load-path (concat user-emacs-directory <span class="org-string">"lisp/vorg"</span>))
 932(<span class="org-keyword">require</span> '<span class="org-constant">init-func</span>)
 933(vde/el-load-dir (concat user-emacs-directory <span class="org-string">"/config/"</span>))
 934</pre>
 935</div>
 936
 937<p>
 938Finally, I want to be able to load files for a specific machine, in case I need it (not
 939entirely sure why yet but…)
 940</p>
 941
 942<div class="org-src-container">
 943<pre class="src src-emacs-lisp">(<span class="org-keyword">if</span> (file-exists-p (downcase (concat user-emacs-directory <span class="org-string">"/hosts/"</span> (vde/short-hostname) <span class="org-string">".el"</span>)))
 944    (load-file (downcase (concat user-emacs-directory <span class="org-string">"/hosts/"</span> (vde/short-hostname) <span class="org-string">".el"</span>))))
 945</pre>
 946</div>
 947</div>
 948</div>
 949
 950<div id="outline-container-Counting%20the%20time%20of%20loading" class="outline-3">
 951<h3 id="Counting%20the%20time%20of%20loading">Counting the time of loading</h3>
 952<div class="outline-text-3" id="text-Counting%20the%20time%20of%20loading">
 953<div class="org-src-container">
 954<pre class="src src-emacs-lisp">(<span class="org-keyword">let</span> ((elapsed (float-time (time-subtract (current-time)
 955                                          emacs-start-time))))
 956  (message <span class="org-string">"Loading %s...done (%.3fs)"</span> load-file-name elapsed))
 957
 958(add-hook 'after-init-hook
 959          `(<span class="org-keyword">lambda</span> ()
 960             (<span class="org-keyword">let</span> ((elapsed
 961                    (float-time
 962                     (time-subtract (current-time) emacs-start-time))))
 963               (message <span class="org-string">"Loading %s...done (%.3fs) [after-init]"</span>
 964                        ,load-file-name elapsed))) <span class="org-warning">t)</span>
 965</pre>
 966</div>
 967</div>
 968</div>
 969</section>
 970<section id="outline-container-Configurations" class="outline-2">
 971<h2 id="Configurations">Configurations</h2>
 972<div class="outline-text-2" id="text-Configurations">
 973<p>
 974As seen above, I split my configurations in a <code>config</code> folder. Each of those configuration
 975has its own documentation, on its own page. Ideally, each module is optional and can be
 976skipped if not desired. In practice though, I load all of them, because this is my
 977config. I haven&rsquo;t really tried loading them all individually to make sure I don&rsquo;t have
 978links between them.
 979</p>
 980
 981<ul class="org-ul">
 982<li>Core System
 983<ul class="org-ul">
 984<li><a href="emacs_keep_it_clean.html">keep emacs clean</a></li>
 985<li><a href="emacs_appearance.html">appearance</a></li>
 986<li>editing</li>
 987<li>navigation</li>
 988<li>buffer and windows</li>
 989<li>files (with dired)</li>
 990</ul></li>
 991<li>Version control</li>
 992<li><a href="emacs_projects.html">Projects</a></li>
 993<li>Programming
 994<ul class="org-ul">
 995<li>emacs-lisp</li>
 996<li>go</li>
 997<li>nix</li>
 998</ul></li>
 999<li>Writing</li>
1000<li>Task management
1001<ul class="org-ul">
1002<li><a href="my_organizational_workflow.html">Org-mode and agenda</a> aka &ldquo;My Organization Workflow&rdquo;</li>
1003</ul></li>
1004<li>Communications
1005<ul class="org-ul">
1006<li><a href="config_email_configuration.html">Email configuration</a>, notably using <a href="gnus.html">Gnus</a> and <a href="notmuch.html">notmuch</a>.</li>
1007</ul></li>
1008</ul>
1009</div>
1010</section>
1011<section id="outline-container-Nix%28eries%29" class="outline-2">
1012<h2 id="Nix%28eries%29">Nix(eries)</h2>
1013<div class="outline-text-2" id="text-Nix%28eries%29">
1014<p>
1015I am using <a href="nixos.html">NixOS</a> and <a href="nix.html">Nix</a>, thus I do have a nix specific setup for Emacs.
1016</p>
1017</div>
1018
1019<div id="outline-container-Scripts" class="outline-3">
1020<h3 id="Scripts">Scripts</h3>
1021<div class="outline-text-3" id="text-Scripts">
1022<p>
1023I have a few scripts and desktop files that I want to get installed in my environment.
1024</p>
1025</div>
1026
1027<div id="outline-container-capture" class="outline-4">
1028<h4 id="capture">capture</h4>
1029<div class="outline-text-4" id="text-capture">
1030<p>
1031The first one is a capture command that starts a new frame using the <code>org</code> daemon so that
1032I can quickly capture something from anywhere.
1033</p>
1034
1035<div class="org-src-container">
1036<pre class="src src-nix" id="org53b4124"><span class="org-nix-attribute">capture</span> = pkgs.writeScriptBin <span class="org-string">"capture"</span> <span class="org-string">''</span>
1037<span class="org-string">  #!</span><span class="org-nix-antiquote">${</span>pkgs.stdenv.shell<span class="org-nix-antiquote">}</span>
1038<span class="org-string">  emacsclient -s /run/user/1000/emacs/org -n -F '((name . "capture") (width . 150) (height . 90))' -e '(org-capture)'</span>
1039<span class="org-string">''</span>;
1040</pre>
1041</div>
1042</div>
1043</div>
1044
1045<div id="outline-container-emacsclient%20helpers" class="outline-4">
1046<h4 id="emacsclient%20helpers">emacsclient helpers</h4>
1047<div class="outline-text-4" id="text-emacsclient%20helpers">
1048<p>
1049<code>ec</code> will start an emacs &ldquo;window&rdquo; frame from the emacs org server.
1050</p>
1051
1052<div class="org-src-container">
1053<pre class="src src-nix" id="org7baa974"><span class="org-nix-attribute">ec</span> = pkgs.writeScriptBin <span class="org-string">"ec"</span> <span class="org-string">''</span>
1054<span class="org-string">  #!</span><span class="org-nix-antiquote">${</span>pkgs.stdenv.shell<span class="org-nix-antiquote">}</span>
1055<span class="org-string">  emacsclient -s /run/user/1000/emacs/org --create-frame $@</span>
1056<span class="org-string">''</span>;
1057</pre>
1058</div>
1059
1060<p>
1061<code>ec</code> will start an emacs termimal frame from the emacs org server.
1062</p>
1063
1064<div class="org-src-container">
1065<pre class="src src-nix" id="orge349e27"><span class="org-nix-attribute">et</span> = pkgs.writeScriptBin <span class="org-string">"et"</span> <span class="org-string">''</span>
1066<span class="org-string">  #!</span><span class="org-nix-antiquote">${</span>pkgs.stdenv.shell<span class="org-nix-antiquote">}</span>
1067<span class="org-string">  emacsclient -s /run/user/1000/emacs/org --tty $@</span>
1068<span class="org-string">''</span>;
1069</pre>
1070</div>
1071</div>
1072</div>
1073
1074<div id="outline-container-portable%20dump%20command" class="outline-4">
1075<h4 id="portable%20dump%20command">portable dump command</h4>
1076<div class="outline-text-4" id="text-portable%20dump%20command">
1077<p>
1078<code>e</code> starts emacs using the portable dump.
1079</p>
1080
1081<div class="org-src-container">
1082<pre class="src src-nix" id="orge77203e"><span class="org-nix-attribute">e</span> = pkgs.writeScriptBin <span class="org-string">"e"</span> <span class="org-string">''</span>
1083<span class="org-string">  #!</span><span class="org-nix-antiquote">${</span>pkgs.stdenv.shell<span class="org-nix-antiquote">}</span>
1084<span class="org-string">  emacs --dump-file=~/.config/emacs/emacs.pdmp $@</span>
1085<span class="org-string">''</span>;
1086</pre>
1087</div>
1088</div>
1089</div>
1090</div>
1091
1092<div id="outline-container-Desktop%20files" class="outline-3">
1093<h3 id="Desktop%20files">Desktop files</h3>
1094<div class="outline-text-3" id="text-Desktop%20files">
1095<ul class="org-ul">
1096<li><p>
1097<code>org-protocol.desktop</code>: this register the org protocol in xdg.
1098</p>
1099<div class="org-src-container">
1100<pre class="src src-conf">[<span class="org-type">Desktop Entry</span>]
1101<span class="org-variable-name">Name</span>=org-protocol
1102<span class="org-variable-name">Exec</span>=emacsclient -s /run/user/1000/emacs/org -n %u
1103<span class="org-variable-name">Type</span>=Application
1104<span class="org-variable-name">Terminal</span>=false
1105<span class="org-variable-name">Categories</span>=System;
1106<span class="org-variable-name">MimeType</span>=x-scheme-handler/org-protocol;
1107</pre>
1108</div></li>
1109<li><p>
1110<code>ec.desktop</code>: this starts a new frame on the <code>org</code> daemon.
1111</p>
1112<div class="org-src-container">
1113<pre class="src src-conf">[<span class="org-type">Desktop Entry</span>]
1114<span class="org-variable-name">Name</span>=Emacs (client)
1115<span class="org-variable-name">Exec</span>=ec
1116<span class="org-variable-name">Type</span>=Application
1117<span class="org-variable-name">Terminal</span>=false
1118<span class="org-variable-name">Categories</span>=System;
1119<span class="org-variable-name">Icon</span>=emacs;
1120</pre>
1121</div></li>
1122<li><p>
1123<code>capture.desktop</code>: this runs the <code>capture</code> script above
1124</p>
1125<div class="org-src-container">
1126<pre class="src src-conf">[<span class="org-type">Desktop Entry</span>]
1127<span class="org-variable-name">Name</span>=Emacs capture
1128<span class="org-variable-name">Exec</span>=capture
1129<span class="org-variable-name">Type</span>=Application
1130<span class="org-variable-name">Terminal</span>=false
1131<span class="org-variable-name">Categories</span>=System;
1132<span class="org-variable-name">Icon</span>=emacs;
1133</pre>
1134</div></li>
1135</ul>
1136
1137<p>
1138And then, we need to link those up :
1139</p>
1140
1141<div class="org-src-container">
1142<pre class="src src-nix" id="org5c0598b">home.file.<span class="org-string">".local/share/applications/org-protocol.desktop"</span>.<span class="org-nix-attribute">source</span> = <span class="org-nix-constant">./emacs/org-protocol.desktop</span>;
1143home.file.<span class="org-string">".local/share/applications/ec.desktop"</span>.<span class="org-nix-attribute">source</span> = <span class="org-nix-constant">./emacs/ec.desktop</span>;
1144home.file.<span class="org-string">".local/share/applications/capture.desktop"</span>.<span class="org-nix-attribute">source</span> = <span class="org-nix-constant">./emacs/capture.desktop</span>;
1145</pre>
1146</div>
1147</div>
1148</div>
1149
1150<div id="outline-container-Home%20packages" class="outline-3">
1151<h3 id="Home%20packages">Home packages</h3>
1152<div class="outline-text-3" id="text-Home%20packages">
1153<p>
1154We need to install a few packages:
1155</p>
1156<ul class="org-ul">
1157<li><code>ditaa</code> and <code>graphiz</code> are there for org-mode and org-babel</li>
1158<li><code>pandoc</code> is for when I when to migrate a document from markdown to org-mode or the opposite</li>
1159<li><code>sqlite</code> is for packages like <code>forge</code></li>
1160<li><code>zip</code> is… always useful</li>
1161<li><code>capture</code> is the script defined abovoe.</li>
1162</ul>
1163
1164<div class="org-src-container">
1165<pre class="src src-nix" id="org524401b"><span class="org-nix-attribute">home.packages</span> = <span class="org-nix-keyword">with</span> pkgs; [
1166  ditaa
1167  graphviz
1168  pandoc
1169  sqlite
1170  zip
1171  <span class="org-comment"># See if I can hide this under an option</span>
1172  capture
1173  e
1174  ec
1175  et
1176];
1177</pre>
1178</div>
1179</div>
1180</div>
1181
1182<div id="outline-container-%3Dprograms.emacs%3D" class="outline-3">
1183<h3 id="%3Dprograms.emacs%3D"><code>programs.emacs</code></h3>
1184<div class="outline-text-3" id="text-%3Dprograms.emacs%3D">
1185<p>
1186<code>home-manager</code> comes with a modules named <code>programs.emacs</code>, so we are going to use it
1187</p>
1188
1189<div class="org-src-container">
1190<pre class="src src-nix" id="org6d6dc2f"><span class="org-nix-attribute">programs.emacs</span> = {
1191  <span class="org-nix-attribute">enable</span> = <span class="org-nix-builtin">true</span>;
1192  <span class="org-nix-attribute">package</span> = pkgs.my.emacs;
1193  <span class="org-nix-attribute">extraPackages</span> = myExtraPackages;
1194};
1195</pre>
1196</div>
1197
1198<div class="org-src-container">
1199<pre class="src src-nix" id="orge61a240"><span class="org-nix-attribute">myExtraPackages</span> = epkgs: <span class="org-nix-keyword">with</span> epkgs; [
1200  ace-window
1201  aggressive-indent
1202  async
1203  avy
1204  bbdb
1205  beginend
1206  color-identifiers-mode
1207  company
1208  company-emoji
1209  company-go
1210  dash
1211  delight
1212  diredfl
1213  dired-collapse
1214  dired-git-info
1215  dired-narrow
1216  dired-quick-sort
1217  dired-rsync
1218  dired-subtree
1219  dockerfile-mode
1220  dumb-jump
1221  easy-kill
1222  edit-indirect
1223  envrc
1224  esh-autosuggest
1225  eshell-prompt-extras
1226  esup
1227  expand-region
1228  flimenu
1229  flycheck
1230  flycheck-golangci-lint
1231  git-annex
1232  git-commit
1233  gitattributes-mode
1234  gitconfig-mode
1235  github-review
1236  gitignore-mode
1237  go-mode
1238  go-stacktracer
1239  gotest
1240  goto-last-change
1241  hardhat
1242  helpful
1243  highlight
1244  highlight-indentation
1245  highlight-numbers
1246  ibuffer-vc
1247  icomplete-vertical
1248  iedit
1249  json-mode
1250  magit
1251  magit-annex
1252  magit-popup
1253  magit-todos
1254  markdown-mode
1255  minions
1256  modus-operandi-theme
1257  moody
1258  mwim
1259  nix-buffer
1260  nix-mode
1261  nixpkgs-fmt
1262  no-littering
1263  ob-async
1264  ob-go
1265  ob-http
1266  olivetti
1267  orderless
1268  org-capture-pop-frame
1269  org-gcal
1270  org-journal
1271  org-plus-contrib
1272  org-ql
1273  org-ref
1274  org-roam
1275  org-super-agenda
1276  org-superstar
1277  org-tree-slide
1278  org-web-tools
1279  orgit
1280  ox-pandoc
1281  pandoc-mode
1282  pdf-tools
1283  pkgs.bookmark-plus
1284  pkgs.dired-plus
1285  projectile
1286  python-mode
1287  rainbow-delimiters
1288  rainbow-mode
1289  rg
1290  ripgrep
1291  scratch
1292  shr-tag-pre-highlight
1293  smartparens
1294  symbol-overlay
1295  trashed
1296  try
1297  undo-tree
1298  use-package
1299  visual-fill-column
1300  visual-regexp
1301  vterm
1302  web-mode
1303  wgrep
1304  whole-line-or-region
1305  with-editor
1306  xterm-color
1307  yaml-mode
1308];
1309</pre>
1310</div>
1311</div>
1312</div>
1313
1314<div id="outline-container-Emacs%20%2Fserver%2F" class="outline-3">
1315<h3 id="Emacs%20%2Fserver%2F">Emacs <i>server</i></h3>
1316<div class="outline-text-3" id="text-Emacs%20%2Fserver%2F">
1317<div class="org-src-container">
1318<pre class="src src-nix" id="orgd8099cb"><span class="org-nix-attribute">services.emacs-server</span> = {
1319  <span class="org-nix-attribute">enable</span> = <span class="org-nix-builtin">true</span>;
1320  <span class="org-nix-attribute">package</span> = pkgs.my.emacs;
1321  <span class="org-nix-attribute">name</span> = <span class="org-string">"org"</span>;
1322  <span class="org-nix-attribute">shell</span> = pkgs.zsh + <span class="org-string">"/bin/zsh -i -c"</span>;
1323  <span class="org-comment"># FIXME do this in the derivation :)</span>
1324  <span class="org-comment"># extraOptions = "--dump-file=${config.home.homeDirectory}/.config/emacs/emacs.pdmp";</span>
1325};
1326</pre>
1327</div>
1328</div>
1329</div>
1330
1331<div id="outline-container-Commands%20and%20sessions%20variables" class="outline-3">
1332<h3 id="Commands%20and%20sessions%20variables">Commands and sessions variables</h3>
1333<div class="outline-text-3" id="text-Commands%20and%20sessions%20variables">
1334<p>
1335Let&rsquo;s define some useful <i>commands</i> that can be used
1336</p>
1337
1338<p>
1339Let&rsquo;s define some
1340</p>
1341</div>
1342</div>
1343
1344<div id="outline-container-Legacy" class="outline-3">
1345<h3 id="Legacy">Legacy</h3>
1346<div class="outline-text-3" id="text-Legacy">
1347<div class="org-src-container">
1348<pre class="src src-nix" id="org5b88dbd"><span class="org-nix-attribute">home.sessionVariables</span> = {
1349  <span class="org-nix-attribute">EDITOR</span> = <span class="org-string">"et"</span>;
1350  <span class="org-nix-attribute">ALTERNATE_EDITOR</span> = <span class="org-string">"et"</span>;
1351};
1352</pre>
1353</div>
1354</div>
1355</div>
1356
1357<div id="outline-container-Configuration%20layout" class="outline-3">
1358<h3 id="Configuration%20layout">Configuration layout</h3>
1359<div class="outline-text-3" id="text-Configuration%20layout">
1360<p>
1361Here we define the <code>emacs.nix</code> file that gets generated by the source blocks in our Org
1362document. This is the file that actually gets loaded on startup. The placeholders in
1363angled brackets correspond to the <code>NAME</code> directives above the <code>SRC</code> blocks throughout this
1364document.
1365</p>
1366
1367<div class="org-src-container">
1368<pre class="src src-nix"><span class="org-comment-delimiter"># </span><span class="org-comment">Note: this file is autogenerated from an org-mode file.</span>
1369{ config, lib, pkgs, ... }:
1370
1371<span class="org-nix-keyword">with</span> lib;
1372<span class="org-nix-keyword">let</span>
1373  &lt;<span class="org-nix-constant">&lt;script-capture&gt;</span>&gt;
1374  &lt;<span class="org-nix-constant">&lt;script-e&gt;</span>&gt;
1375  &lt;<span class="org-nix-constant">&lt;script-et&gt;</span>&gt;
1376  &lt;<span class="org-nix-constant">&lt;script-ec&gt;</span>&gt;
1377  &lt;<span class="org-nix-constant">&lt;myExtraPackages&gt;</span>&gt;
1378<span class="org-nix-keyword">in</span>
1379{
1380  &lt;<span class="org-nix-constant">&lt;desktop-files&gt;</span>&gt;
1381  &lt;<span class="org-nix-constant">&lt;packages&gt;</span>&gt;
1382  &lt;<span class="org-nix-constant">&lt;programs.emacs&gt;</span>&gt;
1383  &lt;<span class="org-nix-constant">&lt;emacs-server&gt;</span>&gt;
1384  &lt;<span class="org-nix-constant">&lt;legacy&gt;</span>&gt;
1385}
1386</pre>
1387</div>
1388</div>
1389</div>
1390</section>
1391<section id="outline-container-Inspirations" class="outline-2">
1392<h2 id="Inspirations">Inspirations</h2>
1393<div class="outline-text-2" id="text-Inspirations">
1394<p>
1395This is inspired by a crazy amount of configurations (litterate or note):
1396</p>
1397
1398<ul class="org-ul">
1399<li><a href="https://protesilaos.com/dotemacs/">Protesilaos Stravou&rsquo;s dotemacs</a></li>
1400<li><a href="https://tecosaur.github.io/emacs-config/config.html">Doom Emacs Configuration</a> from <a href="https://github.com/tecosaur">tecosaur</a></li>
1401<li><a href="https://gitlab.com/ndw/dotfiles">https://gitlab.com/ndw/dotfiles</a></li>
1402<li><a href="https://github.com/MatthewZMD/.emacs.d">https://github.com/MatthewZMD/.emacs.d</a></li>
1403<li><a href="https://github.com/alhassy/emacs.d">https://github.com/alhassy/emacs.d</a></li>
1404<li><a href="https://github.com/chmouel/emacs-config">https://github.com/chmouel/emacs-config</a></li>
1405<li><a href="https://github.com/seagle0128/.emacs.d">https://github.com/seagle0128/.emacs.d</a></li>
1406<li><a href="https://github.com/hlissner/doom-emacs">https://github.com/hlissner/doom-emacs</a></li>
1407<li><a href="http://doc.norang.ca/org-mode.html">http://doc.norang.ca/org-mode.html</a></li>
1408</ul>
1409
1410<p>
1411And also:
1412</p>
1413
1414<ul class="org-ul">
1415<li><a href="https://sriramkswamy.github.io/dotemacs/">Emacs configuration file</a></li>
1416<li><a href="https://blog.d46.us/advanced-emacs-startup/">Advanced Techniques for Reducing Emacs Startup Time</a></li>
1417<li><a href="https://www.bartuka.com/posts/emacs-config/index.html">@bartuka: emacs.d</a></li>
1418<li><a href="http://www.howardism.org/Technical/Emacs/getting-boxes-done.html">Getting Boxes Done</a></li>
1419<li><a href="https://idiocy.org/emacs-fonts-and-fontsets.html">Emacs, fonts and fontsets</a></li>
1420<li><a href="https://spin.atomicobject.com/2016/05/27/write-emacs-package/">A Simple Guide to Writing &amp; Publishing Emacs Packages</a></li>
1421<li><a href="https://alphapapa.github.io/emacs-package-dev-handbook/">The Emacs Package Developer&rsquo;s Handbook</a></li>
1422<li><a href="https://tecosaur.github.io/emacs-config/config.html">Doom Emacs Configuration</a></li>
1423</ul>
1424</div>
1425</section>
1426
1427
1428<section id="outline-container-Links" class="outline-2">
1429<h2 id="Links">Links</h2>
1430<div class="outline-text-2" id="text-Links">
1431<p>
1432Here is a compilation of <i>random</i> articles around GNU/Emacs that I found interesting to
1433share. I may add comment on those too.
1434</p>
1435</div>
1436<div id="outline-container-%5B%5Bhttps%3A%2F%2Faliquote.org%2Fpost%2Fminimalist-emacs%2F%5D%5BMinimalist%20Emacs%20-%20aliquot%EF%A3%BF%5D%5D" class="outline-3">
1437<h3 id="%5B%5Bhttps%3A%2F%2Faliquote.org%2Fpost%2Fminimalist-emacs%2F%5D%5BMinimalist%20Emacs%20-%20aliquot%EF%A3%BF%5D%5D"><span class="todo TODO">TODO</span> <a href="https://aliquote.org/post/minimalist-emacs/">Minimalist Emacs - aliquot</a></h3>
1438<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Faliquote.org%2Fpost%2Fminimalist-emacs%2F%5D%5BMinimalist%20Emacs%20-%20aliquot%EF%A3%BF%5D%5D">
1439<p>
1440<span class="timestamp-wrapper"><span class="timestamp">[2020-09-17 Thu 17:55]</span></span>
1441</p>
1442</div>
1443</div>
1444
1445<div id="outline-container-%5B%5Bhttps%3A%2F%2Fgithub.com%2Fkensanata%2Fggg%23gmail-gnus-gpg-guide-gggg%5D%5Bkensanata%2Fggg%3A%20Gmail%2C%20Gnus%20and%20GPG%5D%5D" class="outline-3">
1446<h3 id="%5B%5Bhttps%3A%2F%2Fgithub.com%2Fkensanata%2Fggg%23gmail-gnus-gpg-guide-gggg%5D%5Bkensanata%2Fggg%3A%20Gmail%2C%20Gnus%20and%20GPG%5D%5D"><a href="https://github.com/kensanata/ggg#gmail-gnus-gpg-guide-gggg">kensanata/ggg: Gmail, Gnus and GPG</a></h3>
1447<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fgithub.com%2Fkensanata%2Fggg%23gmail-gnus-gpg-guide-gggg%5D%5Bkensanata%2Fggg%3A%20Gmail%2C%20Gnus%20and%20GPG%5D%5D">
1448<p>
1449<span class="timestamp-wrapper"><span class="timestamp">[2020-07-08 Wed 07:37]</span></span>
1450</p>
1451</div>
1452</div>
1453<div id="outline-container-%5B%5Bhttps%3A%2F%2Fwww.greghendershott.com%2F2017%2F02%2Femacs-themes.html%5D%5BEmacs%20Themes%5D%5D" class="outline-3">
1454<h3 id="%5B%5Bhttps%3A%2F%2Fwww.greghendershott.com%2F2017%2F02%2Femacs-themes.html%5D%5BEmacs%20Themes%5D%5D"><a href="https://www.greghendershott.com/2017/02/emacs-themes.html">Emacs Themes</a></h3>
1455<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fwww.greghendershott.com%2F2017%2F02%2Femacs-themes.html%5D%5BEmacs%20Themes%5D%5D">
1456<p>
1457<span class="timestamp-wrapper"><span class="timestamp">[2020-06-02 Tue 18:07]</span></span>
1458</p>
1459</div>
1460</div>
1461<div id="outline-container-%5B%5Bhttps%3A%2F%2Fdegruchy.org%2F2020%2F05%2F26%2Fbinding-emacs%2F%5D%5BBinding%20Emacs%20%E2%80%93%20Verily%5D%5D" class="outline-3">
1462<h3 id="%5B%5Bhttps%3A%2F%2Fdegruchy.org%2F2020%2F05%2F26%2Fbinding-emacs%2F%5D%5BBinding%20Emacs%20%E2%80%93%20Verily%5D%5D"><a href="https://degruchy.org/2020/05/26/binding-emacs/">Binding Emacs – Verily</a></h3>
1463<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fdegruchy.org%2F2020%2F05%2F26%2Fbinding-emacs%2F%5D%5BBinding%20Emacs%20%E2%80%93%20Verily%5D%5D">
1464<p>
1465<span class="timestamp-wrapper"><span class="timestamp">[2020-06-02 Tue 18:04]</span></span>
1466</p>
1467</div>
1468</div>
1469<div id="outline-container-%5B%5Bhttps%3A%2F%2Fmihaiolteanu.me%2Feshell-toggle%2F%5D%5BHow%20to%20create%20and%20jump%20to%20eshell%20buffers%20with%20a%20single%20command%5D%5D" class="outline-3">
1470<h3 id="%5B%5Bhttps%3A%2F%2Fmihaiolteanu.me%2Feshell-toggle%2F%5D%5BHow%20to%20create%20and%20jump%20to%20eshell%20buffers%20with%20a%20single%20command%5D%5D"><a href="https://mihaiolteanu.me/eshell-toggle/">How to create and jump to eshell buffers with a single command</a></h3>
1471<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fmihaiolteanu.me%2Feshell-toggle%2F%5D%5BHow%20to%20create%20and%20jump%20to%20eshell%20buffers%20with%20a%20single%20command%5D%5D">
1472<p>
1473<span class="timestamp-wrapper"><span class="timestamp">[2020-05-29 Fri 15:05]</span></span>
1474</p>
1475</div>
1476</div>
1477<div id="outline-container-%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Ffk7p49%2Fpiping_stdout_to_emacs%2F%5D%5BPiping%20stdout%20to%20Emacs%20%3A%20emacs%5D%5D" class="outline-3">
1478<h3 id="%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Ffk7p49%2Fpiping_stdout_to_emacs%2F%5D%5BPiping%20stdout%20to%20Emacs%20%3A%20emacs%5D%5D"><span class="todo TODO">TODO</span> <a href="https://www.reddit.com/r/emacs/comments/fk7p49/piping_stdout_to_emacs/">Piping stdout to Emacs : emacs</a>&#xa0;&#xa0;&#xa0;<span class="tag"><span class="emacs">emacs</span></span></h3>
1479<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Ffk7p49%2Fpiping_stdout_to_emacs%2F%5D%5BPiping%20stdout%20to%20Emacs%20%3A%20emacs%5D%5D">
1480<p>
1481<span class="timestamp-wrapper"><span class="timestamp">[2020-03-24 Tue 07:54]</span></span>
1482</p>
1483</div>
1484</div>
1485
1486<div id="outline-container-%5B%5Bhttps%3A%2F%2Fexplog.in%2Fnotes%2Fpoet.html%5D%5BMaking%20Poet%2C%20an%20Emacs%20theme%5D%5D" class="outline-3">
1487<h3 id="%5B%5Bhttps%3A%2F%2Fexplog.in%2Fnotes%2Fpoet.html%5D%5BMaking%20Poet%2C%20an%20Emacs%20theme%5D%5D"><span class="todo TODO">TODO</span> <a href="https://explog.in/notes/poet.html">Making Poet, an Emacs theme</a>&#xa0;&#xa0;&#xa0;<span class="tag"><span class="emacs">emacs</span></span></h3>
1488<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fexplog.in%2Fnotes%2Fpoet.html%5D%5BMaking%20Poet%2C%20an%20Emacs%20theme%5D%5D">
1489<p>
1490<span class="timestamp-wrapper"><span class="timestamp">[2020-03-25 Wed 16:58]</span></span>
1491</p>
1492</div>
1493</div>
1494
1495<div id="outline-container-%5B%5Bhttps%3A%2F%2Fwillschenk.com%2Farticles%2F2020%2Ftramp_tricks%2F%5D%5BEmacs%20Tramp%20tricks%5D%5D" class="outline-3">
1496<h3 id="%5B%5Bhttps%3A%2F%2Fwillschenk.com%2Farticles%2F2020%2Ftramp_tricks%2F%5D%5BEmacs%20Tramp%20tricks%5D%5D"><span class="todo TODO">TODO</span> <a href="https://willschenk.com/articles/2020/tramp_tricks/">Emacs Tramp tricks</a>&#xa0;&#xa0;&#xa0;<span class="tag"><span class="emacs">emacs</span></span></h3>
1497<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fwillschenk.com%2Farticles%2F2020%2Ftramp_tricks%2F%5D%5BEmacs%20Tramp%20tricks%5D%5D">
1498<p>
1499<span class="timestamp-wrapper"><span class="timestamp">[2020-03-08 Sun 16:44]</span></span>
1500</p>
1501</div>
1502</div>
1503<div id="outline-container-%5B%5Bhttps%3A%2F%2Fazzamsa.com%2Fn%2Fscripts-el%2F%5D%5BUseful%20Emacs%20Lisp%20Scripts%C2%A0%F0%9F%8C%B1%20%C2%B7%20AZZAMSA%5D%5D" class="outline-3">
1504<h3 id="%5B%5Bhttps%3A%2F%2Fazzamsa.com%2Fn%2Fscripts-el%2F%5D%5BUseful%20Emacs%20Lisp%20Scripts%C2%A0%F0%9F%8C%B1%20%C2%B7%20AZZAMSA%5D%5D"><span class="todo TODO">TODO</span> <a href="https://azzamsa.com/n/scripts-el/">Useful Emacs Lisp Scripts 🌱 · AZZAMSA</a></h3>
1505<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fazzamsa.com%2Fn%2Fscripts-el%2F%5D%5BUseful%20Emacs%20Lisp%20Scripts%C2%A0%F0%9F%8C%B1%20%C2%B7%20AZZAMSA%5D%5D">
1506<p>
1507<span class="timestamp-wrapper"><span class="timestamp">[2020-06-18 Thu 18:41]</span></span>
1508</p>
1509</div>
1510</div>
1511<div id="outline-container-%5B%5Bhttps%3A%2F%2Femacsredux.com%2Fblog%2F2020%2F06%2F10%2Fcomment-commands-redux%2F%5D%5BComment%20Commands%20Redux%20%7C%20Emacs%20Redux%5D%5D" class="outline-3">
1512<h3 id="%5B%5Bhttps%3A%2F%2Femacsredux.com%2Fblog%2F2020%2F06%2F10%2Fcomment-commands-redux%2F%5D%5BComment%20Commands%20Redux%20%7C%20Emacs%20Redux%5D%5D"><span class="todo TODO">TODO</span> <a href="https://emacsredux.com/blog/2020/06/10/comment-commands-redux/">Comment Commands Redux | Emacs Redux</a>&#xa0;&#xa0;&#xa0;<span class="tag"><span class="emacs">emacs</span></span></h3>
1513<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Femacsredux.com%2Fblog%2F2020%2F06%2F10%2Fcomment-commands-redux%2F%5D%5BComment%20Commands%20Redux%20%7C%20Emacs%20Redux%5D%5D">
1514<p>
1515<span class="timestamp-wrapper"><span class="timestamp">[2020-06-23 Tue 17:45]</span></span>
1516</p>
1517</div>
1518</div>
1519<div id="outline-container-%5B%5Bhttps%3A%2F%2Fgithub.com%2FMatthewZMD%2F.emacs.d%5D%5BMatthewZMD%2F.emacs.d%3A%20M-EMACS%2C%20a%20full-feature%20GNU%20Emacs%20configuration%20distribution%5D%5D" class="outline-3">
1520<h3 id="%5B%5Bhttps%3A%2F%2Fgithub.com%2FMatthewZMD%2F.emacs.d%5D%5BMatthewZMD%2F.emacs.d%3A%20M-EMACS%2C%20a%20full-feature%20GNU%20Emacs%20configuration%20distribution%5D%5D"><span class="todo TODO">TODO</span> <a href="https://github.com/MatthewZMD/.emacs.d">MatthewZMD/.emacs.d: M-EMACS, a full-feature GNU Emacs configuration distribution</a></h3>
1521<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fgithub.com%2FMatthewZMD%2F.emacs.d%5D%5BMatthewZMD%2F.emacs.d%3A%20M-EMACS%2C%20a%20full-feature%20GNU%20Emacs%20configuration%20distribution%5D%5D">
1522<p>
1523<span class="timestamp-wrapper"><span class="timestamp">[2020-06-29 Mon 11:35]</span></span>
1524</p>
1525</div>
1526</div>
1527<div id="outline-container-%5B%5Bhttps%3A%2F%2Fwritequit.org%2Feos%2Feos.html%5D%5BThe%20Emacs%20Operating%20System%20%28EOS%29%5D%5D" class="outline-3">
1528<h3 id="%5B%5Bhttps%3A%2F%2Fwritequit.org%2Feos%2Feos.html%5D%5BThe%20Emacs%20Operating%20System%20%28EOS%29%5D%5D"><span class="todo TODO">TODO</span> <a href="https://writequit.org/eos/eos.html">The Emacs Operating System (EOS)</a></h3>
1529<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fwritequit.org%2Feos%2Feos.html%5D%5BThe%20Emacs%20Operating%20System%20%28EOS%29%5D%5D">
1530<p>
1531<span class="timestamp-wrapper"><span class="timestamp">[2020-07-02 Thu 18:20]</span></span>
1532</p>
1533</div>
1534</div>
1535<div id="outline-container-%5B%5Bhttps%3A%2F%2Fjustin.abrah.ms%2Fdotfiles%2Femacs.html%5D%5BMy%20Emacs%20Configuration%5D%5D" class="outline-3">
1536<h3 id="%5B%5Bhttps%3A%2F%2Fjustin.abrah.ms%2Fdotfiles%2Femacs.html%5D%5BMy%20Emacs%20Configuration%5D%5D"><span class="todo TODO">TODO</span> <a href="https://justin.abrah.ms/dotfiles/emacs.html">My Emacs Configuration</a></h3>
1537<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fjustin.abrah.ms%2Fdotfiles%2Femacs.html%5D%5BMy%20Emacs%20Configuration%5D%5D">
1538<p>
1539<span class="timestamp-wrapper"><span class="timestamp">[2020-07-15 Wed 12:29]</span></span>
1540</p>
1541</div>
1542</div>
1543<div id="outline-container-%5B%5Bhttps%3A%2F%2Fjakemccrary.com%2Fblog%2F2020%2F11%2F14%2Fspeeding-up-magit%2F%5D%5BSpeeding%20up%20magit%20-%20Jake%20McCrary%5D%5D" class="outline-3">
1544<h3 id="%5B%5Bhttps%3A%2F%2Fjakemccrary.com%2Fblog%2F2020%2F11%2F14%2Fspeeding-up-magit%2F%5D%5BSpeeding%20up%20magit%20-%20Jake%20McCrary%5D%5D"><span class="todo TODO">TODO</span> <a href="https://jakemccrary.com/blog/2020/11/14/speeding-up-magit/">Speeding up magit - Jake McCrary</a></h3>
1545<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fjakemccrary.com%2Fblog%2F2020%2F11%2F14%2Fspeeding-up-magit%2F%5D%5BSpeeding%20up%20magit%20-%20Jake%20McCrary%5D%5D">
1546<p>
1547<span class="timestamp-wrapper"><span class="timestamp">[2020-11-17 Tue 18:09]</span></span>
1548</p>
1549</div>
1550</div>
1551<div id="outline-container-%5B%5Bhttps%3A%2F%2Ftech.toryanderson.com%2F2020%2F11%2F13%2Fmigrating-to-a-custom-file-less-setup%2F%5D%5BMigrating%20to%20a%20custom-file-less%20setup%20%7C%20Tech.ToryAnderson.com%5D%5D" class="outline-3">
1552<h3 id="%5B%5Bhttps%3A%2F%2Ftech.toryanderson.com%2F2020%2F11%2F13%2Fmigrating-to-a-custom-file-less-setup%2F%5D%5BMigrating%20to%20a%20custom-file-less%20setup%20%7C%20Tech.ToryAnderson.com%5D%5D"><span class="todo TODO">TODO</span> <a href="https://tech.toryanderson.com/2020/11/13/migrating-to-a-custom-file-less-setup/">Migrating to a custom-file-less setup | Tech.ToryAnderson.com</a></h3>
1553<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Ftech.toryanderson.com%2F2020%2F11%2F13%2Fmigrating-to-a-custom-file-less-setup%2F%5D%5BMigrating%20to%20a%20custom-file-less%20setup%20%7C%20Tech.ToryAnderson.com%5D%5D">
1554<p>
1555<span class="timestamp-wrapper"><span class="timestamp">[2020-11-19 Thu 11:00]</span></span>
1556</p>
1557</div>
1558</div>
1559
1560<div id="outline-container-%5B%5Bhttps%3A%2F%2Fwww.philnewton.net%2Fblog%2Fleanpub-with-emacs%2F%5D%5BWriting%20a%20Leanpub%20book%20with%20Emacs%20-%20philnewton.net%5D%5D" class="outline-3">
1561<h3 id="%5B%5Bhttps%3A%2F%2Fwww.philnewton.net%2Fblog%2Fleanpub-with-emacs%2F%5D%5BWriting%20a%20Leanpub%20book%20with%20Emacs%20-%20philnewton.net%5D%5D"><span class="todo TODO">TODO</span> <a href="https://www.philnewton.net/blog/leanpub-with-emacs/">Writing a Leanpub book with Emacs - philnewton.net</a></h3>
1562<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fwww.philnewton.net%2Fblog%2Fleanpub-with-emacs%2F%5D%5BWriting%20a%20Leanpub%20book%20with%20Emacs%20-%20philnewton.net%5D%5D">
1563<p>
1564<span class="timestamp-wrapper"><span class="timestamp">[2020-11-19 Thu 11:11]</span></span>
1565</p>
1566</div>
1567</div>
1568<div id="outline-container-%5B%5Bhttps%3A%2F%2Fen.liujiacai.net%2F2020%2F11%2F29%2Fwhy-emacs%2F%5D%5BWhat%20you%20need%20to%20know%20before%20try%20Emacs%20-%20KeepCoding%5D%5D" class="outline-3">
1569<h3 id="%5B%5Bhttps%3A%2F%2Fen.liujiacai.net%2F2020%2F11%2F29%2Fwhy-emacs%2F%5D%5BWhat%20you%20need%20to%20know%20before%20try%20Emacs%20-%20KeepCoding%5D%5D"><span class="todo TODO">TODO</span> <a href="https://en.liujiacai.net/2020/11/29/why-emacs/">What you need to know before try Emacs - KeepCoding</a></h3>
1570<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fen.liujiacai.net%2F2020%2F11%2F29%2Fwhy-emacs%2F%5D%5BWhat%20you%20need%20to%20know%20before%20try%20Emacs%20-%20KeepCoding%5D%5D">
1571<p>
1572<span class="timestamp-wrapper"><span class="timestamp">[2020-12-01 Tue 08:02]</span></span>
1573</p>
1574</div>
1575</div>
1576
1577<div id="outline-container-%5B%5Bhttps%3A%2F%2Fgithub.com%2Frougier%2Fnano-emacs%5D%5Brougier%2Fnano-emacs%3A%20GNU%20Emacs%20%2F%20N%20%CE%9B%20N%20O%20-%20Emacs%20made%20simple%5D%5D" class="outline-3">
1578<h3 id="%5B%5Bhttps%3A%2F%2Fgithub.com%2Frougier%2Fnano-emacs%5D%5Brougier%2Fnano-emacs%3A%20GNU%20Emacs%20%2F%20N%20%CE%9B%20N%20O%20-%20Emacs%20made%20simple%5D%5D"><span class="todo TODO">TODO</span> <a href="https://github.com/rougier/nano-emacs">rougier/nano-emacs: GNU Emacs / N Λ N O - Emacs made simple</a></h3>
1579<div class="outline-text-3" id="text-%5B%5Bhttps%3A%2F%2Fgithub.com%2Frougier%2Fnano-emacs%5D%5Brougier%2Fnano-emacs%3A%20GNU%20Emacs%20%2F%20N%20%CE%9B%20N%20O%20-%20Emacs%20made%20simple%5D%5D">
1580<p>
1581<span class="timestamp-wrapper"><span class="timestamp">[2020-12-01 Tue 08:12]</span></span>
1582</p>
1583</div>
1584</div>
1585</section>
1586</main>
1587<footer id="postamble" class="status">
1588<footer>
1589     <small><a href="/" rel="history">Index</a> • <a href="/sitemap.html">Sitemap</a> • <a href="https://dl.sbr.pm/">Files</a></small><br/>
1590     <small class='questions'>Questions, comments ? Please use my <a href="https://lists.sr.ht/~vdemeester/public-inbox">public inbox</a> by sending a plain-text email to <a href="mailto:~vdemeester/public-inbox@lists.sr.ht">~vdemeester/public-inbox@lists.sr.ht</a>.</small><br/>
1591     <small class='copyright'>
1592      Content and design by Vincent Demeester
1593      (<a rel='licence' href='http://creativecommons.org/licenses/by-nc-sa/3.0/'>Some rights reserved</a>)
1594    </small><br />
1595</footer>
1596</footer>
1597</body>
1598</html>