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