<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    
    <title>GitHub Emacs Lisp Weekly Trending Repositories</title>
    <description>Weekly Trending Repositories of Emacs Lisp on GitHub</description>
    
    <pubDate>Wed, 12 Aug 2026 04:29:41 GMT</pubDate>
    <link>https://mshibanami.github.io/GitHubTrendingRSS</link>
    
    <item>
      <title>syl20bnr/spacemacs</title>
      <link>https://github.com/syl20bnr/spacemacs</link>
      <description>&lt;p&gt;A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it&#39;s Emacs *and* Vim!&lt;/p&gt;&lt;hr&gt;&lt;p&gt;&lt;a name=&quot;top&quot; id=&quot;fork-destination-box&quot;&gt;&lt;/a&gt; &lt;a href=&quot;https://spacemacs.org&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/assets/spacemacs-badge.svg?sanitize=true&quot; alt=&quot;Made with Spacemacs&quot; height=&quot;20&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.en.html&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/assets/gplv3.png&quot; alt=&quot;GPLv3 Software&quot; align=&quot;right&quot; height=&quot;20&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://www.twitter.com/spacemacs&quot;&gt;&lt;img src=&quot;https://i.imgur.com/tXSoThF.png&quot; alt=&quot;Twitter&quot; align=&quot;right&quot; height=&quot;20&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;!-- logo and links --&gt; 
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/doc/img/title2.png&quot; alt=&quot;Spacemacs&quot; /&gt;&lt;/p&gt; 
&lt;p align=&quot;center&quot;&gt; &lt;b&gt;&lt;a href=&quot;https://spacemacs.org/doc/DOCUMENTATION#core-pillars&quot;&gt;philosophy&lt;/a&gt;&lt;/b&gt; | &lt;b&gt;&lt;a href=&quot;https://spacemacs.org/doc/DOCUMENTATION#who-can-benefit-from-this&quot;&gt;for whom?&lt;/a&gt;&lt;/b&gt; | &lt;b&gt;&lt;a href=&quot;https://spacemacs.org/doc/DOCUMENTATION#screenshots&quot;&gt;screenshots&lt;/a&gt;&lt;/b&gt; | &lt;b&gt;&lt;a href=&quot;https://spacemacs.org/doc/DOCUMENTATION.html&quot;&gt;documentation&lt;/a&gt;&lt;/b&gt; | &lt;b&gt;&lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/CONTRIBUTING.org&quot;&gt;contribute&lt;/a&gt;&lt;/b&gt; | &lt;b&gt;&lt;a href=&quot;https://spacemacs.org/doc/DOCUMENTATION#achievements&quot;&gt;achievements&lt;/a&gt;&lt;/b&gt; | &lt;b&gt;&lt;a href=&quot;https://spacemacs.org/doc/FAQ&quot;&gt;FAQ&lt;/a&gt;&lt;/b&gt; &lt;/p&gt; 
&lt;!-- badges --&gt; 
&lt;p align=&quot;center&quot;&gt; &lt;a href=&quot;https://gitter.im/syl20bnr/spacemacs?utm_source=badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=pr-badge&amp;amp;utm_content=badge&quot;&gt;&lt;img src=&quot;https://badges.gitter.im/Join%20Chat.svg?sanitize=true&quot; alt=&quot;Gitter&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://discord.gg/p4MddFu6Ag&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/chat-on%20discord-7289da.svg?sanitize=true&quot; alt=&quot;Discord&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://github.com/syl20bnr/spacemacs/actions/workflows/elisp_test.yml&quot;&gt;&lt;img src=&quot;https://github.com/syl20bnr/spacemacs/actions/workflows/elisp_test.yml/badge.svg?branch=develop&quot; alt=&quot;elisp state&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;amp;hosted_button_id=ESFVNPKP4Y742&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/Paypal-Donate-blue.svg?sanitize=true&quot; alt=&quot;Donate&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://shop.spreadshirt.com/spacemacs-shop&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/Shop-T--Shirts-blue.svg?sanitize=true&quot; alt=&quot;Merchandise&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://www.slant.co/topics/12/~what-are-the-best-programming-text-editors&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/Slant-Recommend-ff69b4.svg?sanitize=true&quot; alt=&quot;Recommend it&quot; /&gt;&lt;/a&gt; &lt;/p&gt; 
&lt;hr /&gt; 
&lt;p&gt;&lt;strong&gt;Quick Start&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;If you &lt;em&gt;don&#39;t&lt;/em&gt; have an existing Emacs setup and want to run Spacemacs as your configuration, and if you have all &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/#prerequisites&quot;&gt;prerequisites&lt;/a&gt; installed, you can install Spacemacs with one line:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;shell:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git clone https://github.com/syl20bnr/spacemacs &quot;${HOME}/.emacs.d&quot;
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Windows PowerShell:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;git clone https://github.com/syl20bnr/spacemacs &quot;${HOME}/.emacs.d&quot;
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;If &lt;code&gt;HOME&lt;/code&gt; is not set in environment or in registry:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;git clone https://github.com/syl20bnr/spacemacs &quot;${env:APPDATA}/.emacs.d&quot;
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;If you do have an existing Emacs configuration, look at the &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/#install&quot;&gt;full installation instructions&lt;/a&gt; for other options.&lt;/p&gt; 
&lt;h1&gt;Introduction&lt;/h1&gt; 
&lt;p&gt;Spacemacs is a new way of experiencing Emacs -- it&#39;s a sophisticated and polished set-up, focused on &lt;em&gt;ergonomics&lt;/em&gt;, &lt;em&gt;mnemonics&lt;/em&gt; and &lt;em&gt;consistency&lt;/em&gt;.&lt;/p&gt; 
&lt;p&gt;Just clone and launch it, then press the space bar to explore the interactive list of carefully-chosen key bindings. You can also press the home buffer&#39;s &lt;code&gt;[?]&lt;/code&gt; button for some great first key bindings to try.&lt;/p&gt; 
&lt;p&gt;Spacemacs can be used naturally by both Emacs and Vim users -- you can even mix the two editing styles. Being able to quickly switch between input styles, makes Spacemacs a great tool for pair-programming.&lt;/p&gt; 
&lt;p&gt;Spacemacs is currently in beta, and any contributions are very welcome.&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/doc/img/spacemacs-python.png&quot; alt=&quot;spacemacs_python&quot; /&gt;&lt;/p&gt; 
&lt;h1&gt;Features&lt;/h1&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;strong&gt;Great documentation:&lt;/strong&gt; access the Spacemacs documentation with &lt;kbd&gt;SPC h SPC&lt;/kbd&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Beautiful GUI:&lt;/strong&gt; you&#39;ll love the distraction free UI and its functional mode-line.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Excellent ergonomics:&lt;/strong&gt; all the key bindings are accessible by pressing the &lt;kbd&gt;SPC&lt;/kbd&gt; or &lt;kbd&gt;Alt-m&lt;/kbd&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Mnemonic key bindings:&lt;/strong&gt; commands have mnemonic prefixes like &lt;kbd&gt;SPC b&lt;/kbd&gt; for all the buffer commands or &lt;kbd&gt;SPC p&lt;/kbd&gt; for the project commands.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Batteries included:&lt;/strong&gt; discover hundreds of ready-to-use packages nicely organized in configuration layers following a set of &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/doc/CONVENTIONS.org&quot;&gt;conventions &lt;/a&gt;.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;Documentation&lt;/h1&gt; 
&lt;p&gt;Comprehensive documentation is available for each layer by pressing &lt;kbd&gt;SPC h SPC&lt;/kbd&gt;.&lt;/p&gt; 
&lt;p&gt;You can also check the &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/doc/DOCUMENTATION.org&quot;&gt;general documentation&lt;/a&gt;, &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/doc/QUICK_START.org&quot;&gt;quick start guide&lt;/a&gt; and the &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/doc/FAQ.org&quot;&gt;FAQ&lt;/a&gt;.&lt;/p&gt; 
&lt;h1&gt;Getting Help&lt;/h1&gt; 
&lt;p&gt;If you need help, ask your questions in the &lt;a href=&quot;https://gitter.im/syl20bnr/spacemacs&quot;&gt;Gitter Chat&lt;/a&gt; and a member of the community will help you out.&lt;/p&gt; 
&lt;p&gt;If you prefer IRC, connect to the &lt;a href=&quot;https://irc.gitter.im/&quot;&gt;Gitter Chat IRC server&lt;/a&gt; and join the &lt;code&gt;#syl20bnr/spacemacs&lt;/code&gt; channel.&lt;/p&gt; 
&lt;p&gt;Last but not least there are a lot of high class tutorials available on YouTube:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Jack of Some&#39;s &lt;a href=&quot;https://www.youtube.com/watch?v=r-BHx7VNX5s&amp;amp;list=PLd_Oyt6lAQ8Rxb0HUnGbRrn6R4Cdt2yoI&quot;&gt;Spacemacs tutorial videos&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;GDQuest&#39;s &lt;a href=&quot;https://www.youtube.com/watch?v=hCNOB5jjtmc&amp;amp;list=PLhqJJNjsQ7KFkMVBunWWzFD8SlH714qm4&quot;&gt;Game Design oriented tutorials &lt;/a&gt; to Spacemacs.&lt;/li&gt; 
 &lt;li&gt;Practicalli&#39;s &lt;a href=&quot;https://www.youtube.com/watch?v=jMJ58Gcc1RI&amp;amp;list=PLpr9V-R8ZxiCHMl2_dn1Fovcd34Oz45su&quot;&gt;Clojure tutorials based on Spacemacs&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;Eivind Fonn&#39;s classic &lt;a href=&quot;https://www.youtube.com/watch?v=ZFV5EqpZ6_s&amp;amp;list=PLrJ2YN5y27KLhd3yNs2dR8_inqtEiEweE&quot;&gt;Spacemacs ABC&lt;/a&gt;.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;Prerequisites&lt;/h1&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;A package manager if the OS doesn&#39;t have one already.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Spacemacs is an extension of a popular text editor called &lt;a href=&quot;https://www.gnu.org/software/emacs/&quot;&gt;Emacs&lt;/a&gt;. So you&#39;ll need Emacs installed first.&lt;/p&gt; &lt;p&gt;Spacemacs requires Emacs 28.2 or above. The development version of Emacs is not &lt;em&gt;officially&lt;/em&gt; supported, but it should nevertheless be expected to work.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;a href=&quot;https://git-scm.com/downloads&quot;&gt;git&lt;/a&gt; is required to download and update Spacemacs.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Tar, in particular &lt;a href=&quot;https://www.gnu.org/software/tar/&quot;&gt;GNU Tar&lt;/a&gt;, is required to install and update Emacs packages used by Spacemacs.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;em&gt;(Optional)&lt;/em&gt; The default font used by Spacemacs is &lt;a href=&quot;https://adobe-fonts.github.io/source-code-pro/&quot;&gt;Source Code Pro&lt;/a&gt;. You may customize your own font settings and choose another font. If you want to use this default font, it must be installed.&lt;/p&gt; &lt;p&gt;Spacemacs also uses fallback fonts to ensure certain Unicode symbols it uses symbols appear correctly. The fonts used are determined by the OS:&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;Linux: &lt;a href=&quot;https://fonts.google.com/specimen/Nanum+Gothic&quot;&gt;Nanum Gothic&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;macOS: &lt;a href=&quot;https://docs.microsoft.com/en-us/typography/font-list/arial-unicode-ms&quot;&gt;Arial Unicode MS&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;Windows: &lt;a href=&quot;https://docs.microsoft.com/en-us/typography/font-list/ms-gothic&quot;&gt;MS Gothic&lt;/a&gt; and &lt;a href=&quot;https://docs.microsoft.com/en-us/typography/font-list/lucida-sans-unicode&quot;&gt;Lucida Sans Unicode&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;p&gt;If the mode-line doesn&#39;t look similar to the &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/#introduction&quot;&gt;picture at the top of this page&lt;/a&gt;, make sure you have the correct fallback font installed.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;em&gt;(Optional)&lt;/em&gt; Various commands in Spacemacs needs one of the following line searching program:&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://github.com/BurntSushi/ripgrep&quot;&gt;ripgrep (rg)&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://github.com/ggreer/the_silver_searcher&quot;&gt;The silver searcher (ag)&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://github.com/beyondgrep/ack3&quot;&gt;ack&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://www.gnu.org/software/grep/&quot;&gt;GNU Grep&lt;/a&gt; or &lt;a href=&quot;https://man.openbsd.org/grep&quot;&gt;BSD Grep&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;p&gt;Grep is very slow but it&#39;s widely available on most systems and is used as an fallback option.&lt;/p&gt; &lt;p&gt;We strongly recommend &lt;a href=&quot;https://github.com/BurntSushi/ripgrep&quot;&gt;ripgrep&lt;/a&gt; over other line searching programs, for its blazing fast speed. The following subsections helps you to install it.&lt;/p&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;h3&gt;Linux&lt;/h3&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;Most Linux distribution ships a package manager already and if this is the case you are all set for this step.&lt;/p&gt; &lt;p&gt;If it doesn&#39;t, you may need to build the softwares mentioned below from their sources.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;In most distributions, Emacs is installed via an &lt;code&gt;emacs&lt;/code&gt; package from the package manager.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;N.B.&lt;/strong&gt; DO not install &lt;a href=&quot;https://www.xemacs.org&quot;&gt;XEmacs&lt;/a&gt; because it&#39;s not supported by Spacemacs. XEmacs is an old fork of Emacs with various &lt;a href=&quot;https://www.emacswiki.org/emacs/EmacsAndXEmacs&quot;&gt;subtle differences&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;N.B.&lt;/strong&gt; Some Linux distributions support only Emacs versions older than 28.2. In this case you should &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/efaq/Installing-Emacs.html&quot;&gt;build it from source&lt;/a&gt; instead.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Very likely Git is already installed on your system. Otherwise, you should be able to install &lt;code&gt;git&lt;/code&gt; from your system&#39;s package manager.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Very likely Tar is already installed on your system. Otherwise, you should be able to install &lt;code&gt;tar&lt;/code&gt; from your system&#39;s package manager.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;em&gt;(Optional)&lt;/em&gt; If Nerd Fonts and Nanum Gothic are available from your distribution&#39;s package manager, you should install it there.&lt;/p&gt; &lt;p&gt;Otherwise, the generic way to install it is:&lt;/p&gt; 
  &lt;ol&gt; 
   &lt;li&gt; &lt;p&gt;Download the latest pre-built &lt;code&gt;TTF&lt;/code&gt; font from &lt;a href=&quot;https://github.com/adobe-fonts/source-code-pro/releases/latest&quot;&gt;https://github.com/adobe-fonts/source-code-pro/releases/latest&lt;/a&gt; and &lt;a href=&quot;https://fonts.google.com/specimen/Nanum+Gothic&quot;&gt;https://fonts.google.com/specimen/Nanum+Gothic&lt;/a&gt;.&lt;/p&gt; &lt;/li&gt; 
   &lt;li&gt; &lt;p&gt;Extract the archive and move the font files to &lt;code&gt;~/.fonts&lt;/code&gt;.&lt;/p&gt; &lt;/li&gt; 
   &lt;li&gt; &lt;p&gt;Refresh font cache with:&lt;/p&gt; &lt;/li&gt; 
  &lt;/ol&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;fc-cache -fv
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;em&gt;(Optional)&lt;/em&gt; If your distribution is listed &lt;a href=&quot;https://github.com/BurntSushi/ripgrep#installation=&quot;&gt;here&lt;/a&gt;, follow the instructions. Otherwise, you can download its pre-built binary or build it from source.&lt;/p&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;h3&gt;macOS&lt;/h3&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;The most popular package manager on macOS is &lt;a href=&quot;https://brew.sh&quot;&gt;Homebrew&lt;/a&gt;, to install it:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Several options exist for installing Emacs on macOS:&lt;/p&gt; 
  &lt;ol&gt; 
   &lt;li&gt; &lt;p&gt;&lt;a href=&quot;https://github.com/d12frosted/homebrew-emacs-plus&quot;&gt;Emacs Plus&lt;/a&gt; features &lt;a href=&quot;https://github.com/d12frosted/homebrew-emacs-plus#features-explained&quot;&gt;additional functionalities&lt;/a&gt; over base Emacs.&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;brew tap d12frosted/emacs-plus

# install latest stable release, with Spacemacs icon and native compilation
brew install emacs-plus --with-spacemacs-icon --with-native-comp
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;You will require the latest version of Xcode Command Line tools, which can be downloaded from the &lt;a href=&quot;https://developer.apple.com/download/all/&quot;&gt;Apple Developer Portal&lt;/a&gt; or by running the following command:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;softwareupdate --all --install --force
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
   &lt;li&gt; &lt;p&gt;&lt;a href=&quot;https://github.com/railwaycat/homebrew-emacsmacport&quot;&gt;Emacs Mac Port&lt;/a&gt; adds native GUI support to Emacs 28. And the full list of features is available &lt;a href=&quot;https://bitbucket.org/mituharu/emacs-mac/src/master/README-mac&quot;&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;brew tap railwaycat/emacsmacport
brew install emacs-mac
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
   &lt;li&gt; &lt;p&gt;&lt;a href=&quot;https://emacsformacosx.com/&quot;&gt;Emacs for Mac OS X&lt;/a&gt; is the binary build of GNU Emacs, &lt;em&gt;without&lt;/em&gt; any extra feature.&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;brew install --cask emacs
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
  &lt;/ol&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;To install &lt;code&gt;git&lt;/code&gt;:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;brew install git
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;macOS ships with &lt;a href=&quot;https://man.openbsd.org/tar&quot;&gt;BSD Tar&lt;/a&gt;, but there are reports of weird issues so we require &lt;a href=&quot;https://www.gnu.org/software/tar/&quot;&gt;GNU Tar&lt;/a&gt; instead.&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;brew install gnu-tar
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;em&gt;(Optional)&lt;/em&gt; To install Source Code Pro Font:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;brew tap homebrew/cask-fonts
brew install --cask font-source-code-pro
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Arial Unicode MS is shipped with macOS v10.5 and later so you don&#39;t need to install it manually.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;em&gt;(Optional)&lt;/em&gt; You can install &lt;code&gt;ripgrep&lt;/code&gt; via &lt;code&gt;Homebrew&lt;/code&gt;:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;brew install ripgrep
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;h3&gt;Windows&lt;/h3&gt; 
&lt;p&gt;We recommend using wsl2 with wslg support especially with a pgtk build of emacs and wayland. For the installation please refer to the linux installation section. When running emacs within your wsl2 environment emacs will be handled like any other windows application.&lt;/p&gt; 
&lt;p&gt;If this is not possible you can fallback to a native windows installation, however note that this will create a lot of subtle bugs especially with tls which we will most likely not be able to help with.&lt;/p&gt; 
&lt;p&gt;If you need to follow that path we recommend to at least use a package manager like &lt;a href=&quot;https://scoop.sh&quot;&gt;Scoop&lt;/a&gt; to install the needed packages.&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;You can install &lt;a href=&quot;https://scoop.sh&quot;&gt;Scoop&lt;/a&gt; via PowerShell:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time
irm get.scoop.sh | iex
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Emacs can be installed in PowerShell:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;scoop bucket add extras
scoop install emacs
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;To install &lt;code&gt;git&lt;/code&gt; in PowerShell:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;scoop bucket add main
scoop install git
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Windows 10 build 17063 and later ships with &lt;a href=&quot;https://man.openbsd.org/tar&quot;&gt;BSD Tar&lt;/a&gt;, but it&#39;s required to install &lt;a href=&quot;https://www.gnu.org/software/tar/&quot;&gt;GNU Tar&lt;/a&gt; instead to avoid possible issues. Alternatively, if you are running an earlier version of Windows, Tar isn&#39;t installed. In either case, you can install GNU Tar via:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;scoop bucket add main
scoop install tar
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;To install Source Code Pro Font in PowerShell:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;scoop bucket add KnotUntied_scoop-fonts https://github.com/KnotUntied/scoop-fonts
scoop install sourcecodepro
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;MS Gothic and Lucida Sans Unicode are shipped with Windows 2003 and later so you don&#39;t need to install it manually.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;em&gt;(Optional)&lt;/em&gt; You can install &lt;code&gt;ripgrep&lt;/code&gt; in PowerShell:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;scoop bucket add main
scoop install ripgrep
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;h1&gt;Install&lt;/h1&gt; 
&lt;h2&gt;Default Install&lt;/h2&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;The default installation downloads Spacemacs to the &lt;code&gt;.emacs.d&lt;/code&gt; directory in your &lt;code&gt;HOME&lt;/code&gt; directory.&lt;/p&gt; &lt;p&gt;But in the case of Windows, &lt;code&gt;HOME&lt;/code&gt; is not set out-of-box. We recommend you to set it as an environment variable, with the same value as environment variable &lt;code&gt;HOMEPATH&lt;/code&gt;, which usually looks like &lt;code&gt;C:\Users\&amp;lt;username&amp;gt;&lt;/code&gt;.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Since Spacemacs will now be downloaded at &lt;code&gt;&quot;${HOME}/.emacs.d&quot;&lt;/code&gt;, if it already exists it&#39;ll be overridden.&lt;/p&gt; &lt;p&gt;Also, if you have either &lt;code&gt;&quot;${HOME}/.emacs.el&quot;&lt;/code&gt; or &lt;code&gt;&quot;${HOME}/.emacs&quot;&lt;/code&gt;, they will appear before Spacemacs in Emacs&#39;s initialization steps. Thus they must be renamed in order for Spacemacs to load correctly.&lt;/p&gt; &lt;p&gt;To backup/rename the aforementioned files/directory, in shell:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;[ -d &quot;${HOME}/.emacs.d&quot; ] &amp;amp;&amp;amp; mv &quot;${HOME}/.emacs.d&quot; &quot;${HOME}/.emacs.d.bak&quot;
[ -f &quot;${HOME}/.emacs.el&quot; ] &amp;amp;&amp;amp; mv &quot;${HOME}/.emacs.el&quot; &quot;${HOME}/.emacs.el.bak&quot;
[ -f &quot;${HOME}/.emacs&quot; ] &amp;amp;&amp;amp; mv &quot;${HOME}/.emacs&quot; &quot;${HOME}/.emacs.bak&quot;
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;or in PowerShell:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;if( Test-Path -Path &quot;${HOME}/.emacs.d&quot; )
{
    Rename-Item &quot;${HOME}/.emacs.d&quot; &quot;${HOME}/.emacs.d.bak&quot;
}
if( Test-Path -Path &quot;${HOME}/.emacs.el&quot; )
{
    Rename-Item &quot;${HOME}/.emacs.el&quot; &quot;${HOME}/.emacs.el.bak&quot;
}
if( Test-Path -Path &quot;${HOME}/.emacs&quot; )
{
    Rename-Item &quot;${HOME}/.emacs&quot; &quot;${HOME}/.emacs.bak&quot;
}
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Now clone this repository with Git. The following work for both shell and PowerShell:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git clone https://github.com/syl20bnr/spacemacs &quot;${HOME}/.emacs.d&quot;
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;In case you have a limited internet connection or limited speed:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git clone --depth 1 https://github.com/syl20bnr/spacemacs ~/.emacs.d
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Now you can launch Emacs and Spacemacs will be loaded.&lt;/p&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;h2&gt;Alternative Install Location&lt;/h2&gt; 
&lt;p&gt;To install Spacemacs in a different location, we first need to introduce how Spacemacs is loaded:&lt;/p&gt; 
&lt;p&gt;When Emacs is started, it looks for the init file &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html&quot;&gt;in a deterministic way&lt;/a&gt;. The &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/#default-install&quot;&gt;default installation&lt;/a&gt; exploits it by occupying &lt;code&gt;&quot;${HOME}/.emacs.d/init.el&quot;&lt;/code&gt; and let Emacs use it as its init file.&lt;/p&gt; 
&lt;p&gt;In other word, in default installation, Emacs find and load &lt;code&gt;&quot;${HOME}/.emacs.d/init.el&quot;&lt;/code&gt;, which is then responsible to load other files in &lt;code&gt;&quot;${HOME}/.emacs.d&quot;&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;If you want to install Spacemacs to a different location, you need to make sure it&#39;s loaded by Emacs in one of its &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html&quot;&gt;init file&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;For example, if you&#39;ve cloned Spacemacs to &lt;code&gt;&quot;${HOME}/Spacemacs&quot;&lt;/code&gt;, and if you use &lt;code&gt;&quot;${HOME}/.emacs.el&quot;&lt;/code&gt; as Emacs init file, then the following lines in &lt;code&gt;&quot;${HOME}/.emacs.el&quot;&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;;; load Spacemacs&#39;s initialization file, &quot;~&quot; is equivalent to &quot;${HOME}&quot;
(load-file &quot;~/Spacemacs/init.el&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h1&gt;First Launch and Configuration&lt;/h1&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;After cloning Spacemacs, the first time when you launch Emacs, Spacemacs will automatically install the essential packages it requires. This step is the bootstrap.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Once the bootstrap packages are installed, Spacemacs checks whether you have an customization file &lt;code&gt;&quot;${HOME}/.spacemacs&quot;&lt;/code&gt;, known as &lt;code&gt;dotspacemacs&lt;/code&gt;:&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;If it already exists, Spacemacs loads it as the configuration.&lt;/li&gt; 
   &lt;li&gt;Otherwise, you need to answer a few questions and Spacemacs will generate the &lt;code&gt;dotspacemacs&lt;/code&gt; file for you.&lt;/li&gt; 
  &lt;/ul&gt; &lt;p&gt;If you are new to Emacs and/or Spacemacs, it&#39;s fine to just accept the default choices. They can be changed in the &lt;code&gt;dotspacemacs&lt;/code&gt; file later.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Spacemacs will download and install remaining packages it will require, according to your &lt;code&gt;dotspacemacs&lt;/code&gt;. When the all the packages have been installed, restart Emacs to complete the installation.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;dotspacemacs&lt;/code&gt; is the configuration file for Spacemacs, it&#39;s self explanatory and is written in Emacs Lisp. Read &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/doc/DOCUMENTATION.org&quot;&gt;general documentation&lt;/a&gt; and &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/doc/QUICK_START.org&quot;&gt;quick start guide&lt;/a&gt; for more information.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;In case you want to store your &lt;code&gt;dotspacemacs&lt;/code&gt; at another location, say under &lt;code&gt;&quot;${HOME}/.spacemacs.d&quot;&lt;/code&gt;:&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;First set the environment variable &lt;code&gt;SPACEMACSDIR&lt;/code&gt; to &lt;code&gt;&quot;${HOME}/.spacemacs.d&quot;&lt;/code&gt;.&lt;/li&gt; 
   &lt;li&gt;Move &lt;code&gt;&quot;${HOME}/.spacemacs&quot;&lt;/code&gt; to &lt;code&gt;&quot;${HOME}/.spacemacs.d/init.el&quot;&lt;/code&gt;.&lt;/li&gt; 
  &lt;/ul&gt; &lt;p&gt;In other word, set &lt;code&gt;SPACEMACSDIR&lt;/code&gt; to the parent directory of your &lt;code&gt;dotspacemacs&lt;/code&gt;, and move &lt;code&gt;dotspacemacs&lt;/code&gt; to the said directory.&lt;/p&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;h2&gt;Spacemacs logo&lt;/h2&gt; 
&lt;p&gt;For Linux users, create &lt;code&gt;spacemacs.desktop&lt;/code&gt; in &lt;code&gt;~/.local/share/applications/&lt;/code&gt; using &lt;a href=&quot;https://github.com/emacs-mirror/emacs/raw/master/etc/emacs.desktop&quot;&gt;this .desktop file&lt;/a&gt; as a reference. Change the &lt;code&gt;Name&lt;/code&gt; parameter to &lt;code&gt;Name=Spacemacs&lt;/code&gt; and the &lt;code&gt;Icon&lt;/code&gt; parameter to &lt;code&gt;Icon=/PATH/TO/EMACSD/core/banners/img/spacemacs.png&lt;/code&gt; where &lt;code&gt;PATH/TO/EMACSD&lt;/code&gt; is the path to your &lt;code&gt;.emacs.d&lt;/code&gt; directory, by default &lt;code&gt;~/.emacs.d&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;For macOS users, you need to &lt;a href=&quot;https://github.com/nashamri/spacemacs-logo&quot;&gt;download the .icns version of the logo&lt;/a&gt; and simply &lt;a href=&quot;https://www.idownloadblog.com/2014/07/16/how-to-change-app-icon-mac/&quot;&gt;change the logo on the Dock&lt;/a&gt;.&lt;/p&gt; 
&lt;h2&gt;Notes&lt;/h2&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;Depending on the installed version of GnuTLS, securely installing Emacs packages may fail. If this happens to you please update your OS and Emacs. If you are behind a company proxy please trust the company firewall cert. We do not longer support disabling https due to security reasons.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;(&lt;em&gt;Windows)&lt;/em&gt; If the following error occurs after starting Emacs:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;The directory ~/.emacs.d/server is unsafe
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Fix it by changing the owner of the directory &lt;code&gt;~/.emacs.d/server&lt;/code&gt;:&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;From Properties select the Tab “Security”,&lt;/li&gt; 
   &lt;li&gt;Select the button “Advanced”,&lt;/li&gt; 
   &lt;li&gt;Select the Tab “Owner”&lt;/li&gt; 
   &lt;li&gt;Change the owner to your account name&lt;/li&gt; 
  &lt;/ul&gt; &lt;p&gt;Source: &lt;a href=&quot;https://stackoverflow.com/questions/885793/emacs-error-when-calling-server-start&quot;&gt;Stack Overflow&lt;/a&gt;&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;(&lt;em&gt;Windows&lt;/em&gt;) The period (dot) before a file or folder name means that it&#39;s a hidden file or folder. To show hidden files and folders:&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;Press the Windows key&lt;/li&gt; 
   &lt;li&gt;Type &lt;code&gt;File explorer options&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;Select the &lt;code&gt;View&lt;/code&gt; tab at the top&lt;/li&gt; 
   &lt;li&gt;Check &lt;code&gt;Show hidden files, folders and drives&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;Click &lt;code&gt;OK&lt;/code&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;Update&lt;/h1&gt; 
&lt;p&gt;Spacemacs relies solely on a rolling update scheme based on the latest changes available. To update Spacemacs, simply pull the latest changes from the &lt;code&gt;develop&lt;/code&gt; branch:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;Close Emacs and update the git repository:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git pull --rebase
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Restart Emacs to complete the upgrade.&lt;/p&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;&lt;strong&gt;After updating Spacemacs, you should also check if any updates are available for your packages. On the Spacemacs Home Buffer &lt;kbd&gt;SPC b h&lt;/kbd&gt;, click (press &lt;kbd&gt;RET&lt;/kbd&gt;) on the &lt;code&gt;[Update Packages]&lt;/code&gt; button, or use the convenient keybinding &lt;kbd&gt;SPC f e U&lt;/kbd&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;h2&gt;Upgrading from the deprecated &lt;code&gt;master&lt;/code&gt; branch&lt;/h2&gt; 
&lt;p&gt;If you are still on the old &lt;code&gt;master&lt;/code&gt; branch (i.e., if &lt;code&gt;git branch --show-current&lt;/code&gt; shows &lt;code&gt;master&lt;/code&gt; instead of &lt;code&gt;develop&lt;/code&gt;), you need to &lt;a href=&quot;https://practical.li/spacemacs/reference/switch-to-develop/&quot;&gt;upgrade to &lt;code&gt;develop&lt;/code&gt;&lt;/a&gt; first.&lt;/p&gt; 
&lt;h1&gt;Quotes&lt;/h1&gt; 
&lt;p&gt;&lt;a href=&quot;https://gitter.im/syl20bnr/spacemacs?at=568e627a0cdaaa62045a7df6&quot;&gt;Quote&lt;/a&gt; by &lt;a href=&quot;https://github.com/ashnur&quot;&gt;ashnur&lt;/a&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;«I feel that spacemacs is an aircraft carrier and I am playing table tennis
on the deck as a freerider.»
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;a href=&quot;https://gitter.im/syl20bnr/spacemacs?at=5768456c6577f032450cfedb&quot;&gt;Quote&lt;/a&gt; by &lt;a href=&quot;https://github.com/deuill&quot;&gt;deuill&lt;/a&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;«I LOVE SPACEMACS AND MAGIT

 That is all»
&lt;/code&gt;&lt;/pre&gt; 
&lt;h1&gt;Contributions&lt;/h1&gt; 
&lt;p&gt;Spacemacs is a community-driven project, it needs &lt;em&gt;you&lt;/em&gt; to keep it up to date and to propose great and useful configurations for all the things!&lt;/p&gt; 
&lt;p&gt;Before contributing, be sure to consult the &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/CONTRIBUTING.org&quot;&gt;contribution guidelines&lt;/a&gt; and &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/doc/CONVENTIONS.org&quot;&gt;conventions&lt;/a&gt;.&lt;/p&gt; 
&lt;h1&gt;Communities&lt;/h1&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://gitter.im/syl20bnr/spacemacs&quot;&gt;Gitter Chat&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://emacs.stackexchange.com/questions/tagged/spacemacs&quot;&gt;Stack Exchange&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://www.reddit.com/r/spacemacs&quot;&gt;Reddit&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;Spacemacs Everywhere&lt;/h1&gt; 
&lt;p&gt;Once you&#39;ve learned the Spacemacs key bindings, you can use them in other IDEs/tools, thanks to the following projects:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/MarcoIeni/intellimacs&quot;&gt;Intellimacs&lt;/a&gt; - Spacemacs&#39; like key bindings for IntelliJ platform&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/MarcoIeni/spaceclipse&quot;&gt;Spaceclipse&lt;/a&gt; - Spacemacs’ like key bindings for Eclipse&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/SpaceVim/SpaceVim&quot;&gt;SpaceVim&lt;/a&gt; - A community-driven modular vim distribution&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/VSpaceCode/VSpaceCode&quot;&gt;VSpaceCode&lt;/a&gt; - Spacemacs’ like key bindings for Visual Studio Code&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;License&lt;/h1&gt; 
&lt;p&gt;The license is GPLv3 for all parts specific to Spacemacs, this includes:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;the initialization and core files&lt;/li&gt; 
 &lt;li&gt;all the layer files&lt;/li&gt; 
 &lt;li&gt;the documentation&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;For the packages shipped in this repository, you can refer to the files header.&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://github.com/nashamri/spacemacs-logo&quot;&gt;Spacemacs logo&lt;/a&gt; by &lt;a href=&quot;https://github.com/nashamri&quot;&gt;Nasser Alshammari&lt;/a&gt; released under a &lt;a href=&quot;https://creativecommons.org/licenses/by-sa/4.0/&quot;&gt;Creative Commons Attribution-ShareAlike 4.0 International License.&lt;/a&gt;&lt;/p&gt; 
&lt;h1&gt;Supporting Spacemacs&lt;/h1&gt; 
&lt;p&gt;The best way to support Spacemacs is to contribute to it either by reporting bugs, helping the community on the &lt;a href=&quot;https://gitter.im/syl20bnr/spacemacs&quot;&gt;Gitter Chat&lt;/a&gt; or sending pull requests.&lt;/p&gt; 
&lt;p&gt;You can show your love for the project by getting cool Spacemacs t-shirts, mugs and more in the &lt;a href=&quot;https://shop.spreadshirt.com/spacemacs-shop&quot;&gt;Spacemacs Shop&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;If you want to show your support financially, then you can contribute to &lt;a href=&quot;https://salt.bountysource.com/teams/spacemacs&quot;&gt;Bountysource&lt;/a&gt;, or buy a drink for the maintainer by clicking on the &lt;a href=&quot;https://raw.githubusercontent.com/syl20bnr/spacemacs/develop/#top&quot;&gt;Paypal badge&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;If you used Spacemacs in a project, and you want to show that fact, you can use the Spacemacs badge: &lt;a href=&quot;https://spacemacs.org&quot;&gt;&lt;img src=&quot;https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg?sanitize=true&quot; alt=&quot;Built with
Spacemacs&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;For Markdown:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;[![Built with Spacemacs](https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg)](https://spacemacs.org)
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;For HTML:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;a href=&quot;https://spacemacs.org&quot;&amp;gt;&amp;lt;img alt=&quot;Built with Spacemacs&quot; src=&quot;https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg&quot; /&amp;gt;&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;For Org-mode:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-org&quot;&gt;[[https://spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Thank you!&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>karthink/gptel</title>
      <link>https://github.com/karthink/gptel</link>
      <description>&lt;p&gt;A simple, extensible LLM client for Emacs&lt;/p&gt;&lt;hr&gt;&lt;p&gt;#+title: gptel: A simple LLM client for Emacs&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://elpa.nongnu.org/nongnu/gptel.html&quot;&gt;https://elpa.nongnu.org/nongnu/gptel.html&lt;/a&gt;][file:&lt;a href=&quot;https://elpa.nongnu.org/nongnu/gptel.svg&quot;&gt;https://elpa.nongnu.org/nongnu/gptel.svg&lt;/a&gt;]] [[&lt;a href=&quot;https://elpa.nongnu.org/nongnu-devel/gptel.html&quot;&gt;https://elpa.nongnu.org/nongnu-devel/gptel.html&lt;/a&gt;][file:&lt;a href=&quot;https://elpa.nongnu.org/nongnu-devel/gptel.svg&quot;&gt;https://elpa.nongnu.org/nongnu-devel/gptel.svg&lt;/a&gt;]] [[&lt;a href=&quot;https://stable.melpa.org/#/gptel&quot;&gt;https://stable.melpa.org/#/gptel&lt;/a&gt;][file:&lt;a href=&quot;https://stable.melpa.org/packages/gptel-badge.svg&quot;&gt;https://stable.melpa.org/packages/gptel-badge.svg&lt;/a&gt;]] [[&lt;a href=&quot;https://melpa.org/#/gptel&quot;&gt;https://melpa.org/#/gptel&lt;/a&gt;][file:&lt;a href=&quot;https://melpa.org/packages/gptel-badge.svg&quot;&gt;https://melpa.org/packages/gptel-badge.svg&lt;/a&gt;]]&lt;/p&gt; 
&lt;p&gt;gptel is a simple Large Language Model chat client for Emacs, with support for multiple models and backends. It works in the spirit of Emacs, available at any time and uniformly in any buffer.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;General usage&lt;/em&gt;: ([[&lt;a href=&quot;https://www.youtube.com/watch?v=bsRnh_brggM&quot;&gt;https://www.youtube.com/watch?v=bsRnh_brggM&lt;/a&gt;][YouTube Demo]])&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://user-images.githubusercontent.com/8607532/230516812-86510a09-a2fb-4cbd-b53f-cc2522d05a13.mp4&quot;&gt;https://user-images.githubusercontent.com/8607532/230516812-86510a09-a2fb-4cbd-b53f-cc2522d05a13.mp4&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://user-images.githubusercontent.com/8607532/230516816-ae4a613a-4d01-4073-ad3f-b66fa73c6e45.mp4&quot;&gt;https://user-images.githubusercontent.com/8607532/230516816-ae4a613a-4d01-4073-ad3f-b66fa73c6e45.mp4&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;In-place usage&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt; &lt;a href=&quot;https://github.com/user-attachments/assets/cec11aec-52f6-412e-9e7a-9358e8b9b1bf&quot;&gt;https://github.com/user-attachments/assets/cec11aec-52f6-412e-9e7a-9358e8b9b1bf&lt;/a&gt; #+html: &lt;/p&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Tool use&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt; &lt;a href=&quot;https://github.com/user-attachments/assets/5f993659-4cfd-49fa-b5cd-19c55766b9b2&quot;&gt;https://github.com/user-attachments/assets/5f993659-4cfd-49fa-b5cd-19c55766b9b2&lt;/a&gt; #+html: &lt;/p&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt; &lt;a href=&quot;https://github.com/user-attachments/assets/8f57c20b-e1b0-4d86-b972-f46fb90ae1e7&quot;&gt;https://github.com/user-attachments/assets/8f57c20b-e1b0-4d86-b972-f46fb90ae1e7&lt;/a&gt; #+html: &lt;/p&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;See also [[&lt;a href=&quot;https://youtu.be/g1VMGhC5gRU&quot;&gt;https://youtu.be/g1VMGhC5gRU&lt;/a&gt;][this youtube demo (2 minutes)]] by Armin Darvish.&lt;/p&gt; 
&lt;h1&gt;&lt;em&gt;Media support&lt;/em&gt;&lt;/h1&gt; 
&lt;h1&gt;#+html: &lt;p align=&quot;center&quot;&gt;&lt;/p&gt;&lt;/h1&gt; 
&lt;h1&gt;&lt;a href=&quot;https://github.com/user-attachments/assets/1fd947e1-226b-4be2-bc68-7b22b2e3215f&quot;&gt;https://github.com/user-attachments/assets/1fd947e1-226b-4be2-bc68-7b22b2e3215f&lt;/a&gt;&lt;/h1&gt; 
&lt;h1&gt;#+html: &lt;p&gt;&lt;/p&gt;&lt;/h1&gt; 
&lt;h1&gt;&lt;em&gt;Multi-LLM support demo&lt;/em&gt;:&lt;/h1&gt; 
&lt;h1&gt;&lt;a href=&quot;https://github-production-user-asset-6210df.s3.amazonaws.com/8607532/278854024-ae1336c4-5b87-41f2-83e9-e415349d6a43.mp4&quot;&gt;https://github-production-user-asset-6210df.s3.amazonaws.com/8607532/278854024-ae1336c4-5b87-41f2-83e9-e415349d6a43.mp4&lt;/a&gt;&lt;/h1&gt; 
&lt;hr /&gt; 
&lt;ul&gt; 
 &lt;li&gt;Interact with LLMs from anywhere in Emacs (any buffer, shell, minibuffer, wherever).&lt;/li&gt; 
 &lt;li&gt;LLM responses are in Markdown or Org markup.&lt;/li&gt; 
 &lt;li&gt;Supports multiple independent conversations, one-off ad hoc interactions and anything in between.&lt;/li&gt; 
 &lt;li&gt;Supports tool-use to equip LLMs with agentic capabilities.&lt;/li&gt; 
 &lt;li&gt;Supports Model Context Protocol (MCP) integration using [[&lt;a href=&quot;https://github.com/lizqwerscott/mcp.el&quot;&gt;https://github.com/lizqwerscott/mcp.el&lt;/a&gt;][mcp.el]].&lt;/li&gt; 
 &lt;li&gt;Supports multi-modal input (include images, documents).&lt;/li&gt; 
 &lt;li&gt;Supports &quot;reasoning&quot; content in LLM responses.&lt;/li&gt; 
 &lt;li&gt;Save chats as regular Markdown/Org/Text files and resume them later.&lt;/li&gt; 
 &lt;li&gt;Edit your previous prompts or LLM responses when continuing a conversation. These will be fed back to the model.&lt;/li&gt; 
 &lt;li&gt;Supports introspection, so you can see /exactly/ what will be sent. Inspect and modify queries before sending them.&lt;/li&gt; 
 &lt;li&gt;Pause multi-stage requests at an intermediate stage and resume them later.&lt;/li&gt; 
 &lt;li&gt;Don&#39;t like gptel&#39;s workflow? Use it to create your own for any supported model/backend with a [[&lt;a href=&quot;https://github.com/karthink/gptel/wiki/Defining-custom-gptel-commands&quot;&gt;https://github.com/karthink/gptel/wiki/Defining-custom-gptel-commands&lt;/a&gt;][simple API]].&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;gptel uses Curl if available, but falls back to the built-in url-retrieve to work without external dependencies.&lt;/p&gt; 
&lt;p&gt;** Contents :toc:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[#installation][Installation]] 
  &lt;ul&gt; 
   &lt;li&gt;[[#straight][Straight]]&lt;/li&gt; 
   &lt;li&gt;[[#manual][Manual]]&lt;/li&gt; 
   &lt;li&gt;[[#doom-emacs][Doom Emacs]]&lt;/li&gt; 
   &lt;li&gt;[[#spacemacs][Spacemacs]]&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;[[#setup][Setup]] 
  &lt;ul&gt; 
   &lt;li&gt;[[#openai][OpenAI]]&lt;/li&gt; 
   &lt;li&gt;[[#other-llm-backends][Other LLM backends]] 
    &lt;ul&gt; 
     &lt;li&gt;[[#optional-securing-api-keys-with-authinfo][(Optional) Securing API keys with =authinfo=]]&lt;/li&gt; 
     &lt;li&gt;[[#optional-reading-api-keys-from-environment-variables][(Optional) Reading API keys from environment variables]]&lt;/li&gt; 
     &lt;li&gt;[[#openai-chatgpt-pluspro-subscription][OpenAI (ChatGPT plus/pro subscription)]]&lt;/li&gt; 
     &lt;li&gt;[[#azure][Azure]]&lt;/li&gt; 
     &lt;li&gt;[[#gpt4all][GPT4All]]&lt;/li&gt; 
     &lt;li&gt;[[#ollama][Ollama]]&lt;/li&gt; 
     &lt;li&gt;[[#open-webui][Open WebUI]]&lt;/li&gt; 
     &lt;li&gt;[[#gemini][Gemini]]&lt;/li&gt; 
     &lt;li&gt;[[#llamacpp-or-llamafile][Llama.cpp or Llamafile]]&lt;/li&gt; 
     &lt;li&gt;[[#kagi-fastgpt--summarizer][Kagi (FastGPT &amp;amp; Summarizer)]]&lt;/li&gt; 
     &lt;li&gt;[[#togetherai][&lt;a href=&quot;http://together.ai&quot;&gt;together.ai&lt;/a&gt;]]&lt;/li&gt; 
     &lt;li&gt;[[#anyscale][Anyscale]]&lt;/li&gt; 
     &lt;li&gt;[[#perplexity][Perplexity]]&lt;/li&gt; 
     &lt;li&gt;[[#anthropic-claude][Anthropic (Claude)]]&lt;/li&gt; 
     &lt;li&gt;[[#groq][Groq]]&lt;/li&gt; 
     &lt;li&gt;[[#mistral-le-chat][Mistral Le Chat]]&lt;/li&gt; 
     &lt;li&gt;[[#openrouter][OpenRouter]]&lt;/li&gt; 
     &lt;li&gt;[[#privategpt][PrivateGPT]]&lt;/li&gt; 
     &lt;li&gt;[[#deepseek][DeepSeek]]&lt;/li&gt; 
     &lt;li&gt;[[#sambanova-deepseek][Sambanova (Deepseek)]]&lt;/li&gt; 
     &lt;li&gt;[[#cerebras][Cerebras]]&lt;/li&gt; 
     &lt;li&gt;[[#github-models][Github Models]]&lt;/li&gt; 
     &lt;li&gt;[[#novita-ai][Novita AI]]&lt;/li&gt; 
     &lt;li&gt;[[#xai][xAI]]&lt;/li&gt; 
     &lt;li&gt;[[#aiml-api][AI/ML API]]&lt;/li&gt; 
     &lt;li&gt;[[#github-copilotchat][GitHub CopilotChat]]&lt;/li&gt; 
     &lt;li&gt;[[#aws-bedrock][AWS Bedrock]]&lt;/li&gt; 
     &lt;li&gt;[[#moonshot-kimi][Moonshot (Kimi)]]&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;[[#usage][Usage]] 
  &lt;ul&gt; 
   &lt;li&gt;[[#in-any-buffer][In any buffer:]]&lt;/li&gt; 
   &lt;li&gt;[[#in-a-dedicated-chat-buffer][In a dedicated chat buffer:]] 
    &lt;ul&gt; 
     &lt;li&gt;[[#including-media-images-documents-or-plain-text-files-with-requests][Including media (images, documents or plain-text files) with requests]]&lt;/li&gt; 
     &lt;li&gt;[[#save-and-restore-your-chat-sessions][Save and restore your chat sessions]]&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;[[#setting-options-backend-model-request-parameters-system-prompts-and-more][Setting options (backend, model, request parameters, system prompts and more)]]&lt;/li&gt; 
   &lt;li&gt;[[#include-more-context-with-requests][Include more context with requests]]&lt;/li&gt; 
   &lt;li&gt;[[#handle-reasoning-content][Handle &quot;reasoning&quot; content]]&lt;/li&gt; 
   &lt;li&gt;[[#tool-use][Tool use]] 
    &lt;ul&gt; 
     &lt;li&gt;[[#defining-gptel-tools][Defining gptel tools]]&lt;/li&gt; 
     &lt;li&gt;[[#selecting-tools][Selecting tools]]&lt;/li&gt; 
     &lt;li&gt;[[#llm-tool-collections][LLM tool collections]]&lt;/li&gt; 
     &lt;li&gt;[[#model-context-protocol-mcp-integration][Model Context Protocol (MCP) integration]]&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;[[#rewrite-refactor-or-fill-in-a-region][Rewrite, refactor or fill in a region]]&lt;/li&gt; 
   &lt;li&gt;[[#extra-org-mode-conveniences][Extra Org mode conveniences]]&lt;/li&gt; 
   &lt;li&gt;[[#introspection-examine-debug-or-modify-requests][Introspection (examine, debug or modify requests)]]&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;[[#faq][FAQ]] 
  &lt;ul&gt; 
   &lt;li&gt;[[#chat-buffer-ui][Chat buffer UI]] 
    &lt;ul&gt; 
     &lt;li&gt;[[#i-want-the-window-to-scroll-automatically-as-the-response-is-inserted][I want the window to scroll automatically as the response is inserted]]&lt;/li&gt; 
     &lt;li&gt;[[#i-want-the-cursor-to-move-to-the-next-prompt-after-the-response-is-inserted][I want the cursor to move to the next prompt after the response is inserted]]&lt;/li&gt; 
     &lt;li&gt;[[#i-want-to-change-the-formatting-of-the-prompt-and-llm-response][I want to change the formatting of the prompt and LLM response]]&lt;/li&gt; 
     &lt;li&gt;[[#how-does-gptel-distinguish-between-user-prompts-and-llm-responses][How does gptel distinguish between user prompts and LLM responses?]]&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;[[#transient-menu-behavior][Transient menu behavior]] 
    &lt;ul&gt; 
     &lt;li&gt;[[#i-want-to-set-gptel-options-but-only-for-this-buffer][I want to set gptel options but only for this buffer]]&lt;/li&gt; 
     &lt;li&gt;[[#i-want-the-transient-menu-options-to-be-saved-so-i-only-need-to-set-them-once][I want the transient menu options to be saved so I only need to set them once]]&lt;/li&gt; 
     &lt;li&gt;[[#using-the-transient-menu-leaves-behind-extra-windows][Using the transient menu leaves behind extra windows]]&lt;/li&gt; 
     &lt;li&gt;[[#can-i-change-the-transient-menu-key-bindings][Can I change the transient menu key bindings?]]&lt;/li&gt; 
     &lt;li&gt;[[#doom-emacs-sending-a-query-from-the-gptel-menu-fails-because-of-a-key-conflict-with-org-mode][(Doom Emacs) Sending a query from the gptel menu fails because of a key conflict with Org mode]]&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;[[#miscellaneous][Miscellaneous]] 
    &lt;ul&gt; 
     &lt;li&gt;[[#i-want-to-use-gptel-in-a-way-thats-not-supported-by-gptel-send-or-the-options-menu][I want to use gptel in a way that&#39;s not supported by =gptel-send= or the options menu]]&lt;/li&gt; 
     &lt;li&gt;[[#chatgpt-i-get-the-error-http2-429-you-exceeded-your-current-quota][(ChatGPT) I get the error &quot;(HTTP/2 429) You exceeded your current quota&quot;]]&lt;/li&gt; 
     &lt;li&gt;[[#why-another-llm-client][Why another LLM client?]]&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;[[#additional-configuration][Additional Configuration]] 
  &lt;ul&gt; 
   &lt;li&gt;[[#option-presets][Option presets]] 
    &lt;ul&gt; 
     &lt;li&gt;[[#applying-presets-to-requests-automatically][Applying presets to requests automatically]]&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;[[#alternatives][Alternatives]] 
  &lt;ul&gt; 
   &lt;li&gt;[[#packages-using-gptel][Packages using gptel]]&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;[[#acknowledgments][Acknowledgments]]&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** Installation&lt;/p&gt; 
&lt;p&gt;Note: gptel requires Transient 0.7.8 or higher. Transient is a built-in package and Emacs does not update it by default. Ensure that =package-install-upgrade-built-in= is true, or update Transient manually.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;em&gt;Release version&lt;/em&gt;: =M-x package-install= ⏎ =gptel= in Emacs.&lt;/li&gt; 
 &lt;li&gt;&lt;em&gt;Development snapshot&lt;/em&gt;: Add MELPA or NonGNU-devel ELPA to your list of package sources, then install with =M-x package-install= ⏎ =gptel=.&lt;/li&gt; 
 &lt;li&gt;&lt;em&gt;Optional:&lt;/em&gt; Install =markdown-mode=.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;details&gt;
 &lt;summary&gt; *** Straight #+html: &lt;/summary&gt; #+begin_src emacs-lisp (straight-use-package &#39;gptel) #+end_src #+html: 
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; *** Manual #+html: &lt;/summary&gt; Note: gptel requires Transient 0.7.8 or higher. Transient is a built-in package and Emacs does not update it by default. Ensure that =package-install-upgrade-built-in= is true, or update Transient manually.
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Clone or download this repository and run =M-x package-install-file⏎= on the repository directory. #+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; *** Doom Emacs #+html: &lt;/summary&gt; In =packages.el=
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (package! gptel :recipe (:nonrecursive t)) #+end_src&lt;/p&gt; 
 &lt;p&gt;In =config.el=&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (use-package! gptel :config (setq! gptel-api-key &quot;your key&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;&quot;your key&quot; can be the API key itself, or (safer) a function that returns the key. Setting =gptel-api-key= is optional, you will be asked for a key if it&#39;s not found.&lt;/p&gt; 
 &lt;p&gt;Alternatively, Doom Emacs provides a built-in =:tools llm= [[&lt;a href=&quot;https://github.com/doomemacs/modules/tree/main/modules/tools/llm&quot;&gt;https://github.com/doomemacs/modules/tree/main/modules/tools/llm&lt;/a&gt;][module]] powered by gptel. Enable it in your =init.el= in the =doom!= block:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (doom! :tools llm) #+end_src&lt;/p&gt; 
 &lt;p&gt;This installs gptel with preconfigured keybindings (=
  &lt;leader&gt;
    o l=), magit integration for generating commit messages (=M-g= in commit buffers), and packages =gptel-quick= and =gptel-magit=. Run =doom/help-modules= (=
   &lt;leader&gt;
     h d m=) and select =:tools llm= for full documentation.
   &lt;/leader&gt;
  &lt;/leader&gt;&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; *** Spacemacs #+html: &lt;/summary&gt; In your =.spacemacs= file, add =llm-client= to =dotspacemacs-configuration-layers=.
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (llm-client :variables llm-client-enable-gptel t) #+end_src #+html: &lt;/p&gt;
&lt;/details&gt; ** Setup
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;gptel supports a number of LLM providers:&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
  | LLM Backend | Requires | |----------------------+----------------------------| | OpenAI | [[
 &lt;a href=&quot;https://platform.openai.com/account/api-keys&quot;&gt;https://platform.openai.com/account/api-keys&lt;/a&gt;][API key]] | | OpenAI subscription | ChatGPT plus/pro sub | | Anthropic (Claude) | [[
 &lt;a href=&quot;https://www.anthropic.com/api&quot;&gt;https://www.anthropic.com/api&lt;/a&gt;][API key]] | | Gemini | [[
 &lt;a href=&quot;https://makersuite.google.com/app/apikey&quot;&gt;https://makersuite.google.com/app/apikey&lt;/a&gt;][API key]] | | Ollama | [[
 &lt;a href=&quot;https://ollama.ai/&quot;&gt;https://ollama.ai/&lt;/a&gt;][Ollama running locally]] | | Open WebUI | [[
 &lt;a href=&quot;https://openwebui.com/&quot;&gt;https://openwebui.com/&lt;/a&gt;][Open WebUI running locally]] | | Llama.cpp | [[
 &lt;a href=&quot;https://github.com/ggml-org/llama.cpp/tree/master/tools/server#quick-start&quot;&gt;https://github.com/ggml-org/llama.cpp/tree/master/tools/server#quick-start&lt;/a&gt;][Llama.cpp running locally]] | | Llamafile | [[
 &lt;a href=&quot;https://github.com/Mozilla-Ocho/llamafile#quickstart&quot;&gt;https://github.com/Mozilla-Ocho/llamafile#quickstart&lt;/a&gt;][Local Llamafile server]] | | GPT4All | [[
 &lt;a href=&quot;https://gpt4all.io/index.html&quot;&gt;https://gpt4all.io/index.html&lt;/a&gt;][GPT4All running locally]] | | Kagi FastGPT | [[
 &lt;a href=&quot;https://kagi.com/settings?p=api&quot;&gt;https://kagi.com/settings?p=api&lt;/a&gt;][API key]] | | Kagi Summarizer | [[
 &lt;a href=&quot;https://kagi.com/settings?p=api&quot;&gt;https://kagi.com/settings?p=api&lt;/a&gt;][API key]] | | Azure | Deployment and API key | | Groq | [[
 &lt;a href=&quot;https://console.groq.com/keys&quot;&gt;https://console.groq.com/keys&lt;/a&gt;][API key]] | | Mistral Le Chat | [[
 &lt;a href=&quot;https://console.mistral.ai/api-keys&quot;&gt;https://console.mistral.ai/api-keys&lt;/a&gt;][API key]] | | Perplexity | [[
 &lt;a href=&quot;https://docs.perplexity.ai/docs/getting-started&quot;&gt;https://docs.perplexity.ai/docs/getting-started&lt;/a&gt;][API key]] | | OpenRouter | [[
 &lt;a href=&quot;https://openrouter.ai/keys&quot;&gt;https://openrouter.ai/keys&lt;/a&gt;][API key]] | | AI/ML API | [[
 &lt;a href=&quot;https://aimlapi.com/app/?utm_source=gptel&amp;amp;utm_medium=github&amp;amp;utm_campaign=integration&quot;&gt;https://aimlapi.com/app/?utm_source=gptel&amp;amp;utm_medium=github&amp;amp;utm_campaign=integration&lt;/a&gt;][API key]] | | 
 &lt;a href=&quot;http://together.ai&quot;&gt;together.ai&lt;/a&gt; | [[
 &lt;a href=&quot;https://api.together.xyz/settings/api-keys&quot;&gt;https://api.together.xyz/settings/api-keys&lt;/a&gt;][API key]] | | Anyscale | [[
 &lt;a href=&quot;https://docs.endpoints.anyscale.com/&quot;&gt;https://docs.endpoints.anyscale.com/&lt;/a&gt;][API key]] | | PrivateGPT | [[
 &lt;a href=&quot;https://github.com/zylon-ai/private-gpt#-documentation&quot;&gt;https://github.com/zylon-ai/private-gpt#-documentation&lt;/a&gt;][PrivateGPT running locally]] | | DeepSeek | [[
 &lt;a href=&quot;https://platform.deepseek.com/api_keys&quot;&gt;https://platform.deepseek.com/api_keys&lt;/a&gt;][API key]] | | Sambanova (Deepseek) | [[
 &lt;a href=&quot;https://cloud.sambanova.ai/apis&quot;&gt;https://cloud.sambanova.ai/apis&lt;/a&gt;][API key]] | | Cerebras | [[
 &lt;a href=&quot;https://cloud.cerebras.ai/&quot;&gt;https://cloud.cerebras.ai/&lt;/a&gt;][API key]] | | Github Models | [[
 &lt;a href=&quot;https://github.com/settings/tokens&quot;&gt;https://github.com/settings/tokens&lt;/a&gt;][Token]] | | Novita AI | [[
 &lt;a href=&quot;https://novita.ai/model-api/product/llm-api?utm_source=github_gptel&amp;amp;utm_medium=github_readme&amp;amp;utm_campaign=link&quot;&gt;https://novita.ai/model-api/product/llm-api?utm_source=github_gptel&amp;amp;utm_medium=github_readme&amp;amp;utm_campaign=link&lt;/a&gt;][Token]] | | xAI | [[
 &lt;a href=&quot;https://console.x.ai?utm_source=github_gptel&amp;amp;utm_medium=github_readme&amp;amp;utm_campaign=link&quot;&gt;https://console.x.ai?utm_source=github_gptel&amp;amp;utm_medium=github_readme&amp;amp;utm_campaign=link&lt;/a&gt;][API key]] | | GitHub CopilotChat | GitHub account | | Bedrock | AWS credentials | | Moonshot (Kimi) | API key ([[
 &lt;a href=&quot;https://platform.moonshot.cn/console&quot;&gt;https://platform.moonshot.cn/console&lt;/a&gt;][CN]] or [[
 &lt;a href=&quot;https://platform.moonshot.ai/console&quot;&gt;https://platform.moonshot.ai/console&lt;/a&gt;][Global]]) | #+html: 
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;*** OpenAI Procure an [[&lt;a href=&quot;https://platform.openai.com/account/api-keys&quot;&gt;https://platform.openai.com/account/api-keys&lt;/a&gt;][OpenAI API key]].&lt;/p&gt; 
&lt;p&gt;Optional: Set =gptel-api-key= to the key. Alternatively, you may choose a more secure method such as:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Setting it to a custom function that returns the key.&lt;/li&gt; 
 &lt;li&gt;Leaving it set to the default =gptel-api-key-from-auth-source= function which reads keys from =~/.authinfo=. (See [[#optional-securing-api-keys-with-authinfo][authinfo details]])&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;*** Other LLM backends&lt;/p&gt; 
&lt;p&gt;An OpenAI backend is configured out of the box. If you want to use other LLM backends (like Ollama, Claude/Anthropic or Gemini) you need to register and configure them first.&lt;/p&gt; 
&lt;p&gt;As an example, registering a backend typically looks like the following:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (gptel-make-anthropic &quot;Claude&quot; :stream t :key gptel-api-key) #+end_src&lt;/p&gt; 
&lt;p&gt;Once this backend is registered, you&#39;ll see model names prefixed by &quot;Claude:&quot; appear in gptel&#39;s menu.&lt;/p&gt; 
&lt;p&gt;See below for details on your preferred LLM provider, including local LLMs.&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;details&gt;
 &lt;summary&gt; **** (Optional) Securing API keys with =authinfo= #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;You can use Emacs&#39; built-in support for =authinfo= to store API keys required by gptel. Add your API keys to =~/.authinfo=, and leave =gptel-api-key= set to its default. By default, the API endpoint DNS name (e.g. &quot;&lt;a href=&quot;http://api.openai.com&quot;&gt;api.openai.com&lt;/a&gt;&quot;) is used as HOST and &quot;apikey&quot; as USER.&lt;/p&gt; 
 &lt;p&gt;#+begin_src authinfo machine &lt;a href=&quot;http://api.openai.com&quot;&gt;api.openai.com&lt;/a&gt; login apikey password sk-secret-openai-api-key-goes-here machine &lt;a href=&quot;http://api.anthropic.com&quot;&gt;api.anthropic.com&lt;/a&gt; login apikey password sk-secret-anthropic-api-key-goes-here #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** (Optional) Reading API keys from environment variables #+html: &lt;/summary&gt; Alternatively, you can fetch API keys from variables in Emacs&#39; environment (such as =OPENAI_API_KEY=) using a function like this:
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (defun gptel-api-key-from-environment (&amp;amp;optional var) (lambda () (getenv (or var ;provided key (thread-first ;or fall back to 
  &lt;type&gt;
   _API_KEY (type-of gptel-backend) (symbol-name) (substring 6) (upcase) (concat &quot;_API_KEY&quot;)))))) #+end_src
  &lt;/type&gt;&lt;/p&gt; 
 &lt;p&gt;Then set the =:key= when defining backend to the appropriate environment variable:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-anthropic &quot;My-Claude-backend&quot; :key (gptel-api-key-from-environment &quot;ANTHROPIC_API_KEY&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;If no environment variable is provided:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-gemini &quot;My-Gemini-backend&quot; :key (gptel-api-key-from-environment)) #+end_src&lt;/p&gt; 
 &lt;p&gt;it will try to guess the key from the backend type, /i.e./ try to use =GEMINI_API_KEY= when using the Gemini backend, and so on.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** OpenAI (ChatGPT plus/pro subscription) #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Includes access to OpenAI Codex models. Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-openai-oauth &quot;OpenAI-sub&quot;) ;Any name of your choosing #+end_src&lt;/p&gt; 
 &lt;p&gt;You will be prompted to log into OpenAI as required. (You can also log in manually with =M-x gptel-openai-oauth-login=.)&lt;/p&gt; 
 &lt;p&gt;If you are using it through a proxy, you can specify the host name, protocol etc:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-openai-oauth &quot;OpenAI-sub&quot; :host &quot;my.openai-proxy.tld&quot; :protocol &quot;http&quot;) #+end_src&lt;/p&gt; 
 &lt;p&gt;Refer to the documentation of =gptel-make-openai-oauth= to set more parameters.&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel. (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (setq gptel-model &#39;gpt-5.4-mini gptel-backend (gptel-make-openai-oauth &quot;OpenAI-sub&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Azure #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-azure &quot;Azure-1&quot; ;Name, whatever you&#39;d like :protocol &quot;https&quot; ;Optional -- https is the default :host &quot;YOUR_RESOURCE_NAME.openai.azure.com&quot; :endpoint &quot;/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2023-05-15&quot; ;or equivalent :stream t ;Enable streaming responses :key #&#39;gptel-api-key :models &#39;(gpt-3.5-turbo gpt-4)) #+end_src&lt;/p&gt; 
 &lt;p&gt;Refer to the documentation of =gptel-make-azure= to set more parameters.&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel. (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;gpt-3.5-turbo gptel-backend (gptel-make-azure &quot;Azure-1&quot; :protocol &quot;https&quot; :host &quot;YOUR_RESOURCE_NAME.openai.azure.com&quot; :endpoint &quot;/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2023-05-15&quot; :stream t :key #&#39;gptel-api-key :models &#39;(gpt-3.5-turbo gpt-4))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** GPT4All #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-gpt4all &quot;GPT4All&quot; ;Name of your choosing :protocol &quot;http&quot; :host &quot;localhost:4891&quot; ;Where it&#39;s running :models &#39;(mistral-7b-openorca.Q4_0.gguf)) ;Available models #+end_src&lt;/p&gt; 
 &lt;p&gt;These are the required parameters, refer to the documentation of =gptel-make-gpt4all= for more.&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above. Additionally you may want to increase the response token size since GPT4All uses very short (often truncated) responses by default.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-max-tokens 500 gptel-model &#39;mistral-7b-openorca.Q4_0.gguf gptel-backend (gptel-make-gpt4all &quot;GPT4All&quot; :protocol &quot;http&quot; :host &quot;localhost:4891&quot; :models &#39;(mistral-7b-openorca.Q4_0.gguf))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Ollama #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with #+begin_src emacs-lisp (gptel-make-ollama &quot;Ollama&quot; ;Any name of your choosing :host &quot;localhost:11434&quot; ;Where it&#39;s running :stream t ;Stream responses :models &#39;(mistral:latest)) ;List of models #+end_src&lt;/p&gt; 
 &lt;p&gt;These are the required parameters, refer to the documentation of =gptel-make-ollama= for more.&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]])&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;mistral:latest gptel-backend (gptel-make-ollama &quot;Ollama&quot; :host &quot;localhost:11434&quot; :stream t :models &#39;(mistral:latest))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;details&gt;
 &lt;summary&gt; **** Open WebUI #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;[[&lt;a href=&quot;https://openwebui.com/&quot;&gt;https://openwebui.com/&lt;/a&gt;][Open WebUI]] is an open source, self-hosted system which provides a multi-user web chat interface and an API endpoint for accessing LLMs, especially LLMs running locally on inference servers like Ollama.&lt;/p&gt; 
 &lt;p&gt;Because it presents an OpenAI-compatible endpoint, you use ~gptel-make-openai~ to register it as a backend.&lt;/p&gt; 
 &lt;p&gt;For instance, you can use this form to register a backend for a local instance of Open Web UI served via http on port 3000:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-openai &quot;OpenWebUI&quot; :host &quot;localhost:3000&quot; :protocol &quot;http&quot; :key &quot;KEY_FOR_ACCESSING_OPENWEBUI&quot; :endpoint &quot;/api/chat/completions&quot; :stream t :models &#39;(&quot;gemma3n:latest&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;Or if you are running Open Web UI on another host on your local network (~box.local~), serving via https with self-signed certificates, this will work:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-openai &quot;OpenWebUI&quot; :host &quot;box.local&quot; :curl-args &#39;(&quot;--insecure&quot;) ; needed for self-signed certs :key &quot;KEY_FOR_ACCESSING_OPENWEBUI&quot; :endpoint &quot;/api/chat/completions&quot; :stream t :models &#39;(&quot;gemma3n:latest&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;To find your API key in Open WebUI, click the user name in the bottom left, Settings, Account, and then Show by API Keys section.&lt;/p&gt; 
 &lt;p&gt;Refer to the documentation of =gptel-make-openai= for more configuration options.&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]])&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &quot;gemma3n:latest&quot; gptel-backend (gptel-make-openai &quot;OpenWebUI&quot; :host &quot;localhost:3000&quot; :protocol &quot;http&quot; :key &quot;KEY_FOR_ACCESSING_OPENWEBUI&quot; :endpoint &quot;/api/chat/completions&quot; :stream t :models &#39;(&quot;gemma3n:latest&quot;))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;details&gt;
 &lt;summary&gt; **** Gemini #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; :key can be a function that returns the API key. (gptel-make-gemini &quot;Gemini&quot; :key &quot;YOUR_GEMINI_API_KEY&quot; :stream t) #+end_src&lt;/p&gt; 
 &lt;p&gt;These are the required parameters, refer to the documentation of =gptel-make-gemini= for more.&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]])&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;gemini-2.5-pro-exp-03-25 gptel-backend (gptel-make-gemini &quot;Gemini&quot; :key &quot;YOUR_GEMINI_API_KEY&quot; :stream t)) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;details&gt;
  #+html: 
 &lt;summary&gt; **** Llama.cpp or Llamafile #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;(If using a llamafile, run a [[&lt;a href=&quot;https://github.com/Mozilla-Ocho/llamafile#other-example-llamafiles&quot;&gt;https://github.com/Mozilla-Ocho/llamafile#other-example-llamafiles&lt;/a&gt;][server llamafile]] instead of a &quot;command-line llamafile&quot;, and a model that supports text generation.)&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; Llama.cpp offers an OpenAI compatible API (gptel-make-openai &quot;llama-cpp&quot; ;Any name :stream t ;Stream responses :protocol &quot;http&quot; :host &quot;localhost:8000&quot; ;Llama.cpp server location :models &#39;(test)) ;Any names, doesn&#39;t matter for Llama #+end_src&lt;/p&gt; 
 &lt;p&gt;These are the required parameters, refer to the documentation of =gptel-make-openai= for more.&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]])&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;test gptel-backend (gptel-make-openai &quot;llama-cpp&quot; :stream t :protocol &quot;http&quot; :host &quot;localhost:8000&quot; :models &#39;(test))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Kagi (FastGPT &amp;amp; Summarizer) #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Kagi&#39;s FastGPT model and the Universal Summarizer are both supported. A couple of notes:&lt;/p&gt; 
 &lt;ol&gt; 
  &lt;li&gt; &lt;p&gt;Universal Summarizer: If there is a URL at point, the summarizer will summarize the contents of the URL. Otherwise the context sent to the model is the same as always: the buffer text upto point, or the contents of the region if the region is active.&lt;/p&gt; &lt;/li&gt; 
  &lt;li&gt; &lt;p&gt;Kagi models do not support multi-turn conversations, interactions are &quot;one-shot&quot;. They also do not support streaming responses.&lt;/p&gt; &lt;/li&gt; 
 &lt;/ol&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-kagi &quot;Kagi&quot; ;any name :key &quot;YOUR_KAGI_API_KEY&quot;) ;can be a function that returns the key #+end_src&lt;/p&gt; 
 &lt;p&gt;These are the required parameters, refer to the documentation of =gptel-make-kagi= for more.&lt;/p&gt; 
 &lt;p&gt;You can pick this backend and the model (fastgpt/summarizer) from the transient menu when using gptel.&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;fastgpt gptel-backend (gptel-make-kagi &quot;Kagi&quot; :key &quot;YOUR_KAGI_API_KEY&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;The alternatives to =fastgpt= include =summarize:cecil=, =summarize:agnes=, =summarize:daphne= and =summarize:muriel=. The difference between the summarizer engines is [[&lt;a href=&quot;https://help.kagi.com/kagi/api/summarizer.html#summarization-engines&quot;&gt;https://help.kagi.com/kagi/api/summarizer.html#summarization-engines&lt;/a&gt;][documented here]].&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** &lt;a href=&quot;http://together.ai&quot;&gt;together.ai&lt;/a&gt; #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; &lt;a href=&quot;http://Together.ai&quot;&gt;Together.ai&lt;/a&gt; offers an OpenAI compatible API (gptel-make-openai &quot;TogetherAI&quot; ;Any name you want :host &quot;api.together.xyz&quot; :key &quot;your-api-key&quot; ;can be a function that returns the key :stream t :models &#39;(;; has many more, check &lt;a href=&quot;http://together.ai&quot;&gt;together.ai&lt;/a&gt; mistralai/Mixtral-8x7B-Instruct-v0.1 codellama/CodeLlama-13b-Instruct-hf codellama/CodeLlama-34b-Instruct-hf)) #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]])&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;mistralai/Mixtral-8x7B-Instruct-v0.1 gptel-backend (gptel-make-openai &quot;TogetherAI&quot;&lt;br /&gt; :host &quot;api.together.xyz&quot; :key &quot;your-api-key&quot;&lt;br /&gt; :stream t :models &#39;(;; has many more, check &lt;a href=&quot;http://together.ai&quot;&gt;together.ai&lt;/a&gt; mistralai/Mixtral-8x7B-Instruct-v0.1 codellama/CodeLlama-13b-Instruct-hf codellama/CodeLlama-34b-Instruct-hf))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Anyscale #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; Anyscale offers an OpenAI compatible API (gptel-make-openai &quot;Anyscale&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://api.endpoints.anyscale.com&quot;&gt;api.endpoints.anyscale.com&lt;/a&gt;&quot; :key &quot;your-api-key&quot; ;can be a function that returns the key :models &#39;(;; has many more, check anyscale mistralai/Mixtral-8x7B-Instruct-v0.1)) #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]])&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;mistralai/Mixtral-8x7B-Instruct-v0.1 gptel-backend (gptel-make-openai &quot;Anyscale&quot; :host &quot;&lt;a href=&quot;http://api.endpoints.anyscale.com&quot;&gt;api.endpoints.anyscale.com&lt;/a&gt;&quot; :key &quot;your-api-key&quot; :models &#39;(;; has many more, check anyscale mistralai/Mixtral-8x7B-Instruct-v0.1))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Perplexity #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-perplexity &quot;Perplexity&quot; ;Any name you want :key &quot;your-api-key&quot; ;can be a function that returns the key :stream t) ;If you want responses to be streamed #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]])&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;sonar gptel-backend (gptel-make-perplexity &quot;Perplexity&quot; :key &quot;your-api-key&quot; :stream t)) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Anthropic (Claude) #+html: &lt;/summary&gt; Register a backend with
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-anthropic &quot;Claude&quot; ;Any name you want :stream t ;Streaming responses :key &quot;your-api-key&quot;) #+end_src The =:key= can be a function that returns the key (more secure).&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;claude-3-sonnet-20240229 ; &quot;claude-3-opus-20240229&quot; also available gptel-backend (gptel-make-anthropic &quot;Claude&quot; :stream t :key &quot;your-api-key&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Interim support for Claude 3.7 Sonnet&lt;/p&gt; 
 &lt;p&gt;To use Claude 3.7 Sonnet model in its &quot;thinking&quot; mode, you can define a second Claude backend and select it via the UI or elisp:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-anthropic &quot;Claude-thinking&quot; ;Any name you want :key &quot;your-API-key&quot; :stream t :models &#39;(claude-sonnet-4-20250514 claude-3-7-sonnet-20250219) :request-params &#39;(:thinking (:type &quot;enabled&quot; :budget_tokens 2048) :max_tokens 4096)) #+end_src&lt;/p&gt; 
 &lt;p&gt;You can set the reasoning budget tokens and max tokens for this usage via the =:budget_tokens= and =:max_tokens= keys here, respectively.&lt;/p&gt; 
 &lt;p&gt;You can control whether/how the reasoning output is shown via gptel&#39;s menu or =gptel-include-reasoning=, see [[#handle-reasoning-content][handling reasoning content]].&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Groq #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; Groq offers an OpenAI compatible API (gptel-make-openai &quot;Groq&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://api.groq.com&quot;&gt;api.groq.com&lt;/a&gt;&quot; :endpoint &quot;/openai/v1/chat/completions&quot; :stream t :key &quot;your-api-key&quot; ;can be a function that returns the key :models &#39;(gemma-7b-it llama3-8b-8192 mixtral-8x7b-32768 openai/gpt-oss-20b openai/gpt-oss-120b qwen/qwen3.6-27b)) #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]). Note that Groq is fast enough that you could set =:stream nil= and still get near-instant responses.&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;mixtral-8x7b-32768 gptel-backend (gptel-make-openai &quot;Groq&quot; :host &quot;&lt;a href=&quot;http://api.groq.com&quot;&gt;api.groq.com&lt;/a&gt;&quot; :endpoint &quot;/openai/v1/chat/completions&quot; :stream t :key &quot;your-api-key&quot; :models &#39;(gemma-7b-it llama3-8b-8192 mixtral-8x7b-32768 openai/gpt-oss-20b openai/gpt-oss-120b qwen/qwen3.6-27b))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Mistral Le Chat #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; Mistral offers an OpenAI compatible API (gptel-make-openai &quot;MistralLeChat&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://api.mistral.ai&quot;&gt;api.mistral.ai&lt;/a&gt;&quot; :endpoint &quot;/v1/chat/completions&quot; :protocol &quot;https&quot; :key &quot;your-api-key&quot; ;can be a function that returns the key :models &#39;(&quot;mistral-small&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;mistral-small gptel-backend (gptel-make-openai &quot;MistralLeChat&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://api.mistral.ai&quot;&gt;api.mistral.ai&lt;/a&gt;&quot; :endpoint &quot;/v1/chat/completions&quot; :protocol &quot;https&quot; :key &quot;your-api-key&quot; ;can be a function that returns the key :models &#39;(&quot;mistral-small&quot;))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt;&lt;p&gt;&lt;/p&gt; &lt;p&gt;**** OpenRouter #+html: &lt;/p&gt;&lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OpenRouter offers an OpenAI compatible API (gptel-make-openai &quot;OpenRouter&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://openrouter.ai&quot;&gt;openrouter.ai&lt;/a&gt;&quot; :endpoint &quot;/api/v1/chat/completions&quot; :stream t :key &quot;your-api-key&quot; ;can be a function that returns the key :models &#39;(openai/gpt-3.5-turbo mistralai/mixtral-8x7b-instruct meta-llama/codellama-34b-instruct codellama/codellama-70b-instruct google/palm-2-codechat-bison-32k google/gemini-pro))&lt;/p&gt; 
 &lt;p&gt;#+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;mixtral-8x7b-32768 gptel-backend (gptel-make-openai &quot;OpenRouter&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://openrouter.ai&quot;&gt;openrouter.ai&lt;/a&gt;&quot; :endpoint &quot;/api/v1/chat/completions&quot; :stream t :key &quot;your-api-key&quot; ;can be a function that returns the key :models &#39;(openai/gpt-3.5-turbo mistralai/mixtral-8x7b-instruct meta-llama/codellama-34b-instruct codellama/codellama-70b-instruct google/palm-2-codechat-bison-32k google/gemini-pro)))&lt;/p&gt; 
 &lt;p&gt;#+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** PrivateGPT #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-privategpt &quot;privateGPT&quot; ;Any name you want :protocol &quot;http&quot; :host &quot;localhost:8001&quot; :stream t :context t ;Use context provided by embeddings :sources t ;Return information about source documents :models &#39;(private-gpt))&lt;/p&gt; 
 &lt;p&gt;#+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;private-gpt gptel-backend (gptel-make-privategpt &quot;privateGPT&quot; ;Any name you want :protocol &quot;http&quot; :host &quot;localhost:8001&quot; :stream t :context t ;Use context provided by embeddings :sources t ;Return information about source documents :models &#39;(private-gpt)))&lt;/p&gt; 
 &lt;p&gt;#+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** DeepSeek #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-deepseek &quot;DeepSeek&quot; ;Any name you want :stream t ;for streaming responses :key &quot;your-api-key&quot;) ;can be a function that returns the key #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;deepseek-reasoner gptel-backend (gptel-make-deepseek &quot;DeepSeek&quot; :stream t :key &quot;your-api-key&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt;&lt;p&gt;&lt;/p&gt; &lt;p&gt;**** Sambanova (Deepseek) #+html: &lt;/p&gt;&lt;/summary&gt; Sambanova offers various LLMs through their Samba Nova Cloud offering, with Deepseek-R1 being one of them. The token speed for Deepseek R1 via Sambanova is about 6 times faster than when accessed through 
 &lt;a href=&quot;http://deepseek.com&quot;&gt;deepseek.com&lt;/a&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-openai &quot;Sambanova&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://api.sambanova.ai&quot;&gt;api.sambanova.ai&lt;/a&gt;&quot; :endpoint &quot;/v1/chat/completions&quot; :stream t ;for streaming responses :key &quot;your-api-key&quot; ;can be a function that returns the key :models &#39;(DeepSeek-R1)) #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend The code aboves makes the backend available for selection. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Add these two lines to your configuration:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;DeepSeek-R1) (setq gptel-backend (gptel-get-backend &quot;Sambanova&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt;&lt;p&gt;&lt;/p&gt; &lt;p&gt;**** Cerebras #+html: &lt;/p&gt;&lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; Cerebras offers an instant OpenAI compatible API (gptel-make-openai &quot;Cerebras&quot; :host &quot;&lt;a href=&quot;http://api.cerebras.ai&quot;&gt;api.cerebras.ai&lt;/a&gt;&quot; :endpoint &quot;/v1/chat/completions&quot; :stream t ;optionally nil as Cerebras is instant AI :key &quot;your-api-key&quot; ;can be a function that returns the key :models &#39;(llama3.1-70b llama3.1-8b)) #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;llama3.1-8b gptel-backend (gptel-make-openai &quot;Cerebras&quot; :host &quot;&lt;a href=&quot;http://api.cerebras.ai&quot;&gt;api.cerebras.ai&lt;/a&gt;&quot; :endpoint &quot;/v1/chat/completions&quot; :stream nil :key &quot;your-api-key&quot; :models &#39;(llama3.1-70b llama3.1-8b))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Github Models #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;NOTE: [[&lt;a href=&quot;https://docs.github.com/en/github-models/about-github-models&quot;&gt;https://docs.github.com/en/github-models/about-github-models&lt;/a&gt;][GitHub Models]] is /not/ GitHub Copilot! If you want to use GitHub Copilot chat via gptel, look at the instructions for GitHub CopilotChat below instead.&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; Github Models offers an OpenAI compatible API (gptel-make-openai &quot;Github Models&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://models.inference.ai.azure.com&quot;&gt;models.inference.ai.azure.com&lt;/a&gt;&quot; :endpoint &quot;/chat/completions?api-version=2024-05-01-preview&quot; :stream t :key &quot;your-github-token&quot; :models &#39;(gpt-4o)) #+end_src&lt;/p&gt; 
 &lt;p&gt;You will need to create a github [[&lt;a href=&quot;https://github.com/settings/personal-access-tokens&quot;&gt;https://github.com/settings/personal-access-tokens&lt;/a&gt;][token]].&lt;/p&gt; 
 &lt;p&gt;For all the available models, check the [[&lt;a href=&quot;https://github.com/marketplace/models&quot;&gt;https://github.com/marketplace/models&lt;/a&gt;][marketplace]].&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;gpt-4o gptel-backend (gptel-make-openai &quot;Github Models&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://models.inference.ai.azure.com&quot;&gt;models.inference.ai.azure.com&lt;/a&gt;&quot; :endpoint &quot;/chat/completions?api-version=2024-05-01-preview&quot; :stream t :key &quot;your-github-token&quot; :models &#39;(gpt-4o)) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Novita AI #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; Novita AI offers an OpenAI compatible API (gptel-make-openai &quot;NovitaAI&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://api.novita.ai&quot;&gt;api.novita.ai&lt;/a&gt;&quot; :endpoint &quot;/v3/openai&quot; :key &quot;your-api-key&quot; ;can be a function that returns the key :stream t :models &#39;(;; has many more, check &lt;a href=&quot;https://novita.ai/llm-api&quot;&gt;https://novita.ai/llm-api&lt;/a&gt; gryphe/mythomax-l2-13b meta-llama/llama-3-70b-instruct meta-llama/llama-3.1-70b-instruct)) #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]])&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;gryphe/mythomax-l2-13b gptel-backend (gptel-make-openai &quot;NovitaAI&quot;&lt;br /&gt; :host &quot;&lt;a href=&quot;http://api.novita.ai&quot;&gt;api.novita.ai&lt;/a&gt;&quot; :endpoint &quot;/v3/openai&quot; :key &quot;your-api-key&quot;&lt;br /&gt; :stream t :models &#39;(;; has many more, check &lt;a href=&quot;https://novita.ai/llm-api&quot;&gt;https://novita.ai/llm-api&lt;/a&gt; mistralai/Mixtral-8x7B-Instruct-v0.1 meta-llama/llama-3-70b-instruct meta-llama/llama-3.1-70b-instruct))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** xAI #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-xai &quot;xAI&quot; ; Any name you want :stream t :key &quot;your-api-key&quot;) ; can be a function that returns the key #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]])&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (setq gptel-model &#39;grok-3-latest gptel-backend (gptel-make-xai &quot;xAI&quot; ; Any name you want :key &quot;your-api-key&quot; ; can be a function that returns the key :stream t)) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** AI/ML API #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;AI/ML API provides 300+ AI models including Deepseek, Gemini, ChatGPT. The models run at enterprise-grade rate limits and uptimes.&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; AI/ML API offers an OpenAI compatible API (gptel-make-openai &quot;AI/ML API&quot; ;Any name you want :host &quot;&lt;a href=&quot;http://api.aimlapi.com&quot;&gt;api.aimlapi.com&lt;/a&gt;&quot; :endpoint &quot;/v1/chat/completions&quot; :stream t :key &quot;your-api-key&quot; ;can be a function that returns the key :models &#39;(deepseek-chat gemini-pro gpt-4o)) #+end_src&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;gpt-4o gptel-backend (gptel-make-openai &quot;AI/ML API&quot; :host &quot;&lt;a href=&quot;http://api.aimlapi.com&quot;&gt;api.aimlapi.com&lt;/a&gt;&quot; :endpoint &quot;/v1/chat/completions&quot; :stream t :key &quot;your-api-key&quot; :models &#39;(deepseek-chat gemini-pro gpt-4o))) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** GitHub CopilotChat #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-gh-copilot &quot;Copilot&quot;) #+end_src&lt;/p&gt; 
 &lt;p&gt;Github copilot is configured to use the public endpoint =api.githubcopilot.com=. Depending on your plan, you may need to use a different host (see [[&lt;a href=&quot;https://github.blog/changelog/2026-02-13-network-configuration-changes-for-copilot-coding-agent/#whats-changing&quot;&gt;https://github.blog/changelog/2026-02-13-network-configuration-changes-for-copilot-coding-agent/#whats-changing&lt;/a&gt;][Copilot plan changes]]):&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;Copilot Business: =api.business.githubcopilot.com=&lt;/li&gt; 
  &lt;li&gt;Copilot Enterprise: =api.enterprise.githubcopilot.com=&lt;/li&gt; 
  &lt;li&gt;Copilot Pro and Pro+: =api.individual.githubcopilot.com=&lt;/li&gt; 
 &lt;/ul&gt; 
 &lt;p&gt;You can do this as follows: #+begin_src emacs-lisp (gptel-make-gh-copilot &quot;Copilot&quot; :host &quot;&lt;a href=&quot;http://api.business.githubcopilot.com&quot;&gt;api.business.githubcopilot.com&lt;/a&gt;&quot;) #+end_src&lt;/p&gt; 
 &lt;p&gt;You will be informed to login into =GitHub= as required. (You can also log in manually with =M-x gptel-gh-login=.)&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;claude-3.7-sonnet gptel-backend (gptel-make-gh-copilot &quot;Copilot&quot;)) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** AWS Bedrock #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-bedrock &quot;AWS&quot; ;; optionally enable streaming :stream t :region &quot;ap-northeast-1&quot; ;; subset of gptel--bedrock-models :models &#39;(claude-sonnet-4-20250514) ;; Model region for cross-region inference profiles. Required for models such ;; as Claude without on-demand throughput support. One of &#39;apac, &#39;eu or &#39;us. ;; &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-use.html&quot;&gt;https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-use.html&lt;/a&gt; :model-region &#39;apac) #+end_src&lt;/p&gt; 
 &lt;p&gt;AWS has numerous credential provisions; we follow this order precedence,&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;(argument) ~:aws-bearer-token~&lt;/li&gt; 
  &lt;li&gt;(env. variable) ~AWS_BEARER_TOKEN_BEDROCK~&lt;/li&gt; 
  &lt;li&gt;(argument) ~:aws-profile~ If this option is specified, the Bedrock-backend uses the shared AWS config and credentials files to obtain credentials based on the AWS Profile selected. If ~:aws-profile~ is set to the keyword ~:static~, the IAM credentials are imported without a profile argument.&lt;/li&gt; 
  &lt;li&gt;(env. varible) ~AWS_PROFILE~&lt;/li&gt; 
  &lt;li&gt;(env. varible) ~AWS_ACCESS_KEY_ID~, ~AWS_SECRET_ACCESS_KEY~ and ~AWS_SESSION_TOKEN~&lt;/li&gt; 
 &lt;/ul&gt; 
 &lt;p&gt;&lt;em&gt;NOTE:&lt;/em&gt; The Bedrock backend requires ~gptel-use-curl~ to be set to ~t~. When authenticating with an AWS profile or IAM credentials, =curl= computes a SigV4 signature and version 8.10 or newer is required (see [[&lt;a href=&quot;https://github.com/curl/curl/issues/11794&quot;&gt;https://github.com/curl/curl/issues/11794&lt;/a&gt;][curl issue #11794]]). Bearer token authentication does not have this requirement.&lt;/p&gt; 
 &lt;p&gt;You can pick this backend from the menu when using gptel (see [[#usage][Usage]]).&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Set as the default gptel backend&lt;/p&gt; 
 &lt;p&gt;The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; OPTIONAL configuration (setq gptel-model &#39;claude-sonnet-4-20250514 gptel-backend (gptel-make-bedrock &quot;AWS&quot; ;; optionally enable streaming :stream t ;; optionally specify the aws profile ;; :profile :region &quot;ap-northeast-1&quot; ;; subset of gptel--bedrock-models :models &#39;(claude-sonnet-4-20250514) ;; Model region for cross-region inference profiles. Required for models such ;; as Claude without on-demand throughput support. One of &#39;apac, &#39;eu or &#39;us. ;; &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-use.html&quot;&gt;https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-use.html&lt;/a&gt; :model-region &#39;apac)) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Moonshot (Kimi) #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Register a backend with&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-openai &quot;Moonshot&quot; :host &quot;&lt;a href=&quot;http://api.moonshot.cn&quot;&gt;api.moonshot.cn&lt;/a&gt;&quot; ;; or &quot;&lt;a href=&quot;http://api.moonshot.ai&quot;&gt;api.moonshot.ai&lt;/a&gt;&quot; for the global site :key &quot;your-api-key&quot; :stream t ;; optionally enable streaming :models &#39;(kimi-latest kimi-k2-0711-preview)) #+end_src&lt;/p&gt; 
 &lt;p&gt;See [[&lt;a href=&quot;https://platform.moonshot.ai/docs/pricing/chat&quot;&gt;https://platform.moonshot.ai/docs/pricing/chat&lt;/a&gt;][&lt;a href=&quot;http://Moonshot.ai&quot;&gt;Moonshot.ai&lt;/a&gt; document]] for a complete list of models.&lt;/p&gt; 
 &lt;p&gt;***** (Optional) Use the builtin search tool&lt;/p&gt; 
 &lt;p&gt;Moonshot supports a builtin search tool that does not requires the user to provide the tool implementation. To use that, you first need to define the tool and add to =gptel-tools= (while it does not requires the client to provide the search implementation, it does expects the client to reply a tool call message with its given argument, to be consistent with other tool calls):&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (setq gptel-tools (list (gptel-make-tool :name &quot;$web_search&quot; :function (lambda (&amp;amp;optional search_result) (json-serialize `(:search_result ,search_result))) :description &quot;Moonshot builtin web search. Only usable by moonshot model (kimi), ignore this if you are not.&quot; :args &#39;((:name &quot;search_result&quot; :type object :optional t)) :category &quot;web&quot;))) #+end_src&lt;/p&gt; 
 &lt;p&gt;Then you also need to add the tool declaration via =:request-params= because it needs a special =builtin_function= type:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-openai &quot;Moonshot&quot; :host &quot;&lt;a href=&quot;http://api.moonshot.cn&quot;&gt;api.moonshot.cn&lt;/a&gt;&quot; ;; or &quot;&lt;a href=&quot;http://api.moonshot.ai&quot;&gt;api.moonshot.ai&lt;/a&gt;&quot; for the global site :key &quot;your-api-key&quot; :stream t ;; optionally enable streaming :models &#39;(kimi-latest kimi-k2-0711-preview) :request-params &#39;(:tools [(:type &quot;builtin_function&quot; :function (:name &quot;$web_search&quot;))])) #+end_src&lt;/p&gt; 
 &lt;p&gt;Now the chat should be able to automatically use search. Try &quot;what&#39;s new today&quot; and you should expect the up-to-date news in response.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; ** Usage
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;gptel provides a few powerful, general purpose and flexible commands. You can dynamically tweak their behavior to the needs of your task with /directives/ (system prompts), redirection options and more. There is a [[&lt;a href=&quot;https://www.youtube.com/watch?v=bsRnh_brggM&quot;&gt;https://www.youtube.com/watch?v=bsRnh_brggM&lt;/a&gt;][video demo]] showing various uses of gptel -- but =gptel-send= might be all you need.&lt;/p&gt; 
&lt;p&gt;|-------------------+---------------------------------------------------------------------------------------------------| | &lt;em&gt;To send queries&lt;/em&gt; | Description | |-------------------+---------------------------------------------------------------------------------------------------| | =gptel-send= | Send all text up to =(point)=, or the selection if region is active. Works anywhere in Emacs. | | =gptel= | Create a new dedicated chat buffer. Not required to use gptel. | | =gptel-rewrite= | Rewrite, refactor or change the selected region. Can diff/ediff changes before merging/applying. | |-------------------+---------------------------------------------------------------------------------------------------|&lt;/p&gt; 
&lt;p&gt;|---------------------+---------------------------------------------------------------| | &lt;em&gt;To tweak behavior&lt;/em&gt; | | |---------------------+---------------------------------------------------------------| | =C-u= =gptel-send= | Transient menu for preferences, input/output redirection etc. | | =gptel-menu= | /(Same)/ | |---------------------+---------------------------------------------------------------|&lt;/p&gt; 
&lt;p&gt;|------------------+--------------------------------------------------------------------------------------------------------| | &lt;em&gt;To add context&lt;/em&gt; | | |------------------+--------------------------------------------------------------------------------------------------------| | =gptel-add= | Add/remove a region or buffer to gptel&#39;s context. In Dired, add/remove marked files. | | =gptel-add-file= | Add a file (text or supported media type) to gptel&#39;s context. Also available from the transient menu. | |------------------+--------------------------------------------------------------------------------------------------------|&lt;/p&gt; 
&lt;p&gt;|----------------------------+-----------------------------------------------------------------------------------------| | &lt;em&gt;Org mode bonuses&lt;/em&gt; | | |----------------------------+-----------------------------------------------------------------------------------------| | =gptel-org-set-topic= | Limit conversation context to an Org heading. (For branching conversations see below.) | | =gptel-org-set-properties= | Write gptel configuration as Org properties, for per-heading chat configuration. | |----------------------------+-----------------------------------------------------------------------------------------|&lt;/p&gt; 
&lt;p&gt;|----------------------------+-------------------------------------------------------------------------------------------| | &lt;em&gt;Oauth connections&lt;/em&gt; | | |----------------------------+-------------------------------------------------------------------------------------------| | =gptel-gh-login= | Authenticate with GitHub Copilot. (Automatically handled, but can be forced if required.) | | =gptel-openai-oauth-login= | Authenticate with OpenAI (Codex). (Automatically handled, but can be forced if required.) | |----------------------------+-------------------------------------------------------------------------------------------|&lt;/p&gt; 
&lt;p&gt;*** In any buffer:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;Call =M-x gptel-send= to send the text up to the cursor. The response will be inserted below. Continue the conversation by typing below the response.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;If a region is selected, the conversation will be limited to its contents.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Call =M-x gptel-send= with a prefix argument (~C-u~)&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;to set chat parameters (model, backend, system message etc) for this buffer,&lt;/li&gt; 
   &lt;li&gt;include quick instructions for the next request only,&lt;/li&gt; 
   &lt;li&gt;to add additional context -- regions, buffers or files -- to gptel,&lt;/li&gt; 
   &lt;li&gt;to read the prompt from or redirect the response elsewhere,&lt;/li&gt; 
   &lt;li&gt;or to replace the prompt with the response.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;#+html: &lt;img src=&quot;https://github.com/karthink/gptel/assets/8607532/3562a6e2-7a5c-4f7e-8e57-bf3c11589c73&quot; align=&quot;center&quot; alt=&quot;Image showing gptel&#39;s menu with some of the available query options.&quot; /&gt;&lt;/p&gt; 
&lt;hr /&gt; 
&lt;p&gt;You can use =gptel-highlight-mode= to highlight LLM responses in different ways:&lt;/p&gt; 
&lt;p&gt;#+html: &lt;img width=&quot;1226&quot; height=&quot;764&quot; alt=&quot;Image&quot; src=&quot;https://github.com/user-attachments/assets/1a3d5411-3cbc-41cf-b9fa-5089a1ffa096&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;You can also define a &quot;preset&quot; bundle of options that are applied together, see [[#option-presets][Option presets]] below.&lt;/p&gt; 
&lt;p&gt;*** In a dedicated chat buffer:&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Note&lt;/em&gt;: gptel works anywhere in Emacs. The dedicated chat buffer only adds some conveniences.&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;Run =M-x gptel= to start or switch to the chat buffer. It will ask you for the key if you skipped the previous step. Run it with a prefix-arg (=C-u M-x gptel=) to start a new session.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;In the gptel buffer, send your prompt with =M-x gptel-send=, bound to =C-c RET=.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Set chat parameters (LLM provider, model, system prompt etc) for the session by calling =gptel-send= with a prefix argument (=C-u C-c RET=):&lt;/p&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;#+html: &lt;img src=&quot;https://github.com/karthink/gptel/assets/8607532/eb4867e5-30ac-455f-999f-e17123afb810&quot; align=&quot;center&quot; alt=&quot;Image showing gptel&#39;s menu with some of the available query options.&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;That&#39;s it. You can go back and edit previous prompts and responses if you want.&lt;/p&gt; 
&lt;p&gt;The default mode is =markdown-mode= if available, else =text-mode=. You can set =gptel-default-mode= to =org-mode= if desired.&lt;/p&gt; 
&lt;p&gt;You can use =gptel-highlight-mode= to highlight LLM responses in different ways.&lt;/p&gt; 
&lt;p&gt;You can also define a &quot;preset&quot; bundle of options that are applied together, see [[#option-presets][Option presets]] below.&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;details&gt;
 &lt;summary&gt; **** Including media (images, documents or plain-text files) with requests #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;gptel supports sending media in Markdown and Org chat buffers, but this feature is disabled by default.&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;You can enable it globally, for all models that support it, by setting =gptel-track-media=.&lt;/li&gt; 
  &lt;li&gt;Or you can set it locally, just for the chat buffer, via the header line or gptel&#39;s transient menu:&lt;/li&gt; 
 &lt;/ul&gt; 
 &lt;p&gt;#+html: &lt;img src=&quot;https://github.com/user-attachments/assets/91f6aaab-2ea4-4806-9cc9-39b4b46a8e6c&quot; align=&quot;center&quot; alt=&quot;Image showing a gptel chat buffer&#39;s header line with the button to toggle media support&quot; /&gt;&lt;/p&gt; 
 &lt;hr /&gt; 
 &lt;p&gt;There are two ways to include media or plain-text files with requests:&lt;/p&gt; 
 &lt;ol&gt; 
  &lt;li&gt; &lt;p&gt;Add files to gptel&#39;s context with =gptel-add-file=, described further below.&lt;/p&gt; &lt;/li&gt; 
  &lt;li&gt; &lt;p&gt;Include links to media in chat buffers. gptel will annotate the link to indicate that the linked files will be sent along with the prompt. If a link cannot be sent for some reason, that will be indicated too, and the reason will be shown in a tooltip:&lt;/p&gt; &lt;/li&gt; 
 &lt;/ol&gt; 
 &lt;p&gt;#+html: &lt;img width=&quot;848&quot; height=&quot;336&quot; alt=&quot;Image showing a gptel chat buffer with annotated links, two of which are marked with SEND.  A third link will not be sent, and the echo area contains an explanation for why.&quot; src=&quot;https://github.com/user-attachments/assets/00fd0187-f964-4f55-a392-0a1562bb9118&quot; align=&quot;center&quot; /&gt;&lt;/p&gt; 
 &lt;p&gt;Most ways of specifying links to files/URLs are respected by gptel:&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;In Markdown mode: 
   &lt;ul&gt; 
    &lt;li&gt;=[](file:///path/to/file.txt)= and =&lt;a href=&quot;https://raw.githubusercontent.com/karthink/gptel/master/path/to/file.txt&quot;&gt;&lt;/a&gt;=&lt;/li&gt; 
    &lt;li&gt;=[Description](file:///path/to/file.txt)= and =&lt;a href=&quot;https://raw.githubusercontent.com/karthink/gptel/master/path/to/file.txt&quot;&gt;Description&lt;/a&gt;=&lt;/li&gt; 
    &lt;li&gt;=&amp;lt;file:///path/to/file.txt&amp;gt;= &quot;Plain&quot; links of the form =file:///path/to/file.txt= will not be recognized.&lt;/li&gt; 
   &lt;/ul&gt; &lt;/li&gt; 
  &lt;li&gt;In Org mode: 
   &lt;ul&gt; 
    &lt;li&gt;=[[file:/path/to/file.txt]]=&lt;/li&gt; 
    &lt;li&gt;=[[file:/path/to/file.txt][Description]]=&lt;/li&gt; 
    &lt;li&gt;=&amp;lt;file:/path/to/file.txt&amp;gt;=&lt;/li&gt; 
    &lt;li&gt;=[[attachment:data.txt]]= &quot;Plain&quot; links of the form =file:/path/to/file.txt= will not be recognized.&lt;/li&gt; 
   &lt;/ul&gt; &lt;/li&gt; 
 &lt;/ul&gt; 
 &lt;p&gt;Support for custom Org link types is planned.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Save and restore your chat sessions #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Saving the file will save the state of the conversation as well. To resume the chat, open the file and turn on =gptel-mode= before editing the buffer.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; *** Setting options (backend, model, request parameters, system prompts and more)
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;Most gptel options can be set from gptel&#39;s transient menu, available by calling =gptel-send= with a prefix-argument, or via =gptel-menu=. To change their default values in your configuration, see [[#additional-configuration][Additional Configuration]]. Chat buffer-specific options are also available via the header-line in chat buffers.&lt;/p&gt; 
&lt;h1&gt;TODO Remove this when writing the manual.&lt;/h1&gt; 
&lt;p&gt;Selecting a model and backend can be done interactively via the =-m= command of =gptel-menu=. Available registered models are prefixed by the name of their backend with a string like =ChatGPT:gpt-4o-mini=, where =ChatGPT= is the backend name you used to register it and =gpt-4o-mini= is the name of the model.&lt;/p&gt; 
&lt;p&gt;*** Include more context with requests :PROPERTIES: :CUSTOM_ID: include-context :END:&lt;/p&gt; 
&lt;p&gt;By default, gptel will query the LLM with the active region or the buffer contents up to the cursor. Often it can be helpful to provide the LLM with additional context from outside the current buffer. For example, when you&#39;re in a chat buffer but want to ask questions about a (possibly changing) code buffer and auxiliary project files.&lt;/p&gt; 
&lt;p&gt;You can include additional text regions, buffers or files with gptel&#39;s queries in two ways. The first is via links in chat buffers, as described above (see &quot;Including media with requests&quot;).&lt;/p&gt; 
&lt;p&gt;The second is globally via dedicated context commands: you can add a selected region, buffer or file to gptel&#39;s context from the menu, or call =gptel-add=. To add a file use =gptel-add= in Dired, or use the dedicated =gptel-add-file= command. Directories will have their files added recursively after prompting for confirmation.&lt;/p&gt; 
&lt;p&gt;This additional context is &quot;live&quot; and not a snapshot. Once added, the regions, buffers or files are scanned and included at the time of each query. When using multi-modal models, added files can be of any supported type -- typically images.&lt;/p&gt; 
&lt;p&gt;You can examine the active context from the menu: #+html: &amp;lt;img src=&quot;&lt;a href=&quot;https://github.com/karthink/gptel/assets/8607532/63cd7fc8-6b3e-42ae-b6ca-06ff935bae9c&quot;&gt;https://github.com/karthink/gptel/assets/8607532/63cd7fc8-6b3e-42ae-b6ca-06ff935bae9c&lt;/a&gt;&quot; align=&quot;center&quot; alt=&quot;Image showing gptel&#39;s menu with the &quot;inspect context&quot; command.&quot;&amp;gt;&lt;/p&gt; 
&lt;p&gt;And then browse through or remove context from the context buffer: #+html: &lt;img src=&quot;https://github.com/karthink/gptel/assets/8607532/79a5ffe8-3d63-4bf7-9bf6-0457ab61bf2a&quot; align=&quot;center&quot; alt=&quot;Image showing gptel&#39;s context buffer.&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;By default, files in a version control system that are not project files (&quot;gitignored&quot; files) will not be added to the context. To be able to add these files, set =gptel-context-restrict-to-project-files= to =nil=. Note that remote files are always included, regardless of the value of =gptel-context-restrict-to-project-files=.&lt;/p&gt; 
&lt;p&gt;*** Handle &quot;reasoning&quot; content&lt;/p&gt; 
&lt;p&gt;Some LLMs include in their response a &quot;thinking&quot; or &quot;reasoning&quot; block. This text improves the quality of the LLM’s final output, but may not be interesting to you by itself. You can decide how you would like this &quot;reasoning&quot; content to be handled by gptel by setting the user option =gptel-include-reasoning=. You can include it in the LLM response (the default), omit it entirely, include it in the buffer but ignore it on subsequent conversation turns, or redirect it to another buffer. As with most options, you can specify this behavior from gptel&#39;s transient menu globally, buffer-locally or for the next request only.&lt;/p&gt; 
&lt;p&gt;When included with the response, reasoning content will be delimited by Org blocks or markdown backticks.&lt;/p&gt; 
&lt;p&gt;*** Tool use&lt;/p&gt; 
&lt;p&gt;gptel can provide the LLM with client-side elisp &quot;tools&quot;, or function specifications, along with the request. If the LLM decides to run the tool, it supplies the tool call arguments, which gptel uses to run the tool in your Emacs session. The result is optionally returned to the LLM to complete the task.&lt;/p&gt; 
&lt;p&gt;This exchange can be used to equip the LLM with capabilities or knowledge beyond what is available out of the box -- for instance, you can get the LLM to control your Emacs frame, create or modify files and directories, or look up information relevant to your request via web search or in a local database. Here is a very simple example:&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt; &lt;a href=&quot;https://github.com/user-attachments/assets/d1f8e2ac-62bb-49bc-850d-0a67aa0cd4c3&quot;&gt;https://github.com/user-attachments/assets/d1f8e2ac-62bb-49bc-850d-0a67aa0cd4c3&lt;/a&gt; #+html: &lt;/p&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;To use tools in gptel, you need&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;a model that supports this usage. All the flagship models support tool use, as do many of the smaller open models.&lt;/li&gt; 
 &lt;li&gt;Tool specifications that gptel understands. gptel does not currently include any tools out of the box.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;details&gt;
 &lt;summary&gt; **** Defining gptel tools #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Defining a gptel tool requires an elisp function and associated metadata. Here are two simple tool definitions:&lt;/p&gt; 
 &lt;p&gt;&lt;em&gt;To read the contents of an Emacs buffer&lt;/em&gt;:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-tool :name &quot;read_buffer&quot; ; javascript-style snake_case name :function (lambda (buffer) ; the function that will run (unless (buffer-live-p (get-buffer buffer)) (error &quot;error: buffer %s is not live.&quot; buffer)) (with-current-buffer buffer (buffer-substring-no-properties (point-min) (point-max)))) :description &quot;return the contents of an emacs buffer&quot; :args (list &#39;(:name &quot;buffer&quot; :type string ; :type value must be a symbol :description &quot;the name of the buffer whose contents are to be retrieved&quot;)) :category &quot;emacs&quot;) ; An arbitrary label for grouping #+end_src&lt;/p&gt; 
 &lt;p&gt;Besides the function itself, which can be named or anonymous (as above), the tool specification requires a =:name=, =:description= and a list of argument specifications in =:args=. Each argument specification is a plist with atleast the keys =:name=, =:type= and =:description=.&lt;/p&gt; 
 &lt;p&gt;&lt;em&gt;To create a text file&lt;/em&gt;:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (gptel-make-tool :name &quot;create_file&quot; ; javascript-style snake_case name :function (lambda (path filename content) ; the function that runs (let ((full-path (expand-file-name filename path))) (with-temp-buffer (insert content) (write-file full-path)) (format &quot;Created file %s in %s&quot; filename path))) :description &quot;Create a new file with the specified content&quot; :args (list &#39;(:name &quot;path&quot; ; a list of argument specifications :type string :description &quot;The directory where to create the file&quot;) &#39;(:name &quot;filename&quot; :type string :description &quot;The name of the file to create&quot;) &#39;(:name &quot;content&quot; :type string :description &quot;The content to write to the file&quot;)) :category &quot;filesystem&quot;) ; An arbitrary label for grouping #+end_src&lt;/p&gt; 
 &lt;p&gt;With some prompting, you can get an LLM to write these tools for you.&lt;/p&gt; 
 &lt;p&gt;Tools can also be asynchronous, use optional arguments and arguments with more structure (enums, arrays, objects etc). See =gptel-make-tool= for details.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Selecting tools #+html: &lt;/summary&gt; Once defined, tools can be selected (globally, buffer-locally or for the next request only) from gptel&#39;s transient menu:
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;img src=&quot;https://github.com/user-attachments/assets/fd878596-b313-4385-b675-3d6546909d8b&quot; align=&quot;center&quot; alt=&quot;Image showing gptel&#39;s tool selection menu.&quot; /&gt;&lt;/p&gt; 
 &lt;p&gt;From here you can also require confirmation for all tool calls, and decide if tool call results should be included in the LLM response.&lt;/p&gt; 
 &lt;p&gt;Alternatively, you can add/remove tools via&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;Elisp, see [[#additional-configuration][Additional Configuration]].&lt;/li&gt; 
  &lt;li&gt;gptel presets, see [[#option-presets][Option presets]].&lt;/li&gt; 
 &lt;/ul&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** LLM tool collections #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;The following repositories provide collections of tools written by gptel users.&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;[[&lt;a href=&quot;https://github.com/skissue/llm-tool-collection&quot;&gt;https://github.com/skissue/llm-tool-collection&lt;/a&gt;][llm-tool-collection]] :: A community collection of tools for use with LLM clients in Emacs. Includes LLM tools for interacting with files, Emacs buffers and running system commands.&lt;/li&gt; 
  &lt;li&gt;[[&lt;a href=&quot;https://github.com/karthink/gptel-agent&quot;&gt;https://github.com/karthink/gptel-agent&lt;/a&gt;][gptel-agent]] :: A collection of tools meant for agentic LLM use. Includes tools for filesystem access and manipulation, running Bash commands, Emacs introspection and Elisp evaluation, web search and YouTube.&lt;/li&gt; 
  &lt;li&gt;[[&lt;a href=&quot;https://github.com/ultronozm/codel.el&quot;&gt;https://github.com/ultronozm/codel.el&lt;/a&gt;][codel.el]] :: A collection of code editing tools.&lt;/li&gt; 
  &lt;li&gt;[[&lt;a href=&quot;https://codeberg.org/bajsicki/gptel-org-tools&quot;&gt;https://codeberg.org/bajsicki/gptel-org-tools&lt;/a&gt;][gptel-org-tools]] :: Tools for interacting with Org files.&lt;/li&gt; 
  &lt;li&gt;[[&lt;a href=&quot;https://github.com/positron-solutions/ragmacs&quot;&gt;https://github.com/positron-solutions/ragmacs&lt;/a&gt;][ragmacs]] :: A collection of tools for Emacs introspection.&lt;/li&gt; 
  &lt;li&gt;[[&lt;a href=&quot;https://github.com/munen/emacs.d?tab=readme-ov-file#tool-use&quot;&gt;https://github.com/munen/emacs.d?tab=readme-ov-file#tool-use&lt;/a&gt;][Alain Lafon’s tool collection]]&lt;/li&gt; 
 &lt;/ul&gt; 
 &lt;p&gt;Additionally, the [[&lt;a href=&quot;https://github.com/karthink/gptel/wiki/Tools-collection&quot;&gt;https://github.com/karthink/gptel/wiki/Tools-collection&lt;/a&gt;][wiki has some examples]] of common tools. These are not maintained, but might serve instructional when writing custom tools.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Model Context Protocol (MCP) integration #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;The [[&lt;a href=&quot;https://modelcontextprotocol.io/introduction&quot;&gt;https://modelcontextprotocol.io/introduction&lt;/a&gt;][Model Context Protocol]] (MCP) is a protocol for providing resources and tools to LLMs, and [[&lt;a href=&quot;https://github.com/appcypher/awesome-mcp-servers&quot;&gt;https://github.com/appcypher/awesome-mcp-servers&lt;/a&gt;][many MCP servers exist]] that provide LLM tools for file access, database connections, API integrations etc. The [[mcp.el]] package for Emacs can act as an MCP client and manage these tool calls for gptel.&lt;/p&gt; 
 &lt;p&gt;To use MCP servers with gptel, you thus need three pieces:&lt;/p&gt; 
 &lt;ol&gt; 
  &lt;li&gt;The [[&lt;a href=&quot;https://github.com/lizqwerscott/mcp.el&quot;&gt;https://github.com/lizqwerscott/mcp.el&lt;/a&gt;][mcp.el]] package for Emacs, [[&lt;a href=&quot;https://melpa.org/#/mcp&quot;&gt;https://melpa.org/#/mcp&lt;/a&gt;][available on MELPA]].&lt;/li&gt; 
  &lt;li&gt;MCP servers configured for and running via mcp.el.&lt;/li&gt; 
  &lt;li&gt;gptel and access to an LLM&lt;/li&gt; 
 &lt;/ol&gt; 
 &lt;p&gt;gptel includes =gptel-integrations=, a small library to make this more convenient. This library is not automatically loaded by gptel, so if you would like to use it you have to require it:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (require &#39;gptel-integrations) #+end_src&lt;/p&gt; 
 &lt;p&gt;Once loaded, you can run the =gptel-mcp-connect= and =gptel-mcp-disconnect= commands to register and unregister MCP-provided tools in gptel. These will also show up in the tools menu in gptel, accessed via =M-x gptel-menu= or =M-x gptel-tools=:&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;img src=&quot;https://github.com/user-attachments/assets/2cbbf8a0-49c7-49a5-ba24-514ad7e08799&quot; align=&quot;center&quot; alt=&quot;Image showing MCP tool registration commands in gptel&#39;s tool selection menu.&quot; /&gt;&lt;/p&gt; 
 &lt;p&gt;MCP-provided tools can be used as normal with gptel. Here is a screencast of the process. (In this example the &quot;github&quot; MCP server is installed separately using npm.)&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
 &lt;p align=&quot;center&quot;&gt; &lt;a href=&quot;https://github.com/user-attachments/assets/f3ea7ac0-a322-4a59-b5b2-b3f592554f8a&quot;&gt;https://github.com/user-attachments/assets/f3ea7ac0-a322-4a59-b5b2-b3f592554f8a&lt;/a&gt; #+html: &lt;/p&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Here&#39;s an example of using these tools:&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
 &lt;p align=&quot;center&quot;&gt; &lt;a href=&quot;https://github.com/user-attachments/assets/b48a6a24-a130-4da7-a2ee-6ea568e10c85&quot;&gt;https://github.com/user-attachments/assets/b48a6a24-a130-4da7-a2ee-6ea568e10c85&lt;/a&gt; #+html: &lt;/p&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;*** Rewrite, refactor or fill in a region&lt;/p&gt; 
&lt;p&gt;In any buffer: with a region selected, you can modify text, rewrite prose or refactor code with =gptel-rewrite=. Example with prose:&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt; &lt;a href=&quot;https://github.com/user-attachments/assets/e3b436b3-9bde-4c1f-b2ce-3f7df1984933&quot;&gt;https://github.com/user-attachments/assets/e3b436b3-9bde-4c1f-b2ce-3f7df1984933&lt;/a&gt; #+html: &lt;/p&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;The result is previewed over the original text. By default, the buffer is not modified.&lt;/p&gt; 
&lt;p&gt;Pressing =RET= or clicking in the rewritten region should give you a list of options: you can &lt;em&gt;iterate&lt;/em&gt; on, &lt;em&gt;diff&lt;/em&gt;, &lt;em&gt;ediff&lt;/em&gt;, &lt;em&gt;merge&lt;/em&gt; or &lt;em&gt;accept&lt;/em&gt; the replacement. Example with code:&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt; &lt;a href=&quot;https://github.com/user-attachments/assets/4067fdb8-85d3-4264-9b64-d727353f68f9&quot;&gt;https://github.com/user-attachments/assets/4067fdb8-85d3-4264-9b64-d727353f68f9&lt;/a&gt; #+html: &lt;/p&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Acting on the LLM response&lt;/em&gt;:&lt;/p&gt; 
&lt;p&gt;If you would like one of these things to happen automatically, you can customize =gptel-rewrite-default-action=.&lt;/p&gt; 
&lt;p&gt;These options are also available from =gptel-rewrite=:&lt;/p&gt; 
&lt;p&gt;#+html: &lt;img src=&quot;https://github.com/user-attachments/assets/589785b9-aa3f-414a-98dd-d26b7509de08&quot; align=&quot;center&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;And you can call them directly when the cursor is in the rewritten region:&lt;/p&gt; 
&lt;p&gt;#+html: &lt;img src=&quot;https://github.com/user-attachments/assets/f5b3ca47-e146-45fe-8584-f11035fa4dbc&quot; align=&quot;center&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;*** Extra Org mode conveniences&lt;/p&gt; 
&lt;p&gt;gptel offers a few extra conveniences in Org mode.&lt;/p&gt; 
&lt;p&gt;***** Limit conversation context to an Org heading&lt;/p&gt; 
&lt;p&gt;You can limit the conversation context to an Org heading with the command =gptel-org-set-topic=.&lt;/p&gt; 
&lt;p&gt;(This sets an Org property (=GPTEL_TOPIC=) under the heading. You can also add this property manually instead.)&lt;/p&gt; 
&lt;p&gt;***** Use branching context in Org mode (tree of conversations)&lt;/p&gt; 
&lt;p&gt;You can have branching conversations in Org mode, where each hierarchical outline path through the document is a separate conversation branch. This is also useful for limiting the context size of each query. See the variable =gptel-org-branching-context=.&lt;/p&gt; 
&lt;p&gt;If this variable is non-nil, you should probably edit =gptel-prompt-prefix-alist= and =gptel-response-prefix-alist= so that the prefix strings for org-mode are not Org headings, e.g.&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setf (alist-get &#39;org-mode gptel-prompt-prefix-alist) &quot;@user\n&quot;) (setf (alist-get &#39;org-mode gptel-response-prefix-alist) &quot;@assistant\n&quot;) #+end_src&lt;/p&gt; 
&lt;p&gt;Otherwise, the default prompt prefix will make successive prompts sibling headings, and therefore on different conversation branches, which probably isn&#39;t what you want.&lt;/p&gt; 
&lt;p&gt;Note: using this option requires Org 9.7 or higher to be available. The [[&lt;a href=&quot;https://github.com/ultronozm/ai-org-chat.el&quot;&gt;https://github.com/ultronozm/ai-org-chat.el&lt;/a&gt;][ai-org-chat]] package uses gptel to provide this branching conversation behavior for older versions of Org.&lt;/p&gt; 
&lt;p&gt;***** Save gptel parameters to Org headings (reproducible chats)&lt;/p&gt; 
&lt;p&gt;You can declare the gptel model, backend, temperature, system message and other parameters as Org properties with the command =gptel-org-set-properties=. gptel queries under the corresponding heading will always use these settings, allowing you to create mostly reproducible LLM chat notebooks, and to have simultaneous chats with different models, model settings and directives (system prompts) under different Org headings.&lt;/p&gt; 
&lt;p&gt;*** Introspection (examine, debug or modify requests)&lt;/p&gt; 
&lt;p&gt;Set =gptel-expert-commands= to =t= to display additional options in gptel&#39;s transient menu. #+html: &lt;img width=&quot;800&quot; height=&quot;403&quot; alt=&quot;Image&quot; src=&quot;https://github.com/user-attachments/assets/636ff77c-73d9-449b-9d49-bb792d8abd45&quot; align=&quot;center&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Examining prompts&lt;/em&gt;: you can examine and edit gptel request payloads before sending them.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Pick one of the &quot;dry run&quot; options in the menu to produce a buffer containing the request payload.&lt;/li&gt; 
 &lt;li&gt;You can edit this buffer as you would like and send the request.&lt;/li&gt; 
 &lt;li&gt;You can also copy a Curl command corresponding to the request and invoke it from the shell.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;Examining responses&lt;/em&gt;: You can turn on logging to examine the full response from an LLM.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Set =gptel-log-level= to =info= or =debug=.&lt;/li&gt; 
 &lt;li&gt;Send a request.&lt;/li&gt; 
 &lt;li&gt;Open the log buffer from gptel&#39;s transient menu, or switch to the =&lt;em&gt;gptel-log&lt;/em&gt;= buffer.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** FAQ *** Chat buffer UI #+html: &lt;/p&gt;
&lt;details&gt;
 &lt;summary&gt; **** I want the window to scroll automatically as the response is inserted #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;To be minimally annoying, gptel does not move the cursor by default. Add the following to your configuration to enable auto-scrolling.&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (add-hook &#39;gptel-post-stream-hook &#39;gptel-auto-scroll) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** I want the cursor to move to the next prompt after the response is inserted #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;To be minimally annoying, gptel does not move the cursor by default. Add the following to your configuration to move the cursor:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp (add-hook &#39;gptel-post-response-functions &#39;gptel-end-of-response) #+end_src&lt;/p&gt; 
 &lt;p&gt;You can also call =gptel-end-of-response= as a command at any time.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** I want to change the formatting of the prompt and LLM response #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Anywhere in Emacs: Turn on =gptel-highlight-mode=. See its documentation for customization options.&lt;/p&gt; 
 &lt;p&gt;In dedicated chat buffers: you can additionally customize =gptel-prompt-prefix-alist= and =gptel-response-prefix-alist=, which are prefixes inserted before the prompt and response. You can set a different pair for each major-mode.&lt;/p&gt; 
 &lt;p&gt;For more custom formatting, use =gptel-pre-response-hook= and =gptel-post-response-functions=.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** How does gptel distinguish between user prompts and LLM responses? #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;gptel uses [[&lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/elisp/Text-Properties.html&quot;&gt;https://www.gnu.org/software/emacs/manual/html_node/elisp/Text-Properties.html&lt;/a&gt;][text-properties]] to watermark LLM responses. Thus this text is interpreted as a response even if you copy it into another buffer. In regular buffers (buffers without =gptel-mode= enabled), you can turn off this tracking by unsetting =gptel-track-response=.&lt;/p&gt; 
 &lt;p&gt;When restoring a chat state from a file on disk, gptel will apply these properties from saved metadata in the file when you turn on =gptel-mode=.&lt;/p&gt; 
 &lt;p&gt;gptel does /not/ use any prefix or semantic/syntax element in the buffer (such as headings) to separate prompts and responses. The reason for this is that gptel aims to integrate as seamlessly as possible into your regular Emacs usage: LLM interaction is not the objective, it&#39;s just another tool at your disposal. So requiring a bunch of &quot;user&quot; and &quot;assistant&quot; tags in the buffer is noisy and restrictive. If you want these demarcations, you can customize =gptel-prompt-prefix-alist= and =gptel-response-prefix-alist=. Note that these prefixes are for your readability only and purely cosmetic.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; *** Transient menu behavior #+html: 
&lt;details&gt;
 &lt;summary&gt; **** I want to set gptel options but only for this buffer :PROPERTIES: :ID: 748cbc00-0c92-4705-8839-619b2c80e566 :END: #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;In every menu used to set options, gptel provides a &quot;scope&quot; option, bound to the ~=~ key:&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;img src=&quot;https://github.com/user-attachments/assets/f9904134-2905-4b1d-ad37-b64c777af8ac&quot; align=&quot;center&quot; /&gt;&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;img src=&quot;https://github.com/user-attachments/assets/c0950035-bf65-43ae-b649-8e3b651ce3f1&quot; align=&quot;center&quot; /&gt;&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;img src=&quot;https://github.com/user-attachments/assets/fa3b1246-e00f-4c5e-88c7-46557b3507ef&quot; align=&quot;center&quot; /&gt;&lt;/p&gt; 
 &lt;p&gt;You can flip this switch before setting the option to =buffer= or =oneshot=. You only need to flip this switch once, it&#39;s a persistent setting. =buffer= sets the option buffer-locally, =oneshot= will set it for the next gptel request only. The default scope is global.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** I want the transient menu options to be saved so I only need to set them once #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Any model options you set are saved according to the scope (see previous question). But the redirection options in the menu are set for the next query only:&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;img src=&quot;https://github.com/karthink/gptel/assets/8607532/2ecc6be9-aa52-4287-a739-ba06e1369ec2&quot; alt=&quot;https://github.com/karthink/gptel/assets/8607532/2ecc6be9-aa52-4287-a739-ba06e1369ec2&quot; /&gt;&lt;/p&gt; 
 &lt;p&gt;You can make them persistent across this Emacs session by pressing ~C-x C-s~:&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;img src=&quot;https://github.com/karthink/gptel/assets/8607532/b8bcb6ad-c974-41e1-9336-fdba0098a2fe&quot; alt=&quot;https://github.com/karthink/gptel/assets/8607532/b8bcb6ad-c974-41e1-9336-fdba0098a2fe&quot; /&gt;&lt;/p&gt; 
 &lt;p&gt;(You can also cycle through presets you&#39;ve saved with ~C-x p~ and ~C-x n~.)&lt;/p&gt; 
 &lt;p&gt;Now these will be enabled whenever you send a query from the transient menu. If you want to use these saved options without invoking the transient menu, you can use a keyboard macro:&lt;/p&gt; 
 &lt;p&gt;#+begin_src emacs-lisp ;; Replace with your key to invoke the transient menu: (keymap-global-set &quot;
  &lt;f6&gt;
   &quot; &quot;C-u C-c 
   &lt;return&gt; 
    &lt;return&gt;
     &quot;) #+end_src
    &lt;/return&gt;
   &lt;/return&gt;
  &lt;/f6&gt;&lt;/p&gt; 
 &lt;p&gt;Or see this [[&lt;a href=&quot;https://github.com/karthink/gptel/wiki/Commonly-requested-features#save-transient-flags&quot;&gt;https://github.com/karthink/gptel/wiki/Commonly-requested-features#save-transient-flags&lt;/a&gt;][wiki entry]].&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Using the transient menu leaves behind extra windows #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;If using gptel&#39;s transient menus causes new/extra window splits to be created, check your value of =transient-display-buffer-action=. [[&lt;a href=&quot;https://github.com/magit/transient/discussions/358&quot;&gt;https://github.com/magit/transient/discussions/358&lt;/a&gt;][See this discussion]] for more context.&lt;/p&gt; 
 &lt;p&gt;If you are using Helm, see [[&lt;a href=&quot;https://github.com/magit/transient/discussions/361&quot;&gt;https://github.com/magit/transient/discussions/361&lt;/a&gt;][Transient#361]].&lt;/p&gt; 
 &lt;p&gt;In general, do not customize this Transient option unless you know what you&#39;re doing!&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Can I change the transient menu key bindings? #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Yes, see =transient-suffix-put=. This changes the key to select a backend/model from &quot;-m&quot; to &quot;M&quot; in gptel&#39;s menu: #+begin_src emacs-lisp (transient-suffix-put &#39;gptel-menu (kbd &quot;-m&quot;) :key &quot;M&quot;) #+end_src&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** (Doom Emacs) Sending a query from the gptel menu fails because of a key conflict with Org mode #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Doom binds ~RET~ in Org mode to =+org/dwim-at-point=, which appears to conflict with gptel&#39;s transient menu bindings for some reason.&lt;/p&gt; 
 &lt;p&gt;Two solutions:&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;Press ~C-m~ instead of the return key.&lt;/li&gt; 
  &lt;li&gt;Change the send key from return to a key of your choice: #+begin_src emacs-lisp (transient-suffix-put &#39;gptel-menu (kbd &quot;RET&quot;) :key &quot;
   &lt;f8&gt;
    &quot;) #+end_src
   &lt;/f8&gt;&lt;/li&gt; 
 &lt;/ul&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; *** Miscellaneous #+html: 
&lt;details&gt;
 &lt;summary&gt; **** I want to use gptel in a way that&#39;s not supported by =gptel-send= or the options menu #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;gptel&#39;s default usage pattern is simple, and will stay this way: Read input in any buffer and insert the response below it. Some custom behavior is possible with the transient menu (=C-u M-x gptel-send=).&lt;/p&gt; 
 &lt;p&gt;For more programmable usage, gptel provides a general =gptel-request= function that accepts a custom prompt and a callback to act on the response. You can use this to build custom workflows not supported by =gptel-send=. See the documentation of =gptel-request=, and the [[&lt;a href=&quot;https://github.com/karthink/gptel/wiki/Defining-custom-gptel-commands&quot;&gt;https://github.com/karthink/gptel/wiki/Defining-custom-gptel-commands&lt;/a&gt;][wiki]] for examples.&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** (ChatGPT) I get the error &quot;(HTTP/2 429) You exceeded your current quota&quot; #+html:&lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;#+begin_quote (HTTP/2 429) You exceeded your current quota, please check your plan and billing details. #+end_quote&lt;/p&gt; 
 &lt;p&gt;Using the ChatGPT (or any OpenAI) API requires [[&lt;a href=&quot;https://platform.openai.com/account/billing/overview&quot;&gt;https://platform.openai.com/account/billing/overview&lt;/a&gt;][adding credit to your account]].&lt;/p&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt; #+html: 
&lt;details&gt;
 &lt;summary&gt; **** Why another LLM client? #+html: &lt;/summary&gt;
 &lt;p&gt;&lt;/p&gt; 
 &lt;p&gt;Other Emacs clients for LLMs prescribe the format of the interaction (a comint shell, org-babel blocks, etc). I wanted:&lt;/p&gt; 
 &lt;ol&gt; 
  &lt;li&gt;Something that is as free-form as possible: query the model using any text in any buffer, and redirect the response as required. Using a dedicated =gptel= buffer just adds some visual flair to the interaction.&lt;/li&gt; 
  &lt;li&gt;Integration with org-mode, not using a walled-off org-babel block, but as regular text. This way the model can generate code blocks that I can run.&lt;/li&gt; 
 &lt;/ol&gt; 
 &lt;p&gt;#+html: &lt;/p&gt;
&lt;/details&gt;
&lt;p&gt;&lt;/p&gt; 
&lt;p&gt;** Additional Configuration :PROPERTIES: :ID: f885adac-58a3-4eba-a6b7-91e9e7a17829 :END: #+html: &lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp :exports none :results list (let ((all)) (mapatoms (lambda (sym) (when (and (string-match-p &quot;^gptel-[^-]&quot; (symbol-name sym)) (get sym &#39;variable-documentation)) (push sym all)))) all) #+end_src&lt;/p&gt; 
&lt;p&gt;|-------------------------+--------------------------------------------------------------------| | &lt;em&gt;Connection options&lt;/em&gt; | | |-------------------------+--------------------------------------------------------------------| | =gptel-use-curl= | Use Curl? (default), fallback to Emacs&#39; built-in =url=. | | | You can also specify the Curl path here. | | =gptel-proxy= | Proxy server for requests, passed to curl via =--proxy=. | | =gptel-curl-extra-args= | Extra arguments passed to Curl. | | =gptel-api-key= | Variable/function that returns the API key for the active backend. | |-------------------------+--------------------------------------------------------------------|&lt;/p&gt; 
&lt;p&gt;|-----------------------+---------------------------------------------------------| | &lt;em&gt;LLM request options&lt;/em&gt; | /(Note: not supported uniformly across LLMs)/ | |-----------------------+---------------------------------------------------------| | =gptel-backend= | Default LLM Backend. | | =gptel-model= | Default model to use, depends on the backend. | | =gptel-stream= | Enable streaming responses, if the backend supports it. | | =gptel-system-prompt= | Default system prompt used by gptel, can be a function. | | =gptel-directives= | Alist of system prompts, can switch on the fly. | | =gptel-max-tokens= | Maximum token count (in query + response). | | =gptel-temperature= | Randomness in response text, 0 to 2. | | =gptel-cache= | Cache prompts, system message or tools (Anthropic only) | | =gptel-use-context= | How/whether to include additional context | | =gptel-context= | List of context sources (files/buffers) for queries | | =gptel-use-tools= | Disable, allow or force LLM tool-use | | =gptel-tools= | List of tools to include with requests | |-----------------------+---------------------------------------------------------|&lt;/p&gt; 
&lt;p&gt;|--------------------------------+----------------------------------------------------------------| | &lt;em&gt;Chat UI options&lt;/em&gt; | | |--------------------------------+----------------------------------------------------------------| | =gptel-default-mode= | Major mode for dedicated chat buffers. | | =gptel-highlight-methods= | Response highlighting used by =gptel-highlight-mode= | | =gptel-prompt-prefix-alist= | Text inserted before queries. | | =gptel-response-prefix-alist= | Text inserted before responses. | | =gptel-track-response= | Distinguish between user messages and LLM responses? | | =gptel-track-media= | Send text, images or other media from links? | | =gptel-markdown-validate-link= | Function to validate links to include with queries | | =gptel-confirm-tool-calls= | Confirm all tool calls? | | =gptel-include-tool-results= | Include tool results in the LLM response? | | =gptel-use-header-line= | Display status messages in header-line (default) or minibuffer | | =gptel-display-buffer-action= | Placement of the gptel chat buffer. | |--------------------------------+----------------------------------------------------------------|&lt;/p&gt; 
&lt;p&gt;|-------------------------------+-------------------------------------------------------| | &lt;em&gt;Org mode UI options&lt;/em&gt; | | |-------------------------------+-------------------------------------------------------| | =gptel-org-branching-context= | Make each outline path a separate conversation branch | | =gptel-org-ignore-elements= | Ignore parts of the buffer when sending a query | | =gptel-org-validate-link= | Function to validate links to include with queries | |-------------------------------+-------------------------------------------------------|&lt;/p&gt; 
&lt;p&gt;|------------------------------------+-------------------------------------------------------------| | &lt;em&gt;Hooks for customization&lt;/em&gt; | | |------------------------------------+-------------------------------------------------------------| | =gptel-save-state-hook= | Runs before saving the chat state to a file on disk | | =gptel-prompt-transform-functions= | Runs in a temp buffer to transform text before sending | | =gptel-post-request-hook= | Runs immediately after dispatching a =gptel-request=. | | =gptel-pre-response-hook= | Runs before inserting the LLM response into the buffer | | =gptel-post-response-functions= | Runs after inserting the full LLM response into the buffer | | =gptel-post-stream-hook= | Runs after each streaming insertion | | =gptel-pre-tool-call-functions= | Runs before each tool call, can block or modify it | | =gptel-post-tool-call-functions= | Runs after each tool call, can block or modify results | | =gptel-context-wrap-function= | To include additional context formatted your way | | =gptel-rewrite-default-action= | Automatically diff, ediff, merge or replace refactored text | | =gptel-post-rewrite-functions= | Runs after a =gptel-rewrite= request succeeds | |------------------------------------+-------------------------------------------------------------|&lt;/p&gt; 
&lt;p&gt;#+html: &lt;/p&gt; 
&lt;p&gt;*** Option presets&lt;/p&gt; 
&lt;p&gt;If you use several LLMs for different tasks with accompanying system prompts (instructions) and tool configurations, manually adjusting =gptel= settings each time can become tedious. Presets are a bundle of gptel settings -- such as the model, backend, system message, and enabled tools -- that you can switch to at once.&lt;/p&gt; 
&lt;p&gt;Once defined, presets can be applied from gptel&#39;s transient menu:&lt;/p&gt; 
&lt;p&gt;#+html: &lt;img src=&quot;https://github.com/user-attachments/assets/e0cf6a32-d999-4138-8369-23512f5e9311&quot; align=&quot;center&quot; /&gt; #+html: &lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;To define a preset, use the =gptel-make-preset= function, which takes a name and keyword-value pairs of settings.&lt;/p&gt; 
&lt;p&gt;Presets can be used to set individual options. Here is an example of a preset to set the system message (and do nothing else): #+begin_src emacs-lisp (gptel-make-preset &#39;explain :system &quot;Explain what this code does to a novice programmer.&quot;) #+end_src&lt;/p&gt; 
&lt;p&gt;More generally, you can specify a bundle of options: #+begin_src emacs-lisp (gptel-make-preset &#39;gpt4coding ;preset name, a symbol :description &quot;A preset optimized for coding tasks&quot; ;for your reference :backend &quot;Claude&quot; ;gptel backend or backend name :model &#39;claude-3-7-sonnet-20250219.1 :system &quot;You are an expert coding assistant. Your role is to provide high-quality code solutions, refactorings, and explanations.&quot; :tools &#39;(&quot;read_buffer&quot; &quot;modify_buffer&quot;)) ;gptel tools or tool names #+end_src&lt;/p&gt; 
&lt;p&gt;Besides a couple of special keys (=:description=, =:parents= to inherit other presets), there is no predefined list of keys. Instead, the key =:foo= corresponds to setting =gptel-foo= (preferred) or =gptel--foo=. So the preset can include the value of any gptel option. For example, the following preset sets =gptel-temperature=, =gptel-use-context= and =gptel-context=, a list of files to include as context:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (gptel-make-preset &#39;proofreader :description &quot;Preset for proofreading tasks&quot; :backend &quot;ChatGPT&quot; :model &#39;gpt-4.1-mini :tools &#39;(&quot;read_buffer&quot; &quot;spell_check&quot; &quot;grammar_check&quot;) :use-context &#39;system ;sets gptel-use-context :context &#39;(&quot;./.grammar_rules.md&quot; &quot;./jargonfile.md&quot;) ;sets gptel-context :temperature 0.2) ;sets gptel-temperature #+end_src&lt;/p&gt; 
&lt;p&gt;Switching to a preset applies the specified settings without affecting other settings. Depending on the scope option (~=~ in gptel&#39;s transient menu), presets can be applied globally, buffer-locally or for the next request only.&lt;/p&gt; 
&lt;p&gt;**** Applying presets to requests automatically&lt;/p&gt; 
&lt;p&gt;You can apply a preset to a /single/ query by including =@preset-name= in the prompt, where =preset-name= is the name of the preset. (The =oneshot= scope option in gptel&#39;s transient menus is another way to do this, [[id:748cbc00-0c92-4705-8839-619b2c80e566][see the FAQ.]])&lt;/p&gt; 
&lt;p&gt;For example, if you have a preset named =websearch= defined which includes tools for web access and search: #+begin_src emacs-lisp (gptel-make-preset &#39;websearch :description &quot;Haiku with basic web search capability.&quot; :backend &quot;Claude&quot; :model &#39;claude-3-5-haiku-20241022 :tools &#39;(&quot;search_web&quot; &quot;read_url&quot; &quot;get_youtube_meta&quot;)) #+end_src&lt;/p&gt; 
&lt;p&gt;The following query is sent with this preset applied:&lt;/p&gt; 
&lt;p&gt;#+begin_quote @websearch Are there any 13&quot; e-ink monitors on the market? Create a table comparing them, sourcing specs and reviews from online sources. Also do the same for &quot;transreflective-LCD&quot; displays -- I&#39;m not sure what exactly they&#39;re called but they&#39;re comparable to e-ink. #+end_quote&lt;/p&gt; 
&lt;p&gt;This =@preset-name= cookie only applies to the final user turn of the coversation that is sent. So the presence of the cookie in past messages/turns is not significant.&lt;/p&gt; 
&lt;p&gt;The =@preset-name= cookie can be anywhere in the prompt. For example: #+begin_quote 
 &lt;long piece of text&gt;&lt;/long&gt;&lt;/p&gt; 
&lt;p&gt;What do you make of the above description, @proofreader? #+end_quote&lt;/p&gt; 
&lt;p&gt;In chat buffers this prefix will be offered as a completion and fontified, making it easy to use and spot.&lt;/p&gt; 
&lt;p&gt;** Alternatives&lt;/p&gt; 
&lt;p&gt;Other LLM clients for Emacs include&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Libraries&lt;/em&gt;:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/ahyatt/llm&quot;&gt;https://github.com/ahyatt/llm&lt;/a&gt;][llm]]: llm provides a uniform API across language model providers for building LLM clients in Emacs, and is intended as a library for use by package authors. For similar scripting purposes, gptel provides the command =gptel-request=.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;Chat clients&lt;/em&gt;:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/s-kostyaev/ellama&quot;&gt;https://github.com/s-kostyaev/ellama&lt;/a&gt;][Ellama]]: A full-fledged LLM client built on llm, that supports many LLM providers (Ollama, Open AI, Vertex, GPT4All and more). Its usage differs from gptel in that it provides separate commands for dozens of common tasks, like general chat, summarizing code/text, refactoring code, improving grammar, translation and so on.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/xenodium/chatgpt-shell&quot;&gt;https://github.com/xenodium/chatgpt-shell&lt;/a&gt;][chatgpt-shell]]: comint-shell based interaction with ChatGPT. Also supports DALL-E, executable code blocks in the responses, and more.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/rksm/org-ai&quot;&gt;https://github.com/rksm/org-ai&lt;/a&gt;][org-ai]]: Interaction through special =#+begin_ai ... #+end_ai= Org-mode blocks. Also supports DALL-E, querying ChatGPT with the contents of project files, and more.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/yibie/superchat&quot;&gt;https://github.com/yibie/superchat&lt;/a&gt;][Superchat]]: A Claude Code style chat UI for gptel in Emacs, focusing on making structured prompts and file‑grounded conversations effortless.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;There are several more: [[&lt;a href=&quot;https://github.com/iwahbe/chat.el&quot;&gt;https://github.com/iwahbe/chat.el&lt;/a&gt;][chat.el]], [[&lt;a href=&quot;https://github.com/stuhlmueller/gpt.el&quot;&gt;https://github.com/stuhlmueller/gpt.el&lt;/a&gt;][gpt.el]], [[&lt;a href=&quot;https://github.com/AnselmC/le-gpt.el&quot;&gt;https://github.com/AnselmC/le-gpt.el&lt;/a&gt;][le-gpt]], [[&lt;a href=&quot;https://github.com/stevemolitor/robby&quot;&gt;https://github.com/stevemolitor/robby&lt;/a&gt;][robby]].&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Coding agents&lt;/em&gt;:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/manzaltu/claude-code-ide.el&quot;&gt;https://github.com/manzaltu/claude-code-ide.el&lt;/a&gt;][claude-code-ide]] and [[&lt;a href=&quot;https://github.com/stevemolitor/claude-code.el&quot;&gt;https://github.com/stevemolitor/claude-code.el&lt;/a&gt;][claude-code.el]]: Emacs interfaces to Claude Code.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/xenodium/agent-shell&quot;&gt;https://github.com/xenodium/agent-shell&lt;/a&gt;][agent-shell]]: Emacs interface to various coding agents, like Claude Code, Gemini, Codex, Opencode, Goose and more.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/MatthewZMD/aidermacs&quot;&gt;https://github.com/MatthewZMD/aidermacs&lt;/a&gt;][Aidermacs]] and [[&lt;a href=&quot;https://github.com/tninja/aider.el&quot;&gt;https://github.com/tninja/aider.el&lt;/a&gt;][aider.el]]: Emacs interfaces to [[&lt;a href=&quot;https://aider.chat/&quot;&gt;https://aider.chat/&lt;/a&gt;][Aider]].&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;Completion at point&lt;/em&gt;:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/copilot-emacs/copilot.el&quot;&gt;https://github.com/copilot-emacs/copilot.el&lt;/a&gt;][copilot.el]]: Code completion using Copilot.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/milanglacier/minuet-ai.el&quot;&gt;https://github.com/milanglacier/minuet-ai.el&lt;/a&gt;][Minuet]]: Code-completion using LLM. Supports fill-in-the-middle (FIM) completion for compatible models such as DeepSeek and Codestral.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;*** Packages using gptel&lt;/p&gt; 
&lt;p&gt;gptel is a general-purpose package for chat and ad-hoc LLM interaction. The following packages use gptel to provide additional or specialized functionality:&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Lookup helpers&lt;/em&gt;: Calling gptel quickly for one-off interactions&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/karthink/gptel-quick&quot;&gt;https://github.com/karthink/gptel-quick&lt;/a&gt;][gptel-quick]]: Quickly look up the region or text at point.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;Task-driven workflows&lt;/em&gt;: Different interfaces to specify tasks for LLMs.&lt;/p&gt; 
&lt;p&gt;These differ from full &quot;agentic&quot; use in that the interactions are &quot;one-shot&quot;, not chained.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/dolmens/gptel-aibo/&quot;&gt;https://github.com/dolmens/gptel-aibo/&lt;/a&gt;][gptel-aibo]]: A writing assistant system built on top of gptel.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/daedsidog/evedel&quot;&gt;https://github.com/daedsidog/evedel&lt;/a&gt;][Evedel]]: Instructed LLM Programmer/Assistant.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/lanceberge/elysium&quot;&gt;https://github.com/lanceberge/elysium&lt;/a&gt;][Elysium]]: Request AI-generated changes as you code.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/ISouthRain/gptel-watch&quot;&gt;https://github.com/ISouthRain/gptel-watch&lt;/a&gt;][gptel-watch]]: Automatically call gptel when typing lines that indicate intent.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;Agentic use&lt;/em&gt;: Use LLMs as agents, with tool-use&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/kmontag/macher&quot;&gt;https://github.com/kmontag/macher&lt;/a&gt;][Macher]]: Project-aware multi-file LLM editing for Emacs.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/karthink/gptel-agent&quot;&gt;https://github.com/karthink/gptel-agent&lt;/a&gt;][gptel-agent]]: Tools, presets and configuration for general agentic LLM use.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;Text completion&lt;/em&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/JDNdeveloper/gptel-autocomplete&quot;&gt;https://github.com/JDNdeveloper/gptel-autocomplete&lt;/a&gt;][gptel-autocomplete]]: Inline completions using gptel.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;Integration with major-modes&lt;/em&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/jwiegley/ob-gptel&quot;&gt;https://github.com/jwiegley/ob-gptel&lt;/a&gt;][ob-gptel]]: Org-babel backend for running gptel queries.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/kamushadenes/ai-blog.el&quot;&gt;https://github.com/kamushadenes/ai-blog.el&lt;/a&gt;][ai-blog.el]]: Streamline generation of blog posts in Hugo.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/lakkiy/gptel-commit&quot;&gt;https://github.com/lakkiy/gptel-commit&lt;/a&gt;][gptel-commit]]: Generate commit messages using gptel.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/douo/magit-gptcommit&quot;&gt;https://github.com/douo/magit-gptcommit&lt;/a&gt;][magit-gptcommit]]: Generate commit messages within magit-status Buffer using gptel.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/ragnard/gptel-magit/&quot;&gt;https://github.com/ragnard/gptel-magit/&lt;/a&gt;][gptel-magit]]: Generate commit messages for magit using gptel.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/ArthurHeymans/gptel-forge-prs&quot;&gt;https://github.com/ArthurHeymans/gptel-forge-prs&lt;/a&gt;][gptel-forge-prs]]: Generate pull request message for forge using gptel.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;Chat interface addons&lt;/em&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/rob137/Corsair&quot;&gt;https://github.com/rob137/Corsair&lt;/a&gt;][Corsair]]: Helps gather text to populate LLM prompts for gptel.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/ultronozm/ai-org-chat.el&quot;&gt;https://github.com/ultronozm/ai-org-chat.el&lt;/a&gt;][ai-org-chat]]: Provides branching conversations in Org buffers using gptel. Note that gptel includes this feature as well (see =gptel-org-branching-context=), but requires a recent version of Org mode 9.7 or later to be installed.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;Integration with other packages&lt;/em&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/armindarvish/consult-omni&quot;&gt;https://github.com/armindarvish/consult-omni&lt;/a&gt;][consult-omni]]: Versatile multi-source search package. It includes gptel as one of its many sources.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;gptel configuration management&lt;/em&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/jwiegley/gptel-prompts&quot;&gt;https://github.com/jwiegley/gptel-prompts&lt;/a&gt;][gptel-prompts]]: System prompt manager for gptel.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** COMMENT Older Breaking Changes&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;=gptel-post-response-hook= has been renamed to =gptel-post-response-functions=, and functions in this hook are now called with two arguments: the start and end buffer positions of the response. This should make it easy to act on the response text without having to locate it first.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Possible breakage, see #120: If streaming responses stop working for you after upgrading to v0.5, try reinstalling gptel and deleting its native comp eln cache in =native-comp-eln-load-path=.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;The user option =gptel-host= is deprecated. If the defaults don&#39;t work for you, use =gptel-make-openai= to customize server settings.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=gptel-api-key-from-auth-source= now searches for the API key using the host address for the active LLM backend, /i.e./ &quot;&lt;a href=&quot;http://api.openai.com&quot;&gt;api.openai.com&lt;/a&gt;&quot; when using ChatGPT. You may need to update your =~/.authinfo=.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** Acknowledgments&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/felipeochoa&quot;&gt;https://github.com/felipeochoa&lt;/a&gt;][Felipe Ochoa]] and [[&lt;a href=&quot;https://github.com/akssri&quot;&gt;https://github.com/akssri&lt;/a&gt;][akssri]] for adding AWS Bedrock support to gptel.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/jwiegley&quot;&gt;https://github.com/jwiegley&lt;/a&gt;][John Wiegley]] for the design of gptel&#39;s presets and gptel-request&#39;s async pipeline, but also for loads of general feedback and advice.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/pabl0&quot;&gt;https://github.com/pabl0&lt;/a&gt;][Henrik Ahlgren]] for a keen eye to detail and polish applied to gptel&#39;s UI.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/psionic-k&quot;&gt;https://github.com/psionic-k&lt;/a&gt;][psionic-k]] for extensive testing of the tool use feature and the design of gptel&#39;s in-buffer tool use records.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/jdtsmith&quot;&gt;https://github.com/jdtsmith&lt;/a&gt;][JD Smith]] for feedback and code assistance with gptel-menu&#39;s redesign&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/meain&quot;&gt;https://github.com/meain&lt;/a&gt;][Abin Simon]] for extensive feedback on improving gptel&#39;s directives and UI.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/algal&quot;&gt;https://github.com/algal&lt;/a&gt;][Alexis Gallagher]] and [[&lt;a href=&quot;https://github.com/d1egoaz&quot;&gt;https://github.com/d1egoaz&lt;/a&gt;][Diego Alvarez]] for fixing a nasty multi-byte bug with =url-retrieve=.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/tarsius&quot;&gt;https://github.com/tarsius&lt;/a&gt;][Jonas Bernoulli]] for the Transient library.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/daedsidog&quot;&gt;https://github.com/daedsidog&lt;/a&gt;][daedsidog]] for adding context support to gptel.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/Aquan1412&quot;&gt;https://github.com/Aquan1412&lt;/a&gt;][Aquan1412]] for adding PrivateGPT support to gptel.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/r0man&quot;&gt;https://github.com/r0man&lt;/a&gt;][r0man]] for improving gptel&#39;s Curl integration.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;Local Variables:&lt;/h1&gt; 
&lt;h1&gt;toc-org-max-depth: 4&lt;/h1&gt; 
&lt;h1&gt;eval: (and (fboundp &#39;toc-org-mode) (toc-org-mode 1))&lt;/h1&gt; 
&lt;h1&gt;End:&lt;/h1&gt;</description>
      
    </item>
    
    <item>
      <title>doomemacs/core</title>
      <link>https://github.com/doomemacs/core</link>
      <description>&lt;p&gt;An Emacs framework for the stubborn martian hacker&lt;/p&gt;&lt;hr&gt;&lt;div align=&quot;center&quot;&gt; 
 &lt;h1&gt;Doom Emacs&lt;/h1&gt; 
 &lt;p&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/#install&quot;&gt;Install&lt;/a&gt; • &lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/index.org&quot;&gt;Documentation&lt;/a&gt; • &lt;a href=&quot;https://github.com/doomemacs/core/raw/master/docs/faq.org&quot;&gt;FAQ&lt;/a&gt; • &lt;a href=&quot;https://github.com/doomemacs/core/tree/screenshots#emacsd-screenshots&quot;&gt;Screenshots&lt;/a&gt; • &lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/#contribute&quot;&gt;Contribute&lt;/a&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;img src=&quot;https://img.shields.io/github/tag/doomemacs/core.svg?style=flat-square&amp;amp;label=release&amp;amp;color=58839b&quot; alt=&quot;Made with Doom Emacs&quot; /&gt; &lt;img src=&quot;https://img.shields.io/badge/Supports-Emacs_27.1%E2%80%9330.2-blueviolet.svg?style=flat-square&amp;amp;logo=GNU%20Emacs&amp;amp;logoColor=white&quot; alt=&quot;Supports Emacs 27.1–30.2&quot; /&gt; &lt;img src=&quot;https://img.shields.io/github/last-commit/doomemacs/core?style=flat-square&quot; alt=&quot;Latest commit&quot; /&gt;&lt;/p&gt; 
 &lt;!-- ![Build status: master](https://img.shields.io/github/workflow/status/doomemacs/core/CI/master?style=flat-square) --&gt; 
 &lt;p&gt;&lt;a href=&quot;https://doomemacs.org/discord&quot;&gt;&lt;img src=&quot;https://img.shields.io/discord/406534637242810369?color=738adb&amp;amp;label=Discord&amp;amp;logo=discord&amp;amp;logoColor=white&amp;amp;style=flat-square&quot; alt=&quot;Discord Server&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://doomemacs.org/discuss&quot;&gt;&lt;img src=&quot;https://img.shields.io/github/discussions/doomemacs/community?label=Discussions&amp;amp;logo=github&amp;amp;style=flat-square&quot; alt=&quot;Discussions board&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/doomemacs/core/screenshots/main.png&quot; alt=&quot;Doom Emacs Screenshot&quot; /&gt;&lt;/p&gt; 
&lt;/div&gt; 
&lt;hr /&gt; 
&lt;h3&gt;Table of Contents&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/#introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/#features&quot;&gt;Features&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/#prerequisites&quot;&gt;Prerequisites&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/#install&quot;&gt;Install&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/#roadmap&quot;&gt;Roadmap&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/#getting-help&quot;&gt;Getting help&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/#contribute&quot;&gt;Contribute&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;Introduction&lt;/h1&gt; 
&lt;a href=&quot;http://ultravioletbat.deviantart.com/art/Yay-Evil-111710573&quot;&gt; &lt;img src=&quot;https://raw.githubusercontent.com/doomemacs/core/screenshots/cacochan.png&quot; align=&quot;right&quot; /&gt; &lt;/a&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;It is a story as old as time. A stubborn, shell-dwelling, and melodramatic vimmer—envious of the features of modern text editors—spirals into despair before he succumbs to the &lt;a href=&quot;https://github.com/emacs-evil/evil&quot;&gt;dark side&lt;/a&gt;. This is his config.&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;Doom is a configuration framework for &lt;a href=&quot;https://www.gnu.org/software/emacs/&quot;&gt;GNU Emacs&lt;/a&gt; tailored for Emacs bankruptcy veterans who want less framework in their frameworks, a modicum of stability (and reproducibility) from their package manager, and the performance of a hand rolled config (or better). It can be a foundation for your own config or a resource for Emacs enthusiasts to learn more about our favorite operating system.&lt;/p&gt; 
&lt;p&gt;Its design is guided by these mantras:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;strong&gt;Gotta go fast.&lt;/strong&gt; Startup and run-time performance are priorities. Doom goes beyond by modifying packages to be snappier and load lazier.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Close to metal.&lt;/strong&gt; There&#39;s less between you and vanilla Emacs by design. That&#39;s less to grok and less to work around when you tinker. Internals ought to be written as if reading them were part of Doom&#39;s UX, and it is!&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Opinionated, but not stubborn.&lt;/strong&gt; Doom is about reasonable defaults and curated opinions, but use as little or as much of it as you like.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Your system, your rules.&lt;/strong&gt; You know better. At least, Doom hopes so! It won&#39;t &lt;em&gt;automatically&lt;/em&gt; install system dependencies (and will force plugins not to either). Rely on &lt;code&gt;doom doctor&lt;/code&gt; to tell you what&#39;s missing.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Nix/Guix is a great idea!&lt;/strong&gt; The Emacs ecosystem is temperamental. Things break and they break often. Disaster recovery should be a priority! Doom&#39;s package management should be declarative and your private config reproducible, and comes with a means to roll back releases and updates (still a WIP).&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Check out &lt;a href=&quot;https://github.com/doomemacs/core/raw/master/docs/faq.org&quot;&gt;the FAQ&lt;/a&gt; for answers to common questions about the project.&lt;/p&gt; 
&lt;h1&gt;Features&lt;/h1&gt; 
&lt;ul&gt; 
 &lt;li&gt;Minimalistic good looks inspired by modern editors.&lt;/li&gt; 
 &lt;li&gt;Curated and sane defaults for many packages, (major) OSes, and Emacs itself.&lt;/li&gt; 
 &lt;li&gt;A modular organizational structure for separating concerns in your config.&lt;/li&gt; 
 &lt;li&gt;A standard library designed to simplify your elisp bike shedding.&lt;/li&gt; 
 &lt;li&gt;A declarative &lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/getting_started.org#package-management&quot;&gt;package management system&lt;/a&gt; (powered by &lt;a href=&quot;https://github.com/radian-software/straight.el&quot;&gt;straight.el&lt;/a&gt;) with a command line interface. Install packages from anywhere, not just (M)ELPA, and pin them to any commit.&lt;/li&gt; 
 &lt;li&gt;Optional vim emulation powered by &lt;a href=&quot;https://github.com/emacs-evil/evil&quot;&gt;evil-mode&lt;/a&gt;, including ports of popular vim plugins like &lt;a href=&quot;https://github.com/justinmk/vim-sneak&quot;&gt;vim-sneak&lt;/a&gt;, &lt;a href=&quot;https://github.com/easymotion/vim-easymotion&quot;&gt;vim-easymotion&lt;/a&gt;, &lt;a href=&quot;https://github.com/tpope/vim-unimpaired&quot;&gt;vim-unimpaired&lt;/a&gt; and &lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/modules/editor/evil/README.org#ported-vim-plugins&quot;&gt;more&lt;/a&gt;!&lt;/li&gt; 
 &lt;li&gt;Opt-in LSP integration for many languages, using &lt;a href=&quot;https://github.com/emacs-lsp/lsp-mode&quot;&gt;lsp-mode&lt;/a&gt; or &lt;a href=&quot;https://github.com/joaotavora/eglot&quot;&gt;eglot&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;Support for &lt;em&gt;many&lt;/em&gt; programming languages. Includes syntax highlighting, linters/checker integration, inline code evaluation, code completion (where possible), REPLs, documentation lookups, snippets, and more!&lt;/li&gt; 
 &lt;li&gt;Support for &lt;em&gt;many&lt;/em&gt; tools, like docker, pass, ansible, terraform, and more.&lt;/li&gt; 
 &lt;li&gt;A Spacemacs-esque &lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/modules/config/default/+evil-bindings.el&quot;&gt;keybinding scheme&lt;/a&gt;, centered around leader and localleader prefix keys (&lt;kbd&gt;SPC&lt;/kbd&gt; and &lt;kbd&gt;SPC&lt;/kbd&gt;&lt;kbd&gt;m&lt;/kbd&gt; for evil users, &lt;kbd&gt;C-c&lt;/kbd&gt; and &lt;kbd&gt;C-c l&lt;/kbd&gt; for vanilla users).&lt;/li&gt; 
 &lt;li&gt;A rule-based &lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/modules/ui/popup/README.org&quot;&gt;popup manager&lt;/a&gt; to control how temporary buffers are displayed (and disposed of).&lt;/li&gt; 
 &lt;li&gt;Per-file indentation style detection and &lt;a href=&quot;http://editorconfig.org/&quot;&gt;editorconfig&lt;/a&gt; integration. Let someone else argue about tabs vs &lt;strong&gt;&lt;em&gt;spaces&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt; 
 &lt;li&gt;Project-management tools and framework-specific minor modes with their own snippets libraries.&lt;/li&gt; 
 &lt;li&gt;Project search (and replace) utilities, powered by &lt;a href=&quot;https://github.com/BurntSushi/ripgrep&quot;&gt;ripgrep&lt;/a&gt; and &lt;a href=&quot;https://github.com/abo-abo/swiper&quot;&gt;ivy&lt;/a&gt; or &lt;a href=&quot;https://github.com/emacs-helm/helm&quot;&gt;helm&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;Isolated and persistent workspaces (also substitutes for vim tabs).&lt;/li&gt; 
 &lt;li&gt;Support for Chinese and Japanese input systems.&lt;/li&gt; 
 &lt;li&gt;Save a snapshot of your shell environment to a file for Emacs to load at startup. No more struggling to get Emacs to inherit your &lt;code&gt;PATH&lt;/code&gt;, among other things.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;Prerequisites&lt;/h1&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;strong&gt;Required:&lt;/strong&gt; 
  &lt;ul&gt; 
   &lt;li&gt;GNU Emacs 27.1–30.2 (30.2 is recommended) 
    &lt;ul&gt; 
     &lt;li&gt;If only using Doom&#39;s core, 27.1+ is required.&lt;/li&gt; 
     &lt;li&gt;If using Doom&#39;s modules (especially tree-sitter support), 29.1+ is required.&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;Git &amp;gt;= 2.23&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://github.com/BurntSushi/ripgrep&quot;&gt;ripgrep&lt;/a&gt; &amp;gt;= 11.0&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Optional, but recommended:&lt;/strong&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://github.com/sharkdp/fd&quot;&gt;fd&lt;/a&gt; 7.3.0+ (used to improve file indexing performance)&lt;/li&gt; 
   &lt;li&gt;GNU variants of &lt;code&gt;find&lt;/code&gt;, &lt;code&gt;ls&lt;/code&gt;, and &lt;code&gt;tar&lt;/code&gt; (on MacOS and BSD *nix)&lt;/li&gt; 
   &lt;li&gt;Symbola font (Emacs&#39; fallback font for glyphs it can&#39;t display)&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;div class=&quot;markdown-alert markdown-alert-warning&quot;&gt;
 &lt;p class=&quot;markdown-alert-title&quot;&gt;
  &lt;svg class=&quot;octicon octicon-alert mr-2&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; height=&quot;16&quot; aria-hidden=&quot;true&quot;&gt;
   &lt;path d=&quot;M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z&quot;&gt;&lt;/path&gt;
  &lt;/svg&gt;Warning&lt;/p&gt;
 &lt;p&gt;&lt;strong&gt;Avoid unstable and pre-release builds of Emacs.&lt;/strong&gt; These end in &lt;code&gt;.50&lt;/code&gt;, &lt;code&gt;.60&lt;/code&gt;, or &lt;code&gt;.9X&lt;/code&gt; (e.g. &lt;code&gt;28.1.91&lt;/code&gt;). Doom should generally work on Emacs HEAD (the maintainer dogfoods it), but support lags behind the bleeding edge by at least a month or so.&lt;/p&gt; 
&lt;/div&gt; 
&lt;div class=&quot;markdown-alert markdown-alert-important&quot;&gt;
 &lt;p class=&quot;markdown-alert-title&quot;&gt;
  &lt;svg class=&quot;octicon octicon-report mr-2&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; height=&quot;16&quot; aria-hidden=&quot;true&quot;&gt;
   &lt;path d=&quot;M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z&quot;&gt;&lt;/path&gt;
  &lt;/svg&gt;Important&lt;/p&gt;
 &lt;p&gt;Doom is comprised of &lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/modules.org&quot;&gt;~150 optional modules&lt;/a&gt;, some of which may have additional dependencies. &lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/modules.org&quot;&gt;Visit their documentation&lt;/a&gt; or run &lt;code&gt;bin/doom doctor&lt;/code&gt; to check for any that you may have missed.&lt;/p&gt; 
&lt;/div&gt; 
&lt;h1&gt;Install&lt;/h1&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git clone --depth 1 https://github.com/doomemacs/core ~/.config/emacs
~/.config/emacs/bin/doom install
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Then &lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/getting_started.org&quot;&gt;read our Getting Started guide&lt;/a&gt; to be walked through installing, configuring and maintaining Doom Emacs.&lt;/p&gt; 
&lt;p&gt;It&#39;s a good idea to add &lt;code&gt;~/.config/emacs/bin&lt;/code&gt; to your &lt;code&gt;PATH&lt;/code&gt;! Other &lt;code&gt;bin/doom&lt;/code&gt; commands you should know about:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;doom sync&lt;/code&gt; to synchronize your private config with Doom by installing missing packages, removing orphaned packages, and regenerating caches. Run this whenever you modify your private &lt;code&gt;init.el&lt;/code&gt; or &lt;code&gt;packages.el&lt;/code&gt;, or install/remove an Emacs package through your OS package manager (e.g. mu4e or agda).&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;doom sync --env&lt;/code&gt; to include a snapshot of your shell environment that Doom will load at startup. This allows Emacs to inherit your &lt;code&gt;PATH&lt;/code&gt;, among other things. This replaces &lt;a href=&quot;https://github.com/purcell/exec-path-from-shell&quot;&gt;exec-path-from-shell&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;doom upgrade&lt;/code&gt; to update Doom to the latest release &amp;amp; all installed packages.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;doom doctor&lt;/code&gt; to diagnose common issues with your system and config.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;Roadmap&lt;/h1&gt; 
&lt;p&gt;Doom is an active and ongoing project. To make that development more transparent, its roadmap (and other concerns) are published across three github project boards and a newsletter:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://doomemacs.org/roadmap&quot;&gt;Development Roadmap&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://doomemacs.org/packages-under-review&quot;&gt;Packages under review&lt;/a&gt;: lists plugins we are watching and considering for inclusion, and what their status for inclusion is. Please consult this list before requesting new packages/features.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/orgs/doomemacs/projects/7&quot;&gt;Upstream bugs&lt;/a&gt;: lists issues that originate from elsewhere, and whether or not we have local workarounds or temporary fixes for them.&lt;/li&gt; 
 &lt;li&gt;&lt;s&gt;Doom&#39;s newsletter&lt;/s&gt; (not finished) will contain changelogs in between releases.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;Getting help&lt;/h1&gt; 
&lt;p&gt;Emacs is no journey of a mere thousand miles. You &lt;em&gt;will&lt;/em&gt; run into problems and mysterious errors. When you do, here are some places you can look for help:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/index.org&quot;&gt;Our documentation&lt;/a&gt; covers many use cases. 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/getting_started.org#configuring-doom&quot;&gt;The Configuration section&lt;/a&gt; covers how to configure Doom and its packages.&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/getting_started.org#package-management&quot;&gt;The Package Management section&lt;/a&gt; covers how to install and disable packages.&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/getting_started.org#the-bindoom-utility&quot;&gt;This section&lt;/a&gt; explains the &lt;code&gt;bin/doom&lt;/code&gt; script&#39;s most important commands.&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/getting_started.org#common-mistakes-when-configuring-doom-emacs&quot;&gt;This section&lt;/a&gt; lists some common configuration mistakes new users make, when migrating a config from another distro or their own.&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/faq.org#how-do-i-change-the-theme&quot;&gt;This answer&lt;/a&gt; shows you how to add your own themes to your private config.&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/faq.org#how-do-i-change-the-fonts&quot;&gt;This answer&lt;/a&gt; shows you how to change the default font.&lt;/li&gt; 
   &lt;li&gt;Your issue may be documented in the &lt;a href=&quot;https://github.com/doomemacs/core/raw/master/docs/faq.org&quot;&gt;FAQ&lt;/a&gt;.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;With Emacs built-in help system documentation is a keystroke away: 
  &lt;ul&gt; 
   &lt;li&gt;For functions: &lt;kbd&gt;SPC h f&lt;/kbd&gt; or &lt;kbd&gt;C-h f&lt;/kbd&gt;&lt;/li&gt; 
   &lt;li&gt;For variables: &lt;kbd&gt;SPC h v&lt;/kbd&gt; or &lt;kbd&gt;C-h v&lt;/kbd&gt;&lt;/li&gt; 
   &lt;li&gt;For a keybind: &lt;kbd&gt;SPC h k&lt;/kbd&gt; or &lt;kbd&gt;C-h k&lt;/kbd&gt;&lt;/li&gt; 
   &lt;li&gt;To search available keybinds: &lt;kbd&gt;SPC h b b&lt;/kbd&gt; or &lt;kbd&gt;C-h b b&lt;/kbd&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;Run &lt;code&gt;bin/doom doctor&lt;/code&gt; to detect common issues with your development environment and private config.&lt;/li&gt; 
 &lt;li&gt;Check out the &lt;a href=&quot;https://github.com/doomemacs/core/raw/master/docs/faq.org&quot;&gt;FAQ&lt;/a&gt; or &lt;a href=&quot;https://github.com/doomemacs/community?tab=readme-ov-file#frequently-asked-questions&quot;&gt;Community FAQs&lt;/a&gt;, in case your question has already been answered.&lt;/li&gt; 
 &lt;li&gt;Search &lt;a href=&quot;https://github.com/doomemacs/core/issues&quot;&gt;Doom&#39;s issue tracker&lt;/a&gt; in case your issue was already reported.&lt;/li&gt; 
 &lt;li&gt;Hop on &lt;a href=&quot;https://doomemacs.org/discord&quot;&gt;our Discord server&lt;/a&gt;; it&#39;s active and friendly! Keep an eye on the #announcements channel, where I announce breaking updates and releases.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h1&gt;Contribute&lt;/h1&gt; 
&lt;p&gt;&lt;a href=&quot;http://makeapullrequest.com&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square&quot; alt=&quot;PRs Welcome&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://github.com/bbatsov/emacs-lisp-style-guide&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/elisp-style%20guide-purple?style=flat-square&quot; alt=&quot;Elisp styleguide&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://liberapay.com/hlissner/donate&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/liberapay-donate-1.svg?style=flat-square&amp;amp;logo=liberapay&amp;amp;color=blue&quot; alt=&quot;Donate on liberapay&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://paypal.me/hlissner/10&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/paypal-donate-1?style=flat-square&amp;amp;logo=paypal&amp;amp;color=blue&quot; alt=&quot;Donate on paypal&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;Doom is a labor of love and incurable madness, but I&#39;m only one guy. Doom wouldn&#39;t be where it is today without your help. I welcome contributions of any kind!&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;I ❤️ pull requests and bug reports (see the &lt;a href=&quot;https://raw.githubusercontent.com/doomemacs/core/master/docs/contributing.org&quot;&gt;Contributing Guidelines&lt;/a&gt;)!&lt;/li&gt; 
 &lt;li&gt;Don&#39;t hesitate to &lt;a href=&quot;https://github.com/doomemacs/core/issues/new/choose&quot;&gt;tell me my Elisp-fu sucks&lt;/a&gt;, but please tell me why.&lt;/li&gt; 
 &lt;li&gt;Hop on &lt;a href=&quot;https://doomemacs.org/discord&quot;&gt;our Discord server&lt;/a&gt; and say hi! Help others, hang out or talk to me about Emacs, gamedev, programming, physics, pixel art, anime, gaming -- anything you like. Nourish this lonely soul.&lt;/li&gt; 
 &lt;li&gt;If you&#39;d like to support my work financially, buy me a drink through &lt;a href=&quot;https://liberapay.com/hlissner/donate&quot;&gt;liberapay&lt;/a&gt; or &lt;a href=&quot;https://paypal.me/hlissner/10&quot;&gt;paypal&lt;/a&gt;. My work contends with studies, adventures in indie gamedev and freelance work. Donations help me allocate more time to my Emacs and OSS capers.&lt;/li&gt; 
&lt;/ul&gt;</description>
      
    </item>
    
    <item>
      <title>Wilfred/elisp-refs</title>
      <link>https://github.com/Wilfred/elisp-refs</link>
      <description>&lt;p&gt;semantic code search for emacs lisp&lt;/p&gt;&lt;hr&gt;&lt;h1&gt;elisp-refs&lt;/h1&gt; 
&lt;p&gt;&lt;a href=&quot;https://coveralls.io/github/Wilfred/elisp-refs?branch=master&quot;&gt;&lt;img src=&quot;https://coveralls.io/repos/github/Wilfred/elisp-refs/badge.svg?branch=master&quot; alt=&quot;Coverage Status&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://melpa.org/#/elisp-refs&quot;&gt;&lt;img src=&quot;http://melpa.org/packages/elisp-refs-badge.svg?sanitize=true&quot; alt=&quot;MELPA&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;elisp-refs is an intelligent code search for Emacs lisp.&lt;/p&gt; 
&lt;p&gt;It can find references to functions, macros or variables. Unlike a dumb text search, elisp-refs actually parses the code, so it&#39;s never confused by comments or variables with the same name as functions.&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/elisp-refs/master/refs_screenshot.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;This is particularly useful for finding all the places a function is used, or finding examples of usage.&lt;/p&gt; 
&lt;p&gt;Interested readers may enjoy my blog post: &lt;a href=&quot;http://www.wilfred.me.uk/blog/2016/09/30/searching-a-million-lines-of-lisp/&quot;&gt;Searching A Million Lines Of Lisp&lt;/a&gt;.&lt;/p&gt; 
&lt;h2&gt;Installation&lt;/h2&gt; 
&lt;p&gt;Install from MELPA (recommended) or just add elisp-refs to your &lt;code&gt;load-path&lt;/code&gt;.&lt;/p&gt; 
&lt;h2&gt;Commands available&lt;/h2&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;elisp-refs-function&lt;/code&gt; (find function calls)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;elisp-refs-macro&lt;/code&gt; (find macro calls)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;elisp-refs-variable&lt;/code&gt; (find variable references)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;elisp-refs-special&lt;/code&gt; (find special form calls)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;elisp-refs-symbol&lt;/code&gt; (find all references to a symbol)&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;These command search all the files currently loaded in your Emacs instance.&lt;/p&gt; 
&lt;p&gt;If called with a prefix, you can limit search results to specific directories. For example:&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;C-u M-x elisp-refs-macro RET pcase RET ~/.emacs.d/elpa/magit-20160927.510 RET&lt;/code&gt;&lt;/p&gt; 
&lt;p&gt;will search for uses of &lt;code&gt;pcase&lt;/code&gt; in magit:&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/elisp-refs/master/refs_filtered.png&quot; alt=&quot;filtering screenshot&quot; /&gt;&lt;/p&gt; 
&lt;h2&gt;Semantic analysis&lt;/h2&gt; 
&lt;p&gt;elisp-refs has &lt;em&gt;street smarts&lt;/em&gt;: given &lt;code&gt;(defun foo (bar) (baz))&lt;/code&gt;, it understands that &lt;code&gt;bar&lt;/code&gt; is a variable and &lt;code&gt;baz&lt;/code&gt; is a function.&lt;/p&gt; 
&lt;p&gt;elisp-refs understands the following forms:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;defun&lt;/code&gt; &lt;code&gt;defsubst&lt;/code&gt; &lt;code&gt;defmacro&lt;/code&gt; &lt;code&gt;cl-defun&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;let&lt;/code&gt; &lt;code&gt;let*&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;funcall&lt;/code&gt; &lt;code&gt;apply&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;sharp quoted expressions (e.g. &lt;code&gt;#&#39;some-func&lt;/code&gt;)&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Limitations&lt;/h2&gt; 
&lt;p&gt;elisp-refs understands elisp special forms, and a few common macros. However, it &lt;strong&gt;cannot understand arbitrary macros&lt;/strong&gt;.&lt;/p&gt; 
&lt;p&gt;Therefore elisp-refs will assume that &lt;code&gt;(other-macro (foo bar))&lt;/code&gt; is a function call to &lt;code&gt;foo&lt;/code&gt;. If this is incorrect, you may wish to use the command &lt;code&gt;elisp-refs-symbol&lt;/code&gt; to find all references to the &lt;code&gt;foo&lt;/code&gt; symbol.&lt;/p&gt; 
&lt;p&gt;If &lt;code&gt;other-macro&lt;/code&gt; is a common macro, please consider submitting a patch to &lt;code&gt;elisp-refs--function-p&lt;/code&gt; to make elisp-refs smarter.&lt;/p&gt; 
&lt;p&gt;elisp-refs also does not support &lt;strong&gt;indirect calls&lt;/strong&gt;.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Since we do a simple syntax tree walk, this isn&#39;t treated as a
;; call to foo.
(let ((x (symbol-function &#39;foo)))
  (funcall x))

;; Similarly, indirect function calls are not treated as
;; function calls.
(defun call-func (x)
  (funcall x))
(call-func &#39;foo)

;; However, if you use sharp quoting, elisp-refs knows it&#39;s a function
reference!
(call-func #&#39;foo)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Running tests&lt;/h2&gt; 
&lt;p&gt;You can run the tests with:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$ cask install
$ cask exec ert-runner
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Performance&lt;/h2&gt; 
&lt;p&gt;elisp-refs is CPU-intensive elisp and has been carefully optimised. You can run the benchmark script with:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$ cask install
$ ./bench.sh
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;New features are carefully measured to ensure performance does not get worse.&lt;/p&gt; 
&lt;p&gt;See elisp-refs-bench.el for more details.&lt;/p&gt; 
&lt;h2&gt;Alternative Projects&lt;/h2&gt; 
&lt;p&gt;&lt;strong&gt;xref-find-references&lt;/strong&gt;: This command is included in Emacs 25.1, but it&#39;s based on a text search. It is confused by comments and strings, and cannot distinguish between functions and variables.&lt;/p&gt; 
&lt;p&gt;xrefs-find-references is also line oriented, so it does not show the whole sexp that matched your search. Since it requires text files, it doesn&#39;t search built-in .el.gz files.&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;TAGS&lt;/strong&gt;: It is possible to record function references in TAGS files. Whilst &lt;a href=&quot;https://github.com/universal-ctags/ctags&quot;&gt;universal-ctags&lt;/a&gt; (formerly known as exuberant-ctags) does provide the ability to find references, it is not supported in its lisp parser.&lt;/p&gt; 
&lt;p&gt;etags, the TAGS implementation shipped with Emacs, cannot find references (to my knowledge).&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://elpa.gnu.org/packages/el-search.html&quot;&gt;el-search&lt;/a&gt;&lt;/strong&gt; allows you to search for arbitrary forms in elisp files. It&#39;s slower, but a much more general tool. Its design greatly influenced elisp-refs.&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/purcell/elisp-slime-nav&quot;&gt;elisp-slime-nav&lt;/a&gt;&lt;/strong&gt; finds definitions, not references. It&#39;s a great complementary tool.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>magit/forge</title>
      <link>https://github.com/magit/forge</link>
      <description>&lt;p&gt;Work with Git forges from the comfort of Magit&lt;/p&gt;&lt;hr&gt;&lt;p&gt;** Work with Git forges from the comfort of Magit&lt;/p&gt; 
&lt;p&gt;Work with Git forges, such as Github and Gitlab, from the comfort of Magit and the rest of Emacs.&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;http://readme.emacsair.me/forge-status.png&quot;&gt;http://readme.emacsair.me/forge-status.png&lt;/a&gt;]]&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;http://readme.emacsair.me/forge-topic.png&quot;&gt;http://readme.emacsair.me/forge-topic.png&lt;/a&gt;]]&lt;/p&gt; 
&lt;p&gt;Please see the [[&lt;a href=&quot;https://docs.magit.vc/forge&quot;&gt;https://docs.magit.vc/forge&lt;/a&gt;][manual]] and the [[&lt;a href=&quot;https://emacsair.me/2018/12/19/forge-0.1&quot;&gt;https://emacsair.me/2018/12/19/forge-0.1&lt;/a&gt;][announcement]] for more information.&lt;/p&gt; 
&lt;p&gt;#+html: &lt;br /&gt;&lt;br /&gt; #+html: &lt;a href=&quot;https://github.com/magit/forge/actions/workflows/compile.yml&quot;&gt;&lt;img alt=&quot;Compile&quot; src=&quot;https://github.com/magit/forge/actions/workflows/compile.yml/badge.svg?sanitize=true&quot; /&gt;&lt;/a&gt; #+html: &lt;a href=&quot;https://github.com/magit/forge/actions/workflows/manual.yml&quot;&gt;&lt;img alt=&quot;Manual&quot; src=&quot;https://github.com/magit/forge/actions/workflows/manual.yml/badge.svg?sanitize=true&quot; /&gt;&lt;/a&gt; #+html: &lt;a href=&quot;https://snapshots.melpa.org/#/forge&quot;&gt;&lt;img alt=&quot;MELPA Snapshots&quot; src=&quot;https://snapshots.melpa.org/packages/forge-badge.svg?sanitize=true&quot; /&gt;&lt;/a&gt; #+html: &lt;a href=&quot;https://releases.melpa.org/#/forge&quot;&gt;&lt;img alt=&quot;MELPA Releases&quot; src=&quot;https://releases.melpa.org/packages/forge-badge.svg?sanitize=true&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Wilfred/helpful</title>
      <link>https://github.com/Wilfred/helpful</link>
      <description>&lt;p&gt;A better Emacs *help* buffer&lt;/p&gt;&lt;hr&gt;&lt;h1&gt;Helpful &lt;a href=&quot;https://coveralls.io/github/Wilfred/helpful?branch=master&quot;&gt;&lt;img src=&quot;https://coveralls.io/repos/github/Wilfred/helpful/badge.svg?branch=master&quot; alt=&quot;Coverage Status&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://melpa.org/#/helpful&quot;&gt;&lt;img src=&quot;http://melpa.org/packages/helpful-badge.svg?sanitize=true&quot; alt=&quot;MELPA&quot; /&gt;&lt;/a&gt;&lt;/h1&gt; 
&lt;p&gt;Helpful is an alternative to the built-in Emacs help that provides much more contextual information.&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/helpful/master/screenshots/helpful.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt; 
&lt;h2&gt;Usage&lt;/h2&gt; 
&lt;p&gt;Install from MELPA, then call one of the following commands:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;helpful-callable&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;helpful-function&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;helpful-macro&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;helpful-command&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;helpful-key&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;helpful-variable&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;helpful-at-point&lt;/code&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;If you want to replace the default Emacs help keybindings, you can do so:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Note that the built-in `describe-function&#39; includes both functions
;; and macros. `helpful-function&#39; is functions only, so we provide
;; `helpful-callable&#39; as a drop-in replacement.
(global-set-key (kbd &quot;C-h f&quot;) #&#39;helpful-callable)

(global-set-key (kbd &quot;C-h v&quot;) #&#39;helpful-variable)
(global-set-key (kbd &quot;C-h k&quot;) #&#39;helpful-key)
(global-set-key (kbd &quot;C-h x&quot;) #&#39;helpful-command)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;I also recommend the following keybindings to get the most out of helpful:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Lookup the current symbol at point. C-c C-d is a common keybinding
;; for this in lisp modes.
(global-set-key (kbd &quot;C-c C-d&quot;) #&#39;helpful-at-point)

;; Look up *F*unctions (excludes macros).
;;
;; By default, C-h F is bound to `Info-goto-emacs-command-node&#39;. Helpful
;; already links to the manual, if a function is referenced there.
(global-set-key (kbd &quot;C-h F&quot;) #&#39;helpful-function)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;a href=&quot;https://github.com/abo-abo/swiper&quot;&gt;Ivy&lt;/a&gt; users can use Helpful with counsel commands:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq counsel-describe-function-function #&#39;helpful-callable)
(setq counsel-describe-variable-function #&#39;helpful-variable)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Features&lt;/h2&gt; 
&lt;h3&gt;Source code&lt;/h3&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/helpful/master/screenshots/helpful_source.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;Helpful will try really hard to show the source code. It shows the source code for interactively defined functions (unlike the built-in Help) and falls back to the raw sexp if no source is available.&lt;/p&gt; 
&lt;h3&gt;View Callers&lt;/h3&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/helpful/master/screenshots/helpful_refs.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;Helpful will show you where a function is being called!&lt;/p&gt; 
&lt;h3&gt;Prettier Docstrings&lt;/h3&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/helpful/master/screenshots/helpful_docstring.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;Docstrings in helpful:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Highlight the summary (the first sentence)&lt;/li&gt; 
 &lt;li&gt;Include cross-references to other functions/variables&lt;/li&gt; 
 &lt;li&gt;Linkify references to Info nodes&lt;/li&gt; 
 &lt;li&gt;Hide superfluous punctuation&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/helpful/master/screenshots/helpful_view_in_manual.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;If a symbol is also documented in the Info manual, helpful will provide a link to the relevant section too.&lt;/p&gt; 
&lt;h3&gt;Symbol Properties&lt;/h3&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/helpful/master/screenshots/helpful_props.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;Helpful will show you the properties that have been applied to the current symbol. This provides visibility of features like edebug or byte-code optimisation.&lt;/p&gt; 
&lt;p&gt;Helpful will also highlight any symbol aliases.&lt;/p&gt; 
&lt;h3&gt;Describe Commands&lt;/h3&gt; 
&lt;p&gt;Helpful provides a separate &lt;code&gt;helpful-command&lt;/code&gt; function, for when you just want to view interactive functions.&lt;/p&gt; 
&lt;h3&gt;View Keymaps&lt;/h3&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/helpful/master/screenshots/helpful_bindings.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;Helpful displays any keybindings that apply to interactive functions.&lt;/p&gt; 
&lt;h3&gt;Integrated Tooling&lt;/h3&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/helpful/master/screenshots/helpful_tools.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;You can trace, debug or disassemble functions from inside Helpful. This is discoverable and doesn&#39;t require memorisation of commands.&lt;/p&gt; 
&lt;h3&gt;Aliases&lt;/h3&gt; 
&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Wilfred/helpful/master/screenshots/helpful_aliases.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;If a function has multiple aliases in Emacs, Helpful will show all of the aliases defined.&lt;/p&gt; 
&lt;h2&gt;Inspirations&lt;/h2&gt; 
&lt;p&gt;This project has been heavily influenced by:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://www.emacswiki.org/emacs/help+.el&quot;&gt;help+.el&lt;/a&gt;, help-fns+.el, help-mode+.el&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=pQQTScuApWk&quot;&gt;Dave Williams&#39; demo of Lucid&#39;s Energize&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;License&lt;/h2&gt; 
&lt;p&gt;GPLv3+.&lt;/p&gt; 
&lt;p&gt;I am providing code in the repository to you under an open source license. Because this is my personal repository, the license you receive to my code is from me and not my employer.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>org-roam/org-roam</title>
      <link>https://github.com/org-roam/org-roam</link>
      <description>&lt;p&gt;Rudimentary Roam replica with Org-mode&lt;/p&gt;&lt;hr&gt;&lt;h1&gt;Org-roam &lt;a href=&quot;https://github.com/org-roam/org-roam/releases&quot;&gt;&lt;img src=&quot;https://img.shields.io/github/v/release/org-roam/org-roam&quot; alt=&quot;GitHub Release&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://melpa.org/#/org-roam&quot;&gt;&lt;img src=&quot;https://melpa.org/packages/org-roam-badge.svg?sanitize=true&quot; alt=&quot;MELPA&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://www.gnu.org/licenses/gpl-3.0.txt&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/license-GPL_3-green.svg?sanitize=true&quot; alt=&quot;License GPL 3&quot; /&gt;&lt;/a&gt;&lt;/h1&gt; 
&lt;img src=&quot;https://www.orgroam.com/img/logo.svg?sanitize=true&quot; align=&quot;right&quot; alt=&quot;Org-roam Logo&quot; width=&quot;240&quot; /&gt; 
&lt;p&gt;Org-roam is a plain-text knowledge management system. It brings some of &lt;a href=&quot;https://www.roamresearch.com/&quot;&gt;Roam&#39;s&lt;/a&gt; more powerful features into the &lt;a href=&quot;https://orgmode.org/&quot;&gt;Org-mode&lt;/a&gt; ecosystem.&lt;/p&gt; 
&lt;p&gt;Org-roam borrows principles from the Zettelkasten method, providing a solution for non-hierarchical note-taking. It should also work as a plug-and-play solution for anyone already using Org-mode for their personal wiki.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;strong&gt;Private and Secure&lt;/strong&gt;: Edit your personal wiki completely offline, entirely in your control. Encrypt your notes with GPG. Take lasting notes in plain-text.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Networked Thought&lt;/strong&gt;: Connect notes and thoughts together with ease using backlinks. Discover surprising and previously unseen connections in your notes with the built-in graph visualization.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Extensible and Powerful&lt;/strong&gt;: Leverage Emacs&#39; fantastic text-editing interface, and the mature Emacs and Org-mode ecosystem of packages.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Free and Open Source&lt;/strong&gt;: Org-roam is licensed under the GNU General Public License version 3 or later.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p align=&quot;center&quot;&gt; &lt;img src=&quot;https://www.orgroam.com/img/screenshot.png&quot; alt=&quot;Org-roam Screenshot&quot; width=&quot;738&quot; /&gt; &lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://www.orgroam.com/manual.html&quot;&gt;Documentation&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://org-roam.discourse.group/&quot;&gt;Discourse&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://join.slack.com/t/orgroam/shared_invite/zt-wuoize1z-x3UyQnQ0WHF0RhuEQ2NLnQ&quot;&gt;Slack&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://www.orgroam.com/manual.html#FAQ&quot;&gt;Frequently Asked Questions&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://raw.githubusercontent.com/org-roam/org-roam/main/CHANGELOG.md&quot;&gt;Changelog&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Installation&lt;/h2&gt; 
&lt;p&gt;Down below you will find basic installation instructions for how to quickly install &lt;code&gt;org-roam&lt;/code&gt; using various environments for various purposes. For more detailed information, please read the &lt;a href=&quot;https://www.orgroam.com/manual.html&quot;&gt;manual&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;Using &lt;code&gt;package.el&lt;/code&gt;&lt;/h3&gt; 
&lt;details&gt; 
 &lt;summary&gt;Toggle instructions&lt;/summary&gt; 
 &lt;p&gt;You can install &lt;code&gt;org-roam&lt;/code&gt; from &lt;a href=&quot;https://melpa.org/&quot;&gt;MELPA&lt;/a&gt; or &lt;a href=&quot;https://stable.melpa.org/&quot;&gt;MELPA Stable&lt;/a&gt; using &lt;code&gt;package.el&lt;/code&gt;:&lt;/p&gt; 
 &lt;pre&gt;&lt;code&gt;M-x package-install RET org-roam RET
&lt;/code&gt;&lt;/pre&gt; 
&lt;/details&gt; 
&lt;h3&gt;Using &lt;code&gt;straight.el&lt;/code&gt;&lt;/h3&gt; 
&lt;details&gt; 
 &lt;summary&gt;Toggle instructions&lt;/summary&gt; 
 &lt;p&gt;Installation from MELPA or MELPA Stable using &lt;code&gt;straight.el&lt;/code&gt;:&lt;/p&gt; 
 &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;org-roam)
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;Or with &lt;code&gt;use-package&lt;/code&gt;:&lt;/p&gt; 
 &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package org-roam
  :straight t
  ...)
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;If you need to install the package directly from the source repository, instead of from MELPA, the next sample shows how to do so:&lt;/p&gt; 
 &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package org-roam
  :straight (:host github :repo &quot;org-roam/org-roam&quot;
             :files (:defaults &quot;extensions/*&quot;))
  ...)
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;If you plan to use your own local fork for the development and contribution, the next sample will get you there:&lt;/p&gt; 
 &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package org-roam
  :straight (:local-repo &quot;/path/to/org-roam-fork&quot;
             :files (:defaults &quot;extensions/*&quot;)
             :build (:not compile))
  ...)
&lt;/code&gt;&lt;/pre&gt; 
&lt;/details&gt; 
&lt;h3&gt;Using Doom Emacs&lt;/h3&gt; 
&lt;details&gt; 
 &lt;summary&gt;Toggle instructions&lt;/summary&gt; 
 &lt;p&gt;Doom&#39;s &lt;code&gt;:lang org&lt;/code&gt; module comes with support for &lt;code&gt;org-roam&lt;/code&gt;, but it&#39;s not enabled by default. To activate it pass &lt;code&gt;+roam&lt;/code&gt; flag to &lt;code&gt;org&lt;/code&gt; module in your &lt;code&gt;$DOOMDIR/init.el&lt;/code&gt; (e.g. &lt;code&gt;(org +roam)&lt;/code&gt;), save the file and run &lt;code&gt;doom sync -u&lt;/code&gt; in your shell.&lt;/p&gt; 
 &lt;p&gt;To provide better stability, Doom pins the package to a specific commit. If you need to unpin it &lt;em&gt;(not recommended doing that, request Doom to bump the package instead)&lt;/em&gt; use the next in your &lt;code&gt;packages.el&lt;/code&gt;:&lt;/p&gt; 
 &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(unpin! org-roam)
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;If for some reasons you want to use a different recipe for &lt;code&gt;org-roam&lt;/code&gt;, you can use the next form in your &lt;code&gt;packages.el&lt;/code&gt; to install the package from a recipe repository (e.g. MELPA):&lt;/p&gt; 
 &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(package! org-roam)
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;You can pass &lt;code&gt;:pin &quot;commit hash&quot;&lt;/code&gt; to pin the package to a specific commit.&lt;/p&gt; 
 &lt;p&gt;With the next sample you can install the package directly from the source repository:&lt;/p&gt; 
 &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(package! org-roam
  :recipe (:host github :repo &quot;org-roam/org-roam&quot;
           :files (:defaults &quot;extensions/*&quot;)))
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;And if you plan to use your own local fork for the development or contribution, the next sample will get you there:&lt;/p&gt; 
 &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(package! org-roam
  :recipe (:local-repo &quot;/path/to/org-roam-fork&quot;
           :files (:defaults &quot;extensions/*&quot;)
           :build (:not compile)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;/details&gt; 
&lt;h3&gt;Without a package manager&lt;/h3&gt; 
&lt;details&gt; 
 &lt;summary&gt;Toggle instructions&lt;/summary&gt; 
 &lt;p&gt;To install the package without using a package manager you have the next two options:&lt;/p&gt; 
 &lt;ol&gt; 
  &lt;li&gt;Install the package by cloning it with &lt;code&gt;git&lt;/code&gt; from the source repository.&lt;/li&gt; 
  &lt;li&gt;Or install the package by downloading the latest &lt;a href=&quot;https://github.com/org-roam/org-roam/releases&quot;&gt;release version&lt;/a&gt;.&lt;/li&gt; 
 &lt;/ol&gt; 
 &lt;p&gt;In both of the cases you will need to ensure that you have all the required dependencies. These include:&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;org (9.6 is the minimum required version!)&lt;/li&gt; 
  &lt;li&gt;emacsql&lt;/li&gt; 
  &lt;li&gt;magit-section&lt;/li&gt; 
 &lt;/ul&gt; 
 &lt;p&gt;After installing the package, you will need to properly setup &lt;code&gt;load-path&lt;/code&gt; to the package:&lt;/p&gt; 
 &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(add-to-list &#39;load-path &quot;/path/to/org-roam/&quot;)
(add-to-list &#39;load-path &quot;/path/to-org-roam/extensions/&quot;)
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;After which you should be able to resolve &lt;code&gt;(require &#39;org-roam)&lt;/code&gt; call without any problems.&lt;/p&gt; 
 &lt;p&gt;Org-roam also comes with &lt;code&gt;.texi&lt;/code&gt; files to integrate with Emacs&#39; built-in Info system. Read the manual to find more details for how to install them manually.&lt;/p&gt; 
&lt;/details&gt; 
&lt;h2&gt;Configuration&lt;/h2&gt; 
&lt;p&gt;Here&#39;s a very basic sample for configuration of &lt;code&gt;org-roam&lt;/code&gt; using &lt;code&gt;use-package&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package org-roam
  :ensure t
  :custom
  (org-roam-directory (file-truename &quot;/path/to/org-files/&quot;))
  :bind ((&quot;C-c n l&quot; . org-roam-buffer-toggle)
         (&quot;C-c n f&quot; . org-roam-node-find)
         (&quot;C-c n g&quot; . org-roam-graph)
         (&quot;C-c n i&quot; . org-roam-node-insert)
         (&quot;C-c n c&quot; . org-roam-capture)
         ;; Dailies
         (&quot;C-c n j&quot; . org-roam-dailies-capture-today))
  :config
  ;; If you&#39;re using a vertical completion framework, you might want a more informative completion interface
  (setq org-roam-node-display-template (concat &quot;${title:*} &quot; (propertize &quot;${tags:10}&quot; &#39;face &#39;org-tag)))
  (org-roam-db-autosync-mode)
  ;; If using org-roam-protocol
  (require &#39;org-roam-protocol))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Note that the &lt;code&gt;file-truename&lt;/code&gt; function is only necessary when you use symbolic link to &lt;code&gt;org-roam-directory&lt;/code&gt;. Org-roam won&#39;t automatically resolve symbolic link to the directory.&lt;/p&gt; 
&lt;h2&gt;Getting Started&lt;/h2&gt; 
&lt;p&gt;&lt;a href=&quot;https://github.com/daviwil&quot;&gt;David Wilson&lt;/a&gt; of &lt;a href=&quot;https://www.youtube.com/c/SystemCrafters&quot;&gt;System Crafters&lt;/a&gt; has produced an introductory video that covers the basic commands:&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=AyhPmypHDEw&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/AyhPmypHDEw/0.jpg&quot; alt=&quot;Getting Started with Org Roam - Build a Second Brain in Emacs&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;h2&gt;Getting Help&lt;/h2&gt; 
&lt;p&gt;Before creating a new topic/issue, please be mindful of our time and ensure that it has not already been addressed on &lt;a href=&quot;https://github.com/org-roam/org-roam/issues&quot;&gt;GitHub&lt;/a&gt; or on &lt;a href=&quot;https://org-roam.discourse.group/&quot;&gt;Discourse&lt;/a&gt;.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;If you are new to Emacs and have problem setting up Org-roam, please ask your question on &lt;a href=&quot;https://join.slack.com/t/orgroam/shared_invite/zt-wuoize1z-x3UyQnQ0WHF0RhuEQ2NLnQ&quot;&gt;Slack, channel #how-do-i&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;For quick questions, please ask them on &lt;a href=&quot;https://join.slack.com/t/orgroam/shared_invite/zt-wuoize1z-x3UyQnQ0WHF0RhuEQ2NLnQ&quot;&gt;Slack, channel #troubleshooting&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;If something is not working as it should, or if you would like to suggest a new feature, please &lt;a href=&quot;https://github.com/org-roam/org-roam/issues&quot;&gt;create a new issue&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;If you have questions about your workflow with the slip-box method, please find a relevant topic on &lt;a href=&quot;https://org-roam.discourse.group/&quot;&gt;Discourse&lt;/a&gt;, or create a new one.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Knowledge Bases using Org-roam&lt;/h2&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://braindump.jethro.dev/&quot;&gt;Jethro Kuan&lt;/a&gt; (&lt;a href=&quot;https://github.com/jethrokuan/braindump/tree/master/org&quot;&gt;Source&lt;/a&gt;)&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://www.alexeyshmalko.com/&quot;&gt;Alexey Shmalko&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://sidhartharya.github.io/braindump/index.html&quot;&gt;Sidharth Arya&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://edstrom.dev/&quot;&gt;Martin Edström&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Contributing&lt;/h2&gt; 
&lt;p&gt;To report bugs and suggest new feature use the issue tracker. If you have some code which you would like to be merged, then open a pull request. Please also see &lt;a href=&quot;https://raw.githubusercontent.com/org-roam/org-roam/main/.github/CONTRIBUTING.md&quot;&gt;CONTRIBUTING.md&lt;/a&gt;.&lt;/p&gt; 
&lt;h2&gt;License&lt;/h2&gt; 
&lt;p&gt;Copyright © Jethro Kuan and contributors. Distributed under the GNU General Public License, Version 3.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>oantolin/embark</title>
      <link>https://github.com/oantolin/embark</link>
      <description>&lt;p&gt;Emacs Mini-Buffer Actions Rooted in Keymaps&lt;/p&gt;&lt;hr&gt;&lt;p&gt;#+TITLE: Embark: Emacs Mini-Buffer Actions Rooted in Keymaps #+AUTHOR: Omar Antolín Camarena #+OPTIONS: d:nil #+EXPORT_FILE_NAME: embark.texi #+TEXINFO_DIR_CATEGORY: Emacs misc features #+TEXINFO_DIR_TITLE: Embark: (embark). #+TEXINFO_DIR_DESC: Emacs Mini-Buffer Actions Rooted in Keymaps&lt;/p&gt; 
&lt;p&gt;#+html: &lt;a href=&quot;http://elpa.gnu.org/packages/embark.html&quot;&gt;&lt;img alt=&quot;GNU ELPA&quot; src=&quot;https://elpa.gnu.org/packages/embark.svg?sanitize=true&quot; /&gt;&lt;/a&gt; #+html: &lt;a href=&quot;http://elpa.gnu.org/devel/embark.html&quot;&gt;&lt;img alt=&quot;GNU-devel ELPA&quot; src=&quot;https://elpa.gnu.org/devel/embark.svg?sanitize=true&quot; /&gt;&lt;/a&gt; #+html: &lt;a href=&quot;https://melpa.org/#/embark&quot;&gt;&lt;img alt=&quot;MELPA&quot; src=&quot;https://melpa.org/packages/embark-badge.svg?sanitize=true&quot; /&gt;&lt;/a&gt; #+html: &lt;a href=&quot;https://stable.melpa.org/#/embark&quot;&gt;&lt;img alt=&quot;MELPA Stable&quot; src=&quot;https://stable.melpa.org/packages/embark-badge.svg?sanitize=true&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Overview&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Embark makes it easy to choose a command to run based on what is near point, both during a minibuffer completion session (in a way familiar to Helm or Counsel users) and in normal buffers. Bind the command =embark-act= to a key and it acts like prefix-key for a keymap of /actions/ (commands) relevant to the /target/ around point. With point on an URL in a buffer you can open the URL in a browser or eww or download the file it points to. If while switching buffers you spot an old one, you can kill it right there and continue to select another. Embark comes preconfigured with over a hundred actions for common types of targets such as files, buffers, identifiers, s-expressions, sentences; and it is easy to add more actions and more target types. Embark can also collect all the candidates in a minibuffer to an occur-like buffer or export them to a buffer in a major-mode specific to the type of candidates, such as dired for a set of files, ibuffer for a set of buffers, or customize for a set of variables.&lt;/p&gt; 
&lt;p&gt;** Acting on targets&lt;/p&gt; 
&lt;p&gt;You can think of =embark-act= as a keyboard-based version of a right-click contextual menu. The =embark-act= command (which you should bind to a convenient key), acts as a prefix for a keymap offering you relevant /actions/ to use on a /target/ determined by the context:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;In the minibuffer, the target is the current top completion candidate.&lt;/li&gt; 
 &lt;li&gt;In the =&lt;em&gt;Completions&lt;/em&gt;= buffer the target is the completion at point.&lt;/li&gt; 
 &lt;li&gt;In a regular buffer, the target is the region if active, or else the file, symbol, URL, s-expression or defun at point.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Multiple targets can be present at the same location and you can cycle between them by repeating the =embark-act= key binding. The type of actions offered depend on the type of the target. Here is a sample of a few of the actions offered in the default configuration:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;For files you get offered actions like deleting, copying, renaming, visiting in another window, running a shell command on the file, etc.&lt;/li&gt; 
 &lt;li&gt;For buffers the actions include switching to or killing the buffer.&lt;/li&gt; 
 &lt;li&gt;For package names the actions include installing, removing or visiting the homepage.&lt;/li&gt; 
 &lt;li&gt;For Emacs Lisp symbols the actions include finding the definition, looking up documentation, evaluating (which for a variable immediately shows the value, but for a function lets you pass it some arguments first). There are some actions specific to variables, such as setting the value directly or though the customize system, and some actions specific to commands, such as binding it to a key.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;By default when you use =embark-act= if you don&#39;t immediately select an action, after a short delay Embark will pop up a buffer showing a list of actions and their corresponding key bindings. If you are using =embark-act= outside the minibuffer, Embark will also highlight the current target. These behaviors are configurable via the variable =embark-indicators=. Instead of selecting an action via its key binding, you can select it by name with completion by typing =C-h= after =embark-act=.&lt;/p&gt; 
&lt;p&gt;Everything is easily configurable: determining the current target, classifying it, and deciding which actions are offered for each type in the classification. The above introduction just mentions part of the default configuration.&lt;/p&gt; 
&lt;p&gt;Configuring which actions are offered for a type is particularly easy and requires no programming: the variable =embark-keymap-alist= associates target types with variables containing keymaps, and those keymaps containing bindings for the actions. (To examine the available categories and their associated keymaps, you can use =C-h v embark-keymap-alist= or customize that variable.) For example, in the default configuration the type =file= is associated with the symbol =embark-file-map=. That symbol names a keymap with single-letter key bindings for common Emacs file commands, for instance =c= is bound to =copy-file=. This means that if you are in the minibuffer after running a command that prompts for a file, such as =find-file= or =rename-file=, you can copy a file by running =embark-act= and then pressing =c=.&lt;/p&gt; 
&lt;p&gt;These action keymaps are very convenient but not strictly necessary when using =embark-act=: you can use any command that reads from the minibuffer as an action and the target of the action will be inserted at the first minibuffer prompt. After running =embark-act= all of your key bindings and even =execute-extended-command= can be used to run a command. For example, if you want to replace all occurrences of the symbol at point, just use =M-%= as the action, there is no need to bind =query-replace= in one of Embark&#39;s keymaps. Also, those action keymaps are normal Emacs keymaps and you should feel free to bind in them whatever commands you find useful as actions and want to be available through convenient bindings.&lt;/p&gt; 
&lt;p&gt;The actions in =embark-general-map= are available no matter what type of completion you are in the middle of. By default this includes bindings to save the current candidate in the kill ring and to insert the current candidate in the previously selected buffer (the buffer that was current when you executed a command that opened up the minibuffer).&lt;/p&gt; 
&lt;p&gt;Emacs&#39;s minibuffer completion system includes metadata indicating the /category/ of what is being completed. For example, =find-file=&#39;s metadata indicates a category of =file= and =switch-to-buffer=&#39;s metadata indicates a category of =buffer=. Embark has the related notion of the /type/ of a target for actions, and by default when category metadata is present it is taken to be the type of minibuffer completion candidates when used as targets. Emacs commands often do not set useful category metadata so the [[&lt;a href=&quot;https://github.com/minad/marginalia&quot;&gt;https://github.com/minad/marginalia&lt;/a&gt;][Marginalia]] package, which supplies this missing metadata, is highly recommended for use with Embark.&lt;/p&gt; 
&lt;p&gt;Embark&#39;s default configuration has actions for the following target types: files, buffers, symbols, packages, URLs, bookmarks, and as a somewhat special case, actions for when the region is active. You can read about the [[&lt;a href=&quot;https://github.com/oantolin/embark/wiki/Default-Actions&quot;&gt;https://github.com/oantolin/embark/wiki/Default-Actions&lt;/a&gt;][default actions and their key bindings]] on the GitHub project wiki.&lt;/p&gt; 
&lt;p&gt;** The default action on a target&lt;/p&gt; 
&lt;p&gt;Embark has a notion of default action for a target:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;If the target is a minibuffer completion candidate, then the default action is whatever command opened the minibuffer in the first place. For example if you run =kill-buffer=, then the default action will be to kill buffers.&lt;/li&gt; 
 &lt;li&gt;If the target comes from a regular buffer (i.e., not a minibuffer), then the default action is whatever is bound to =RET= in the keymap of actions for that type of target. For example, in Embark&#39;s default configuration for a URL found at point the default action is =browse-url=, because =RET= is bound to =browse-url= in the =embark-url-map= keymap.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;To run the default action you can press =RET= after running =embark-act=. Note that if there are several different targets at a given location, each has its own default action, so first cycle to the target you want and then press =RET= to run the corresponding default action.&lt;/p&gt; 
&lt;p&gt;There is also =embark-dwim= which runs the default action for the first target found. It&#39;s pretty handy in non-minibuffer buffers: with Embark&#39;s default configuration it will:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Open the file at point.&lt;/li&gt; 
 &lt;li&gt;Open the URL at point in a web browser (using the =browse-url= command).&lt;/li&gt; 
 &lt;li&gt;Compose a new email to the email address at point.&lt;/li&gt; 
 &lt;li&gt;In an Emacs Lisp buffer, if point is on an opening parenthesis or right after a closing one, it will evaluate the corresponding expression.&lt;/li&gt; 
 &lt;li&gt;Go to the definition of an Emacs Lisp function, variable or macro at point.&lt;/li&gt; 
 &lt;li&gt;Find the file corresponding to an Emacs Lisp library at point.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** Working with sets of possible targets&lt;/p&gt; 
&lt;p&gt;Besides acting individually on targets, Embark lets you work collectively on a set of target /candidates/. For example, while you are in the minibuffer the candidates are simply the possible completions of your input. Embark provides three main commands to work on candidate sets:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;The =embark-act-all= command runs the same action on each of the current candidates. It is just like using =embark-act= on each candidate in turn. (Because you can easily act on many more candidates than you meant to, by default Embark asks you to confirm uses of =embark-act-all=; you can turn this off by setting the user option =embark-confirm-act-all= to =nil=.)&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;The =embark-collect= command produces a buffer listing all the current candidates, for you to peruse and run actions on at your leisure. The candidates are displayed as a list showing additional annotations. If any of the candidates contain newlines, then horizontal lines are used to separate candidates.&lt;/p&gt; &lt;p&gt;The Embark Collect buffer is somewhat &quot;dired-like&quot;: you can select and deselect candidates through =embark-select= (available as an action in =embark-act=, bound to =SPC=; but you could also give it a global key binding). In an Embark Collect buffer =embark-act= is bound to =a= and =embark-act-all= is bound to =A=; =embark-act-all= will act on all currently marked candidates if there any, and will act on all candidates if none are marked. In particular, this means that =a SPC= will toggle whether the candidate at point is selected, and =A SPC= will select all candidates if none are selected, or deselect all selected candidates if there are some.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;The =embark-export= command tries to open a buffer in an appropriate major mode for the set of candidates. If the candidates are files export produces a Dired buffer; if they are buffers, you get an Ibuffer buffer; and if they are packages you get a buffer in package menu mode.&lt;/p&gt; &lt;p&gt;If you use the grepping commands from the [[&lt;a href=&quot;https://github.com/minad/consult/&quot;&gt;https://github.com/minad/consult/&lt;/a&gt;][Consult]] package, =consult-grep=, =consult-git-grep= or =consult-ripgrep=, then you should install the =embark-consult= package, which adds support for exporting a list of grep results to an honest grep-mode buffer, on which you can even use [[&lt;a href=&quot;https://github.com/mhayashi1120/Emacs-wgrep&quot;&gt;https://github.com/mhayashi1120/Emacs-wgrep&lt;/a&gt;][wgrep]] if you wish.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;When in doubt choosing between exporting and collecting, a good rule of thumb is to always prefer =embark-export= since when an exporter to a special major mode is available for a given type of target, it will be more featureful than an Embark collect buffer, and if no such exporter is configured the =embark-export= command falls back to the generic =embark-collect=.&lt;/p&gt; 
&lt;p&gt;These commands are always available as &quot;actions&quot; (although they do not act on just the current target but on all candidates) for =embark-act= and are bound to =A=, =S= (for &quot;snapshot&quot;), and =E=, respectively, in =embark-general-map=. This means that you do not have to bind your own key bindings for these (although you can, of course!), just a key binding for =embark-act=.&lt;/p&gt; 
&lt;p&gt;In Embark Collect or Embark Export buffers that were obtained by running =embark-collect= or =embark-export= from within a minibuffer completion session, =g= is bound to a command that restarts the completion session, that is, the command that opened the minibuffer is run again and the minibuffer contents restored. You can then interact normally with the command, perhaps editing the minibuffer contents, and, if you wish, you can rerun =embark-collect= or =embark-export= to get an updated buffer.&lt;/p&gt; 
&lt;p&gt;*** Selecting some targets to make an ad hoc candidate set&lt;/p&gt; 
&lt;p&gt;The commands for working with sets of candidates just described, namely =embark-act-all=, =embark-export= and =embark-collect= by default work with all candidates defined in the current context. For example, in the minibuffer they operate on all currently completion candidates, or in a dired buffer they work on all marked files (or all files if none are marked). Embark also has a notion of /selection/, where you can accumulate an ad hoc list of targets for these commands to work on.&lt;/p&gt; 
&lt;p&gt;The selection is controlled by using the =embark-select= action, bound to =SPC= in =embark-general-map= so that it is always available (you can also give =embark-select= a global key binding if you wish; when called directly, not as an action for =embark-act=, it will select the first target at point). Calling this action on a target toggles its membership in the current buffer&#39;s Embark selection; that is, it adds it to selection if not selected and removes it from the selection if it was selected. Whenever the selection for a buffer is non-empty, the commands =embark-act-all=, =embark-export= and =embark-collect= will act on the selection.&lt;/p&gt; 
&lt;p&gt;To deselect all selected targets, you can use the =embark-select= action through =embark-act-all=, since this will run =embark-select= on each member of the current selection. Similarly if no targets are selected and you are in a minibuffer completion session, running =embark-select= from =embark-act-all= will select all the current completion candidates.&lt;/p&gt; 
&lt;p&gt;By default, whenever some targets are selected in the current buffer, a count of selected targets appears in the mode line. This can be turned off or customized through the =embark-selection-indicator= user option.&lt;/p&gt; 
&lt;p&gt;The selection functionality is supported in every buffer:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;In the minibuffer this gives a convenient way to act on several completion candidates that don&#39;t follow any simple pattern: just go through the completions selecting the ones you want, then use =embark-act-all=. For example, you could attach several files at once to an email.&lt;/li&gt; 
 &lt;li&gt;For Embark Collect buffers this functionality enables a dired-like workflow, in which you mark various candidates and apply an action to all at once. (It supersedes a previous ad hoc dired-like interface that was implemented only in Embark Collect buffers, with a slightly different interface.)&lt;/li&gt; 
 &lt;li&gt;In a eww buffer you could use this to select various links you wish to follow up on, and then collect them into a buffer. Similarly, while reading Emacs&#39;s info manual you could select some symbols you want to read more about and export them to an =apropos-mode= buffer.&lt;/li&gt; 
 &lt;li&gt;You can use selections in regular text or programming buffers to do complex editing operations. For example, if you have three paragraphs scattered over a file and you want to bring them together, you can select each one, insert them all somewhere and finally delete all of them (from their original locations).&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;*** =embark-live= a live-updating variant of =embark-collect=&lt;/p&gt; 
&lt;p&gt;Finally, there is also an =embark-live= variant of the =embark-collect= command which automatically updates the collection after each change in the source buffer. Users of a completion UI that automatically updates and displays the candidate list (such as Vertico, Icomplete, Fido-mode, or MCT) will probably not want to use =embark-live= from the minibuffer as they will then have two live updating displays of the completion candidates!&lt;/p&gt; 
&lt;p&gt;A more likely use of =embark-live= is to be called from a regular buffer to display a sort of live updating &quot;table of contents&quot; for the buffer. This depends on having appropriate candidate collectors configured in =embark-candidate-collectors=. There are not many in Embark&#39;s default configuration, but you can try this experiment: open a dired buffer in a directory that has very many files, mark a few, and run =embark-live=. You&#39;ll get an Embark Collect buffer containing only the marked files, which updates as you mark or unmark files in dired. To make =embark-live= genuinely useful other candidate collectors are required. The =embark-consult= package (documented near the end of this manual) contains a few: one for imenu items and one for outline headings as used by =outline-minor-mode=. Those collectors really do give =embark-live= a table-of-contents feel.&lt;/p&gt; 
&lt;p&gt;** Switching to a different command without losing what you&#39;ve typed&lt;/p&gt; 
&lt;p&gt;Embark also has the =embark-become= command which is useful for when you run a command, start typing at the minibuffer and realize you meant a different command. The most common case for me is that I run =switch-to-buffer=, start typing a buffer name and realize I haven&#39;t opened the file I had in mind yet! I&#39;ll use this situation as a running example to illustrate =embark-become=. When this happens I can, of course, press =C-g= and then run =find-file= and open the file, but this requires retyping the portion of the file name you already typed. This process can be streamlined with =embark-become=: while still in the =switch-to-buffer= you can run =embark-become= and effectively make the =switch-to-buffer= command become =find-file= for this run.&lt;/p&gt; 
&lt;p&gt;You can bind =embark-become= to a key in =minibuffer-local-map=, but it is also available as an action under the letter =B= (uppercase), so you don&#39;t need a binding if you already have one for =embark-act=. So, assuming I have =embark-act= bound to, say, =C-.=, once I realize I haven&#39;t open the file I can type =C-. B C-x C-f= to have =switch-to-buffer= become =find-file= without losing what I have already typed in the minibuffer.&lt;/p&gt; 
&lt;p&gt;But for even more convenience, =embark-become= offers shorter key bindings for commands you are likely to want the current command to become. When you use =embark-become= it looks for the current command in all keymaps named in the list =embark-become-keymaps= and then activates all keymaps that contain it. For example, the default value of =embark-become-keymaps= contains a keymap =embark-become-file+buffer-map= with bindings for several commands related to files and buffers, in particular, it binds =switch-to-buffer= to =b= and =find-file= to =f=. So when I accidentally try to switch to a buffer for a file I haven&#39;t opened yet, =embark-become= finds that the command I ran, =switch-to-buffer=, is in the keymap =embark-become-file+buffer-map=, so it activates that keymap (and any others that also contain a binding for =switch-to-buffer=). The end result is that I can type =C-. B f= to switch to =find-file=.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Quick start&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The easiest way to install Embark is from GNU ELPA, just run =M-x package-install RET embark RET=. (It is also available on MELPA.) It is highly recommended to also install [[&lt;a href=&quot;https://github.com/minad/marginalia&quot;&gt;https://github.com/minad/marginalia&lt;/a&gt;][Marginalia]] (also available on GNU ELPA), so that Embark can offer you preconfigured actions in more contexts. For =use-package= users, the following is a very reasonable starting configuration:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (use-package marginalia :ensure t :config (marginalia-mode))&lt;/p&gt; 
&lt;p&gt;(use-package embark :ensure t&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;:bind
((&quot;C-.&quot; . embark-act)         ;; pick some comfortable binding
 (&quot;C-;&quot; . embark-dwim)        ;; good alternative: M-.
 (&quot;C-h B&quot; . embark-bindings)) ;; alternative for `describe-bindings&#39;

:init

;; Optionally replace the key help with a completing-read interface
(setq prefix-help-command #&#39;embark-prefix-help-command)

;; Show the Embark target at point via Eldoc. You may adjust the
;; Eldoc strategy, if you want to see the documentation from
;; multiple providers. Beware that using this can be a little
;; jarring since the message shown in the minibuffer can be more
;; than one line, causing the modeline to move up and down:

;; (add-hook &#39;eldoc-documentation-functions #&#39;embark-eldoc-first-target)
;; (setq eldoc-documentation-strategy #&#39;eldoc-documentation-compose-eagerly)

;; Add Embark to the mouse context menu. Also enable `context-menu-mode&#39;.
;; (context-menu-mode 1)
;; (add-hook &#39;context-menu-functions #&#39;embark-context-menu 100)

:config

;; Hide the mode line of the Embark live/completions buffers
(add-to-list &#39;display-buffer-alist
             &#39;(&quot;\\`\\*Embark Collect \\(Live\\|Completions\\)\\*&quot;
               nil
               (window-parameters (mode-line-format . none)))))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;;; Consult users will also want the embark-consult package. (use-package embark-consult :ensure t) ; only need to install it, embark loads it after consult if found #+end_src&lt;/p&gt; 
&lt;p&gt;About the suggested key bindings for =embark-act= and =embark-dwim=:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Those key bindings are unlikely to work in the terminal, but terminal users are probably well aware of this and will know to select different bindings.&lt;/li&gt; 
 &lt;li&gt;The suggested =C-.= binding is used by default in (at least some installations of) GNOME to input emojis, and Emacs doesn&#39;t even get a chance to respond to the binding. You can select a different key binding for =embark-act= or use =ibus-setup= to change the shortcut for emoji insertion (Emacs 29 uses =C-x 8 e e=, in case you want to set the same one system-wide).&lt;/li&gt; 
 &lt;li&gt;The suggested alternative of =M-.= for =embark-dwim= is bound by default to =xref-find-definitions=. That is a very useful command but overwriting it with =embark-dwim= is sensible since in Embark&#39;s default configuration, =embark-dwim= will also find the definition of the identifier at point. (Note that =xref-find-definitions= with a prefix argument prompts you for an identifier, =embark-dwim= does not cover this case).&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Other Embark commands such as =embark-act-all=, =embark-become=, =embark-collect=, and =embark-export= can be run through =embark-act= as actions bound to =A=, =B=, =S= (for &quot;snapshot&quot;), and =E= respectively, and thus don&#39;t really need a dedicated key binding, but feel free to bind them directly if you so wish. If you do choose to bind them directly, you&#39;ll probably want to bind them in =minibuffer-local-map=, since they are most useful in the minibuffer (in fact, =embark-become= only works in the minibuffer).&lt;/p&gt; 
&lt;p&gt;The command =embark-dwim= executes the default action at point. Another good keybinding for =embark-dwim= is =M-.= since =embark-dwim= acts like =xref-find-definitions= on the symbol at point. =C-.= can be seen as a right-click context menu at point and =M-.= acts like left-click. The keybindings are mnemonic, both act at the point (=.=).&lt;/p&gt; 
&lt;p&gt;Embark needs to know what your minibuffer completion system considers to be the list of candidates and which one is the current candidate. Embark works out of the box if you use Emacs&#39;s default tab completion, the built-in =icomplete-mode= or =fido-mode=, or the third-party packages [[&lt;a href=&quot;https://github.com/minad/vertico&quot;&gt;https://github.com/minad/vertico&lt;/a&gt;][Vertico]] or [[&lt;a href=&quot;https://github.com/abo-abo/swiper&quot;&gt;https://github.com/abo-abo/swiper&lt;/a&gt;][Ivy]].&lt;/p&gt; 
&lt;p&gt;If you are a [[&lt;a href=&quot;https://emacs-helm.github.io/helm/&quot;&gt;https://emacs-helm.github.io/helm/&lt;/a&gt;][Helm]] or [[&lt;a href=&quot;https://github.com/abo-abo/swiper&quot;&gt;https://github.com/abo-abo/swiper&lt;/a&gt;][Ivy]] user you are unlikely to want Embark since those packages include comprehensive functionality for acting on minibuffer completion candidates. (Embark does come with Ivy integration despite this.)&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Advanced configuration ** Showing information about available targets and actions&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;By default, if you run =embark-act= and do not immediately select an action, after a short delay Embark will pop up a buffer called =&lt;em&gt;Embark Actions&lt;/em&gt;= containing a list of available actions with their key bindings. You can scroll that buffer with the mouse of with the usual commands =scroll-other-window= and =scroll-other-window-down= (bound by default to =C-M-v= and =C-M-S-v=).&lt;/p&gt; 
&lt;p&gt;That functionality is provided by the =embark-mixed-indicator=, but Embark has other indicators that can provide information about the target and its type, what other targets you can cycle to, and which actions have key bindings in the action map for the current type of target. Any number of indicators can be active at once and the user option =embark-indicators= should be set to a list of the desired indicators.&lt;/p&gt; 
&lt;p&gt;Embark comes with the following indicators:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;=embark-minimal-indicator=: shows a messages in the echo area or minibuffer prompt showing the current target and the types of all targets starting with the current one.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark-highlight-indicator=: highlights the target at point; on by default.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark-verbose-indicator=: displays a table of actions and their key bindings in a buffer; this is not on by default, in favor of the mixed indicator described next.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark-mixed-indicator=: starts out by behaving as the minimal indicator but after a short delay acts as the verbose indicator; this is on by default.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark-isearch-highlight-indicator=: this only does something when the current target is the symbol at point, in which case it lazily highlights all occurrences of that symbol in the current buffer, like isearch; also on by default.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Users of the popular [[&lt;a href=&quot;https://github.com/justbur/emacs-which-key&quot;&gt;https://github.com/justbur/emacs-which-key&lt;/a&gt;][which-key]] package may prefer to use the =embark-which-key-indicator= from the [[&lt;a href=&quot;https://github.com/oantolin/embark/wiki/Additional-Configuration#use-which-key-like-a-key-menu-prompt&quot;&gt;https://github.com/oantolin/embark/wiki/Additional-Configuration#use-which-key-like-a-key-menu-prompt&lt;/a&gt;][Embark wiki]]. Just copy its definition from the wiki into your configuration and customize the =embark-indicators= user option to exclude the mixed and verbose indicators and to include =embark-which-key-indicator=.&lt;/p&gt; 
&lt;p&gt;If you use [[&lt;a href=&quot;https://github.com/minad/vertico&quot;&gt;https://github.com/minad/vertico&lt;/a&gt;][Vertico]], there is an even easier way to get a =which-key=-like display that also lets you use completion to narrow down the list of alternatives, described at the end of the next section.&lt;/p&gt; 
&lt;p&gt;** Selecting commands via completions instead of key bindings&lt;/p&gt; 
&lt;p&gt;As an alternative to reading the list of actions in the verbose or mixed indicators (see the previous section for a description of these), you can press the =embark-help-key=, which is =C-h= by default (but you may prefer =?= to free up =C-h= for use as a prefix) after running =embark-act=. Pressing the help key will prompt you for the name of an action with completion (but feel free to enter a command that is not among the offered candidates!), and will also remind you of the key bindings. You can press =embark-keymap-prompter-key=, which is =@= by default, at the prompt and then one of the key bindings to enter the name of the corresponding action.&lt;/p&gt; 
&lt;p&gt;You may think that with the =&lt;em&gt;Embark Actions&lt;/em&gt;= buffer popping up to remind you of the key bindings you&#39;d never want to use completion to select an action by name, but personally I find that typing a small portion of the action name to narrow down the list of candidates feels significantly faster than visually scanning the entire list of actions.&lt;/p&gt; 
&lt;p&gt;If you find you prefer selecting actions that way, you can configure embark to always prompt you for actions by setting the variable =embark-prompter= to =embark-completing-read-prompter=.&lt;/p&gt; 
&lt;p&gt;On the other hand, you may wish to continue using key bindings for the actions you perform most often, and to use completion only to explore what further actions are available or when you&#39;ve forgotten a key binding. In that case, you may prefer to use the minimal indicator, which does not pop-up an =&lt;em&gt;Embark Actions&lt;/em&gt;= buffer at all, and to use the =embark-help-key= whenever you need help. This unobtrusive setup is achieved with the following configuration:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq embark-indicators &#39;(embark-minimal-indicator ; default is embark-mixed-indicator embark-highlight-indicator embark-isearch-highlight-indicator)) #+end_src&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://github.com/minad/vertico&quot;&gt;https://github.com/minad/vertico&lt;/a&gt;][Vertico]] users may wish to configure a grid display for the actions and key-bindings, reminiscent of the popular package [[&lt;a href=&quot;https://github.com/justbur/emacs-which-key&quot;&gt;https://github.com/justbur/emacs-which-key&lt;/a&gt;][which-key]], but, of course, enhanced by the use of completion to narrow the list of commands. In order to get the grid display, put the following in your Vertico configuration:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (add-to-list &#39;vertico-multiform-categories &#39;(embark-keybinding grid)) (vertico-multiform-mode) #+end_src&lt;/p&gt; 
&lt;p&gt;This will make the available keys be shown in a compact grid like in =which-key=. The =vertico-multiform-mode= also enables keys such as =M-V=, =M-G=, =M-B=, and =M-U= for manually switching between layouts in Vertico buffers.&lt;/p&gt; 
&lt;p&gt;*** Selecting commands via completion outside of Embark&lt;/p&gt; 
&lt;p&gt;If you like this completion interface for exploring key bindings for Embark actions, you may want to use it elsewhere in Emacs. You can use Embark&#39;s completion-based command prompter to list:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;key bindings under a prefix,&lt;/li&gt; 
 &lt;li&gt;local key bindings, or&lt;/li&gt; 
 &lt;li&gt;all key bindings.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;To use it for key bindings under a prefix (you can use this to replace the =which-key= package, for example), use this configuration:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq prefix-help-command #&#39;embark-prefix-help-command) #+end_src&lt;/p&gt; 
&lt;p&gt;Now, when you have started on a prefix sequence such as =C-x= or =C-c=, pressing =C-h= will bring up the Embark version of the built-in =prefix-help-command=, which will list the keys under that prefix and their bindings, and lets you select the one you wanted with completion, or by key binding if you press =embark-keymap-prompter-key=.&lt;/p&gt; 
&lt;p&gt;If you like this kind of prefix help, but want it to appear automatically after a delay, like =which-key-mode= does by default, you can use =embark-auto-prefix-help-mode= (independently of whether you also use the above setting for =prefix-help-command= or not).&lt;/p&gt; 
&lt;p&gt;To list local or global key bindings, use the command =embark-bindings=. You can bind that to =C-h b=, which is the default key binding for the built-in =describe-bindings= command, which this command can replace. By default, =embark-bindings= lists local key bindings, typically those bound in the major mode keymap; to get global bindings as well, call it with a =C-u= prefix argument.&lt;/p&gt; 
&lt;p&gt;** Quitting the minibuffer after an action&lt;/p&gt; 
&lt;p&gt;By default, if you call =embark-act= from the minibuffer it quits the minibuffer after performing the action. You can change this by setting the user option =embark-quit-after-action= to =nil=. Having =embark-act= /not/ quit the minibuffer can be useful to turn commands into little &quot;thing managers&quot;. For example, you can use =find-file= as a little file manager or =describe-package= as a little package manager: you can run those commands, perform a series of actions, and then quit the command.&lt;/p&gt; 
&lt;p&gt;If you want to control the quitting behavior in a fine-grained manner depending on the action, you can set =embark-quit-after-action= to an alist, associating commands to either =t= for quitting or =nil= for not quitting. When using an alist, you can use the special key =t= to specify the default behavior. For example, to specify that by default actions should not quit the minibuffer but that using =kill-buffer= as an action should quit, you can use the following configuration:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq embark-quit-after-action &#39;((kill-buffer . t) (t . nil))) #+end_src&lt;/p&gt; 
&lt;p&gt;The variable =embark-quit-after-action= only specifies a default, that is, it only controls whether or not =embark-act= quits the minibuffer when you call it without a prefix argument, and you can select the opposite behavior to what the variable says by calling =embark-act= with =C-u=. Also note that both the variable =embark-quit-after-action= and =C-u= have no effect when you call =embark-act= outside the minibuffer.&lt;/p&gt; 
&lt;p&gt;If you find yourself using the quitting and non-quitting variants of =embark-act= about equally often, independently of the action, you may prefer to simply have separate commands for them instead of a single command that you call with =C-u= half the time. You could, for example, keep the default exiting behavior of =embark-act= and define a non-quitting version as follows:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (defun embark-act-noquit () &quot;Run action but don&#39;t quit the minibuffer afterwards.&quot; (interactive) (let ((embark-quit-after-action nil)) (embark-act))) #+end_src&lt;/p&gt; 
&lt;p&gt;** Recording acted-on minibuffer candidates in minibuffer history&lt;/p&gt; 
&lt;p&gt;Confirming minibuffer input with =RET= records the selected candidate in the appropriate history list. The user option =embark-record-minibuffer-history= controls how Embark records acted-on candidates. This option accepts three kinds of values: =t= (always record), =nil= (never record), or =(skip ACTIONS...)= to record for everything except the listed actions. The default is a =skip= form that excludes meta commands such as =embark-export=.&lt;/p&gt; 
&lt;p&gt;** Running some setup after injecting the target&lt;/p&gt; 
&lt;p&gt;You can customize what happens after the target is inserted at the minibuffer prompt of an action. There are =embark-target-injection-hooks=, that are run by default after injecting the target into the minibuffer. The variable =embark-target-injection-hooks= is an alist associating commands to their setup hooks. There are two special keys: if no setup hook is specified for a given action, the hook associated to =t= is run; and the hook associated to =:always= is run regardless of the action. (This variable used to have the less explicit name of =embark-setup-action-hooks=, so please update your configuration.)&lt;/p&gt; 
&lt;p&gt;For example, consider using =shell-command= as an action during file completion. It would be useful to insert a space before the target file name and to leave the point at the beginning, so you can immediately type the shell command to run on that file. That&#39;s why in Embark&#39;s default configuration there is an entry in =embark-target-injection-hooks= associating =shell-command= to a hook that includes =embark--shell-prep=, a simple helper function that quotes all the spaces in the file name, inserts an extra space at the beginning of the line and leaves point to the left of it.&lt;/p&gt; 
&lt;p&gt;Now, the preparation that =embark--shell-prep= does would be useless if Embark did what it normally does after it inserts the target of the action at the minibuffer prompt, which is to &quot;press =RET=&quot; for you, accepting the target as is; if Embark did that for =shell-command= you wouldn&#39;t get a chance to type in the command to execute! That is why in Embark&#39;s default configuration the entry for =shell-command= in =embark-target-injection-hooks= also contains the function =embark--allow-edit=.&lt;/p&gt; 
&lt;p&gt;Embark used to have a dedicated variable =embark-allow-edit-actions= to which you could add commands for which Embark should forgo pressing =RET= for you after inserting the target. Since its effect can also be achieved via the general =embark-target-injection-hooks= mechanism, that variable has been removed to simplify Embark. Be sure to update your configuration; if you had something like:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (add-to-list &#39;embark-allow-edit-actions &#39;my-command) #+end_src&lt;/p&gt; 
&lt;p&gt;you should replace it with:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (push &#39;embark--allow-edit (alist-get &#39;my-command embark-target-injection-hooks)) #+end_src&lt;/p&gt; 
&lt;p&gt;Also note that while you could abuse =embark--allow-edit= so that you have to confirm &quot;dangerous&quot; actions such as =delete-file=, it is better to implement confirmation by adding the =embark--confirm= function to the appropriate entry of a different hook alist, namely, =embark-pre-action-hooks=.&lt;/p&gt; 
&lt;p&gt;Besides =embark--allow-edit=, Embark comes with another function that is of general utility in action setup hooks: =embark--ignore-target=. Use it for commands that do prompt you in the minibuffer but for which inserting the target would be inappropriate. This is not a common situation but does occasionally arise. For example it is used by default for =shell-command-on-region=: that command is used as an action for region targets, and it prompts you for a shell command; you typically do /not/ want the target, that is the contents of the region, to be entered at that prompt!&lt;/p&gt; 
&lt;p&gt;** Running hooks before, after or around an action&lt;/p&gt; 
&lt;p&gt;Embark has three variables, =embark-pre-action-hooks=, =embark-post-action-hooks= and =embark-around-action-hooks=, which are alists associating commands to hooks that should run before or after or as around advice for the command when used as an action. As with =embark-target-injection-hooks=, there are two special keys for the alists: =t= designates the default hook to run when no specific hook is specified for a command; and the hook associated to =:always= runs regardless.&lt;/p&gt; 
&lt;p&gt;The default values of those variables are fairly extensive, adding creature comforts to make running actions a smooth experience. Embark comes with several functions intended to be added to these hooks, and used in the default values of =embark-pre-action-hooks=, =embark-post-action-hooks= and =embark-around-action-hooks=.&lt;/p&gt; 
&lt;p&gt;For pre-action hooks:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;=embark--confirm= :: Prompt the user for confirmation before executing the action. This is used be default for commands deemed &quot;dangerous&quot;, or, more accurately, hard to undo, such as =delete-file= and =kill-buffer=.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark--unmark-target= :: Unmark the active region. Use this for commands you want to act on the region contents but without the region being active. The default configuration uses this function as a pre-action hook for =occur= and =query-replace=, for example, so that you can use them as actions with region targets to search the whole buffer for the text contained in the region. Without this pre-action hook using =occur= as an action for a region target would be pointless: it would search for the the region contents /in the region/, (typically, due to the details of regexps) finding only one match!&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark--beginning-of-target= :: Move to the beginning of the target (for targets that report bounds). This is used by default for backward motion commands such as =backward-sexp=, so that they don&#39;t accidentally leave you on the current target.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark--end-of-target= :: Move to the end of the target. This is used similarly to the previous function, but also for commands that act on the last s-expression like =eval-last-sexp=. This allow you to act on an s-expression from anywhere inside it and still use =eval-last-sexp= as an action.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark--xref-push-markers= :: Push the current location on the xref marker stack. Use this for commands that take you somewhere and for which you&#39;d like to be able to come back to where you were using =xref-pop-marker-stack=. This is used by default for =find-library=.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;For post-action hooks:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;=embark--restart= :: Restart the command currently prompting in the minibuffer, so that the list of completion candidates is updated. This is useful as a post action hook for commands that delete or rename a completion candidate; for example the default value of =embark-post-action-hooks= uses it for =delete-file=, =kill-buffer=, =rename-file=, =rename-buffer=, etc.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;For around-action hooks:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;=embark--mark-target= :: Save existing mark and point location, mark the target and run the action. Most targets at point outside the minibuffer report which region of the buffer they correspond to (this is the information used by =embark-highlight-indicator= to know what portion of the buffer to highlight); this function marks that region. It is useful as an around action hook for commands that expect a region to be marked, for example, it is used by default for =indent-region= so that it works on s-expression targets, or for =fill-region= so that it works on paragraph targets.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark--cd= :: Run the action with =default-directory= set to the directory associated to the current target. The target should be of type =file=, =buffer=, =bookmark= or =library=, and the associated directory is what you&#39;d expect in each case.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark--narrow-to-target= :: Run the action with buffer narrowed to current target. Use this as an around hook to localize the effect of actions that don&#39;t already work on just the region. In the default configuration it is used for =repunctuate-sentences=.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=embark--save-excursion= :: Run the action restoring point at the end. The current default configuration doesn&#39;t use this but it is available for users.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** Creating your own keymaps&lt;/p&gt; 
&lt;p&gt;All internal keymaps are defined with the standard helper macro =defvar-keymap=. For example a simple version of the file action keymap could be defined as follows:&lt;/p&gt; 
&lt;p&gt;#+BEGIN_SRC emacs-lisp (defvar-keymap embark-file-map :doc &quot;Example keymap with a few file actions&quot; :parent embark-general-map &quot;d&quot; #&#39;delete-file &quot;r&quot; #&#39;rename-file &quot;c&quot; #&#39;copy-file) #+END_SRC&lt;/p&gt; 
&lt;p&gt;These action keymaps are perfectly normal Emacs keymaps. You may want to inherit from the =embark-general-map= if you want to access the default Embark actions. Note that =embark-collect= and =embark-export= are also made available via =embark-general-map=.&lt;/p&gt; 
&lt;p&gt;** Defining actions for new categories of targets&lt;/p&gt; 
&lt;p&gt;It is easy to configure Embark to provide actions for new types of targets, either in the minibuffer or outside it. I present below two very detailed examples of how to do this. At several points I&#39;ll explain more than one way to proceed, typically with the easiest option first. I include the alternative options since there will be similar situations where the easiest option is not available.&lt;/p&gt; 
&lt;p&gt;*** New minibuffer target example - tab-bar tabs&lt;/p&gt; 
&lt;p&gt;As an example let us take a look at the [[&lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/emacs/Tab-Bars.html&quot;&gt;https://www.gnu.org/software/emacs/manual/html_node/emacs/Tab-Bars.html&lt;/a&gt;][tab bars]]. I&#39;ll explain how to configure Embark to offer tab-specific actions when you use the tab-bar-mode commands that mention tabs by name. The configuration explained here is now built-in to Embark (and Marginalia), but it&#39;s still a good self-contained example. In order to setup up tab actions you would need to: (1) make sure Embark knows those commands deal with tabs, (2) define a keymap for tab actions and configure Embark so it knows that&#39;s the keymap you want.&lt;/p&gt; 
&lt;p&gt;**** Telling Embark about commands that prompt for tabs by name&lt;/p&gt; 
&lt;p&gt;For step (1), it would be great if the =tab-bar-mode= commands reported the completion category =tab= when asking you for a tab with completion. (All built-in Emacs commands that prompt for file names, for example, do have metadata indicating that they want a =file=.) They do not, unfortunately, and I will describe a couple of ways to deal with this.&lt;/p&gt; 
&lt;p&gt;Maybe the easiest thing is to configure [[&lt;a href=&quot;https://github.com/minad/marginalia&quot;&gt;https://github.com/minad/marginalia&lt;/a&gt;][Marginalia]] to enhance those commands. All of the =tab-bar-*-tab-by-name= commands have the words &quot;tab by name&quot; in the minibuffer prompt, so you can use:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (add-to-list &#39;marginalia-prompt-categories &#39;(&quot;tab by name&quot; . tab)) #+end_src&lt;/p&gt; 
&lt;p&gt;That&#39;s it! But in case you are ever in a situation where you don&#39;t already have commands that prompt for the targets you want, I&#39;ll describe how writing your own command with appropriate =category= metadata looks:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (defun my-select-tab-by-name (tab) (interactive (list (let ((tab-list (or (mapcar (lambda (tab) (cdr (assq &#39;name tab))) (tab-bar-tabs)) (user-error &quot;No tabs found&quot;)))) (completing-read &quot;Tabs: &quot; (lambda (string predicate action) (if (eq action &#39;metadata) &#39;(metadata (category . tab)) (complete-with-action action tab-list string predicate))))))) (tab-bar-select-tab-by-name tab)) #+end_src&lt;/p&gt; 
&lt;p&gt;As you can see, the built-in support for setting the category meta-datum is not very easy to use or pretty to look at. To help with this I recommend the =consult--read= function from the excellent [[&lt;a href=&quot;https://github.com/minad/consult/&quot;&gt;https://github.com/minad/consult/&lt;/a&gt;][Consult]] package. With that function we can rewrite the command as follows:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (defun my-select-tab-by-name (tab) (interactive (list (let ((tab-list (or (mapcar (lambda (tab) (cdr (assq &#39;name tab))) (tab-bar-tabs)) (user-error &quot;No tabs found&quot;)))) (consult--read tab-list :prompt &quot;Tabs: &quot; :category &#39;tab)))) (tab-bar-select-tab-by-name tab)) #+end_src&lt;/p&gt; 
&lt;p&gt;Much nicer! No matter how you define the =my-select-tab-by-name= command, the first approach with Marginalia and prompt detection has the following advantages: you get the =tab= category for all the =tab-bar-*-bar-by-name= commands at once, also, you enhance built-in commands, instead of defining new ones.&lt;/p&gt; 
&lt;p&gt;**** Defining and configuring a keymap for tab actions&lt;/p&gt; 
&lt;p&gt;Let&#39;s say we want to offer select, rename and close actions for tabs (in addition to Embark general actions, such as saving the tab name to the kill-ring, which you get for free). Then this will do:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (defvar-keymap embark-tab-actions :doc &quot;Keymap for actions for tab-bar tabs (when mentioned by name).&quot; :parent embark-general-map &quot;s&quot; #&#39;tab-bar-select-tab-by-name &quot;r&quot; #&#39;tab-bar-rename-tab-by-name &quot;k&quot; #&#39;tab-bar-close-tab-by-name)&lt;/p&gt; 
&lt;p&gt;(add-to-list &#39;embark-keymap-alist &#39;(tab . embark-tab-actions)) #+end_src&lt;/p&gt; 
&lt;p&gt;What if after using this for a while you feel closing the tab without confirmation is dangerous? You have a couple of options:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;You can keep using the =tab-bar-close-tab-by-name= command, but have Embark ask you for confirmation: #+begin_src emacs-lisp (push #&#39;embark--confirm (alist-get &#39;tab-bar-close-tab-by-name embark-pre-action-hooks)) #+end_src&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;You can write your own command that prompts for confirmation and use that instead of =tab-bar-close-tab-by-name= in the above keymap: #+begin_src emacs-lisp (defun my-confirm-close-tab-by-name (tab) (interactive &quot;sTab to close: &quot;) (when (y-or-n-p (format &quot;Close tab &#39;%s&#39;? &quot; tab)) (tab-bar-close-tab-by-name tab))) #+end_src&lt;/p&gt; &lt;p&gt;Notice that this is a command you can also use directly from =M-x= independently of Embark. Using it from =M-x= leaves something to be desired, though, since you don&#39;t get completion for the tab names. You can fix this if you wish as described in the previous section.&lt;/p&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;*** New target example in regular buffers - short Wikipedia links&lt;/p&gt; 
&lt;p&gt;Say you want to teach Embark to treat text of the form =wikipedia:Garry_Kasparov= in any regular buffer as a link to Wikipedia, with actions to open the Wikipedia page in eww or an external browser or to save the URL of the page in the kill-ring. We can take advantage of the actions that Embark has preconfigured for URLs, so all we need to do is teach Embark that =wikipedia:Garry_Kasparov= stands for the URL =&lt;a href=&quot;https://en.wikipedia.org/wiki/Garry_Kasparov=&quot;&gt;https://en.wikipedia.org/wiki/Garry_Kasparov=&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;You can be as fancy as you want with the recognized syntax. Here, to keep the example simple, I&#39;ll assume the link matches the regexp =wikipedia:[[:alnum:]_]+=. We will write a function that looks for a match surrounding point, and returns a dotted list of the form =&#39;(url URL-OF-THE-PAGE START . END)= where =START= and =END= are the buffer positions bounding the target, and are used by Embark to highlight it if you have =embark-highlight-indicator= included in the list =embark-indicators=. (There are a couple of other options for the return value of a target finder: the bounding positions are optional and a single target finder is allowed to return multiple targets; see the documentation for =embark-target-finders= for details.)&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (defun my-short-wikipedia-link () &quot;Target a link at point of the form wikipedia:Page_Name.&quot; (save-excursion (let* ((start (progn (skip-chars-backward &quot;[:alnum:]&lt;em&gt;😊 (point))) (end (progn (skip-chars-forward &quot;[:alnum:]&lt;/em&gt;😊 (point))) (str (buffer-substring-no-properties start end))) (save-match-data (when (string-match &quot;wikipedia:\([[:alnum:]_]+\)&quot; str) `(url ,(format &quot;&lt;a href=&quot;https://en.wikipedia.org/wiki/%25s&quot;&gt;https://en.wikipedia.org/wiki/%s&lt;/a&gt;&quot; (match-string 1 str)) ,start . ,end))))))&lt;/p&gt; 
&lt;p&gt;(add-to-list &#39;embark-target-finders &#39;my-short-wikipedia-link) #+end_src&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;How does Embark call the actions?&lt;/p&gt; &lt;p&gt;Embark actions are normal Emacs commands, that is, functions with an interactive specification. In order to execute an action, Embark calls the command with =call-interactively=, so the command reads user input exactly as if run directly by the user. For example the command may open a minibuffer and read a string (=read-from-minibuffer=) or open a completion interface (=completing-read=). If this happens, Embark takes the target string and inserts it automatically into the minibuffer, simulating user input this way. After inserting the string, Embark exits the minibuffer, submitting the input. (The immediate minibuffer exit can be disabled for specific actions in order to allow editing the input; this is done by adding the =embark--allow-edit= function to the appropriate entry of =embark-target-injection-hooks=). Embark inserts the target string at the first minibuffer opened by the action command, and if the command happens to prompt the user for input more than once, the user still interacts with the second and further prompts in the normal fashion. Note that if a command does not prompt the user for input in the minibuffer, Embark still allows you to use it as an action, but of course, never inserts the target anywhere. (There are plenty of examples in the default configuration of commands that do not prompt the user bound to keys in the action maps, most of the region actions, for instance.)&lt;/p&gt; &lt;p&gt;This is how Embark manages to reuse normal commands as actions. The mechanism allows you to use as Embark actions commands that were not written with Embark in mind (and indeed almost all actions that are bound by default in Embark&#39;s action keymaps are standard Emacs commands). It also allows you to write new custom actions in such a way that they are useful even without Embark.&lt;/p&gt; &lt;p&gt;Emacs has a variable =y-or-n-p-use-read-key=, which when set to =t= causes =y-or-n-p= to use =read-key= instead of =read-from-minibuffer=. Setting =y-or-n-p-use-read-key= to =t= is recommended for Embark users because it keeps Embark from attempting to insert the target at a =y-or-n-p= prompt, which would almost never be sensible. Also consider this as a warning to structure your own action commands so that if they use =y-or-n-p=, they do so only after the prompting for the target.&lt;/p&gt; &lt;p&gt;Here is a simple example illustrating the various ways of reading input from the user mentioned above. Bind the following commands to the =embark-symbol-map= to be used as actions, then put the point on some symbol and run them with =embark-act=:&lt;/p&gt; &lt;p&gt;#+begin_src emacs-lisp (defun example-action-command1 () (interactive) (message &quot;The input was `%s&#39;.&quot; (read-from-minibuffer &quot;Input: &quot;)))&lt;/p&gt; &lt;p&gt;(defun example-action-command2 (arg input1 input2) (interactive &quot;P\nsInput 1: \nsInput 2: &quot;) (message &quot;The first input %swas &lt;code&gt;%s&#39;, and the second was &lt;/code&gt;%s&#39;.&quot; (if arg &quot;truly &quot; &quot;&quot;) input1 input2))&lt;/p&gt; &lt;p&gt;(defun example-action-command3 () (interactive) (message &quot;Your selection was `%s&#39;.&quot; (completing-read &quot;Select: &quot; &#39;(&quot;E&quot; &quot;M&quot; &quot;B&quot; &quot;A&quot; &quot;R&quot; &quot;K&quot;))))&lt;/p&gt; &lt;p&gt;(defun example-action-command4 () (interactive) (message &quot;I don&#39;t prompt you for input and thus ignore the target!&quot;))&lt;/p&gt; &lt;p&gt;(keymap-set embark-symbol-map &quot;X 1&quot; #&#39;example-action-command1) (keymap-set embark-symbol-map &quot;X 2&quot; #&#39;example-action-command2) (keymap-set embark-symbol-map &quot;X 3&quot; #&#39;example-action-command3) (keymap-set embark-symbol-map &quot;X 4&quot; #&#39;example-action-command4) #+end_src&lt;/p&gt; &lt;p&gt;Also note that if you are using the key bindings to call actions, you can pass prefix arguments to actions in the normal way. For example, you can use =C-u X2= with the above demonstration actions to make the message printed by =example-action-command2= more emphatic. This ability to pass prefix arguments to actions is useful for some actions in the default configuration, such as =embark-shell-command-on-buffer=.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** Non-interactive functions as actions&lt;/p&gt; 
&lt;p&gt;Alternatively, Embark does support one other type of action: a non-interactive function of a single argument. The target is passed as argument to the function. For example:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (defun example-action-function (target) (message &quot;The target was `%s&#39;.&quot; target))&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;(keymap-set embark-symbol-map &quot;X 4&quot; #&#39;example-action-function)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;#+end_src&lt;/p&gt; 
&lt;p&gt;Note that normally binding non-interactive functions in a keymap is useless, since when attempting to run them using the key binding you get an error message similar to &quot;Wrong type argument: commandp, example-action-function&quot;. In general it is more flexible to write any new Embark actions as commands, that is, as interactive functions, because that way you can also run them directly, without Embark. But there are a couple of reasons to use non-interactive functions as actions:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;You may already have the function lying around, and it is convenient to simply reuse it.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;For command actions the targets can only be simple string, with no text properties. For certain advanced uses you may want the action to receive a string /with/ some text properties, or even a non-string target.&lt;/p&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;ul&gt; 
 &lt;li&gt;Embark, Marginalia and Consult&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Embark cooperates well with the [[&lt;a href=&quot;https://github.com/minad/marginalia&quot;&gt;https://github.com/minad/marginalia&lt;/a&gt;][Marginalia]] and [[&lt;a href=&quot;https://github.com/minad/consult&quot;&gt;https://github.com/minad/consult&lt;/a&gt;][Consult]] packages. Neither of those packages is a dependency of Embark, but both are highly recommended companions to Embark, for opposite reasons: Marginalia greatly enhances Embark&#39;s usefulness, while Embark can help enhance Consult.&lt;/p&gt; 
&lt;p&gt;In the remainder of this section I&#39;ll explain what exactly Marginalia does for Embark, and what Embark can do for Consult.&lt;/p&gt; 
&lt;p&gt;** Marginalia&lt;/p&gt; 
&lt;p&gt;Embark comes with actions for symbols (commands, functions, variables with actions such as finding the definition, looking up the documentation, evaluating, etc.) in the =embark-symbol-map= keymap, and for packages (actions like install, delete, browse url, etc.) in the =embark-package-keymap=.&lt;/p&gt; 
&lt;p&gt;Unfortunately Embark does not automatically offers you these keymaps when relevant, because many built-in Emacs commands don&#39;t report accurate category metadata. For example, a command like =describe-package=, which reads a package name from the minibuffer, does not have metadata indicating this fact.&lt;/p&gt; 
&lt;p&gt;In an earlier Embark version, there were functions to supply this missing metadata, but they have been moved to Marginalia, which augments many Emacs command to report accurate category metadata. Simply activating =marginalia-mode= allows Embark to offer you the package and symbol actions when appropriate again. Candidate annotations in the Embark collect buffer are also provided by the Marginalia package:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;If you install Marginalia and activate =marginalia-mode=, Embark Collect buffers will use the Marginalia annotations automatically.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;If you don&#39;t install Marginalia, you will see only the annotations that come with Emacs (such as key bindings in =M-x=, or the unicode characters in =C-x 8 RET=).&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** Consult&lt;/p&gt; 
&lt;p&gt;The excellent Consult package provides many commands that use minibuffer completion, via the =completing-read= function; plenty of its commands can be considered enhanced versions of built-in Emacs commands, and some are completely new functionality. One common enhancement provided in all commands for which it makes sense is preview functionality, for example =consult-buffer= will show you a quick preview of a buffer before you actually switch to it.&lt;/p&gt; 
&lt;p&gt;If you use both Consult and Embark you should install the =embark-consult= package which provides integration between the two. It provides exporters for several Consult commands and also tweaks the behavior of many Consult commands when used as actions with =embark-act= in subtle ways that you may not even notice, but make for a smoother experience. You need only install it to get these benefits: Embark will automatically load it after Consult if found.&lt;/p&gt; 
&lt;p&gt;The =embark-consult= package provides the following exporters:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;You can use =embark-export= from =consult-line=, =consult-outline=, or =consult-mark= to obtain an =occur-mode= buffer. As with the built-in =occur= command you use that buffer to jump to a match and after that, you can then use =next-error= and =previous-error= to navigate to other matches. You can also press =e= to activate =occur-edit-mode= and edit the matches in place!&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;You can export from any of the Consult asynchronous search commands, =consult-grep=, =consult-git-grep=, or =consult-ripgrep= to get a =grep-mode= buffer. Here too you can use =next-error= and =previous-error= to navigate among matches, and, if you install the [[&lt;a href=&quot;http://github.com/mhayashi1120/Emacs-wgrep/raw/master/wgrep.el&quot;&gt;http://github.com/mhayashi1120/Emacs-wgrep/raw/master/wgrep.el&lt;/a&gt; ][wgrep]] package, you can use it to edit the matches in place.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;In both cases, pressing =g= will rerun the Consult command you had exported from and re-enter the input you had typed (which is similar to reverting but a little more flexible). You can then proceed to re-export if that&#39;s what you want, but you can also edit the input changing the search terms or simply cancel if you see you are done with that search.&lt;/p&gt; 
&lt;p&gt;The =embark-consult= also contains some candidates collectors that allow you to run =embark-live= to get a live-updating table of contents for your buffer:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;=embark-consult-outline-candidates= produces the outline headings of the current buffer, using =consult-outline=.&lt;/li&gt; 
 &lt;li&gt;=embark-consult-imenu-candidates= produces the imenu items of the current buffer, using =consult-imenu=.&lt;/li&gt; 
 &lt;li&gt;=embark-consult-imenu-or-outline-candidates= is a simple combination of the two previous functions: it produces imenu items in buffers deriving from =prog-mode= and otherwise outline headings.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The way to configure =embark-live= (or =embark-collect= and =embark-export= for that matter) to use one of these function is to add it at the end of the =embark-candidate-collectors= list. The =embark-consult= package by default adds the last one, which seems to be the most sensible default.&lt;/p&gt; 
&lt;p&gt;Besides those exporters and candidate collectors, the =embark-consult= package provides many subtle tweaks and small integrations between Embark and Consult. Some examples are:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;When used as actions, the asynchronous search commands will search only the files associated to the targets: if the targets /are/ files, it searches those files; for buffers it will search either the associated file if there is one, else all files in the buffer&#39;s =default-directory=; for bookmarks it will search the file they point to, same for Emacs Lisp libraries. This is particularly powerful when using =embark-act-all= to act on multiple files at once, for example you can use =consult-find= to search among file /names/ and then =embark-act-all= and =consult-grep= to search within the matching files.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;For all other target types, those that do not have a sensible notion of associated file, a Consult search command (asynchronous or not) will search for the text of the target but leave the minibuffer open so you can interact with the Consult command.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=consult-imenu= will search for the target and take you directly to the location if it matches a unique imenu entry, otherwise it will leave the minibuffer open so you can navigate among the matches.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;Related Packages&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;There are several packages that offer functionality similar to Embark&#39;s.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Acting on minibuffer completion candidates :: The popular Ivy and Helm packages have support for acting on the completion candidates of commands written using their APIs, and there is an extensive ecosystem of packages meant for Helm and for Ivy (the Ivy ones usually have &quot;counsel&quot; in the name) providing commands and appropriate actions.&lt;/li&gt; 
 &lt;li&gt;Acting on things at point :: The built-in =context-menu-mode= provides a mouse-driven context-sensitive configurable menu. The =do-at-point= package by Philip Kaludercic (available on GNU ELPA), on the other hand is keyboard-driven.&lt;/li&gt; 
 &lt;li&gt;Collecting completion candidates into a buffer :: The Ivy package has the command =ivy-occur= which is similar to =embark-collect=. As with Ivy actions, =ivy-occur= only works for commands written using the Ivy API.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;Resources&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;If you want to learn more about how others have used Embark here are some links to read:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://karthinks.com/software/fifteen-ways-to-use-embark/&quot;&gt;https://karthinks.com/software/fifteen-ways-to-use-embark/&lt;/a&gt;][Fifteen ways to use Embark]], a blog post by Karthik Chikmagalur.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://protesilaos.com/dotemacs/&quot;&gt;https://protesilaos.com/dotemacs/&lt;/a&gt;][Protesilaos Stavrou&#39;s dotemacs]], look for the section called &quot;Extended minibuffer actions and more (embark.el and prot-embark.el)&quot;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;And some videos to watch:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://protesilaos.com/codelog/2021-01-09-emacs-embark-extras/&quot;&gt;https://protesilaos.com/codelog/2021-01-09-emacs-embark-extras/&lt;/a&gt;][Embark and my extras]] by Protesilaos Stavrou.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://youtu.be/qpoQiiinCtY&quot;&gt;https://youtu.be/qpoQiiinCtY&lt;/a&gt;][Embark -- Key features and tweaks]] by Raoul Comninos on the Emacs-Elements YouTube channel.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://youtu.be/WsxXr1ncukY&quot;&gt;https://youtu.be/WsxXr1ncukY&lt;/a&gt;][Livestreamed: Adding an Embark context action to send a stream message]] by Sacha Chua.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://youtu.be/qk2Is_sC8Lk&quot;&gt;https://youtu.be/qk2Is_sC8Lk&lt;/a&gt;][System Crafters Live! - The Many Uses of Embark]] by David Wilson.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://youtu.be/5ffb2at2d7w&quot;&gt;https://youtu.be/5ffb2at2d7w&lt;/a&gt;][Using Emacs Episode 80 - Vertico, Marginalia, Consult and Embark]] by Mike Zamansky.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;Contributions&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Contributions to Embark are very welcome. There is a [[&lt;a href=&quot;https://github.com/oantolin/embark/issues/95&quot;&gt;https://github.com/oantolin/embark/issues/95&lt;/a&gt;][wish list]] for actions, target finders, candidate collectors and exporters. For other ideas you have for Embark, feel free to open an issue on the [[&lt;a href=&quot;https://github.com/oantolin/embark/issues&quot;&gt;https://github.com/oantolin/embark/issues&lt;/a&gt;][issue tracker]]. Any neat configuration tricks you find might be a good fit for the [[&lt;a href=&quot;https://github.com/oantolin/embark/wiki&quot;&gt;https://github.com/oantolin/embark/wiki&lt;/a&gt;][wiki]].&lt;/p&gt; 
&lt;p&gt;Code contributions are very welcome too, but since Embark is now on GNU ELPA, copyright assignment to the FSF is required before you can contribute code.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Acknowledgments&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;While I, Omar Antolín Camarena, have written most of the Embark code and remain very stubborn about some of the design decisions, Embark has received substantial help from a number of other people which this document has neglected to mention for far too long. In particular, Daniel Mendler has been absolutely invaluable, implementing several important features, and providing a lot of useful advice.&lt;/p&gt; 
&lt;p&gt;Code contributions:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/minad&quot;&gt;https://github.com/minad&lt;/a&gt;][Daniel Mendler]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/clemera/&quot;&gt;https://github.com/clemera/&lt;/a&gt;][Clemens Radermacher]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://codeberg.org/jao/&quot;&gt;https://codeberg.org/jao/&lt;/a&gt;][José Antonio Ortega Ruiz]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/iyefrat&quot;&gt;https://github.com/iyefrat&lt;/a&gt;][Itai Y. Efrat]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/a13&quot;&gt;https://github.com/a13&lt;/a&gt;][a13]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/jakanakaevangeli&quot;&gt;https://github.com/jakanakaevangeli&lt;/a&gt;][jakanakaevangeli]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/mihakam&quot;&gt;https://github.com/mihakam&lt;/a&gt;][mihakam]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/leungbk&quot;&gt;https://github.com/leungbk&lt;/a&gt;][Brian Leung]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/karthink&quot;&gt;https://github.com/karthink&lt;/a&gt;][Karthik Chikmagalur]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/roshanshariff&quot;&gt;https://github.com/roshanshariff&lt;/a&gt;][Roshan Shariff]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/condy0919&quot;&gt;https://github.com/condy0919&lt;/a&gt;][condy0919]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/DamienCassou&quot;&gt;https://github.com/DamienCassou&lt;/a&gt;][Damien Cassou]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/JimDBh&quot;&gt;https://github.com/JimDBh&lt;/a&gt;][JimDBh]]&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Advice and useful discussions:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/minad&quot;&gt;https://github.com/minad&lt;/a&gt;][Daniel Mendler]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://gitlab.com/protesilaos/&quot;&gt;https://gitlab.com/protesilaos/&lt;/a&gt;][Protesilaos Stavrou]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/clemera/&quot;&gt;https://github.com/clemera/&lt;/a&gt;][Clemens Radermacher]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/hmelman/&quot;&gt;https://github.com/hmelman/&lt;/a&gt;][Howard Melman]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/astoff&quot;&gt;https://github.com/astoff&lt;/a&gt;][Augusto Stoffel]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/bdarcus&quot;&gt;https://github.com/bdarcus&lt;/a&gt;][Bruce d&#39;Arcus]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/jdtsmith&quot;&gt;https://github.com/jdtsmith&lt;/a&gt;][JD Smith]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/karthink&quot;&gt;https://github.com/karthink&lt;/a&gt;][Karthik Chikmagalur]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/jakanakaevangeli&quot;&gt;https://github.com/jakanakaevangeli&lt;/a&gt;][jakanakaevangeli]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/iyefrat&quot;&gt;https://github.com/iyefrat&lt;/a&gt;][Itai Y. Efrat]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/mohkale&quot;&gt;https://github.com/mohkale&lt;/a&gt;][Mohsin Kaleem]]&lt;/li&gt; 
&lt;/ul&gt;</description>
      
    </item>
    
    <item>
      <title>melpa/melpa</title>
      <link>https://github.com/melpa/melpa</link>
      <description>&lt;p&gt;Recipes and build machinery for the biggest Emacs package repo&lt;/p&gt;&lt;hr&gt;&lt;h1&gt;MELPA&lt;/h1&gt; 
&lt;p&gt;&lt;a href=&quot;https://github.com/melpa/melpa/actions/workflows/ci.yml&quot;&gt;&lt;img src=&quot;https://github.com/melpa/melpa/actions/workflows/ci.yml/badge.svg?sanitize=true&quot; alt=&quot;Build Status&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;MELPA is a growing collection of &lt;code&gt;package.el&lt;/code&gt;-compatible Emacs Lisp packages built automatically on our server from the upstream source code using simple recipes. (Think of it as a server-side version of &lt;a href=&quot;https://github.com/dimitri/el-get/&quot;&gt;&lt;code&gt;el-get&lt;/code&gt;&lt;/a&gt;, or even &lt;a href=&quot;https://brew.sh/&quot;&gt;Homebrew&lt;/a&gt;.)&lt;/p&gt; 
&lt;p&gt;Packages are updated at intervals throughout the day.&lt;/p&gt; 
&lt;p&gt;To browse available packages, check out the &lt;a href=&quot;https://melpa.org/&quot;&gt;archive index page&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;Adding packages is as simple as submitting a new recipe as a pull request; read on for details.&lt;/p&gt; 
&lt;h2&gt;Table of Contents&lt;/h2&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/melpa/melpa/master/#usage&quot;&gt;Usage&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/melpa/melpa/master/#contributing&quot;&gt;Contributing&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/melpa/melpa/master/#recipe-format&quot;&gt;Recipe Format&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/melpa/melpa/master/#build-scripts&quot;&gt;Build Scripts&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/melpa/melpa/master/#api&quot;&gt;API&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/melpa/melpa/master/#configuration&quot;&gt;Configuration&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/melpa/melpa/master/#mirrors&quot;&gt;Mirrors&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/melpa/melpa/master/#about&quot;&gt;About&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Usage&lt;/h2&gt; 
&lt;p&gt;To use the MELPA repository, you&#39;ll need an Emacs with &lt;code&gt;package.el&lt;/code&gt;, i.e., Emacs 24.1 or greater. To test TLS support you can visit a HTTPS URL, for example with &lt;code&gt;M-x eww RET https://wikipedia.org RET&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;Enable installation of packages from MELPA by adding an entry to &lt;code&gt;package-archives&lt;/code&gt; after &lt;code&gt;(require &#39;package)&lt;/code&gt; and before the call to &lt;code&gt;package-initialize&lt;/code&gt; in your &lt;code&gt;init.el&lt;/code&gt; or &lt;code&gt;.emacs&lt;/code&gt; file:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(require &#39;package)
(add-to-list &#39;package-archives &#39;(&quot;melpa&quot; . &quot;https://melpa.org/packages/&quot;) t)
;; Comment/uncomment this line to enable MELPA Stable if desired.
;; See `package-archive-priorities` and `package-pinned-packages`.
;; Most users will not need or want to do this.
;; (add-to-list &#39;package-archives
;;              &#39;(&quot;melpa-stable&quot; . &quot;https://stable.melpa.org/packages/&quot;) t)
(package-initialize)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Then just use &lt;code&gt;M-x package-list-packages&lt;/code&gt; to browse and install packages from MELPA and elsewhere.&lt;/p&gt; 
&lt;p&gt;Note that you&#39;ll need to run &lt;code&gt;M-x package-refresh-contents&lt;/code&gt; or &lt;code&gt;M-x package-list-packages&lt;/code&gt; to ensure that Emacs has fetched the MELPA package list before you can install packages with &lt;code&gt;M-x package-install&lt;/code&gt; or similar.&lt;/p&gt; 
&lt;h3&gt;MELPA Stable&lt;/h3&gt; 
&lt;p&gt;Packages in MELPA are built directly from the latest package source code in the upstream repositories, but we also build and publish packages corresponding to the latest tagged code in those repositories, where version tags exist. These packages are published in a separate package archive called &lt;a href=&quot;https://stable.melpa.org/&quot;&gt;MELPA Stable&lt;/a&gt;. Most users should prefer MELPA over MELPA Stable.&lt;/p&gt; 
&lt;p&gt;Some notes:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;If you leave the original MELPA server in your &lt;code&gt;package-archives&lt;/code&gt; then by default you will get the &lt;em&gt;development&lt;/em&gt; versions of packages and not the stable ones, because the development versions are higher.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;If your Emacs has the variables &lt;code&gt;package-pinned-packages&lt;/code&gt; (available in 24.4 and later) and/or &lt;code&gt;package-archive-priorities&lt;/code&gt;, you can customize or modify those variables as needed.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;You will probably want to remove all packages and then reinstall them. Any packages you already have installed from MELPA will never get &quot;updated&quot; to the stable version because of the way version numbering is handled.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Note that the MELPA maintainers do not use MELPA Stable themselves, and do not particularly recommend its use.&lt;/p&gt; 
&lt;h2&gt;Contributing&lt;/h2&gt; 
&lt;p&gt;See the &lt;a href=&quot;https://raw.githubusercontent.com/melpa/melpa/master/CONTRIBUTING.org&quot;&gt;CONTRIBUTING.org&lt;/a&gt; document.&lt;/p&gt; 
&lt;h2&gt;Recipe Format&lt;/h2&gt; 
&lt;p&gt;Packages are specified by files in the &lt;code&gt;recipes&lt;/code&gt; directory. You can contribute a new package by adding a new file under &lt;code&gt;recipes&lt;/code&gt; using the following form (&lt;code&gt;[...]&lt;/code&gt; denotes optional or conditional values),&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(&amp;lt;package-name&amp;gt;
 :fetcher [git|github|gitlab|codeberg|sourcehut|hg]
 [:url &quot;&amp;lt;repo url&amp;gt;&quot;]
 [:repo &quot;user-name/repo-name&quot;]
 [:commit &quot;commit&quot;]
 [:branch &quot;branch&quot;]
 [:version-regexp &quot;&amp;lt;regexp&amp;gt;&quot;]
 [:files (&quot;&amp;lt;file1&amp;gt;&quot; ...)]
 [:old-names (&amp;lt;old-name&amp;gt; ...)])
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;package-name&lt;/code&gt; a lisp symbol that has the same name as the package being specified.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:fetcher&lt;/code&gt; specifies the type of repository the package is being maintained in.&lt;/p&gt; &lt;p&gt;Melpa supports the Git and Mercurial version control systems and provides generic fetcher types for them: &lt;code&gt;git&lt;/code&gt; and &lt;code&gt;hg&lt;/code&gt;. When you use one of these fetchers, you must specify the &lt;code&gt;:url&lt;/code&gt; property.&lt;/p&gt; &lt;p&gt;Melpa also provides dedicated fetchers for certain Git forges (aka &quot;Git repository hosting platforms&quot;), which should always be preferred over the generic &lt;code&gt;git&lt;/code&gt; fetcher. When using a dedicated fetcher, you must specify &lt;code&gt;:repo&lt;/code&gt;, not &lt;code&gt;:url&lt;/code&gt;. Currently these Git forge fetchers exist: &lt;a href=&quot;https://github.com/&quot;&gt;&lt;code&gt;github&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://gitlab.com/&quot;&gt;&lt;code&gt;gitlab&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://codeberg.org/&quot;&gt;&lt;code&gt;codeberg&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://git.sr.ht/&quot;&gt;&lt;code&gt;sourcehut&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;There are no dedicated fetchers for Mercurial. When a forge supports both Git and Mercurial, then the respective fetcher can only be used for Git repositories. For Mercurial repositories always use the &lt;code&gt;hg&lt;/code&gt; fetcher.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:url&lt;/code&gt; specifies the URL of the version control repository. It is required for the generic &lt;code&gt;git&lt;/code&gt; and &lt;code&gt;hg&lt;/code&gt; fetchers and is invalid for forge-specific fetchers.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:repo&lt;/code&gt; specifies the repository used by forge-specific fetchers and is of the form &lt;code&gt;user-name/repo-name&lt;/code&gt;. It is required for forge-specific fetchers and is invalid for the generic fetchers.&lt;/p&gt; &lt;p&gt;Note that user names in Sourcehut URLs are prefixed with &lt;code&gt;~&lt;/code&gt;, that has to be omitted in the value of this property.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:commit&lt;/code&gt; specifies the commit of the Git repository to checkout. The value will be passed to &lt;code&gt;git reset&lt;/code&gt; in a repo where &lt;code&gt;upstream&lt;/code&gt; is the original repository. Can therefore be either a SHA, if pointing at a specific commit, or a full ref prefixed with &quot;origin/&quot;. Only used by the &lt;code&gt;git&lt;/code&gt;-based fetchers.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:branch&lt;/code&gt; specifies the branch of the Git repository to use. This is like &lt;code&gt;:commit&lt;/code&gt;, but it adds the &quot;origin/&quot; prefix automatically. This must be specified when using a branch other than the default branch.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:version-regexp&lt;/code&gt; is a regular expression for extracting a version-string from the repository tags. The default matches typical version tags such as &lt;code&gt;1.0&lt;/code&gt;, &lt;code&gt;R16&lt;/code&gt; or &lt;code&gt;v4.3.5&lt;/code&gt;, so you should not override it unless necessary. For an unusual tag like &quot;OTP-18.1.5&quot;, we might add &lt;code&gt;:version-regexp &quot;[^0-9]*\\(.*\\)&quot;&lt;/code&gt; to strip the &quot;OTP-&quot; prefix. The captured portion of the regexp must be parseable by Emacs&#39; &lt;code&gt;version-to-list&lt;/code&gt; function.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:files&lt;/code&gt; optional property specifying the Emacs Lisp libraries and info files used to build the package. Please do not override this if the default value (below) is adequate, which it should usually be:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;&#39;(&quot;*.el&quot; &quot;lisp/*.el&quot;
  &quot;dir&quot; &quot;*.info&quot; &quot;*.texi&quot; &quot;*.texinfo&quot;
  &quot;doc/dir&quot; &quot;doc/*.info&quot; &quot;doc/*.texi&quot; &quot;doc/*.texinfo&quot;
  &quot;docs/dir&quot; &quot;docs/*.info&quot; &quot;docs/*.texi&quot; &quot;docs/*.texinfo&quot;
  (:exclude
   &quot;.*.el&quot; &quot;lisp/.*.el&quot;
   &quot;test.el&quot; &quot;tests.el&quot; &quot;*-test.el&quot; &quot;*-tests.el&quot;
   &quot;lisp/test.el&quot; &quot;lisp/tests.el&quot; &quot;lisp/*-test.el&quot; &quot;lisp/*-tests.el&quot;))
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Note that you should place Emacs Lisp libraries in the root of the repository or in the &lt;code&gt;lisp/&lt;/code&gt; directory. Test files should be placed in the &lt;code&gt;test/&lt;/code&gt; directory and they should not provide a feature. Note that all Emacs Lisp files whose name begin with a period are excluded.&lt;/p&gt; &lt;p&gt;No &lt;code&gt;NAME-pkg.el&lt;/code&gt; should be checked into version control. This file is generated from metadata found in the &quot;main library&quot; (&lt;code&gt;NAME.el&lt;/code&gt;). This is true not only for MELPA, but also GNU ELPA and NonGNU ELPA.&lt;/p&gt; &lt;p&gt;Please do not track any third-party libraries and test utilities in your repository. If you absolutely must do it, then place these files in a directory dedicated to that purpose, alongside a file named &lt;code&gt;.nosearch&lt;/code&gt;. The latter prevents various tools from adding the containing directory to the &lt;code&gt;load-path&lt;/code&gt; or from otherwise getting confused.&lt;/p&gt; &lt;p&gt;The elements of the &lt;code&gt;:files&lt;/code&gt; list are glob-expanded to make a list of paths that will be copied into the root of the new package. This means a file like &lt;code&gt;lisp/foo.el&lt;/code&gt; would become &lt;code&gt;foo.el&lt;/code&gt; in the new package. To specify a destination subdirectory, use a list element of the form &lt;code&gt;(TARGET-DIR SOURCE-PATH ...)&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;To exclude certain paths, use &lt;code&gt;(:exclude SOURCE-PATH ...)&lt;/code&gt;. There should only be one element that begins with &lt;code&gt;:exclude&lt;/code&gt; and it should be the last element, though that is not enforced at this time.&lt;/p&gt; &lt;p&gt;If your package requires some additional files, but is otherwise fine with the defaults, use the special element &lt;code&gt;:defaults&lt;/code&gt; as the first element of the &lt;code&gt;:files&lt;/code&gt; list. This causes the default value shown above to be prepended to the specified file list. For example &lt;code&gt;:files (:defaults &quot;snippets&quot;)&lt;/code&gt; would cause the &lt;code&gt;snippets&lt;/code&gt; subdir to be copied in addition to the defaults.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; Elements of &lt;code&gt;:files&lt;/code&gt; are (no longer) processed in order because we feed these globs to &lt;code&gt;git log&lt;/code&gt; or &lt;code&gt;hg log&lt;/code&gt; to determine the last commit that touched a relevant file. These commands unfortunately process all exclude globs after all include globs. Therefore it is not possible to override the &lt;code&gt;:exclude&lt;/code&gt; element that appears in &lt;code&gt;:defaults&lt;/code&gt; in a later element of &lt;code&gt;:files&lt;/code&gt;. This means that a package whose name ends with &lt;code&gt;-test&lt;/code&gt; cannot use &lt;code&gt;:defaults&lt;/code&gt;. Likewise if the name of a &lt;em&gt;library&lt;/em&gt; (as opposed to a file implementing tests) ends with &lt;code&gt;-test.el&lt;/code&gt;, then &lt;code&gt;:defaults&lt;/code&gt; cannot be used.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; Once the appropriate commit has been determined &lt;code&gt;file-expand-wildcards&lt;/code&gt; is used to determine the files matched by each glob. Unfortunately (unlike in a shell) a glob that begins with &lt;code&gt;*&lt;/code&gt; may also match filenames that begin with &lt;code&gt;.&lt;/code&gt;, so you might have to add exclude globs to prevent those from being included. &lt;code&gt;:defaults&lt;/code&gt; takes care to exclude &lt;code&gt;.dir-locals.el&lt;/code&gt;; if you don&#39;t use &lt;code&gt;:defaults&lt;/code&gt;, then you might have to exclude that explicitly.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:old-names&lt;/code&gt; specifies former names of the package, if any. The value is a list of symbols.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Example: Single File Repository&lt;/h3&gt; 
&lt;p&gt;&lt;code&gt;smex&lt;/code&gt; is a repository that contains two files:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;README.markdown&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;smex.el&lt;/code&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Since there is only one &lt;code&gt;.el&lt;/code&gt; file, this package only needs the &lt;code&gt;:fetcher&lt;/code&gt; and &lt;code&gt;:repo&lt;/code&gt; specified,&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(smex :fetcher github :repo &quot;nonsequitur/smex&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Example: Multiple Packages in one Repository&lt;/h3&gt; 
&lt;p&gt;Assume we have a repository containing three libraries &lt;code&gt;mypackage.el&lt;/code&gt;, &lt;code&gt;helm-mypackage.el&lt;/code&gt;, and &lt;code&gt;persp-mypackage.el&lt;/code&gt;. The latter two libraries are optional and users who don&#39;t want to use the packages &lt;code&gt;helm&lt;/code&gt; and/or &lt;code&gt;perspective&lt;/code&gt; should not be forced to install them just so they can install &lt;code&gt;mypackage&lt;/code&gt;. These libraries should therefore be distributed as separate packages.&lt;/p&gt; 
&lt;p&gt;The three packages have to be declared in three separate files &lt;code&gt;recipes/mypackage&lt;/code&gt;, &lt;code&gt;recipes/helm-mypackage&lt;/code&gt;, and &lt;code&gt;recipes/persp-mypackage&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(mypackage
 :fetcher github
 :repo &quot;someuser/mypackage&quot;
 :files (&quot;mypackage.el&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(helm-mypackage
 :fetcher github
 :repo &quot;someuser/mypackage&quot;
 :files (&quot;helm-mypackage.el&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(persp-mypackage
 :fetcher github
 :repo &quot;someuser/mypackage&quot;
 :files (&quot;persp-mypackage.el&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Example: Multiple Files in Multiple Directories&lt;/h3&gt; 
&lt;p&gt;There are special cases where creation of the package comes from many different sub-directories in the repository and the destination sub-directories need to be explicitly set.&lt;/p&gt; 
&lt;p&gt;Consider the &lt;code&gt;flymake-perlcritic&lt;/code&gt; recipe,&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(flymake-perlcritic
 :fetcher github
 :repo &quot;illusori/emacs-flymake-perlcritic&quot;
 :files (&quot;*.el&quot; (&quot;bin&quot; &quot;bin/flymake_perlcritic&quot;)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;which will result in a package structure of,&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;flymake-perlcritic-YYYYMMDD
|-- bin
|   `-- flymake_perlcritic
|-- flymake-perlcritic-pkg.el
`-- flymake-perlcritic.el
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Notice that specifying an entry in &lt;code&gt;:files&lt;/code&gt; that is a list takes the first element to be the destination directory.&lt;/p&gt; 
&lt;p&gt;But a better solution, given that we probably want to copy the &lt;em&gt;entire&lt;/em&gt; &lt;code&gt;snippets&lt;/code&gt; directory to the root of the package, we could just specify that directory. Consider the &lt;code&gt;pony-mode&lt;/code&gt; recipe,&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(pony-mode
 :fetcher github
 :repo &quot;davidmiller/pony-mode&quot;
 :files (&quot;src/*.el&quot; &quot;snippets&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;which generates the package,&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;pony-mode-YYYYMMDD
|-- pony-mode-pkg.el
|-- pony-mode.el
|-- pony-tpl.el
`-- snippets
    |-- html-mode
    |   |-- bl
    |   |-- ex
    |   |-- for
    |   |-- if
    |   |-- loa
    |   |-- sup
    |   |-- testc
    |   `-- {{
    `-- python-mode
        |-- auth-view
        |-- bn
        |-- model
        |-- modelform
        |-- render-to
        |-- testc
        `-- view
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Build Scripts&lt;/h2&gt; 
&lt;p&gt;Building MELPA is all based around using the &lt;code&gt;Makefile&lt;/code&gt; included in the root repository directory. Described below are the actions that accepted by the &lt;code&gt;Makefile&lt;/code&gt;.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;all&lt;/code&gt; — build all packages under the &lt;code&gt;recipes/&lt;/code&gt; directory and compiles the &lt;code&gt;index.html&lt;/code&gt; file for the &lt;a href=&quot;https://melpa.org/&quot;&gt;MELPA&lt;/a&gt; website.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;recipes/&amp;lt;NAME&amp;gt;&lt;/code&gt; — build individual recipe &lt;code&gt;&amp;lt;NAME&amp;gt;&lt;/code&gt;. Built packages are put in the &lt;code&gt;packages/&lt;/code&gt; folder with version corresponding to the date of the latest commit that modified at least one of the files specified by the recipe; given according to the &lt;code&gt;%Y%m%d&lt;/code&gt; format.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;json&lt;/code&gt; — build all JSON files.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;archive.json&lt;/code&gt; — construct the &lt;code&gt;archive.json&lt;/code&gt; file that will contain a JSON object of all compiled packages.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;recipes.json&lt;/code&gt; — construct the &lt;code&gt;recipes.json&lt;/code&gt; file containing a JSON object of all packages available for building.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;clean&lt;/code&gt; — clean everything.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;html&lt;/code&gt; — build &lt;code&gt;index.html&lt;/code&gt;.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;clean-working&lt;/code&gt; — remove all repositories that have been checked out to the &lt;code&gt;working/&lt;/code&gt; directory.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;clean-packages&lt;/code&gt; — remove all compiled packages from the &lt;code&gt;packages&lt;/code&gt; directory.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;clean-json&lt;/code&gt; — remove all JSON files.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Note that these scripts require an Emacs with &lt;code&gt;package.el&lt;/code&gt; installed, such as Emacs 24. If you have an older version of Emacs, you can get a suitable &lt;code&gt;package.el&lt;/code&gt; &lt;a href=&quot;https://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob_plain;hb=ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09;f=lisp/emacs-lisp/package.el&quot;&gt;here&lt;/a&gt;.&lt;/p&gt; 
&lt;h2&gt;API&lt;/h2&gt; 
&lt;p&gt;All repository code is contained in the file &lt;code&gt;package-build/package-build.el&lt;/code&gt;. That code is maintained in a &lt;a href=&quot;https://github.com/melpa/package-build/&quot;&gt;separate repository&lt;/a&gt;: the version in the MELPA repository is imported using &lt;code&gt;git subtree&lt;/code&gt;.&lt;/p&gt; 
&lt;h3&gt;Functions&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;(package-build-all)&lt;/code&gt; — build packages for all recipes in the directory specified by &lt;code&gt;package-build-recipes-dir&lt;/code&gt;.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;(package-build-archive NAME)&lt;/code&gt; — interactive Emacs Lisp function to build a single archive. NAME is a symbol for the package to be built. Packages are staged in the directory specified by &lt;code&gt;package-build-working-dir&lt;/code&gt; and built packages are placed in the directory specified by &lt;code&gt;package-build-archive-dir&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Packages are versioned based on the most recent commit date to package files based on commits to upstream package repository.&lt;/p&gt; &lt;p&gt;A file named &lt;code&gt;&amp;lt;NAME&amp;gt;-pkg.el&lt;/code&gt;, which contains &lt;em&gt;description&lt;/em&gt;, &lt;em&gt;version&lt;/em&gt;, and &lt;em&gt;requires&lt;/em&gt; information about the package is automatically generated. The information is extracted from the summary line and headers of &lt;code&gt;&amp;lt;NAME&amp;gt;.el&lt;/code&gt;. For historic reasons, if some of these values cannot be extracted from that file, then Melpa also extracts information from &lt;code&gt;&amp;lt;NAME&amp;gt;-pkg.el&lt;/code&gt; if such a file is tracked in the upstream repository (but this fallback will be removed eventually).&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Variables&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;package-build-working-dir&lt;/code&gt; — Staging area containing package repositories and package directories being built.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;package-build-archive-dir&lt;/code&gt; — Location to store &lt;code&gt;archive-contents&lt;/code&gt; and any built packages.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;package-build-recipes-dir&lt;/code&gt; — Directory containing MELPA compatible recipes. See &lt;a href=&quot;https://raw.githubusercontent.com/melpa/melpa/master/#recipe-format&quot;&gt;Recipe Format&lt;/a&gt; section for more details.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Configuration&lt;/h2&gt; 
&lt;p&gt;Packages end up in the &lt;code&gt;packages/&lt;/code&gt; directory by default. This can be configured using the &lt;code&gt;package-build-archive-dir&lt;/code&gt; variable.&lt;/p&gt; 
&lt;p&gt;Repositories are checked out to the &lt;code&gt;working/&lt;/code&gt; directory by default. This can be configured using the &lt;code&gt;package-build-working-dir&lt;/code&gt; variable.&lt;/p&gt; 
&lt;h2&gt;Mirrors&lt;/h2&gt; 
&lt;p&gt;Official mirrors are available (with many thanks to &lt;a href=&quot;http://mirrorservice.org&quot;&gt;mirrorservice.org&lt;/a&gt;) so that if &lt;a href=&quot;http://melpa.org&quot;&gt;melpa.org&lt;/a&gt; is down, packages can still be installed. The following are the HTTP/HTTPS URLs to use in &lt;code&gt;package-archives&lt;/code&gt; for MELPA and MELPA Stable respectively:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;http://www.mirrorservice.org/sites/melpa.org/packages/&quot;&gt;http://www.mirrorservice.org/sites/melpa.org/packages/&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://www.mirrorservice.org/sites/melpa.org/packages/&quot;&gt;https://www.mirrorservice.org/sites/melpa.org/packages/&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;http://www.mirrorservice.org/sites/stable.melpa.org/packages/&quot;&gt;http://www.mirrorservice.org/sites/stable.melpa.org/packages/&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://www.mirrorservice.org/sites/stable.melpa.org/packages/&quot;&gt;https://www.mirrorservice.org/sites/stable.melpa.org/packages/&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Only the packages are mirrored, not the web site front-end itself.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;We are NOT responsible for the contents of any UNOFFICIAL mirror of our packages.&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;Use &lt;code&gt;rsync&lt;/code&gt; to get started with your own mirror:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;rsync -avz --delete rsync://melpa.org/packages/ snapshots/
rsync -avz --delete rsync://melpa.org/packages-stable/ releases/
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;About&lt;/h2&gt; 
&lt;p&gt;&lt;em&gt;MELPA&lt;/em&gt; is &lt;em&gt;Milkypostman&#39;s ELPA&lt;/em&gt; or &lt;em&gt;Milkypostman&#39;s Experimental Lisp Package Archive&lt;/em&gt; if you&#39;re not into the whole brevity thing.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>jwiegley/emacs-async</title>
      <link>https://github.com/jwiegley/emacs-async</link>
      <description>&lt;p&gt;Simple library for asynchronous processing in Emacs&lt;/p&gt;&lt;hr&gt;&lt;p&gt;&lt;a href=&quot;http://www.gnu.org/licenses/gpl-3.0.txt&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/license-GPL_3-green.svg?sanitize=true&quot; alt=&quot;License GPL 3&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://elpa.gnu.org/packages/async.html&quot;&gt;&lt;img src=&quot;https://elpa.gnu.org/packages/async.svg?sanitize=true&quot; alt=&quot;GNU ELPA&quot; title=&quot;&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://melpa.org/#/async&quot;&gt;&lt;img src=&quot;http://melpa.org/packages/async-badge.svg?sanitize=true&quot; alt=&quot;MELPA&quot; title=&quot;&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://stable.melpa.org/#/async&quot;&gt;&lt;img src=&quot;http://stable.melpa.org/packages/async-badge.svg?sanitize=true&quot; alt=&quot;MELPA Stable&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;h1&gt;emacs-async&lt;/h1&gt; 
&lt;p&gt;I&#39;ve been using Emacs long enough to know that its single-threaded nature is both a strength and a weakness. It keeps things simple -- until you need to copy a hundred files over TRAMP, byte-compile a stack of packages, or send an email through a slow SMTP server. That&#39;s when your entire editor locks up, and you&#39;re stuck watching the modeline blink.&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;async.el&lt;/code&gt; fixes this by letting you run Emacs Lisp code in a child Emacs process. The child starts with &lt;code&gt;-Q&lt;/code&gt; (no init files, no fuss), executes whatever you give it, and passes the result back. Your main Emacs never blocks.&lt;/p&gt; 
&lt;h2&gt;What&#39;s in the box&lt;/h2&gt; 
&lt;p&gt;The core library is &lt;code&gt;async.el&lt;/code&gt;, but the package ships with several ready-to-use applications built on top of it:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;strong&gt;dired-async&lt;/strong&gt; -- Async file operations (copy, rename, symlink) in Dired&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;async-bytecomp&lt;/strong&gt; -- Byte-compiles packages in a clean subprocess, avoiding the stale-bytecode bugs you get when compiling in a running session&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;async-package&lt;/strong&gt; -- Downloads and installs packages asynchronously&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;smtpmail-async&lt;/strong&gt; -- Sends email in the background&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Installation&lt;/h2&gt; 
&lt;p&gt;The package is available on &lt;a href=&quot;https://elpa.gnu.org/packages/async.html&quot;&gt;GNU ELPA&lt;/a&gt; and &lt;a href=&quot;https://melpa.org/#/async&quot;&gt;MELPA&lt;/a&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(package-install &#39;async)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Debian/Ubuntu users: &lt;code&gt;apt-get install elpa-async&lt;/code&gt;&lt;/p&gt; 
&lt;p&gt;From source:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;make all &amp;amp;&amp;amp; make install
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Usage&lt;/h2&gt; 
&lt;h3&gt;The basics&lt;/h3&gt; 
&lt;p&gt;Run a function in a subprocess and get the result via callback:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(async-start
 (lambda ()
   (sleep-for 3)
   42)
 (lambda (result)
   (message &quot;Got %s&quot; result)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;If you&#39;d rather wait for the result yourself, skip the callback and use &lt;code&gt;async-get&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(let ((future (async-start
               (lambda ()
                 (sleep-for 3)
                 42))))
  ;; do other work...
  (message &quot;Result: %s&quot; (async-get future)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;If you don&#39;t care about the return value, pass &lt;code&gt;&#39;ignore&lt;/code&gt; as the callback. Don&#39;t just leave it nil -- you&#39;ll leak process buffers:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(async-start
 (lambda ()
   (delete-file &quot;/ssh:remote:big-file.tar.gz&quot;))
 &#39;ignore)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Passing variables to the child&lt;/h3&gt; 
&lt;p&gt;The child Emacs starts fresh, so it doesn&#39;t have your variables. Use &lt;code&gt;async-inject-variables&lt;/code&gt; to send them over:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(async-start
 `(lambda ()
    ,(async-inject-variables &quot;\\`user-mail-address\\&#39;&quot;)
    (format &quot;Mail: %s&quot; user-mail-address))
 (lambda (result) (message &quot;%s&quot; result)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Bidirectional messaging&lt;/h3&gt; 
&lt;p&gt;The parent and child can exchange messages while the child runs:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(let ((proc
       (async-start
        (lambda ()
          (async-send :status &quot;working&quot;)
          (sleep-for 2)
          (let ((msg (async-receive)))
            (plist-get msg :data)))
        (lambda (result)
          (if (async-message-p result)
              (message &quot;Status: %s&quot; (plist-get result :status))
            (message &quot;Done: %s&quot; result))))))
  (async-send proc :data &quot;here you go&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Async let bindings&lt;/h3&gt; 
&lt;p&gt;&lt;code&gt;async-let&lt;/code&gt; evaluates bindings asynchronously and runs the body when they&#39;re ready:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(async-let ((x (heavy-computation-1))
            (y (heavy-computation-2)))
  (message &quot;x=%s y=%s&quot; x y))
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Dired async mode&lt;/h2&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(dired-async-mode 1)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;That&#39;s it. Copy, rename, and symlink operations in Dired now run in the background. If you use &lt;a href=&quot;https://github.com/emacs-helm/helm&quot;&gt;Helm&lt;/a&gt;, this works there too.&lt;/p&gt; 
&lt;h2&gt;Async byte compilation&lt;/h2&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(async-bytecomp-package-mode 1)
(setq async-bytecomp-allowed-packages &#39;(all))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;This compiles packages in a clean Emacs subprocess, which avoids the nasty bugs you get when the old version of a package is still loaded during compilation.&lt;/p&gt; 
&lt;h2&gt;Async email&lt;/h2&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(setq message-send-mail-function &#39;async-smtpmail-send-it)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;A word of caution: send at least one email synchronously first, so any TLS negotiation or auth prompts happen interactively. After that, async sending works fine.&lt;/p&gt; 
&lt;h2&gt;Authentication&lt;/h2&gt; 
&lt;p&gt;For anything involving remote hosts (TRAMP, SMTP), you&#39;ll want &lt;code&gt;auth-sources&lt;/code&gt; configured so the child process can authenticate without prompting you:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(setq auth-sources &#39;(&quot;~/.authinfo.gpg&quot; &quot;~/.netrc&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;On Emacs 26+, set &lt;code&gt;async-quiet-switch&lt;/code&gt; to &lt;code&gt;&quot;-q&quot;&lt;/code&gt; when using TRAMP -- there&#39;s a bug where &lt;code&gt;-Q&lt;/code&gt; prevents auth-source from working properly.&lt;/p&gt; 
&lt;h2&gt;Development&lt;/h2&gt; 
&lt;p&gt;If you have Nix installed:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;nix develop          # Enter development shell with all dependencies
nix flake check      # Run all checks (compile, lint, format, tests)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Otherwise:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;make all             # Clean, generate autoloads, compile
eask install-deps --dev
eask test buttercup  # Run tests
make lint            # Byte-compile with warnings-as-errors + package-lint
make format-check    # Check code formatting
make format          # Fix code formatting
&lt;/code&gt;&lt;/pre&gt;</description>
      
    </item>
    
    <item>
      <title>renzmann/treesit-auto</title>
      <link>https://github.com/renzmann/treesit-auto</link>
      <description>&lt;p&gt;Automatic installation, usage, and fallback for tree-sitter major modes in Emacs 29&lt;/p&gt;&lt;hr&gt;&lt;p&gt;#+TITLE: treesit-auto #+AUTHOR: Robb Enzmann&lt;/p&gt; 
&lt;p&gt;#+html: &lt;a href=&quot;https://www.gnu.org/software/emacs/&quot;&gt;&lt;img alt=&quot;GNU Emacs&quot; src=&quot;https://github.com/minad/corfu/raw/screenshots/emacs.svg?raw=true&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://melpa.org/#/treesit-auto&quot;&gt;&lt;img alt=&quot;Melpa&quot; src=&quot;https://melpa.org/packages/treesit-auto-badge.svg?raw=true&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://stable.melpa.org/#/treesit-auto&quot;&gt;&lt;img alt=&quot;Melpa&quot; src=&quot;https://stable.melpa.org/packages/treesit-auto-badge.svg?raw=true&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;Automatically install and use tree-sitter major modes in Emacs 29+. If the tree-sitter version can&#39;t be used, fall back to the original major mode.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Features Each of these behaviors are configurable and documented under the &quot;Configuration&quot; section. By activating =global-treesit-auto-mode=, Emacs will:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;Automatically switch to =
  &lt;name&gt;
   -ts-mode= when the grammar for =
   &lt;name&gt;
    = is installed
   &lt;/name&gt;
  &lt;/name&gt;&lt;/li&gt; 
 &lt;li&gt;Stick with =
  &lt;name&gt;
   -mode= if the grammar isn&#39;t installed
  &lt;/name&gt;&lt;/li&gt; 
 &lt;li&gt;Automatically install a grammar before opening a compatible file&lt;/li&gt; 
 &lt;li&gt;Modify =auto-mode-alist= for tree-sitter modes&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;There is also a convenience function =M-x treesit-auto-install-all=, which will install all (or a selected subset) of the maintained and compatible grammars. You can add these grammars to your =auto-mode-alist= automatically by invoking the =treesit-auto-add-to-auto-mode-alist= function in your configuration.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Installation ~treesit-auto~ is available from [[&lt;a href=&quot;https://melpa.org/&quot;&gt;https://melpa.org/&lt;/a&gt;][MELPA]]. After following [[&lt;a href=&quot;https://melpa.org/#/getting-started&quot;&gt;https://melpa.org/#/getting-started&lt;/a&gt;][their setup]], you can use your preferred package manager. If that&#39;s the default =package.el=, simply =M-x package-refresh-contents= and then&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;#+begin_example M-x package-install RET treesit-auto #+end_example&lt;/p&gt; 
&lt;p&gt;If you want a local clone of the repository, rather than just a copy of the source, you might instead use =package-vc-install=&lt;/p&gt; 
&lt;p&gt;#+begin_src example M-x package-vc-install RET &lt;a href=&quot;https://github.com/renzmann/treesit-auto.git&quot;&gt;https://github.com/renzmann/treesit-auto.git&lt;/a&gt; #+end_src&lt;/p&gt; 
&lt;p&gt;Then, in your Emacs configuration file (=~/.emacs.d/init.el=),&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (use-package treesit-auto :config (global-treesit-auto-mode)) #+end_src&lt;/p&gt; 
&lt;p&gt;For most users, this will be enough. There are some nifty things you might want to enable, though, which are covered in the &quot;Configuration&quot; section below.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Configuration example This is how I configure =treesit-auto= for my own personal use.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;#+begin_src emacs-lisp (use-package treesit-auto :custom (treesit-auto-install &#39;prompt) :config (treesit-auto-add-to-auto-mode-alist &#39;all) (global-treesit-auto-mode)) #+end_src&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;What this package does Emacs 29, while featuring =treesit.el= and a convenient =treesit-install-language-grammar=, [[&lt;a href=&quot;https://archive.casouri.cc/note/2023/tree-sitter-in-emacs-29/index.html&quot;&gt;https://archive.casouri.cc/note/2023/tree-sitter-in-emacs-29/index.html&lt;/a&gt;][will not feature an intelligent way to choose]] between a default mode, such as =python-mode=, and its tree-sitter enhanced version, =python-ts-mode=. This package attempts to remedy that by adjusting the =major-mode-remap-alist= and =treesit-language-source-alist= variables in order to get the following behavior:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;1. If the grammar is installed, then switch to the appropriate tree-sitter mode:&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;In this case, assuming we open a Python buffer, and the [[&lt;a href=&quot;https://github.com/tree-sitter/tree-sitter-python&quot;&gt;https://github.com/tree-sitter/tree-sitter-python&lt;/a&gt;][Python tree-sitter grammar]] is installed, then Emacs will use =python-ts-mode= instead of =python-mode=.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;2. The grammar is NOT installed and treesit-auto-install is non-nil:&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;When the grammar is not installed and ~treesit-auto-install~ is t, then upon activating any major mode that has a corresponding tree-sitter mode, the grammar will be downloaded and compiled using ~treesit-install-language-grammar~. Emacs will then activate the tree-sitter major mode for that buffer.&lt;/p&gt; 
&lt;p&gt;~prompt~ is like t, except a message will be displayed in the echo area asking for a yes/no response before attempting the installation.&lt;/p&gt; 
&lt;p&gt;As an example for both cases: if I visit a Python file and didn&#39;t already have the grammar installed, I wind up with an installed grammar and a buffer using ~python-ts-mode~.&lt;/p&gt; 
&lt;p&gt;Otherwise, when ~treesit-auto-install~ is nil, it will try to fall back to another major mode as described in the following two rules.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;3. If the grammar is NOT installed, and a fallback is specified&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;Most languages will have a fallback mode specified, such as =python-ts-mode= falling back to =python-mode=, if the grammar is not installed. If you ever need to double-check what that fallback will be, you can double check what&#39;s in the recipe for that language like this:&lt;/p&gt; 
&lt;p&gt;#+begin_example (treesit-auto-recipe-remap (alist-get &#39;python treesit-auto-lang-recipe-alist)) ⇒ python-mode #+end_example&lt;/p&gt; 
&lt;p&gt;See &quot;Configuration/Configuring behavior for a specific language&quot; in case you would like to specify different fallback modes than the default.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;4. The grammar is installed, but there is no fallback mode&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;You can optionally use the =treesit-auto-add-to-auto-mode-alist= function to ensure that your installed tree-sitter languages have their corresponding =...-ts-mode= added to =auto-mode-alist=, so that Emacs opens the buffer in that =...-ts-mode=, rather than the default =Fundamental= mode.&lt;/p&gt; 
&lt;p&gt;Supposing for instance we don&#39;t have =typescript-mode= installed, then even if we /do/ have =typescript-ts-mode= installed along with the typescript grammar compiled in =~/.emacs.d/tree-sitter/=, Emacs still won&#39;t use =typescript-ts-mode= unless you also added =&#39;(&quot;\.ts\&#39;&quot; . typescript-ts-mode)= to =auto-mode-alist=. By calling =(treesit-auto-add-to-auto-mode-alist)= in your configuration, this modification to =auto-mode-alist= is done automatically for you.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;5. All other cases...&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;This is the most general case, where the grammar is not installed, ~treesit-auto-install~ is nil, and no fallback mode is specified in the language recipe present on =treesit-auto-recipe-list=. In this case, we still gain the benefit of quickly installing grammars through =treesit-install-language-grammar= without having the build the recipe interactively, but =treesit-auto= will make no attempt to switch away from the tree-sitter mode.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Configuration If you have modified =treesit-language-source-alist= through =setq=, then it is recommended to put any configuration of this package AFTER that =setq=.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** Choose which languages =treesit-auto= should consider&lt;/p&gt; 
&lt;p&gt;You can globally alter the behavior of =treesit-auto= to only consider a specific set of languages by setting the =treesit-auto-langs= list to a set of language symbols. By default, this list includes every possible language that =treesit-auto= supports, so you can use =M-x describe-variable RET treesit-auto-langs= to see what the options are.&lt;/p&gt; 
&lt;p&gt;One way to use this variable is to just set it manually:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq treesit-auto-langs &#39;(python rust go)) #+end_src&lt;/p&gt; 
&lt;p&gt;Now, =treesit-auto= features will only ever affect Python, Rust, and Go files. Running =treesit-auto-install-all= will only install these three grammars, and no automatic prompting/installation will occur when visiting a buffer that is not one of these three, either.&lt;/p&gt; 
&lt;p&gt;Another method is to disable specific languages by just removing them from this list:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (delete &#39;awk treesit-auto-langs) #+end_src&lt;/p&gt; 
&lt;p&gt;Here, =treesit-auto= behaves as it normally would for all languages /except/ AWK.&lt;/p&gt; 
&lt;p&gt;** Automatically install grammars if they are missing The =treesit-auto-install= variable controls whether a grammar should be installed automatically when activating a major mode compatible with tree-sitter.&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;=nil=, the default, means =treesit-auto= won&#39;t try to install anything, and will rely on the fallback logic outlined above&lt;/li&gt; 
 &lt;li&gt;=t= means =treesit-auto= should always try to clone and install a grammar when missing&lt;/li&gt; 
 &lt;li&gt;~prompt~ will cause a yes/no prompt to appear in the minibuffer before attempting installation&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq treesit-auto-install &#39;prompt) #+end_src&lt;/p&gt; 
&lt;p&gt;Then, supposing I don&#39;t have =libtree-sitter-python.so= (or its mac/Windows equivalent) under =~/.emacs.d/tree-sitter= (or anywhere else in =treesit-extra-load-path=), visiting a Python file or calling =M-x python-ts-mode= will generate this prompt:&lt;/p&gt; 
&lt;p&gt;#+begin_example Tree-sitter grammar for python is missing. Would you like to install it from &lt;a href=&quot;https://github.com/tree-sitter/tree-sitter-python&quot;&gt;https://github.com/tree-sitter/tree-sitter-python&lt;/a&gt;? (y or n) #+end_example&lt;/p&gt; 
&lt;p&gt;Responding with &quot;yes&quot; will use =treesit-install-language-grammar= to go fetch and compile the missing grammar.&lt;/p&gt; 
&lt;p&gt;The other function that respects this variable is =treesit-auto-install-all=. When =treesit-auto-install= is t, using =M-x treesit-auto-install-all= will skip all prompts. Otherwise, it will ask before attempting the installation.&lt;/p&gt; 
&lt;p&gt;** Configuring behavior for a specific language The variable =treesit-auto-recipe-list= keeps track of all the language &quot;recipes.&quot; These control how =treesit-auto= decides which modes to upgrade/downgrade to/from, where the source code of the language grammar is hosted, and which C/C++ compiler to use. Each recipe can take these arguments:&lt;/p&gt; 
&lt;p&gt;#+begin_example :lang :ts-mode :remap :url :revision :abi14-revision :requires :source-dir :cc :c++ #+end_example&lt;/p&gt; 
&lt;p&gt;To create a recipe, use =make-treesit-auto-recipe=:&lt;/p&gt; 
&lt;p&gt;#+begin_src elisp (setq my-js-tsauto-config (make-treesit-auto-recipe :lang &#39;javascript :ts-mode &#39;js-ts-mode :remap &#39;(js2-mode js-mode javascript-mode) :url &quot;&lt;a href=&quot;https://github.com/tree-sitter/tree-sitter-javascript&quot;&gt;https://github.com/tree-sitter/tree-sitter-javascript&lt;/a&gt;&quot; :revision &quot;master&quot; :source-dir &quot;src&quot; :ext &quot;\.js\&#39;&quot;))&lt;/p&gt; 
&lt;p&gt;(add-to-list &#39;treesit-auto-recipe-list my-js-tsauto-config) #+end_src&lt;/p&gt; 
&lt;p&gt;Here, we&#39;ve specified that the tree-sitter compiler will be creating a file named =libtree-sitter-javascript.so= (or =.dylib= or =.dll=), based on the =:lang= field. The corresponding tree-sitter mode in Emacs is called =js-ts-mode=, and all of =js2-mode=, =js-mode=, and =javascript-mode= should attempt switching to the =js-ts-mode=, if possible.&lt;/p&gt; 
&lt;p&gt;Moreover, since =js-2-mode= is first under the =:remap= section, that is the &quot;primary fallback.&quot; Meaning that if the tree-sitter grammar is not available, it will be the first mode tried. If that doesn&#39;t work, it will try =js-mode=, and =javascript-mode=, in that order, until one /does/ work. If only one fallback needs to be specified, a single quoted symbol is also acceptable. For instance, =python-ts-mode= just uses =:remap &#39;python-mode= in this argument position.&lt;/p&gt; 
&lt;p&gt;If a grammar mandates any other grammars be installed as a dependency, the =:requires= keyword can specify a language symbol or list of symbols that should be installed. One example of this is found in the TypeScript recipe, which specifies =:requires &#39;tsx=, since activating =typescript-ts-mode= on some Emacs builds will attempt to load the TSX grammar.&lt;/p&gt; 
&lt;p&gt;The =:url=, =:revision=, =:source-dir=, =:cc=, and =:c++= arguments are all documented under =treesit-language-source-alist=, which is part of base Emacs, not this package.&lt;/p&gt; 
&lt;p&gt;*** =:abi14-revision= and =version-mismatch= errors If treesit reports reports =(treesit): The installed language grammar for foo cannot be located or has problems (version-mismatch): 15= it means that the grammar is using ABI 15, but Emacs only supports earlier versions (e.g. Emacs 30.1 supports ABI versions 13 and 14). To fix this, set =:abi14-revision= to a git tag that corresponds to an ABI 14 version in the grammar repository.&lt;/p&gt; 
&lt;p&gt;Finding the right tag can require some trial and error, by checking out different revisions of the grammar and building them. Once you&#39;ve built a grammar you can use the script =check_treesit_abi.py= to print its ABI version.&lt;/p&gt; 
&lt;p&gt;Once you find the tag for the ABI 14 revision of a grammar, please submit a pull request to add it to the default value of =treesit-auto-recipe-list=.&lt;/p&gt; 
&lt;p&gt;Setting =:abi14-revision= is preferable to changing =:revision=, because changing =:revision= would force the ABI 14 version even after Emacs starts supporting ABI 15.&lt;/p&gt; 
&lt;p&gt;** Keep track of your hooks This package does not modify any of your major mode hooks. That is, if you have functions in =python-mode-hook=, but not in =python-ts-mode-hook=, then your hook from =python-mode= will not be applied, assuming =python-ts-mode= is what gets loaded. For major modes in which this is a concern, the current recommendation is to address this as part of your configuration.&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq rust-ts-mode-hook rust-mode-hook) #+end_src&lt;/p&gt; 
&lt;p&gt;Some modes have a shared base, such as =python-ts-mode= and =python-mode= both deriving from =python-base-mode=. For these languages, you can opt to hook into =python-base-mode-hook= instead of explicitly setting the tree-sitter mode&#39;s hook.&lt;/p&gt; 
&lt;p&gt;** Automatically register extensions for =auto-mode-alist= You can register tree-sitter modes to =auto-mode-alist= by calling =treesit-auto-add-to-auto-mode-alist=. Depending on the optional argument =langs=, this function can behave in three different ways:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;=nil=, the default - Only add tree-sitter modes to =auto-mode-alist= if the tree-sitter mode is available to Emacs /and/ the grammar is installed.&lt;/li&gt; 
 &lt;li&gt;=&#39;all= - For every tree-sitter mode available to Emacs and in =treesit-auto-langs=, add it to =auto-mode-alist= regardless of whether the grammar is installed. This has the beneficial side effect of installing grammars for you when opening files that have a tree-sitter mode that comes with Emacs, but have no fallback mode. Examples of this are =rust-ts-mode=, =go-ts-mode=, and a few others in Emacs 29+.&lt;/li&gt; 
 &lt;li&gt;&lt;em&gt;A list of language symbols&lt;/em&gt; - behaves like =&#39;all=, but only for the listed languages&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;For instance, you might run this function as:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (treesit-auto-add-to-auto-mode-alist &#39;(rust go toml)) #+end_src&lt;/p&gt; 
&lt;p&gt;This registers your tree-sitter modes according to the common file extension for Rust, Go, and TOML, but no other modes. Most users will probably want to use =(treesit-auto-add-to-auto-mode-alist &#39;all)= for the easiest general behavior; always prompting/installing grammars when we can.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;A rough vanilla equivalent I find it a good practice to be skeptical of adding any new dependency to my Emacs configuration. So, what would you have to do to get similar behavior in your Emacs configuration without the =treesit-auto= package?&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;We&#39;ll take two examples: TypeScript and Python.&lt;/p&gt; 
&lt;p&gt;Emacs 29 ships with =typescript-ts-mode= and =tsx-ts-mode=, but no equivalent =typescript-mode= or =tsx-mode=. =python-ts-mode= and =python-mode=, on the other hand, are both available out of the box. If you wanted these grammars to automatically install on launch, and then use the tree-sitter modes instead of the base modes for every file, you&#39;d need the following code in your init file:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq treesit-language-source-alist &#39;((typescript . (&quot;&lt;a href=&quot;https://github.com/tree-sitter/tree-sitter-typescript&quot;&gt;https://github.com/tree-sitter/tree-sitter-typescript&lt;/a&gt;&quot; &quot;master&quot; &quot;typescript/src&quot;)) (tsx . (&quot;&lt;a href=&quot;https://github.com/tree-sitter/tree-sitter-typescript&quot;&gt;https://github.com/tree-sitter/tree-sitter-typescript&lt;/a&gt;&quot; &quot;master&quot; &quot;tsx/src&quot;)) (python . (&quot;&lt;a href=&quot;https://github.com/tree-sitter/tree-sitter-python&quot;&gt;https://github.com/tree-sitter/tree-sitter-python&lt;/a&gt;&quot;))))&lt;/p&gt; 
&lt;p&gt;(dolist (source treesit-language-source-alist) (unless (treesit-ready-p (car source)) (treesit-install-language-grammar (car source))))&lt;/p&gt; 
&lt;p&gt;(add-to-list &#39;auto-mode-alist &#39;(&quot;\.ts\&#39;&quot; . typescript-ts-mode)) (add-to-list &#39;auto-mode-alist &#39;(&quot;\.tsx\&#39;&quot; . tsx-ts-mode)) (add-to-list &#39;major-mode-remap-alist &#39;(python-mode . python-ts-mode))&lt;/p&gt; 
&lt;p&gt;#+end_src&lt;/p&gt; 
&lt;p&gt;There are plenty of reasons why some users would prefer to take this type of hand-tuned approach to their tree-sitter modes. For most Emacs people, though, you can see the natural progression of where a config like the above would go:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;You need to maintain a library of language symbols (which /must/ match the language&#39;s =grammar.js=), URLs, revisions, and sub-directories for =treesit-language-source-alist=. Additionally, you&#39;d need to know that =typescript-ts-mode= relies on the tree-sitter grammar for =tsx=, which must be installed alongside the grammar for TypeScript. This is probably the main value proposition of this package, since all of this information is stored under the community-contributed =treesit-auto-recipe-list=&lt;/li&gt; 
 &lt;li&gt;You need to be aware of when to use =auto-mode-alist= and =major-mode-remap-alist=, depending on what modes are installed into Emacs&lt;/li&gt; 
 &lt;li&gt;If you want lazy installation of grammars, rather than installing them all up-front in your =init.el=, you&#39;d need to write some hooks or derived modes to check =treesit-ready-p= for the current buffer, and install the language before loading the main tree-sitter mode&lt;/li&gt; 
 &lt;li&gt;After a certain number of langauges, it becomes unweildy to do these =add-to-list= calls for every single one, and it&#39;s better to programmatically operate on a list of selected languages&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;If you were to follow this chain yourself, you&#39;d probably wind up with something in your =init.el= that looks very similar to the code in this package.&lt;/p&gt; 
&lt;p&gt;All in all, this is a small package. Roughly half of it is just maintaining a library of information for =treesit-language-source-alist=, and the other half works through the logic of handling edge cases related to the remaining bullets above.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;Caveats This package is, admittedly, a hack. =treesit.el= provides an excellent foundation to incremental source code parsing for Emacs 29, and over time that foundation /will/ expand into an improved core editing experience. With that in mind, I fully expect this package to eventually be obsolesced by the default options in Emacs 30 and beyond. That does not preclude us from adding a few quality of life improvements to Emacs 29, though, and so it still seems prudent to have this plugin available in the meantime.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Known bugs =treesit-auto= doesn&#39;t play super well with Org-babel, since Org has its own methods of hooking into and using languages. In particular, you may need to set =org-src-lang-modes= yourself to get tree-sitter modes working correctly.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Another side behavior you may encounter is when opening an Org document with shell scripts inside and =treesit-auto-install= is non-nil, then =treesit-auto= will prompt to install the Bash grammar, but won&#39;t display the prompt until you interact with Emacs in some way, such as using =next-line= (=C-n= by default) or hovering over Emacs with your mouse.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Contributing Bug reports, feature requests, and contributions are most welcome. Even though this is a small project, there is always room for improvement. I also appreciate &quot;nitpicky&quot; contributions, such as formatting, conventions, variable naming, code simplification, and improvements to language in documentation.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Issues are tracked on [[&lt;a href=&quot;https://github.com/renzmann/treesit-auto/issues&quot;&gt;https://github.com/renzmann/treesit-auto/issues&lt;/a&gt;][GitHub]], which is also where patches and pull requests should be submitted.&lt;/p&gt; 
&lt;p&gt;If you would like to submit a new language recipe to be distributed as part of this package, see [[&lt;a href=&quot;http://CONTRIBUTING.org&quot;&gt;CONTRIBUTING.org&lt;/a&gt;][&lt;a href=&quot;http://CONTRIBUTING.org&quot;&gt;CONTRIBUTING.org&lt;/a&gt;]] for a quick guide on how to write and submit the new recipe.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>rainstormstudio/nerd-icons.el</title>
      <link>https://github.com/rainstormstudio/nerd-icons.el</link>
      <description>&lt;p&gt;#+TITLE: nerd-icons.el - A Library for Nerd Font icons #+AUTHOR: Hongyu Ding #+LANGUAGE: en&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://melpa.org/#/nerd-icons&quot;&gt;https://melpa.org/#/nerd-icons&lt;/a&gt;][file:&lt;a href=&quot;https://melpa.org/packages/nerd-icons-badge.svg&quot;&gt;https://melpa.org/packages/nerd-icons-badge.svg&lt;/a&gt;]]&lt;/p&gt; 
&lt;p&gt;Nerd-icons.el is a library for easily using [[&lt;a href=&quot;https://github.com/ryanoasis/nerd-fonts&quot;&gt;https://github.com/ryanoasis/nerd-fonts&lt;/a&gt;][Nerd Font]] icons inside Emacs, an alternative to [[&lt;a href=&quot;https://github.com/domtronn/all-the-icons.el&quot;&gt;https://github.com/domtronn/all-the-icons.el&lt;/a&gt;][all-the-icons]].&lt;/p&gt; 
&lt;p&gt;It works on both GUI and terminal! You only need a [[&lt;a href=&quot;https://www.nerdfonts.com/#home&quot;&gt;https://www.nerdfonts.com/#home&lt;/a&gt;][Nerd Font]] installed on your system.&lt;/p&gt; 
&lt;p&gt;It is inspired by [[&lt;a href=&quot;https://github.com/domtronn/all-the-icons.el&quot;&gt;https://github.com/domtronn/all-the-icons.el&lt;/a&gt;][all-the-icons]], [[&lt;a href=&quot;https://github.com/seagle0128/icons-in-terminal.el&quot;&gt;https://github.com/seagle0128/icons-in-terminal.el&lt;/a&gt;][icons-in-terminal]], [[&lt;a href=&quot;https://github.com/ryanoasis/vim-devicons&quot;&gt;https://github.com/ryanoasis/vim-devicons&lt;/a&gt;][vim-devicons]], and [[&lt;a href=&quot;https://github.com/nvim-tree/nvim-web-devicons&quot;&gt;https://github.com/nvim-tree/nvim-web-devicons&lt;/a&gt;][nvim-web-devicons]].&lt;/p&gt; 
&lt;p&gt;in GUI: [[file:screenshots/demo.png]]&lt;/p&gt; 
&lt;p&gt;in terminal: [[file:screenshots/demo-terminal.png]]&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Installing Fonts Please go to [[&lt;a href=&quot;https://www.nerdfonts.com/&quot;&gt;https://www.nerdfonts.com/&lt;/a&gt;][Nerd Fonts website]] and get a Nerd font. After installing the font on your machine, you need to set ~nerd-icons-font-family~ to match its font name so that the font can be properly used under GUI. If you want Nerd Fonts to work under a terminal, please change your terminal&#39;s font to a Nerd font.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;If the Nerd Font you installed does not display correctly (e.g. appear cut off), it is recommended to use =Symbols Nerd Font Mono= (Symbols Nerd Font). You can use ~M-x nerd-icons-install-fonts~ to install ~Symbols Nerd Font Mono~ for you. Note that for &lt;em&gt;Windows&lt;/em&gt; you&#39;ll need to manually install the font after you used this function.&lt;/p&gt; 
&lt;p&gt;To automatically install =Symbols Nerd Font Mono=, you can use this elisp in your ~init.el~. On macOS, Linux and BSDs, this will download and install the font directly for you. On Windows, you can specify the folder to download the font to, but you will still have to manually install it after.&lt;/p&gt; 
&lt;p&gt;#+BEGIN_SRC emacs-lisp ;; Linux/macOS/BSDs (when (member system-type &#39;(gnu gnu/linux gnu/kfreebsd darwin)) (unless (find-font (font-spec :name &quot;Symbols Nerd Font Mono&quot;)) (nerd-icons-install-fonts t)))&lt;/p&gt; 
&lt;p&gt;;; Windows (when (string-equal system-type &#39;windows-nt) (unless (find-font (font-spec :name &quot;Symbols Nerd Font Mono&quot;)) (nerd-icons-install-fonts &quot;c:/Users/username/Desktop/&quot;)))&lt;/p&gt; 
&lt;p&gt;;; All-in-one ;; This will install in the default fonts folder for Linux/macOS/BSDs ;; (same as “t”), but for Windows this will download to the specified ;; folder (unless (find-font (font-spec :name &quot;Symbols Nerd Font Mono&quot;)) (nerd-icons-install-fonts &quot;c:/Users/username/Desktop/&quot;)) #+END_SRC&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Usage ~nerd-icons~ is on [[&lt;a href=&quot;https://melpa.org/#/nerd-icons-completion&quot;&gt;https://melpa.org/#/nerd-icons-completion&lt;/a&gt;][Melpa]]. You can install it with built-in ~M-x package-install~ #+begin_src emacs-lisp (require &#39;nerd-icons) #+end_src&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;or using ~use-package~ #+BEGIN_SRC emacs-lisp (use-package nerd-icons ;; :custom ;; The Nerd Font you want to use in GUI ;; &quot;Symbols Nerd Font Mono&quot; is the default and is recommended ;; but you can use any other Nerd Font if you want ;; (nerd-icons-font-family &quot;Symbols Nerd Font Mono&quot;) ) #+END_SRC ** insert icons&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;use icon based on category&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;~nerd-icons-icon-for-dir~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-icon-for-file~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-icon-for-extension~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-icon-for-mode~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-icon-for-url~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-icon-for-buffer~&lt;/li&gt; 
  &lt;/ul&gt; &lt;p&gt;example: #+BEGIN_SRC emacs-lisp (insert (nerd-icons-icon-for-file &quot;init.el&quot;)) ;; Inserts an icon for Emacs Lisp #+END_SRC&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;use icon directly&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;~nerd-icons-ipsicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-octicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-pomicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-powerline~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-faicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-wicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-sucicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-devicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-codicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-flicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-mdicon~&lt;/li&gt; 
  &lt;/ul&gt; &lt;p&gt;example: #+BEGIN_SRC emacs-lisp (insert (nerd-icons-faicon &quot;nf-fa-gitlab&quot;)) ;; Inserts a Gitlab icon #+END_SRC&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;insert icon interactively (~M-x~ functions)&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;~nerd-icons-insert~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-ipsicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-octicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-pomicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-powerline~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-faicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-wicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-sucicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-devicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-codicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-flicon~&lt;/li&gt; 
   &lt;li&gt;~nerd-icons-insert-mdicon~&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** customize icons You can customize the icons via ~nerd-icons-extension-icon-alist~, ~nerd-icons-regexp-icon-alist~ and ~nerd-icons-mode-icon-alist~, etc.&lt;/p&gt; 
&lt;p&gt;For example, #+begin_src emacs-lisp (add-to-list &#39;nerd-icons-extension-icon-alist &#39;(&quot;epub&quot; nerd-icons-faicon &quot;nf-fa-book&quot; :face nerd-icons-green)) #+end_src&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Glyph Sets | Glyph Set | prefix | Point Range | insert function | |-------------------------+----------------------+--------------------------------------+----------------------| | Seti-UI + Custom | ~nf-seti-~, ~nf-custom-~ | ~e5fa~ - ~e631~ | ~nerd-icons-sucicon~ | | Devicons | ~nf-dev-~ | ~e700~ - ~e7c5~ | ~nerd-icons-devicon~ | | Font Awesome | ~nf-fa-~ | ~f000~ - ~f2e0~ | ~nerd-icons-faicon~ | | Font Awesome Extension | ~nf-fae-~ | ~e200~ - ~e2a9~ | ~nerd-icons-faicon~ | | Material Design Icons | ~nf-md-~ | ~f500~ - ~fd46~ | ~nerd-icons-mdicon~ | | Weather | ~nf-weather-~ | ~e300~ - ~e3eb~ | ~nerd-icons-wicon~ | | Octicons | ~nf-oct-~ | ~f400~ - ~f4a9~, ~2665~, ~26A1~ | ~nerd-icons-octicon~ | | Powerline Symbols | ~nf-pl-~ | ~e0a0~ - ~e0a2~, ~e0b0~ - ~e0b3~ | ~nerd-icons-powerline~ | | Powerline Extra Symbols | ~nf-ple-~ | ~e0a3~, ~e0b4~ - ~e0c8~, ~e0ca~, ~e0cc~ - ~e0d4~ | ~nerd-icons-powerline~ | | IEC Power Symbols | ~nf-iec-~ | ~23fb~ - ~23fe~, ~2b58~ | ~nerd-icons-ipsicon~ | | Font Logos | ~nf-linux-~ | ~f300~ - ~f32d~ | ~nerd-icons-flicon~ | | Pomicons | ~nf-pom-~ | ~e000~ - ~e00a~ | ~nerd-icons-pomicon~ | | Codicons | ~nf-cod-~ | ~ea60~ - ~ebeb~ | ~nerd-icons-codicon~ |&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Please check [[&lt;a href=&quot;https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points&quot;&gt;https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points&lt;/a&gt;][Nerd Fonts Glyph Sets and Code Points]] for more information.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Related Packages&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/rainstormstudio/nerd-icons-dired&quot;&gt;https://github.com/rainstormstudio/nerd-icons-dired&lt;/a&gt;][nerd-icons-dired]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/abougouffa/nerd-icons-multimodal&quot;&gt;https://github.com/abougouffa/nerd-icons-multimodal&lt;/a&gt;][nerd-icons-multimodal]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/rainstormstudio/treemacs-nerd-icons&quot;&gt;https://github.com/rainstormstudio/treemacs-nerd-icons&lt;/a&gt;][treemacs-nerd-icons]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/seagle0128/nerd-icons-ivy-rich&quot;&gt;https://github.com/seagle0128/nerd-icons-ivy-rich&lt;/a&gt;][nerd-icons-ivy-rich]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/seagle0128/nerd-icons-ibuffer&quot;&gt;https://github.com/seagle0128/nerd-icons-ibuffer&lt;/a&gt;][nerd-icons-ibuffer]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/rainstormstudio/nerd-icons-completion&quot;&gt;https://github.com/rainstormstudio/nerd-icons-completion&lt;/a&gt;][nerd-icons-completion]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/LuigiPiucco/nerd-icons-corfu&quot;&gt;https://github.com/LuigiPiucco/nerd-icons-corfu&lt;/a&gt;][nerd-icons-corfu]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/alexluigit/dirvish&quot;&gt;https://github.com/alexluigit/dirvish&lt;/a&gt;][dirvish]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/seagle0128/doom-modeline&quot;&gt;https://github.com/seagle0128/doom-modeline&lt;/a&gt;][doom-modeline]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/grolongo/nerd-icons-mode-line&quot;&gt;https://github.com/grolongo/nerd-icons-mode-line&lt;/a&gt;][nerd-icons-mode-line]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/lucius-martius/tab-line-nerd-icons&quot;&gt;https://github.com/lucius-martius/tab-line-nerd-icons&lt;/a&gt;][tab-line-nerd-icons]]&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** use nerd-icons with dirvish sample configuration: #+BEGIN_SRC emacs-lisp (use-package dirvish :init (dirvish-override-dired-mode) :config (setq dirvish-mode-line-format &#39;(:left (sort symlink) :right (omit yank index))) (setq dirvish-mode-line-height 10) (setq dirvish-attributes &#39;(nerd-icons file-time file-size collapse subtree-state vc-state git-msg)) (setq dirvish-subtree-state-style &#39;nerd) (setq delete-by-moving-to-trash t) (setq dirvish-path-separators (list (format &quot; %s &quot; (nerd-icons-codicon &quot;nf-cod-home&quot;)) (format &quot; %s &quot; (nerd-icons-codicon &quot;nf-cod-root_folder&quot;)) (format &quot; %s &quot; (nerd-icons-faicon &quot;nf-fa-angle_right&quot;)))) (setq dired-listing-switches &quot;-l --almost-all --human-readable --group-directories-first --no-group&quot;) (dirvish-peek-mode) ; Preview files in minibuffer (dirvish-side-follow-mode) ; similar to `treemacs-follow-mode&#39; ) #+END_SRC&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>akermu/emacs-libvterm</title>
      <link>https://github.com/akermu/emacs-libvterm</link>
      <description>&lt;p&gt;Emacs libvterm integration&lt;/p&gt;&lt;hr&gt;&lt;p&gt;&lt;a href=&quot;https://melpa.org/#/vterm&quot;&gt;&lt;img src=&quot;https://melpa.org/packages/vterm-badge.svg?sanitize=true&quot; alt=&quot;MELPA&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;h1&gt;Introduction&lt;/h1&gt; 
&lt;p&gt;Emacs-libvterm (&lt;em&gt;vterm&lt;/em&gt;) is fully-fledged terminal emulator inside GNU Emacs based on &lt;a href=&quot;https://github.com/neovim/libvterm&quot;&gt;&lt;code&gt;libvterm&lt;/code&gt;&lt;/a&gt;, a C library. As a result of using compiled code (instead of elisp), emacs-libvterm is fully capable, fast, and it can seamlessly handle large outputs.&lt;/p&gt; 
&lt;h2&gt;Warning&lt;/h2&gt; 
&lt;p&gt;This package is in active development and, while being stable enough to be used as a daily-driver, it is currently in &lt;strong&gt;alpha&lt;/strong&gt; stage. This means that occasionally the public interface will change (for example names of options or functions). A list of recent breaking changes is in &lt;a href=&quot;https://raw.githubusercontent.com/akermu/emacs-libvterm/master/#breaking-changes&quot;&gt;appendix&lt;/a&gt;. Moreover, emacs-libvterm deals directly with some low-level operations, hence, bugs can lead to segmentation faults and crashes. If that happens, please &lt;a href=&quot;https://github.com/akermu/emacs-libvterm/issues/new&quot;&gt;report the problem&lt;/a&gt;.&lt;/p&gt; 
&lt;h2&gt;Given that eshell, shell, and (ansi-)term are Emacs built-in, why should I use vterm?&lt;/h2&gt; 
&lt;p&gt;The short answer is: unparalleled performance and compatibility with standard command-line tools.&lt;/p&gt; 
&lt;p&gt;For the long answer, let us discuss the differences between &lt;code&gt;eshell&lt;/code&gt;, &lt;code&gt;shell&lt;/code&gt;, &lt;code&gt;term&lt;/code&gt; and &lt;code&gt;vterm&lt;/code&gt;:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;eshell&lt;/code&gt;: it is a shell completely implemented in Emacs Lisp. It is well-integrated in Emacs and it runs on Windows. It does not support command line tools that require terminal manipulation capabilities (e.g., &lt;code&gt;ncdu&lt;/code&gt;, &lt;code&gt;nmtui&lt;/code&gt;, ...).&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;shell&lt;/code&gt;: it interfaces with a standard shell (e.g., &lt;code&gt;bash&lt;/code&gt;). It reads an input from Emacs, sends it to the shell, and reports back the output from the shell. As such, like &lt;code&gt;eshell&lt;/code&gt;, it does not support interactive commands, especially those that directly handle how the output should be displayed (e.g., &lt;code&gt;htop&lt;/code&gt;).&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;term&lt;/code&gt;: it is a terminal emulator written in elisp. &lt;code&gt;term&lt;/code&gt; runs a shell (similarly to other terminal emulators like Gnome Terminal) and programs can directly manipulate the output using escape codes. Hence, many interactive applications (like the one aforementioned) work with &lt;code&gt;term&lt;/code&gt;. However, &lt;code&gt;term&lt;/code&gt; and &lt;code&gt;ansi-term&lt;/code&gt; do not implement all the escapes codes needed, so some programs do not work properly. Moreover, &lt;code&gt;term&lt;/code&gt; has inferior performance compared to standalone terminals, especially with large bursts of output.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;vterm&lt;/code&gt;: like &lt;code&gt;term&lt;/code&gt; it is a terminal emulator. Unlike &lt;code&gt;term&lt;/code&gt;, the core of &lt;code&gt;vterm&lt;/code&gt; is an external library written in C, &lt;code&gt;libvterm&lt;/code&gt;. For this reason, &lt;code&gt;vterm&lt;/code&gt; outperforms &lt;code&gt;term&lt;/code&gt; and has a nearly universal compatibility with terminal applications.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Vterm is not for you &lt;a href=&quot;https://github.com/akermu/emacs-libvterm/issues/12&quot;&gt;if you are using Windows&lt;/a&gt;, or if you cannot set up Emacs with support for modules. Otherwise, you should try vterm, as it provides a superior terminal experience in Emacs.&lt;/p&gt; 
&lt;p&gt;Using &lt;code&gt;vterm&lt;/code&gt; is like using Gnome Terminal inside Emacs: Vterm is fully-featured and fast, but is not as well integrated in Emacs as &lt;code&gt;eshell&lt;/code&gt; (yet), so some of the editing keybinding you are used to using may not work. For example, &lt;code&gt;evil-mode&lt;/code&gt; is currently not supported (though, users can enable VI emulation in their shells). This is because keys are sent directly to the shell. We are constantly working to improve this.&lt;/p&gt; 
&lt;h1&gt;Installation&lt;/h1&gt; 
&lt;h2&gt;Requirements&lt;/h2&gt; 
&lt;p&gt;Before installing emacs-libvterm, you need to make sure you have installed&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;GNU Emacs (&amp;gt;= 25.1) with &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/elisp/Dynamic-Modules.html&quot;&gt;module support&lt;/a&gt;. You can check that, by verifying that &lt;code&gt;module-file-suffix&lt;/code&gt; is not &lt;code&gt;nil&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;cmake (&amp;gt;= 3.11)&lt;/li&gt; 
 &lt;li&gt;libtool-bin (related issues: &lt;a href=&quot;https://github.com/akermu/emacs-libvterm/issues/66&quot;&gt;#66&lt;/a&gt; &lt;a href=&quot;https://github.com/akermu/emacs-libvterm/issues/85#issuecomment-491845136&quot;&gt;#85&lt;/a&gt;)&lt;/li&gt; 
 &lt;li&gt;OPTIONAL: &lt;a href=&quot;https://github.com/Sbozzolo/libvterm-mirror.git&quot;&gt;libvterm&lt;/a&gt; (&amp;gt;= 0.2). This library can be found in the official repositories of most distributions (e.g., Arch, Debian, Fedora, Gentoo, openSUSE, Ubuntu). Typical names are &lt;code&gt;libvterm&lt;/code&gt; (Arch, Fedora, Gentoo, openSUSE), or &lt;code&gt;libvterm-dev&lt;/code&gt; (Debian, Ubuntu). If not available, &lt;code&gt;libvterm&lt;/code&gt; will be downloaded during the compilation process. Some distributions (e.g. Ubuntu &amp;lt; 20.04, Debian &amp;lt; 11) have versions of &lt;code&gt;libvterm&lt;/code&gt; that are too old. If you find compilation errors related to &lt;code&gt;VTERM_COLOR&lt;/code&gt;, you should not use your system libvterm. See &lt;a href=&quot;https://raw.githubusercontent.com/akermu/emacs-libvterm/master/#frequently-asked-questions-and-problems&quot;&gt;FAQ&lt;/a&gt; for more details.&lt;/li&gt; 
&lt;/ol&gt; 
&lt;h2&gt;From MELPA&lt;/h2&gt; 
&lt;p&gt;&lt;code&gt;vterm&lt;/code&gt; is available on &lt;a href=&quot;https://melpa.org/&quot;&gt;MELPA&lt;/a&gt;, and it can be installed as a normal package. If the requirements are satisfied (mainly, Emacs was built with support for modules), &lt;code&gt;vterm&lt;/code&gt; will compile the module the first time it is run. This is the recommended way to install &lt;code&gt;vterm&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;vterm&lt;/code&gt; can be installed from MELPA with &lt;code&gt;use-package&lt;/code&gt; by adding the following lines to your &lt;code&gt;init.el&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(use-package vterm
    :ensure t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;To take full advantage of the capabilities of &lt;code&gt;vterm&lt;/code&gt;, you should configure your shell too. Read about this in the section &lt;a href=&quot;https://raw.githubusercontent.com/akermu/emacs-libvterm/master/#shell-side-configuration&quot;&gt;shell-side configuration&lt;/a&gt;.&lt;/p&gt; 
&lt;h2&gt;Manual installation&lt;/h2&gt; 
&lt;p&gt;Clone the repository:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git clone https://github.com/akermu/emacs-libvterm.git
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;By default, vterm will try to find if &lt;code&gt;libvterm&lt;/code&gt; is installed. If it is not found, emacs-libvterm will download the latest version available of &lt;code&gt;libvterm&lt;/code&gt; (from &lt;a href=&quot;https://github.com/neovim/libvterm&quot;&gt;here&lt;/a&gt;), compile it, and use it. If you always want to use the vendored version as opposed to the one on you system, set &lt;code&gt;USE_SYSTEM_LIBVTERM&lt;/code&gt; to &lt;code&gt;no&lt;/code&gt;. To do this, change &lt;code&gt;cmake ..&lt;/code&gt; with &lt;code&gt;cmake -DUSE_SYSTEM_LIBVTERM=no ..&lt;/code&gt; in the following instructions.&lt;/p&gt; 
&lt;p&gt;Build the module with:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;cd emacs-libvterm
mkdir -p build
cd build
cmake ..
make
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;And add this to your &lt;code&gt;init.el&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(add-to-list &#39;load-path &quot;path/to/emacs-libvterm&quot;)
(require &#39;vterm)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Or, with &lt;code&gt;use-package&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(use-package vterm
  :load-path  &quot;path/to/emacs-libvterm/&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;vterm and Ubuntu&lt;/h2&gt; 
&lt;h3&gt;20.04&lt;/h3&gt; 
&lt;p&gt;Using &lt;code&gt;vterm&lt;/code&gt; on Ubuntu requires additional steps. The latest LTS version (20.04) ships without CMake installed and Emacs27 is not yet available from Ubuntu&#39;s package repository.&lt;/p&gt; 
&lt;p&gt;The basic steps for getting vterm to work on Ubuntu 20.04 are:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Ensure Emacs27 is installed&lt;/li&gt; 
 &lt;li&gt;Install &lt;code&gt;cmake&lt;/code&gt;, &lt;code&gt;libtool&lt;/code&gt;, and &lt;code&gt;libtool-bin&lt;/code&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;There are a few options for installing Emacs27 on Ubuntu 20.04:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Compile Emacs27 from source&lt;/li&gt; 
 &lt;li&gt;Install Emacs27 from Snap&lt;/li&gt; 
 &lt;li&gt;Install Emacs27 from Kevin Kelley&#39;s PPA&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;In any case, if you have an older Emacs version you will need to purge it before proceeding:&lt;/p&gt; 
&lt;h4&gt;Purge Emacs&lt;/h4&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo apt --purge remove emacs
sudo apt autoremove
&lt;/code&gt;&lt;/pre&gt; 
&lt;h4&gt;Installing Emacs27 from Kevin Kelley PPA&lt;/h4&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo add-apt-repository ppa:kelleyk/emacs
sudo apt install emacs27
&lt;/code&gt;&lt;/pre&gt; 
&lt;h5&gt;If you get an error about emacs27_common during the install process:&lt;/h5&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;Errors were encountered while processing:
 /tmp/apt-dpkg-install-RVK8CA/064-emacs27-common_27.1~1.git86d8d76aa3-kk2+20.04_all.deb
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;run&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo apt --purge remove emacs-common
sudo apt --fix-broken install
&lt;/code&gt;&lt;/pre&gt; 
&lt;h4&gt;Installing Emacs27 from Snap&lt;/h4&gt; 
&lt;p&gt;I hesitate to include SNAP here, because I ran into a number of GTK Theme parsing errors, and Fontconfig errors when I tested it, and reverted to installing from Kevin Kelley&#39;s PPA. YMMV&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo snap install emacs --classic
&lt;/code&gt;&lt;/pre&gt; 
&lt;h4&gt;Install CMake and Libtool&lt;/h4&gt; 
&lt;p&gt;In Ubuntu 20.04 CMake (v3.16.3-1ubuntu1) and Libtool can be installed with&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo apt install cmake
sudo apt install libtool
sudo apt install libtool-bin
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;18.04&lt;/h3&gt; 
&lt;p&gt;Using &lt;code&gt;vterm&lt;/code&gt; on Ubuntu 18.04 requires additional steps. 18.04 ships with a version of CMake that is too old for &lt;code&gt;vterm&lt;/code&gt; and GNU Emacs is not compiled with support for dynamical module loading.&lt;/p&gt; 
&lt;p&gt;It is possible to install GNU Emacs with module support from Kevin Kelley&#39;s PPA. The binary in Ubuntu Emacs Lisp PPA is currently broken and leads to segmentation faults (see &lt;a href=&quot;https://github.com/akermu/emacs-libvterm/issues/185#issuecomment-562237077&quot;&gt;#185&lt;/a&gt;). In case Emacs is already on the system, you need to purge it before proceeding with the following commands.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo add-apt-repository ppa:kelleyk/emacs
sudo apt update
sudo apt-get install emacs26
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;A way to install a recent version of CMake (&amp;gt;= 3.11) is with linuxbrew.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;brew install cmake
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;In some cases, &lt;code&gt;/bin/sh&lt;/code&gt; needs to be relinked to &lt;code&gt;/bin/bash&lt;/code&gt; for the compilation to work (see, &lt;a href=&quot;https://github.com/akermu/emacs-libvterm/issues/216#issuecomment-575934593&quot;&gt;#216&lt;/a&gt;).&lt;/p&gt; 
&lt;p&gt;Pull requests to improve support for Ubuntu are welcome (e.g., simplifying the installation).&lt;/p&gt; 
&lt;p&gt;Some releases of Ubuntu (e.g., 18.04) ship with a old version of &lt;code&gt;libvterm&lt;/code&gt; that can lead to compilation errors. If you have this problem, see the &lt;a href=&quot;https://raw.githubusercontent.com/akermu/emacs-libvterm/master/#frequently-asked-questions-and-problems&quot;&gt;FAQ&lt;/a&gt; for a solution.&lt;/p&gt; 
&lt;h2&gt;GNU Guix&lt;/h2&gt; 
&lt;p&gt;&lt;code&gt;vterm&lt;/code&gt; and its dependencies are available in GNU Guix as &lt;a href=&quot;https://guix.gnu.org/packages/emacs-vterm-0-1.7d7381f/&quot;&gt;emacs-vterm&lt;/a&gt;. The package can be installed with &lt;code&gt;guix package -i emacs-vterm&lt;/code&gt;.&lt;/p&gt; 
&lt;h2&gt;Shell-side configuration&lt;/h2&gt; 
&lt;p&gt;Some of the most useful features in &lt;code&gt;vterm&lt;/code&gt; (e.g., &lt;a href=&quot;https://raw.githubusercontent.com/akermu/emacs-libvterm/master/#directory-tracking-and-prompt-tracking&quot;&gt;directory-tracking and prompt-tracking&lt;/a&gt; or &lt;a href=&quot;https://raw.githubusercontent.com/akermu/emacs-libvterm/master/#message-passing&quot;&gt;message passing&lt;/a&gt;) require shell-side configurations. The main goal of these additional functions is to enable the shell to send information to &lt;code&gt;vterm&lt;/code&gt; via properly escaped sequences. A function that helps in this task, &lt;code&gt;vterm_printf&lt;/code&gt;, is defined below. This function is widely used throughout this readme.&lt;/p&gt; 
&lt;p&gt;For &lt;code&gt;bash&lt;/code&gt; or &lt;code&gt;zsh&lt;/code&gt;, put this in your &lt;code&gt;.zshrc&lt;/code&gt; or &lt;code&gt;.bashrc&lt;/code&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;vterm_printf() {
    if [ -n &quot;$TMUX&quot; ] \
        &amp;amp;&amp;amp; { [ &quot;${TERM%%-*}&quot; = &quot;tmux&quot; ] \
            || [ &quot;${TERM%%-*}&quot; = &quot;screen&quot; ]; }; then
        # Tell tmux to pass the escape sequences through
        printf &quot;\ePtmux;\e\e]%s\007\e\\&quot; &quot;$1&quot;
    elif [ &quot;${TERM%%-*}&quot; = &quot;screen&quot; ]; then
        # GNU screen (screen, screen-256color, screen-256color-bce)
        printf &quot;\eP\e]%s\007\e\\&quot; &quot;$1&quot;
    else
        printf &quot;\e]%s\e\\&quot; &quot;$1&quot;
    fi
}
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;This works also for &lt;code&gt;dash&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;For &lt;code&gt;fish&lt;/code&gt; put this in your &lt;code&gt;~/.config/fish/config.fish&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-fish&quot;&gt;function vterm_printf;
    if begin; [  -n &quot;$TMUX&quot; ]  ; and  string match -q -r &quot;screen|tmux&quot; &quot;$TERM&quot;; end
        # tell tmux to pass the escape sequences through
        printf &quot;\ePtmux;\e\e]%s\007\e\\&quot; &quot;$argv&quot;
    else if string match -q -- &quot;screen*&quot; &quot;$TERM&quot;
        # GNU screen (screen, screen-256color, screen-256color-bce)
        printf &quot;\eP\e]%s\007\e\\&quot; &quot;$argv&quot;
    else
        printf &quot;\e]%s\e\\&quot; &quot;$argv&quot;
    end
end
&lt;/code&gt;&lt;/pre&gt; 
&lt;h1&gt;Debugging and testing&lt;/h1&gt; 
&lt;p&gt;If you have successfully built the module, you can test it by executing the following command in the &lt;code&gt;build&lt;/code&gt; directory:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;make run
&lt;/code&gt;&lt;/pre&gt; 
&lt;h1&gt;Usage&lt;/h1&gt; 
&lt;h2&gt;&lt;code&gt;vterm&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;Open a terminal in the current window.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-other-window&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;Open a terminal in another window.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-copy-mode&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;When you enable &lt;code&gt;vterm-copy-mode&lt;/code&gt;, the terminal buffer behaves like a normal &lt;code&gt;read-only&lt;/code&gt; text buffer: you can search, copy text, etc. The default keybinding to toggle &lt;code&gt;vterm-copy-mode&lt;/code&gt; is &lt;code&gt;C-c C-t&lt;/code&gt;. When a region is selected, it is possible to copy the text and leave &lt;code&gt;vterm-copy-mode&lt;/code&gt; with the enter key.&lt;/p&gt; 
&lt;p&gt;If no region is selected when the enter key is pressed it will copy the current line from start to end. If &lt;code&gt;vterm-copy-exclude-prompt&lt;/code&gt; is true it will skip the prompt and not include it in the copy.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-clear-scrollback&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;&lt;code&gt;vterm-clear-scrollback&lt;/code&gt; does exactly what the name suggests: it clears the current buffer from the data that it is not currently visible. &lt;code&gt;vterm-clear-scrollback&lt;/code&gt; is bound to &lt;code&gt;C-c C-l&lt;/code&gt;. This function is typically used with the &lt;code&gt;clear&lt;/code&gt; function provided by the shell to clear both screen and scrollback. In order to achieve this behavior, you need to add a new shell alias.&lt;/p&gt; 
&lt;p&gt;For &lt;code&gt;zsh&lt;/code&gt;, put this in your &lt;code&gt;.zshrc&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-zsh&quot;&gt;if [[ &quot;$INSIDE_EMACS&quot; = &#39;vterm&#39; ]]; then
    alias clear=&#39;vterm_printf &quot;51;Evterm-clear-scrollback&quot;;tput clear&#39;
fi
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;For &lt;code&gt;bash&lt;/code&gt;, put this in your &lt;code&gt;.bashrc&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;if [ &quot;$INSIDE_EMACS&quot; = &#39;vterm&#39; ]; then
    clear() {
        vterm_printf &quot;51;Evterm-clear-scrollback&quot;;
        tput clear;
    }
fi
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;For &lt;code&gt;fish&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-fish&quot;&gt;if [ &quot;$INSIDE_EMACS&quot; = &#39;vterm&#39; ]
    function clear
        vterm_printf &quot;51;Evterm-clear-scrollback&quot;;
        tput clear;
    end
end
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;These aliases take advantage of the fact that &lt;code&gt;vterm&lt;/code&gt; can execute &lt;code&gt;elisp&lt;/code&gt; commands, as explained below.&lt;/p&gt; 
&lt;p&gt;If it possible to automatically clear the scrollback when the screen is cleared by setting the variable &lt;code&gt;vterm-clear-scrollback-when-clearing&lt;/code&gt;: When &lt;code&gt;vterm-clear-scrollback-when-clearing&lt;/code&gt; is non nil, &lt;code&gt;C-l&lt;/code&gt; clears both the screen and the scrollback. When is nil, &lt;code&gt;C-l&lt;/code&gt; only clears the screen. The opposite behavior can be achieved by using the universal prefix (i.e., calling &lt;code&gt;C-u C-l&lt;/code&gt;).&lt;/p&gt; 
&lt;h1&gt;Customization&lt;/h1&gt; 
&lt;h2&gt;&lt;code&gt;vterm-shell&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;Shell to run in a new vterm. It defaults to &lt;code&gt;$SHELL&lt;/code&gt;.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-environment&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;To add more environment variables there is the custom &lt;code&gt;vterm-environment&lt;/code&gt; which has a similar format to the internal Emacs variable &lt;code&gt;process-environment&lt;/code&gt;. You can check the documentation with &lt;code&gt;C-h v process-environment&lt;/code&gt; for more details.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-term-environment-variable&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;Value for the &lt;code&gt;TERM&lt;/code&gt; environment variable. It defaults to &lt;code&gt;xterm-256color&lt;/code&gt;. If &lt;a href=&quot;https://github.com/dieggsy/eterm-256color&quot;&gt;eterm-256color&lt;/a&gt; is installed, setting &lt;code&gt;vterm-term-environment-variable&lt;/code&gt; to &lt;code&gt;eterm-color&lt;/code&gt; improves the rendering of colors in some systems.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-kill-buffer-on-exit&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;If set to &lt;code&gt;t&lt;/code&gt;, buffers are killed when the associated process is terminated (for example, by logging out the shell). Keeping buffers around it is useful if you need to copy or manipulate the content.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-module-cmake-args&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;Compilation flags and arguments to be given to CMake when compiling the module. This string is directly passed to CMake, so it uses the same syntax. At the moment, its main use is for compiling vterm using the system &lt;code&gt;libvterm&lt;/code&gt; instead of the one downloaded from GitHub. You can find all the arguments and flags available with &lt;code&gt;cmake -LA&lt;/code&gt; in the build directory.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-copy-exclude-prompt&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;Controls whether or not to exclude the prompt when copying a line in &lt;code&gt;vterm-copy-mode&lt;/code&gt;. Using the universal prefix before calling &lt;code&gt;vterm-copy-mode-done&lt;/code&gt; will invert the value for that call, allowing you to temporarily override the setting. When a prompt is not found, the whole line is copied.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-use-vterm-prompt-detection-method&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;The variable &lt;code&gt;vterm-use-vterm-prompt-detection-method&lt;/code&gt; determines whether to use the vterm prompt tracking, if false it use the regexp in &lt;code&gt;vterm-copy-prompt-regexp&lt;/code&gt; to search for the prompt.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-enable-manipulate-selection-data-by-osc52&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;Vterm support copy text to Emacs kill ring and system clipboard by using OSC 52. See &lt;a href=&quot;https://invisible-island.net/xterm/ctlseqs/ctlseqs.html&quot;&gt;https://invisible-island.net/xterm/ctlseqs/ctlseqs.html&lt;/a&gt; for more info about OSC 52. For example: send &lt;code&gt;&quot;blabla&quot;&lt;/code&gt; to kill ring: &lt;code&gt;printf &quot;\033]52;c;$(printf &quot;%s&quot; &quot;blabla&quot; | base64)\a&quot;&lt;/code&gt;&lt;/p&gt; 
&lt;p&gt;tmux can share its copy buffer to terminals by supporting OSC 52 (like iterm2 and xterm), you can enable this feature for tmux by:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;set -g set-clipboard on         #osc 52 copy paste share with iterm
set -ga terminal-overrides &#39;,xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007&#39;
set -ga terminal-overrides &#39;,screen*:XT:Ms=\E]52;%p1%s;%p2%s\007&#39;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The clipboard querying/clearing functionality offered by OSC 52 is not implemented here, And for security reason, this feature is disabled by default.&lt;/p&gt; 
&lt;p&gt;This feature needs the new way of handling strings with a struct &lt;code&gt;VTermStringFragment&lt;/code&gt; in &lt;code&gt;libvterm&lt;/code&gt;. You&#39;d better compile &lt;code&gt;emacs-libvterm&lt;/code&gt; with &lt;code&gt;cmake -DUSE_SYSTEM_LIBVTERM=no ..&lt;/code&gt;. If you don&#39;t do that, when the content you want to copy is too long, it would be truncated by a bug in &lt;code&gt;libvterm&lt;/code&gt;.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-buffer-name-string&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;When &lt;code&gt;vterm-buffer-name-string&lt;/code&gt; is not nil, vterm renames automatically its own buffers with &lt;code&gt;vterm-buffer-name-string&lt;/code&gt;. This string can contain the character &lt;code&gt;%s&lt;/code&gt;, which is substituted with the &lt;em&gt;title&lt;/em&gt; (as defined by the shell, see below). A possible value for &lt;code&gt;vterm-buffer-name-string&lt;/code&gt; is &lt;code&gt;vterm %s&lt;/code&gt;, according to which all the vterm buffers will be named &quot;vterm TITLE&quot;.&lt;/p&gt; 
&lt;p&gt;This requires some shell-side configuration to print the title. For example to set the name &quot;HOSTNAME:PWD&quot;, you can use the following:&lt;/p&gt; 
&lt;p&gt;For &lt;code&gt;zsh&lt;/code&gt;,&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-zsh&quot;&gt;autoload -U add-zsh-hook
add-zsh-hook -Uz chpwd (){ print -Pn &quot;\e]2;%m:%2~\a&quot; }
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;For &lt;code&gt;bash&lt;/code&gt;,&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;PROMPT_COMMAND=&quot;${PROMPT_COMMAND:+$PROMPT_COMMAND; }&quot;&#39;echo -ne &quot;\033]0;${HOSTNAME}:${PWD}\007&quot;&#39;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;For &lt;code&gt;fish&lt;/code&gt;,&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-fish&quot;&gt;function fish_title
    hostname
    echo &quot;:&quot;
    prompt_pwd
end
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;See &lt;a href=&quot;http://tldp.org/HOWTO/Xterm-Title-4.html&quot;&gt;zsh and bash&lt;/a&gt; and &lt;a href=&quot;https://fishshell.com/docs/current/#programmable-title&quot;&gt;fish documentations&lt;/a&gt;.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-always-compile-module&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;Vterm needs &lt;code&gt;vterm-module&lt;/code&gt; to work. This can be compiled externally, or &lt;code&gt;vterm&lt;/code&gt; will ask the user whether to build the module when &lt;code&gt;vterm&lt;/code&gt; is first called. To avoid this question and always compile the module, set &lt;code&gt;vterm-always-compile-module&lt;/code&gt; to &lt;code&gt;t&lt;/code&gt;.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-copy-mode-remove-fake-newlines&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;When not-nil fake newlines are removed on entering copy mode. vterm inserts fake-newlines purely for rendering. When using &lt;code&gt;vterm-copy-mode&lt;/code&gt; these are in conflict with many emacs functions like &lt;code&gt;isearch-forward&lt;/code&gt;. if this variable is not-nil the fake-newlines are removed on entering copy-mode and re-inserted on leaving copy mode. Also &lt;code&gt;truncate-lines&lt;/code&gt; is set to &lt;code&gt;t&lt;/code&gt; on entering copy-mode and set to &lt;code&gt;nil&lt;/code&gt; on leaving.&lt;/p&gt; 
&lt;h2&gt;&lt;code&gt;vterm-tramp-shells&lt;/code&gt;&lt;/h2&gt; 
&lt;p&gt;The shell that gets run in the vterm for tramp.&lt;/p&gt; 
&lt;p&gt;This has to be a list of pairs of the format: &lt;code&gt;(TRAMP-METHOD SHELL)&lt;/code&gt;&lt;/p&gt; 
&lt;p&gt;The &lt;code&gt;TRAMP-METHOD&lt;/code&gt; is a method string as used by tramp (e.g., &lt;code&gt;&quot;ssh&quot;&lt;/code&gt;). Use &lt;code&gt;t&lt;/code&gt; as &lt;code&gt;TRAMP-METHOD&lt;/code&gt; to specify a default shell for all methods. Specific methods always take precedence over &lt;code&gt;t&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;Set &lt;code&gt;SHELL&lt;/code&gt; to &lt;code&gt;&#39;login-shell&lt;/code&gt; to use the user&#39;s login shell on the remote host. The login-shell detection currently works for POSIX-compliant remote hosts that have the &lt;code&gt;getent&lt;/code&gt; command (regular GNU/Linux distros, *BSDs, but not MacOS X unfortunately). You can specify an additional second &lt;code&gt;SHELL&lt;/code&gt; command as a fallback that is used when the login-shell detection fails, e.g., &lt;code&gt;&#39;((&quot;ssh&quot; login-shell &quot;/bin/bash&quot;) ...)&lt;/code&gt; If no second &lt;code&gt;SHELL&lt;/code&gt; command is specified with &lt;code&gt;&#39;login-shell&lt;/code&gt;, vterm will fall back to tramp&#39;s shell.&lt;/p&gt; 
&lt;p&gt;Examples:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Use the default login shell for all methods, except for docker. &lt;code&gt;&#39;((t login-shell) (&quot;docker&quot; &quot;/bin/sh&quot;))&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;Use the default login shell for ssh and scp, fall back to &quot;/bin/bash&quot;. Use tramp&#39;s default shell for all other methods. &lt;code&gt;&#39;((&quot;ssh&quot; login-shell &quot;/bin/bash&quot;) (&quot;scp&quot; login-shell &quot;/bin/bash&quot;))&lt;/code&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Keybindings&lt;/h2&gt; 
&lt;p&gt;If you want a key to be sent to the terminal, bind it to &lt;code&gt;vterm--self-insert&lt;/code&gt;, or remove it from &lt;code&gt;vterm-mode-map&lt;/code&gt;. By default, &lt;code&gt;vterm.el&lt;/code&gt; binds most of the &lt;code&gt;C-&amp;lt;char&amp;gt;&lt;/code&gt; and &lt;code&gt;M-&amp;lt;char&amp;gt;&lt;/code&gt; keys, &lt;code&gt;&amp;lt;f1&amp;gt;&lt;/code&gt; through &lt;code&gt;&amp;lt;f12&amp;gt;&lt;/code&gt; and some special keys like &lt;code&gt;&amp;lt;backspace&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;return&amp;gt;&lt;/code&gt;. Sending a keyboard interrupt is bound to &lt;code&gt;C-c C-c&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;In order to send a keypress that is already recognized by Emacs, such as &lt;code&gt;C-g&lt;/code&gt;, use the interactive function &lt;code&gt;vterm-send-next-key&lt;/code&gt;. This can be bound to a key in the &lt;code&gt;vterm-mode-map&lt;/code&gt; like &lt;code&gt;C-q&lt;/code&gt;, in which case pressing &lt;code&gt;C-q C-g&lt;/code&gt; will send a &lt;code&gt;C-g&lt;/code&gt; key to the terminal, and so on for other modified keys:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(define-key vterm-mode-map (kbd &quot;C-q&quot;) #&#39;vterm-send-next-key)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;This can be useful for controlling an application running in the terminal, such as Emacs or Nano.&lt;/p&gt; 
&lt;h2&gt;Fonts&lt;/h2&gt; 
&lt;p&gt;You can change the font (the &lt;em&gt;face&lt;/em&gt;) used in a vterm with the following code:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(add-hook &#39;vterm-mode-hook
          (lambda ()
            (set (make-local-variable &#39;buffer-face-mode-face) &#39;fixed-pitch)
                 (buffer-face-mode t)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Where instead of &lt;code&gt;&#39;fixed-pitch&lt;/code&gt; you specify the face you want to use. The example reported here can be used to force vterm to use a mono-spaced font (the &lt;code&gt;fixed-pitch&lt;/code&gt; face). This is useful when your default font in Emacs is a proportional font.&lt;/p&gt; 
&lt;p&gt;In addition to that, you can disable some text properties (bold, underline, reverse video) setting the relative option to &lt;code&gt;t&lt;/code&gt; (&lt;code&gt;vterm-disable-bold&lt;/code&gt;, &lt;code&gt;vterm-disable-underline&lt;/code&gt;, or &lt;code&gt;vterm-disable-inverse-video&lt;/code&gt;).&lt;/p&gt; 
&lt;p&gt;You can use another font for vterm buffer&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(add-hook &#39;vterm-mode-hook
          (lambda ()
               (set (make-local-variable &#39;buffer-face-mode-face) &#39;(:family &quot;IosevkaTerm Nerd Font&quot;))
               (buffer-face-mode t))
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Blink cursor&lt;/h2&gt; 
&lt;p&gt;When &lt;code&gt;vterm-ignore-blink-cursor&lt;/code&gt; is &lt;code&gt;t&lt;/code&gt;, vterm will ignore request from application to turn on or off cursor blink.&lt;/p&gt; 
&lt;p&gt;If &lt;code&gt;nil&lt;/code&gt;, cursor in any window may begin to blink or not blink because &lt;code&gt;blink-cursor-mode&lt;/code&gt; is a global minor mode in Emacs, you can use &lt;code&gt;M-x blink-cursor-mode&lt;/code&gt; to toggle.&lt;/p&gt; 
&lt;h2&gt;Colors&lt;/h2&gt; 
&lt;p&gt;Customize the following faces to your liking. It is possible to specify different colors for foreground and background via the &lt;code&gt;:foreground&lt;/code&gt; and &lt;code&gt;:background&lt;/code&gt; attributes.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;vterm-color-black&lt;/li&gt; 
 &lt;li&gt;vterm-color-red&lt;/li&gt; 
 &lt;li&gt;vterm-color-green&lt;/li&gt; 
 &lt;li&gt;vterm-color-yellow&lt;/li&gt; 
 &lt;li&gt;vterm-color-blue&lt;/li&gt; 
 &lt;li&gt;vterm-color-magenta&lt;/li&gt; 
 &lt;li&gt;vterm-color-cyan&lt;/li&gt; 
 &lt;li&gt;vterm-color-white&lt;/li&gt; 
 &lt;li&gt;vterm-color-bright-black&lt;/li&gt; 
 &lt;li&gt;vterm-color-bright-red&lt;/li&gt; 
 &lt;li&gt;vterm-color-bright-green&lt;/li&gt; 
 &lt;li&gt;vterm-color-bright-yellow&lt;/li&gt; 
 &lt;li&gt;vterm-color-bright-blue&lt;/li&gt; 
 &lt;li&gt;vterm-color-bright-magenta&lt;/li&gt; 
 &lt;li&gt;vterm-color-bright-cyan&lt;/li&gt; 
 &lt;li&gt;vterm-color-bright-white&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Directory tracking and Prompt tracking&lt;/h2&gt; 
&lt;p&gt;&lt;code&gt;vterm&lt;/code&gt; supports &lt;em&gt;directory tracking&lt;/em&gt;. If this feature is enabled, the default directory in Emacs and the current working directory in &lt;code&gt;vterm&lt;/code&gt; are synced. As a result, interactive functions that ask for a path or a file (e.g., &lt;code&gt;dired&lt;/code&gt; or &lt;code&gt;find-file&lt;/code&gt;) will do so starting from the current location.&lt;/p&gt; 
&lt;p&gt;And &lt;code&gt;vterm&lt;/code&gt; supports &lt;em&gt;prompt tracking&lt;/em&gt;. If this feature is enabled, Emacs knows where the prompt ends, you needn&#39;t customize &lt;code&gt;term-prompt-regexp&lt;/code&gt; any more. Then you can use &lt;code&gt;vterm-next-prompt&lt;/code&gt; and &lt;code&gt;vterm-previous-prompt&lt;/code&gt; moving to end of next/previous prompt. The default keybinding is &lt;code&gt;C-c C-n&lt;/code&gt; and &lt;code&gt;C-c C-p&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;And &lt;code&gt;vterm-beginning-of-line&lt;/code&gt; would move the point to the first character after the shell prompt on this line. If the point is already there, move to the beginning of the line. The default keybinding is &lt;code&gt;C-a&lt;/code&gt; in &lt;code&gt;vterm-copy-mode&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;And &lt;code&gt;vterm--at-prompt-p&lt;/code&gt; would check whether the cursor is at the point just after the shell prompt.&lt;/p&gt; 
&lt;p&gt;Directory tracking and Prompt tracking requires some configuration, as the shell has to be instructed to share the relevant information with Emacs. The following pieces of code assume that you have the function &lt;code&gt;vterm_printf&lt;/code&gt; as defined in section &lt;a href=&quot;https://raw.githubusercontent.com/akermu/emacs-libvterm/master/#shell-side-configuration&quot;&gt;shell-side configuration&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;For &lt;code&gt;zsh&lt;/code&gt;, put this at the end of your &lt;code&gt;.zshrc&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-zsh&quot;&gt;vterm_prompt_end() {
    vterm_printf &quot;51;A$(whoami)@$(hostname):$(pwd)&quot;
}
setopt PROMPT_SUBST
PROMPT=$PROMPT&#39;%{$(vterm_prompt_end)%}&#39;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;For &lt;code&gt;bash&lt;/code&gt;, put this at the end of your &lt;code&gt;.bashrc&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;vterm_prompt_end(){
    vterm_printf &quot;51;A$(whoami)@$(hostname):$(pwd)&quot;
}
PS1=$PS1&#39;\[$(vterm_prompt_end)\]&#39;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;For &lt;code&gt;fish&lt;/code&gt;, put this in your &lt;code&gt;~/.config/fish/config.fish&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-fish&quot;&gt;function vterm_prompt_end;
    vterm_printf &#39;51;A&#39;(whoami)&#39;@&#39;(hostname)&#39;:&#39;(pwd)
end
functions --copy fish_prompt vterm_old_fish_prompt
function fish_prompt --description &#39;Write out the prompt; do not replace this. Instead, put this at end of your file.&#39;
    # Remove the trailing newline from the original prompt. This is done
    # using the string builtin from fish, but to make sure any escape codes
    # are correctly interpreted, use %b for printf.
    printf &quot;%b&quot; (string join &quot;\n&quot; (vterm_old_fish_prompt))
    vterm_prompt_end
end
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Here we are using the function &lt;code&gt;vterm_printf&lt;/code&gt; that we have discussed above, so make sure that this function is defined in your configuration file.&lt;/p&gt; 
&lt;p&gt;Directory tracking works on remote servers too. In case the hostname of your remote machine does not match the actual hostname needed to connect to that server, change &lt;code&gt;$(hostname)&lt;/code&gt; with the correct one. For example, if the correct hostname is &lt;code&gt;foo&lt;/code&gt; and the username is &lt;code&gt;bar&lt;/code&gt;, you should have something like&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;HOSTNAME=foo
USER=baz
vterm_printf &quot;51;A$USER@$HOSTNAME:$(pwd)&quot;
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Message passing&lt;/h2&gt; 
&lt;p&gt;&lt;code&gt;vterm&lt;/code&gt; can read and execute commands. At the moment, a command is passed by providing a specific escape sequence. For example, to evaluate&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(message &quot;Hello!&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;use&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;printf &quot;\e]51;Emessage \&quot;Hello\!\&quot;\e\\&quot;
# or
vterm_printf &quot;51;Emessage \&quot;Hello\!\&quot;&quot;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The commands that are understood are defined in the setting &lt;code&gt;vterm-eval-cmds&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;As &lt;code&gt;split-string-and-unquote&lt;/code&gt; is used the parse the passed string, double quotes and backslashes need to be escaped via backslash. A convenient shell function to automate the substitution is&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;bash&lt;/code&gt; or &lt;code&gt;zsh&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;vterm_cmd() {
    local vterm_elisp
    vterm_elisp=&quot;&quot;
    while [ $# -gt 0 ]; do
        vterm_elisp=&quot;$vterm_elisp&quot;&quot;$(printf &#39;&quot;%s&quot; &#39; &quot;$(printf &quot;%s&quot; &quot;$1&quot; | sed -e &#39;s|\\|\\\\|g&#39; -e &#39;s|&quot;|\\&quot;|g&#39;)&quot;)&quot;
        shift
    done
    vterm_printf &quot;51;E$vterm_elisp&quot;
}
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;code&gt;fish&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-fish&quot;&gt;function vterm_cmd --description &#39;Run an Emacs command among the ones been defined in vterm-eval-cmds.&#39;
    set -l vterm_elisp ()
    for arg in $argv
        set -a vterm_elisp (printf &#39;&quot;%s&quot; &#39; (string replace -a -r -- &#39;([\\\\&quot;])&#39; &#39;\\\\\\\\$1&#39; $arg))
    end
    vterm_printf &#39;51;E&#39;(string join &#39;&#39; $vterm_elisp)
end
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Now we can write shell functions to call the ones defined in &lt;code&gt;vterm-eval-cmds&lt;/code&gt;.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;find_file() {
    vterm_cmd find-file &quot;$(realpath &quot;${@:-.}&quot;)&quot;
}

say() {
    vterm_cmd message &quot;%s&quot; &quot;$*&quot;
}
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Or for &lt;code&gt;fish&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-fish&quot;&gt;function find_file
    set -q argv[1]; or set argv[1] &quot;.&quot;
    vterm_cmd find-file (realpath &quot;$argv&quot;)
end

function say
    vterm_cmd message &quot;%s&quot; &quot;$argv&quot;
end
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;This newly defined &lt;code&gt;find_file&lt;/code&gt; function can now be used inside &lt;code&gt;vterm&lt;/code&gt; as&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;find_file name_of_file_in_local_directory
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;If you call &lt;code&gt;find_file&lt;/code&gt; without specifying any file (you just execute &lt;code&gt;find_file&lt;/code&gt; in your shell), &lt;code&gt;dired&lt;/code&gt; will open with the current directory.&lt;/p&gt; 
&lt;p&gt;As an example, say you like having files opened below the current window. You could add the command to do it on the lisp side like so:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(push (list &quot;find-file-below&quot;
            (lambda (path)
              (if-let* ((buf (find-file-noselect path))
                        (window (display-buffer-below-selected buf nil)))
                  (select-window window)
                (message &quot;Failed to open file: %s&quot; path))))
      vterm-eval-cmds)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Then add the command in your &lt;code&gt;.bashrc&lt;/code&gt; file.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;open_file_below() {
    vterm_cmd find-file-below &quot;$(realpath &quot;${@:-.}&quot;)&quot;
}
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Then you can open any file from inside your shell.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;open_file_below ~/Documents
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Shell-side configuration files&lt;/h2&gt; 
&lt;p&gt;The configurations described in earlier sections are combined in &lt;a href=&quot;https://raw.githubusercontent.com/akermu/emacs-libvterm/master/etc/&quot;&gt;&lt;code&gt;etc/&lt;/code&gt;&lt;/a&gt;. These can be appended to or loaded into your user configuration file. Alternatively, they can be installed system-wide, for example in &lt;code&gt;/etc/bash/bashrc.d/&lt;/code&gt;, &lt;code&gt;/etc/profile.d/&lt;/code&gt; (for &lt;code&gt;zsh&lt;/code&gt;), or &lt;code&gt;/etc/fish/conf.d/&lt;/code&gt; for &lt;code&gt;fish&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;When using vterm Emacs sets the environment variable INSIDE_EMACS in the subshell to ‘vterm’. Usually the programs check this variable to determine whether they are running inside Emacs.&lt;/p&gt; 
&lt;p&gt;Vterm also sets an extra variable EMACS_VTERM_PATH to the place where the vterm library is installed. This is very useful because when vterm is installed from melpa the Shell-side configuration files are in the EMACS_VTERM_PATH inside the /etc sub-directory. After a package update, the directory name changes, so, a code like this in your bashrc could be enough to load always the latest version of the file from the right location without coping any file manually.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;if [[ &quot;$INSIDE_EMACS&quot; = &#39;vterm&#39; ]] \
    &amp;amp;&amp;amp; [[ -n ${EMACS_VTERM_PATH} ]] \
    &amp;amp;&amp;amp; [[ -f ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then
	source ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh
fi
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Frequently Asked Questions and Problems&lt;/h2&gt; 
&lt;h3&gt;How can I increase the size of the scrollback?&lt;/h3&gt; 
&lt;p&gt;By default, the scrollback can contain up to 1000 lines per each vterm buffer. You can increase this up to 100000 by changing the variable &lt;code&gt;vterm-max-scrollback&lt;/code&gt;. If you want to increase it further, you have to edit the file &lt;code&gt;vterm-module.h&lt;/code&gt;, change the variable &lt;code&gt;SB_MAX&lt;/code&gt;, and set the new value for &lt;code&gt;vterm-max-scrollback&lt;/code&gt;. The potential maximum memory consumption of vterm buffers increases with &lt;code&gt;vterm-max-scrollback&lt;/code&gt;, so setting &lt;code&gt;SB_MAX&lt;/code&gt; to extreme values may lead to system instabilities and crashes.&lt;/p&gt; 
&lt;h3&gt;How can I automatically close vterm buffers when the process is terminated?&lt;/h3&gt; 
&lt;p&gt;There is an option for that: set &lt;code&gt;vterm-kill-buffer-on-exit&lt;/code&gt; to &lt;code&gt;t&lt;/code&gt;.&lt;/p&gt; 
&lt;h3&gt;The package does not compile, I have errors related to &lt;code&gt;VTERM_COLOR&lt;/code&gt;.&lt;/h3&gt; 
&lt;p&gt;The version of &lt;code&gt;libvterm&lt;/code&gt; installed on your system is too old. You should let &lt;code&gt;emacs-libvterm&lt;/code&gt; download &lt;code&gt;libvterm&lt;/code&gt; for you. You can either uninstall your &lt;code&gt;libvterm&lt;/code&gt;, or instruct Emacs to ignore the system &lt;code&gt;libvterm&lt;/code&gt;. If you are compiling from Emacs, you can do this by setting:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(setq vterm-module-cmake-args &quot;-DUSE_SYSTEM_LIBVTERM=no&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;and compile again. If you are compiling with CMake, use the flag &lt;code&gt;-DUSE_SYSTEM_LIBVTERM=no&lt;/code&gt;.&lt;/p&gt; 
&lt;h3&gt;&lt;code&gt;&amp;lt;C-backspace&amp;gt;&lt;/code&gt; doesn&#39;t kill previous word.&lt;/h3&gt; 
&lt;p&gt;This can be fixed by rebinding the key to what &lt;code&gt;C-w&lt;/code&gt; does:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(define-key vterm-mode-map (kbd &quot;&amp;lt;C-backspace&amp;gt;&quot;)
    (lambda () (interactive) (vterm-send-key (kbd &quot;C-w&quot;))))
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;&lt;code&gt;counsel-yank-pop&lt;/code&gt; doesn&#39;t work.&lt;/h3&gt; 
&lt;p&gt;Add this piece of code to your configuration file to make &lt;code&gt;counsel&lt;/code&gt; use the correct function to yank in vterm buffers.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(defun vterm-counsel-yank-pop-action (orig-fun &amp;amp;rest args)
  (if (equal major-mode &#39;vterm-mode)
      (let ((inhibit-read-only t)
            (yank-undo-function (lambda (_start _end) (vterm-undo))))
        (cl-letf (((symbol-function &#39;insert-for-yank)
               (lambda (str) (vterm-send-string str t))))
            (apply orig-fun args)))
    (apply orig-fun args)))

(advice-add &#39;counsel-yank-pop-action :around #&#39;vterm-counsel-yank-pop-action)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;How can I get the local directory without shell-side configuration?&lt;/h3&gt; 
&lt;p&gt;We recommend that you set up shell-side configuration for reliable directory tracking. If you cannot do it, a possible workaround is the following.&lt;/p&gt; 
&lt;p&gt;On most GNU/Linux systems, you can read current directory from &lt;code&gt;/proc&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(defun vterm-directory-sync ()
  &quot;Synchronize current working directory.&quot;
  (interactive)
  (when vterm--process
    (let* ((pid (process-id vterm--process))
           (dir (file-truename (format &quot;/proc/%d/cwd/&quot; pid))))
      (setq default-directory dir))))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;A possible application of this function is in combination with &lt;code&gt;find-file&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(advice-add #&#39;find-file :before #&#39;vterm-directory-sync)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;This method does not work on remote machines.&lt;/p&gt; 
&lt;h3&gt;How can I get the directory tracking in a more understandable way?&lt;/h3&gt; 
&lt;p&gt;If you looked at the recommended way to set-up directory tracking, you will have noticed that it requires printing obscure code like &lt;code&gt;\e]2;%m:%2~\a&lt;/code&gt; (unless you are using &lt;code&gt;fish&lt;/code&gt;).&lt;/p&gt; 
&lt;p&gt;There is another way to achieve this behavior. Define a shell function, on a local host you can simply use&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;vterm_set_directory() {
    vterm_cmd update-pwd &quot;$PWD/&quot;
}
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;On a remote one, use instead&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;vterm_set_directory() {
    vterm_cmd update-pwd &quot;/-:&quot;&quot;$USER&quot;&quot;@&quot;&quot;$HOSTNAME&quot;&quot;:&quot;&quot;$PWD/&quot;
}
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Then, for &lt;code&gt;zsh&lt;/code&gt;, add this function to the &lt;code&gt;chpwd&lt;/code&gt; hook:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-zsh&quot;&gt;autoload -U add-zsh-hook
add-zsh-hook -Uz chpwd (){ vterm_set_directory }
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;For &lt;code&gt;bash&lt;/code&gt;, append it to the prompt:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;PROMPT_COMMAND=&quot;${PROMPT_COMMAND:+$PROMPT_COMMAND; }vterm_set_directory&quot;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Finally, add &lt;code&gt;update-pwd&lt;/code&gt; to the list of commands that Emacs is allowed to execute from vterm:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(add-to-list &#39;vterm-eval-cmds &#39;(&quot;update-pwd&quot; (lambda (path) (setq default-directory path))))
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;When evil-mode is enabled, the cursor moves back in normal state, and this messes directory tracking&lt;/h3&gt; 
&lt;p&gt;&lt;code&gt;evil-collection&lt;/code&gt; provides a solution for this problem. If you do not want to use &lt;code&gt;evil-collection&lt;/code&gt;, you can add the following code:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(defun evil-collection-vterm-escape-stay ()
&quot;Go back to normal state but don&#39;t move
cursor backwards. Moving cursor backwards is the default vim behavior but it is
not appropriate in some cases like terminals.&quot;
(setq-local evil-move-cursor-back nil))

(add-hook &#39;vterm-mode-hook #&#39;evil-collection-vterm-escape-stay)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Related packages&lt;/h2&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/jixiuf/vterm-toggle&quot;&gt;vterm-toggle&lt;/a&gt;: Toggles between a vterm and the current buffer&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/suonlight/multi-libvterm&quot;&gt;multi-libvterm&lt;/a&gt;: Multiterm for emacs-libvterm&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Appendix&lt;/h2&gt; 
&lt;h3&gt;Breaking changes&lt;/h3&gt; 
&lt;p&gt;Obsolete variables will be removed in version 0.1.&lt;/p&gt; 
&lt;h4&gt;August 2022&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;vterm-send-C-[a-z]&lt;/code&gt; &lt;code&gt;vterm-send-M-[a-z]&lt;/code&gt; &lt;code&gt;vterm-define-key&lt;/code&gt; &lt;code&gt;vterm-send-{up/down/left/right/prior/next/meta-dot/meta-comma/ctrl-slash}&lt;/code&gt; were obsolete, please use &lt;code&gt;vterm-send&lt;/code&gt; or &lt;code&gt;vterm-send-key&lt;/code&gt; or &lt;code&gt;vterm--self-insert&lt;/code&gt; instead.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;October 2020&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;vterm-disable-bold-font&lt;/code&gt; was renamed to &lt;code&gt;vterm-disable-bold&lt;/code&gt; to uniform it with the other similar options.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;July 2020&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;vterm-use-vterm-prompt&lt;/code&gt; was renamed to &lt;code&gt;vterm-use-vterm-prompt-detection-method&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;vterm-kill-buffer-on-exit&lt;/code&gt; is set to &lt;code&gt;t&lt;/code&gt; by default.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;April 2020&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;vterm-clear-scrollback&lt;/code&gt; was renamed to &lt;code&gt;vterm-clear-scrollback-when-clearning&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;vterm-set-title-functions&lt;/code&gt; was removed. In its place, there is a new custom option &lt;code&gt;vterm-buffer-name-string&lt;/code&gt;. See &lt;a href=&quot;https://raw.githubusercontent.com/akermu/emacs-libvterm/master/vterm-buffer-name-string&quot;&gt;vterm-buffer-name-string&lt;/a&gt; for documentation.&lt;/li&gt; 
&lt;/ul&gt;</description>
      
    </item>
    
    <item>
      <title>MatthewZMD/aidermacs</title>
      <link>https://github.com/MatthewZMD/aidermacs</link>
      <description>&lt;p&gt;AI Pair Programming in Emacs with Aider&lt;/p&gt;&lt;hr&gt;&lt;p align=&quot;center&quot;&gt; &lt;img style=&quot;height: auto; width: 40%; object-fit: contain&quot; src=&quot;https://raw.githubusercontent.com/MatthewZMD/aidermacs/main/aidermacs.png&quot; /&gt; &lt;/p&gt; 
&lt;h1&gt;Aidermacs: AI Pair Programming in Emacs&lt;/h1&gt; 
&lt;p&gt;&lt;a href=&quot;https://melpa.org/#/aidermacs&quot;&gt;&lt;img src=&quot;https://melpa.org/packages/aidermacs-badge.svg?sanitize=true&quot; alt=&quot;MELPA&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://stable.melpa.org/#/aidermacs&quot;&gt;&lt;img src=&quot;https://stable.melpa.org/packages/aidermacs-badge.svg?sanitize=true&quot; alt=&quot;MELPA Stable&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://elpa.nongnu.org/nongnu-devel/aidermacs.html&quot;&gt;&lt;img src=&quot;https://elpa.nongnu.org/nongnu-devel/aidermacs.svg?sanitize=true&quot; alt=&quot;NonGNU-devel ELPA&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://elpa.nongnu.org/nongnu/aidermacs.html&quot;&gt;&lt;img src=&quot;https://elpa.nongnu.org/nongnu/aidermacs.svg?sanitize=true&quot; alt=&quot;NonGNU ELPA&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://www.gnu.org/savannah-checkouts/gnu/emacs/emacs.html&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/Emacs-26.1-922793?logo=gnu-emacs&amp;amp;logoColor=b39ddb&amp;amp;.svg?sanitize=true&quot; alt=&quot;EMACS&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://github.com/MatthewZMD/aidermacs/raw/main/LICENSE&quot;&gt;&lt;img src=&quot;https://img.shields.io/github/license/MatthewZMD/aidermacs?logo=apache&amp;amp;.svg?sanitize=true&quot; alt=&quot;LICENSE&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://github.com/MatthewZMD/aidermacs/graphs/contributors&quot;&gt;&lt;img src=&quot;https://img.shields.io/github/contributors/MatthewZMD/aidermacs.svg?sanitize=true&quot; alt=&quot;CONTRIBUTORS&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;Aidermacs brings AI-powered development to Emacs by integrating &lt;a href=&quot;https://github.com/paul-gauthier/aider&quot;&gt;Aider&lt;/a&gt;, one of the most powerful open-source AI pair programming tools. If you&#39;re missing &lt;a href=&quot;https://cursor.sh&quot;&gt;Cursor&lt;/a&gt; but prefer living in Emacs, Aidermacs provides similar AI capabilities while staying true to Emacs workflows.&lt;/p&gt; 
&lt;img style=&quot;height: auto; width: 80%; object-fit: contain&quot; src=&quot;https://raw.githubusercontent.com/MatthewZMD/aidermacs/main/introscreen.png&quot; /&gt; 
&lt;h3&gt;Key Features&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;Intelligent model selection with multiple backends&lt;/li&gt; 
 &lt;li&gt;Built-in Ediff integration for AI-generated changes&lt;/li&gt; 
 &lt;li&gt;Enhanced file management from Emacs&lt;/li&gt; 
 &lt;li&gt;Great customizability and flexible ways to add content&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Community Speaks&lt;/h3&gt; 
&lt;p&gt;Here&#39;s what the community is saying about Aidermacs:&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&quot;Are you using aidermacs? For me superior to cursor.&quot; - u/berenddeboer&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&quot;This is amazing... every time I upgrade my packages I see your new commits. I feel this the authentic aider for emacs&quot; - u/wchmbo&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&quot;Between Aidermacs and Gptel it&#39;s wild how bleeding edge Emacs is with this stuff. My workplace is exploring MCP registries and even clients that are all the rage (E.g Cursor) lag behind what I can do with mcp.el and gptel for tool use.&quot; - u/no_good_names_avail&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&quot;This looks amazing... I have been using ellama with local llms, looks like that will work here too. Great stuff!!&quot; - u/lugpocalypse&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&quot;Honestly huge fan of this. Thank you for the updates!&quot; - u/ieoa&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;h2&gt;Quick Start&lt;/h2&gt; 
&lt;ol&gt; 
 &lt;li&gt;Requirements&lt;/li&gt; 
&lt;/ol&gt; 
&lt;ul&gt; 
 &lt;li&gt;Emacs ≥ 26.1&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/Aider-AI/aider&quot;&gt;Aider&lt;/a&gt; or its community fork &lt;a href=&quot;https://github.com/dwash96/aider-ce&quot;&gt;Aider Community Experimentation&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/magit/transient&quot;&gt;Transient&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ol start=&quot;2&quot;&gt; 
 &lt;li&gt;Download Aidermacs through &lt;a href=&quot;https://melpa.org/#/aidermacs&quot;&gt;Melpa&lt;/a&gt; or &lt;a href=&quot;https://elpa.nongnu.org/nongnu/aidermacs.html&quot;&gt;Non-GNU Elpa&lt;/a&gt;, or clone manually&lt;/li&gt; 
 &lt;li&gt;Modify this &lt;strong&gt;sample config&lt;/strong&gt; and place it in your Emacs &lt;code&gt;init.el&lt;/code&gt;:&lt;/li&gt; 
&lt;/ol&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package aidermacs
  :bind ((&quot;C-c a&quot; . aidermacs-transient-menu))
  :config
  ; Set API_KEY in .bashrc, that will automatically picked up by aider or in elisp
  (setenv &quot;ANTHROPIC_API_KEY&quot; &quot;sk-...&quot;)
  ; defun my-get-openrouter-api-key yourself elsewhere for security reasons
  (setenv &quot;OPENROUTER_API_KEY&quot; (my-get-openrouter-api-key))
  :custom
  ; See the Configuration section below
  (aidermacs-default-chat-mode &#39;architect)
  (aidermacs-default-model &quot;sonnet&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;ol start=&quot;4&quot;&gt; 
 &lt;li&gt;Open a project and run &lt;code&gt;M-x aidermacs-transient-menu&lt;/code&gt; or &lt;code&gt;SPC a a&lt;/code&gt; (or your chosen binding).&lt;/li&gt; 
 &lt;li&gt;Add files and start coding with AI!&lt;/li&gt; 
&lt;/ol&gt; 
&lt;h3&gt;Spacemacs&lt;/h3&gt; 
&lt;p&gt;For &lt;strong&gt;Spacemacs&lt;/strong&gt; users:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;Add &lt;code&gt;aidermacs&lt;/code&gt; to your &lt;code&gt;dotspacemacs-additional-packages&lt;/code&gt; list in your &lt;code&gt;.spacemacs&lt;/code&gt; file:&lt;/li&gt; 
&lt;/ol&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;dotspacemacs-additional-packages &#39;(
  (aidermacs :variables
              aidermacs-default-chat-mode &#39;architect
              aidermacs-default-model &quot;sonnet&quot;)
)
&lt;/code&gt;&lt;/pre&gt; 
&lt;ol start=&quot;2&quot;&gt; 
 &lt;li&gt;Add the keybinding to your &lt;code&gt;dotspacemacs/user-config&lt;/code&gt; function in &lt;code&gt;.spacemacs&lt;/code&gt;:&lt;/li&gt; 
&lt;/ol&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(defun dotspacemacs/user-config ()
  ;; Set leader key for Aidermacs
  (spacemacs/set-leader-keys &quot;aa&quot; &#39;aidermacs-transient-menu) ; Example binding SPC a a
)
&lt;/code&gt;&lt;/pre&gt; 
&lt;ol start=&quot;3&quot;&gt; 
 &lt;li&gt;Open a project and run &lt;code&gt;M-x aidermacs-transient-menu&lt;/code&gt; or &lt;code&gt;SPC a a&lt;/code&gt; (or your chosen binding).&lt;/li&gt; 
 &lt;li&gt;Add files and start coding with AI!&lt;/li&gt; 
&lt;/ol&gt; 
&lt;h2&gt;Usage&lt;/h2&gt; 
&lt;h3&gt;Getting Started&lt;/h3&gt; 
&lt;p&gt;The main interface to Aidermacs is through its transient menu system (similar to Magit). Access it with:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;M-x aidermacs-transient-menu
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Or bind it to a key in your config:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(global-set-key (kbd &quot;C-c a&quot;) &#39;aidermacs-transient-menu)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Once the transient menu is open, you can navigate and execute commands using the displayed keys. Here&#39;s a summary of the main menu structure:&lt;/p&gt; 
&lt;h5&gt;Core&lt;/h5&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;a&lt;/code&gt;: Start/Open Session (auto-detects project root)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;.&lt;/code&gt;: Start in Current Directory (good for monorepos)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;l&lt;/code&gt;: Clear Chat History&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;s&lt;/code&gt;: Reset Session&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;x&lt;/code&gt;: Exit Session&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h5&gt;Persistent Modes&lt;/h5&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;1&lt;/code&gt;: Code Mode&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;2&lt;/code&gt;: Chat/Ask Mode&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;3&lt;/code&gt;: Architect Mode&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;4&lt;/code&gt;: Help Mode&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h5&gt;Utilities&lt;/h5&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;^&lt;/code&gt;: Show Last Commit (if auto-commits enabled)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;u&lt;/code&gt;: Undo Last Commit (if auto-commits enabled)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;R&lt;/code&gt;: Refresh Repo Map&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;h&lt;/code&gt;: Session History&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;o&lt;/code&gt;: Change Main Model&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;v&lt;/code&gt;: Send Voice Command&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;W&lt;/code&gt;: Fetch Web Content&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;?&lt;/code&gt;: Aider Meta-level Help&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h5&gt;File Actions&lt;/h5&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;f&lt;/code&gt;: Add File (C-u: read-only)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;F&lt;/code&gt;: Add Current File&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;d&lt;/code&gt;: Add From Directory (same type)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;w&lt;/code&gt;: Add From Window&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;m&lt;/code&gt;: Add From Dired (marked)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;j&lt;/code&gt;: Drop File&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;J&lt;/code&gt;: Drop Current File&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;k&lt;/code&gt;: Drop From Dired (marked)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;K&lt;/code&gt;: Drop All Files&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;S&lt;/code&gt;: Create Session Scratchpad&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;G&lt;/code&gt;: Add File to Session&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;A&lt;/code&gt;: List Added Files&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h5&gt;Code Actions&lt;/h5&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;c&lt;/code&gt;: Code Change&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;e&lt;/code&gt;: Question Code&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;r&lt;/code&gt;: Architect Change&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;q&lt;/code&gt;: General Question&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;p&lt;/code&gt;: Question This Symbol&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;g&lt;/code&gt;: Accept Proposed Changes&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;i&lt;/code&gt;: Implement TODO&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;t&lt;/code&gt;: Write Test&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;T&lt;/code&gt;: Fix Test&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;!&lt;/code&gt;: Debug Exception&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The &lt;code&gt;All File Actions&lt;/code&gt; and &lt;code&gt;All Code Actions&lt;/code&gt; entries open submenus with more specialized commands. Use the displayed keys to navigate these submenus.&lt;/p&gt; 
&lt;h3&gt;File Management and AI Interaction&lt;/h3&gt; 
&lt;p&gt;When using Aidermacs, you have the flexibility to decide which files the AI should read and edit. Here are some guidelines:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;strong&gt;Editable Files&lt;/strong&gt;: Add files you want the AI to potentially edit. This grants the AI permission to both read and modify these files if necessary.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Read-Only Files&lt;/strong&gt;: If you want the AI to read a file without editing it, you can add it as read-only. In Aidermacs, all add file commands can be prefixed with &lt;code&gt;C-u&lt;/code&gt; to specify read-only access.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Session Scratchpads&lt;/strong&gt;: Use the session scratchpads (&lt;code&gt;S&lt;/code&gt;) to paste notes or documentation that will be fed to the AI as read-only.&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;External Files&lt;/strong&gt;: The &quot;Add file to session&quot; (&lt;code&gt;G&lt;/code&gt;) command allows you to include files outside the current project (or files in &lt;code&gt;.gitignore&lt;/code&gt;), as Aider doesn&#39;t automatically include these files in its context.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The AI can sometimes determine relevant files on its own, depending on the model and the context of the codebase. However, for precise control, it&#39;s often beneficial to manually specify files, especially when dealing with complex projects.&lt;/p&gt; 
&lt;p&gt;Aider encourages a collaborative approach, similar to working with a human co-worker. Sometimes the AI will need explicit guidance, while other times it can infer the necessary context on its own.&lt;/p&gt; 
&lt;h3&gt;Prompt Files Minor Mode&lt;/h3&gt; 
&lt;p&gt;Aidermacs provides a minor mode that makes it easy to work with prompt files and other Aider-related files. When enabled, the minor mode provides these convenient keybindings:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;C-c C-n&lt;/code&gt; or &lt;code&gt;C-&amp;lt;return&amp;gt;&lt;/code&gt;: Send line/region line-by-line&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;C-c C-c&lt;/code&gt;: Send block/region as whole&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;C-c C-z&lt;/code&gt;: Switch to Aidermacs buffer&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The minor mode is automatically enabled for:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;.aider.prompt.org&lt;/code&gt; files (create with &lt;code&gt;M-x aidermacs-open-prompt-file&lt;/code&gt;)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;.aider.chat.md&lt;/code&gt; files&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;.aider.chat.history.md&lt;/code&gt; files&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;.aider.input.history&lt;/code&gt; files&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Configuration&lt;/h2&gt; 
&lt;h4&gt;Pre-Run Hook&lt;/h4&gt; 
&lt;p&gt;You can use the &lt;code&gt;aidermacs-before-run-backend-hook&lt;/code&gt; to run custom setup code before starting the Aider backend. This is particularly useful for:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Setting environment variables&lt;/li&gt; 
 &lt;li&gt;Injecting secrets&lt;/li&gt; 
 &lt;li&gt;Performing any other pre-run configuration&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Example usage to securely set an OpenAI API key from password-store:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(add-hook &#39;aidermacs-before-run-backend-hook
          (lambda ()
            (setenv &quot;OPENAI_API_KEY&quot; (password-store-get &quot;code/openai_api_key&quot;))))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;An copy of &lt;code&gt;process-environment&lt;/code&gt; is used when running the hook and starting Aider, ensuring environment variables set in the hook only affect the Aider backend. This approach keeps sensitive information out of your dotfiles while still making it available to Aidermacs.&lt;/p&gt; 
&lt;h3&gt;Default Model Selection&lt;/h3&gt; 
&lt;p&gt;You can customize the default AI model used by Aidermacs. The model is determined in the following order of priority:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;The value of the Emacs variable &lt;code&gt;aidermacs-default-model&lt;/code&gt; if you have set it (e.g., via &lt;code&gt;setq&lt;/code&gt;).&lt;/li&gt; 
 &lt;li&gt;The value of the &lt;code&gt;AIDER_MODEL&lt;/code&gt; environment variable, if set.&lt;/li&gt; 
 &lt;li&gt;A built-in default value (e.g., &lt;code&gt;&quot;sonnet&quot;&lt;/code&gt;).&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;To set it in Emacs:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq aidermacs-default-model &quot;sonnet&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;This enables easy switching between different AI models without modifying the &lt;code&gt;aidermacs-extra-args&lt;/code&gt; variable.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Note: This configuration will be overwritten by the existence of an &lt;code&gt;.aider.conf.yml&lt;/code&gt; file (see &lt;a href=&quot;https://raw.githubusercontent.com/MatthewZMD/aidermacs/main/#Overwrite-Configuration-with-Configuration-File&quot;&gt;details&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt; 
&lt;h3&gt;Dynamic Model Selection&lt;/h3&gt; 
&lt;p&gt;Aidermacs offers intelligent model selection for solo (non-Architect) mode, automatically detecting and integrating with multiple AI providers:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Automatically fetches available models from supported providers (OpenAI, Anthropic, DeepSeek, Google Gemini, OpenRouter)&lt;/li&gt; 
 &lt;li&gt;Caches model lists for quick access&lt;/li&gt; 
 &lt;li&gt;Supports both popular pre-configured models and dynamically discovered ones&lt;/li&gt; 
 &lt;li&gt;Handles API keys and authentication automatically from your .bashrc&lt;/li&gt; 
 &lt;li&gt;Provides model compatibility checking&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The dynamic model selection is only for the solo (non-Architect) mode.&lt;/p&gt; 
&lt;p&gt;To change models in solo mode:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;Use &lt;code&gt;M-x aidermacs-change-model&lt;/code&gt; or press &lt;code&gt;o&lt;/code&gt; in the transient menu&lt;/li&gt; 
 &lt;li&gt;Select from either: 
  &lt;ul&gt; 
   &lt;li&gt;Popular pre-configured models (fast)&lt;/li&gt; 
   &lt;li&gt;Dynamically fetched models from all supported providers (comprehensive)&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;The system will automatically filter models to only show ones that are:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Supported by your current Aider version&lt;/li&gt; 
 &lt;li&gt;Available through your configured API keys&lt;/li&gt; 
 &lt;li&gt;Compatible with your current workflow&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Architect Mode - Separating Code Reasoning and Editing Models&lt;/h3&gt; 
&lt;p&gt;Aidermacs features an experimental mode using two specialized models for each coding task: an Architect model for reasoning and an Editor model for code generation. This approach has &lt;strong&gt;achieved state-of-the-art (SOTA) results on aider&#39;s code editing benchmark&lt;/strong&gt;, as detailed in &lt;a href=&quot;https://aider.chat/2024/09/26/architect.html&quot;&gt;this blog post&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;To start new sessions in Architect mode by default, set &lt;code&gt;aidermacs-default-chat-mode&lt;/code&gt; to &lt;code&gt;&#39;architect&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;aidermacs-use-architect-mode&lt;/code&gt; is &lt;strong&gt;deprecated&lt;/strong&gt; and will be removed in a future release.&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;architect&lt;/code&gt; mode will default to using &lt;code&gt;aidermacs-default-model&lt;/code&gt;. You may also configure the &lt;code&gt;aidermacs-architect-model&lt;/code&gt; variable to specify the model to use for the Architect role if you prefer a different main model when using &lt;code&gt;architect&lt;/code&gt; mode.&lt;/p&gt; 
&lt;p&gt;By default, the &lt;code&gt;aidermacs-editor-model&lt;/code&gt; is the same as &lt;code&gt;aidermacs-default-model&lt;/code&gt;. You only need to set &lt;code&gt;aidermacs-editor-model&lt;/code&gt; if you want to use a different model for the Editor role. This variable also respects the &lt;code&gt;AIDER_EDITOR_MODEL&lt;/code&gt; environment variable, following the same priority as &lt;code&gt;aidermacs-default-model&lt;/code&gt;.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq aidermacs-default-chat-mode &#39;architect)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;You can switch to it persistently by &lt;code&gt;M-x aidermacs-switch-to-architect-mode&lt;/code&gt; (&lt;code&gt;3&lt;/code&gt; in &lt;code&gt;aidermacs-transient-menu&lt;/code&gt;), or temporarily with &lt;code&gt;M-x aidermacs-architect-this-code&lt;/code&gt; (&lt;code&gt;r&lt;/code&gt; in &lt;code&gt;aidermacs-transient-menu&lt;/code&gt;).&lt;/p&gt; 
&lt;p&gt;You can configure each model independently:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Default model used for all modes unless overridden
(setq aidermacs-default-model &quot;sonnet&quot;)

;; Optional: Set specific model for architect reasoning
(setq aidermacs-architect-model &quot;deepseek/deepseek-reasoner&quot;)

;; Optional: Set specific model for code generation
(setq aidermacs-editor-model &quot;deepseek/deepseek-chat&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The model hierarchy works as follows:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;When Architect mode is enabled: 
  &lt;ul&gt; 
   &lt;li&gt;The Architect model handles high-level reasoning and solution design&lt;/li&gt; 
   &lt;li&gt;The Editor model executes the actual code changes&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;When Architect mode is disabled, only &lt;code&gt;aidermacs-default-model&lt;/code&gt; is used&lt;/li&gt; 
 &lt;li&gt;You can configure specific models or let them automatically use the default model&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Models will reflect changes to &lt;code&gt;aidermacs-default-model&lt;/code&gt; unless they&#39;ve been explicitly set to a different value.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Note: These configurations will be overwritten by the existence of an &lt;code&gt;.aider.conf.yml&lt;/code&gt; file (see &lt;a href=&quot;https://raw.githubusercontent.com/MatthewZMD/aidermacs/main/#Overwrite-Configuration-with-Configuration-File&quot;&gt;details&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt; 
&lt;h3&gt;Customize Weak Model&lt;/h3&gt; 
&lt;p&gt;The Weak model is used for commit messages (if you have &lt;code&gt;aidermacs-auto-commits&lt;/code&gt; set to &lt;code&gt;t&lt;/code&gt;) and chat history summarization (default depends on –model). You can customize it using the &lt;code&gt;aidermacs-weak-model&lt;/code&gt; variable, which also respects the &lt;code&gt;AIDER_WEAK_MODEL&lt;/code&gt; environment variable.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; default to nil
(setq aidermacs-weak-model &quot;deepseek/deepseek-chat&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;You can change the Weak model during a session by using &lt;code&gt;C-u o&lt;/code&gt; (&lt;code&gt;aidermacs-change-model&lt;/code&gt; with a prefix argument). In most cases, you won&#39;t need to change this as Aider will automatically select an appropriate Weak model based on your main model.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Note: These configurations will be overwritten by the existence of an &lt;code&gt;.aider.conf.yml&lt;/code&gt; file (see &lt;a href=&quot;https://raw.githubusercontent.com/MatthewZMD/aidermacs/main/#Overwrite-Configuration-with-Configuration-File&quot;&gt;details&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt; 
&lt;h4&gt;Architect Mode Confirmation&lt;/h4&gt; 
&lt;p&gt;By default, Aidermacs requires explicit confirmation before applying changes proposed in Architect mode. This gives you a chance to review the AI&#39;s plan before any code is modified.&lt;/p&gt; 
&lt;p&gt;If you prefer to automatically accept all Architect mode changes without confirmation (similar to Aider&#39;s default behavior), you can enable this with:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq aidermacs-auto-accept-architect t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;em&gt;Note: These configurations will be overwritten by the existence of an &lt;code&gt;.aider.conf.yml&lt;/code&gt; file (see &lt;a href=&quot;https://raw.githubusercontent.com/MatthewZMD/aidermacs/main/#Overwrite-Configuration-with-Configuration-File&quot;&gt;details&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt; 
&lt;h3&gt;Terminal Backend Selection&lt;/h3&gt; 
&lt;p&gt;Choose your preferred terminal backend by setting &lt;code&gt;aidermacs-backend&lt;/code&gt;:&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;vterm&lt;/code&gt; offers better terminal compatibility, while &lt;code&gt;comint&lt;/code&gt; provides a simple, built-in option that remains fully compatible with Aidermacs.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Use vterm backend (default is comint)
(setq aidermacs-backend &#39;vterm)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Available backends:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;comint&lt;/code&gt; (default): Uses Emacs&#39; built-in terminal emulation&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;vterm&lt;/code&gt;: Leverages vterm for better terminal compatibility&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Emacs theme support&lt;/h3&gt; 
&lt;p&gt;The vterm backend will use the faces defined by your active Emacs theme to set the colors for aider. It tries to guess some reasonable color values based on your themes. In some cases this will not work perfectly; if text is unreadable for you, you can turn this off as follows:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; don&#39;t match emacs theme colors
(setopt aidermacs-vterm-use-theme-colors nil)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Multiline Input Configuration&lt;/h3&gt; 
&lt;p&gt;You can customize keybindings for multiline input, this key allows you to enter multiple lines without sending the command to Aider. Press &lt;code&gt;RET&lt;/code&gt; normally to send the command.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Comint backend:
(setq aidermacs-comint-multiline-newline-key &quot;S-&amp;lt;return&amp;gt;&quot;)
;; Vterm backend:
(setq aidermacs-vterm-multiline-newline-key &quot;S-&amp;lt;return&amp;gt;&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Remote File Support with Tramp&lt;/h3&gt; 
&lt;p&gt;Aidermacs fully supports working with remote files through Emacs&#39; Tramp mode. This allows you to use Aidermacs on files hosted on remote servers via SSH, Docker, and other protocols supported by Tramp.&lt;/p&gt; 
&lt;p&gt;When working with remote files:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;File paths are automatically localized for the remote system&lt;/li&gt; 
 &lt;li&gt;All Aidermacs features work seamlessly across local and remote files&lt;/li&gt; 
 &lt;li&gt;Edits are applied directly to the remote files&lt;/li&gt; 
 &lt;li&gt;Diffs and change reviews work as expected&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Example usage:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Open a remote file via SSH
(find-file &quot;/ssh:user@remotehost:/path/to/file.py&quot;)

;; Start Aidermacs session - it will automatically detect the remote context
M-x aidermacs-transient-menu
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Prompt Selection and History&lt;/h3&gt; 
&lt;p&gt;Aidermacs makes it easy to reuse prompts through:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;strong&gt;Prompt History&lt;/strong&gt; - Your previously used prompts are saved and can be quickly selected&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Common Prompts&lt;/strong&gt; - A curated list of frequently used prompts for common tasks defined in &lt;code&gt;aidermacs-common-prompts&lt;/code&gt;:&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;When entering a prompt, you can:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Select from your history or common prompts using completion&lt;/li&gt; 
 &lt;li&gt;Still type custom prompts when needed&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The prompt history and common prompts are available across all sessions.&lt;/p&gt; 
&lt;h3&gt;File Watching&lt;/h3&gt; 
&lt;p&gt;Enable watching for AI coding instructions in your repository files with &lt;code&gt;aidermacs-watch-files&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Enable file watching
(setq aidermacs-watch-files t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;When enabled, Aidermacs will will watch all files in your repo and look for any AI coding instructions you add using your favorite IDE or text editor.&lt;/p&gt; 
&lt;p&gt;Specifically, aider looks for one-liner comments (&lt;code&gt;# ...&lt;/code&gt;, &lt;code&gt;// ...&lt;/code&gt; or &lt;code&gt;-- ...&lt;/code&gt;, regardless of the comment style that language supports) that either start or end with &lt;code&gt;AI&lt;/code&gt;, &lt;code&gt;AI!&lt;/code&gt; or &lt;code&gt;AI?&lt;/code&gt; like these:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;# Make a snake game. AI!
# What is the purpose of this method AI?

// Write a protein folding prediction engine. AI!
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Aidermacs will take note of all the comments that start or end with &lt;code&gt;AI&lt;/code&gt;. Comments that include &lt;code&gt;AI!&lt;/code&gt; with an exclamation point or &lt;code&gt;AI?&lt;/code&gt; with a question mark are special. They trigger aider to take action to collect all the AI comments and use them as your instructions.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;AI!&lt;/code&gt; triggers aider to make changes to your code.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;AI?&lt;/code&gt; triggers aider to answer your question.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;em&gt;Note: This feature currently only works in the vterm mode.&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Note: These configurations will be overwritten by the existence of an &lt;code&gt;.aider.conf.yml&lt;/code&gt; file (see &lt;a href=&quot;https://raw.githubusercontent.com/MatthewZMD/aidermacs/main/#Overwrite-Configuration-with-Configuration-File&quot;&gt;details&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt; 
&lt;h3&gt;Read-Only Files&lt;/h3&gt; 
&lt;p&gt;You can configure certain files to always be added as read-only when starting any Aidermacs session by setting the &lt;code&gt;aidermacs-global-read-only-files&lt;/code&gt; and &lt;code&gt;aidermacs-project-read-only-files&lt;/code&gt;.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Always add these files as read-only to all Aidermacs sessions
;; For files that exists outside the project directory
(setq aidermacs-global-read-only-files &#39;(&quot;~/.aider/AI_RULES.md&quot;))
;; For files that exists within the project directory
(setq aidermacs-project-read-only-files &#39;(&quot;CONVENTIONS.md&quot; &quot;README.md&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;When an Aidermacs session starts, these files will be automatically added as read-only if they exist in the project. This is useful for documentation files or other references that you want the AI to be aware of but not modify.&lt;/p&gt; 
&lt;h3&gt;Diff and Change Review&lt;/h3&gt; 
&lt;p&gt;Control whether to show diffs for AI-generated changes with &lt;code&gt;aidermacs-show-diff-after-change&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Enable/disable showing diffs after changes (default: t)
(setq aidermacs-show-diff-after-change t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;When enabled, Aidermacs will:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Capture the state of files before AI edits&lt;/li&gt; 
 &lt;li&gt;Show diffs using Emacs&#39; built-in ediff interface&lt;/li&gt; 
 &lt;li&gt;Allow you to review and accept/reject changes&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Re-Enable Auto-Commits&lt;/h3&gt; 
&lt;p&gt;Aider automatically commits AI-generated changes by default. We consider this behavior &lt;em&gt;very&lt;/em&gt; intrusive, so we&#39;ve disabled it. You can re-enable auto-commits by setting &lt;code&gt;aidermacs-auto-commits&lt;/code&gt; to &lt;code&gt;t&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Enable auto-commits
(setq aidermacs-auto-commits t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;With auto-commits disabled, you must manually commit changes using your preferred Git workflow.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Note: This configuration will be overwritten by the existence of an &lt;code&gt;.aider.conf.yml&lt;/code&gt; file (see &lt;a href=&quot;https://raw.githubusercontent.com/MatthewZMD/aidermacs/main/#Overwrite-Configuration-with-Configuration-File&quot;&gt;details&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt; 
&lt;h3&gt;Control Buffer Killing on Exit&lt;/h3&gt; 
&lt;p&gt;By default, when you exit an Aidermacs session using &lt;code&gt;aidermacs-exit&lt;/code&gt; (or &lt;code&gt;x&lt;/code&gt; in the transient menu), the Aidermacs buffer remains open. If you prefer the buffer to be automatically killed upon exiting the session, you can customize this behavior:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Kill the Aider buffer when exiting the session
(setq aidermacs-exit-kills-buffer t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Customize Aider Options with &lt;code&gt;aidermacs-extra-args&lt;/code&gt;&lt;/h3&gt; 
&lt;p&gt;If these configurations aren&#39;t sufficient, the &lt;code&gt;aidermacs-extra-args&lt;/code&gt; variable enables passing any Aider-supported command-line options.&lt;/p&gt; 
&lt;p&gt;See the &lt;a href=&quot;https://aider.chat/docs/config/options.html&quot;&gt;Aider configuration documentation&lt;/a&gt; for a full list of available options.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Set the verbosity:
(add-to-list &#39;aidermacs-extra-args &quot;--verbose&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;These arguments will be appended to the Aider command when it is run. Note that the &lt;code&gt;--model&lt;/code&gt; argument is automatically handled by &lt;code&gt;aidermacs-default-model&lt;/code&gt; and should not be included in &lt;code&gt;aidermacs-extra-args&lt;/code&gt;.&lt;/p&gt; 
&lt;h3&gt;Overwrite Configuration with Configuration File&lt;/h3&gt; 
&lt;p&gt;Aidermacs supports project-specific configurations via &lt;code&gt;.aider.conf.yml&lt;/code&gt; files. To enable this:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;Create a &lt;code&gt;.aider.conf.yml&lt;/code&gt; in your home dir, project&#39;s root, or the current directory, defining your desired settings. See the &lt;a href=&quot;https://aider.chat/docs/config/aider_conf.html&quot;&gt;Aider documentation&lt;/a&gt; for available options.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Tell Aidermacs to use the config file in one of two ways:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Set the `aidermacs-config-file` variable in your Emacs config:
(setq aidermacs-config-file &quot;/path/to/your/project/.aider.conf.yml&quot;)
;; *Or*, include the `--config` or `-c` flag in `aidermacs-extra-args`:
(setq aidermacs-extra-args &#39;(&quot;--config&quot; &quot;/path/to/your/project/.aider.conf.yml&quot;))
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;&lt;em&gt;Note: You can also rely on Aider&#39;s default behavior of automatically searching for &lt;code&gt;.aider.conf.yml&lt;/code&gt; in the home directory, project root, or current directory, in that order. In this case, you do not need to set &lt;code&gt;aidermacs-config-file&lt;/code&gt; or include &lt;code&gt;--config&lt;/code&gt; in &lt;code&gt;aidermacs-extra-args&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;strong&gt;Important: Configuration Precedence&lt;/strong&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;When an Aidermacs session starts, it determines which settings to use based on the following hierarchy:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;&lt;strong&gt;Aider Configuration File (&lt;code&gt;.aider.conf.yml&lt;/code&gt;):&lt;/strong&gt; If a config file is found (either in a default location or specified via &lt;code&gt;aidermacs-config-file&lt;/code&gt; or &lt;code&gt;aidermacs-extra-args&lt;/code&gt;), it takes &lt;strong&gt;highest priority&lt;/strong&gt;. Aidermacs will &lt;strong&gt;ignore&lt;/strong&gt; its own Emacs variables (like &lt;code&gt;aidermacs-default-model&lt;/code&gt;) and let the &lt;code&gt;aider&lt;/code&gt; tool manage settings directly from the file. The precedence is then determined by &lt;code&gt;aider&lt;/code&gt; itself (where command-line arguments override environment variables, which override the config file).&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;strong&gt;Emacs Configuration (if no config file is used):&lt;/strong&gt; If no &lt;code&gt;.aider.conf.yml&lt;/code&gt; is present, Aidermacs will build the command-line arguments for &lt;code&gt;aider&lt;/code&gt;. The values it uses are determined by this order of priority: a. &lt;strong&gt;Emacs Variables (Highest):&lt;/strong&gt; Values you set in your &lt;code&gt;init.el&lt;/code&gt; (e.g., &lt;code&gt;(setq aidermacs-default-model &quot;...&quot;)&lt;/code&gt;). b. &lt;strong&gt;Environment Variables:&lt;/strong&gt; If an Emacs variable is not set, its value is taken from the corresponding environment variable (e.g., &lt;code&gt;AIDER_MODEL&lt;/code&gt;). c. &lt;strong&gt;Built-in Defaults (Lowest):&lt;/strong&gt; If neither of the above are set, a hardcoded default is used.&lt;/p&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;&lt;strong&gt;To avoid conflicts:&lt;/strong&gt; When using a &lt;code&gt;.aider.conf.yml&lt;/code&gt; file, you should define all your settings within that file. Do not set variables like &lt;code&gt;aidermacs-default-model&lt;/code&gt; in Emacs or pass arguments like &lt;code&gt;--model&lt;/code&gt; in &lt;code&gt;aidermacs-extra-args&lt;/code&gt;, as they will be ignored and can cause confusion.&lt;/p&gt; 
&lt;h3&gt;Claude Sonnet 3.7, 4, 4.5 Thinking Tokens&lt;/h3&gt; 
&lt;p&gt;Aider can work with Sonnet 3.7&#39;s &lt;a href=&quot;https://www.anthropic.com/news/claude-3-7-sonnet&quot;&gt;new thinking tokens&lt;/a&gt; and newer models in this series. You can now enable and configure thinking tokens more easily using the following methods:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;&lt;strong&gt;In-Chat Command:&lt;/strong&gt; Use the &lt;code&gt;/think-tokens&lt;/code&gt; command followed by the desired token budget. For example: &lt;code&gt;/think-tokens 8k&lt;/code&gt; or &lt;code&gt;/think-tokens 10000&lt;/code&gt;. Supported formats include &lt;code&gt;8096&lt;/code&gt;, &lt;code&gt;8k&lt;/code&gt;, &lt;code&gt;10.5k&lt;/code&gt;, and &lt;code&gt;0.5M&lt;/code&gt;.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;strong&gt;Command-Line Argument:&lt;/strong&gt; Set the &lt;code&gt;--thinking-tokens&lt;/code&gt; argument when starting Aidermacs. For example, you can add this to your &lt;code&gt;aidermacs-extra-args&lt;/code&gt;:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq aidermacs-extra-args &#39;(&quot;--thinking-tokens&quot; &quot;16k&quot;))
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;These methods provide a more streamlined way to control thinking tokens without requiring manual configuration of &lt;code&gt;.aider.model.settings.yml&lt;/code&gt; files.&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Note: If you are using an &lt;code&gt;.aider.conf.yml&lt;/code&gt; file, you can also set the &lt;code&gt;thinking_tokens&lt;/code&gt; option there.&lt;/em&gt;&lt;/p&gt; 
&lt;h4&gt;Working with Prompt Files&lt;/h4&gt; 
&lt;p&gt;The &lt;code&gt;.aider.prompt.org&lt;/code&gt; file is particularly useful for:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Storing frequently used prompts&lt;/li&gt; 
 &lt;li&gt;Documenting common workflows&lt;/li&gt; 
 &lt;li&gt;Quick access to complex instructions&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;You can customize which files automatically enable the minor mode by configuring &lt;code&gt;aidermacs-auto-mode-files&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq aidermacs-auto-mode-files
      &#39;(&quot;.aider.prompt.org&quot;
        &quot;.aider.chat.md&quot;
        &quot;.aider.chat.history.md&quot;
        &quot;.aider.input.history&quot;
        &quot;my-custom-aider-file.org&quot;))  ; Add your own files
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;FAQ&lt;/h2&gt; 
&lt;h3&gt;Aider?&lt;/h3&gt; 
&lt;p&gt;Please check &lt;a href=&quot;https://aider.chat/docs/faq.html&quot;&gt;Aider&#39;s FAQ&lt;/a&gt; for Aider related questions.&lt;/p&gt; 
&lt;h3&gt;Can I use my own AI models?&lt;/h3&gt; 
&lt;p&gt;Yes! Aidermacs supports any OpenAI-compatible API endpoint. Check Aider documentation on &lt;a href=&quot;https://aider.chat/docs/llms/ollama.html&quot;&gt;Ollama&lt;/a&gt; and &lt;a href=&quot;https://aider.chat/docs/llms/other.html&quot;&gt;LiteLLM&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;Is my code sent to the AI provider?&lt;/h3&gt; 
&lt;p&gt;Yes, the code you add to the session is sent to the AI provider. Be mindful of sensitive code.&lt;/p&gt; 
&lt;h3&gt;Why aider not support Python 3.13&lt;/h3&gt; 
&lt;p&gt;Aider only support Python 3.12 currently, you can use &lt;a href=&quot;https://github.com/astral-sh/uv&quot;&gt;uv&lt;/a&gt; install aider:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;uv tool install --force --python python3.12 aider-chat@latest
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;If you encounter a proxy-related &lt;a href=&quot;https://github.com/Aider-AI/aider/issues/2984&quot;&gt;issue&lt;/a&gt; , such as the error indicating that the &#39;socksio&#39; package is not installed, please use:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;uv tool install --force --python python3.12 aider-chat@latest --with &#39;httpx[socks]&#39;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;And adjust aidermacs program with below config.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(setq aidermacs-program (expand-file-name &quot;~/.local/bin/aider&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Local models prefer English, even if the prompt language is different&lt;/h3&gt; 
&lt;p&gt;Some local models in aider may default to English, even if you use a different language in your prompt. To ensure the chat language matches your preference (e.g., Russian), add the following to your Emacs configuration:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(add-to-list &#39;aidermacs-extra-args &quot;--chat-language ru&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;This will instruct aider to use Russian for chat interactions.&lt;/p&gt; 
&lt;h3&gt;Aidermacs or Aider ignores command-line arguments and prompts for provider selection when using Ollama&lt;/h3&gt; 
&lt;p&gt;If the &lt;code&gt;~/.aider&lt;/code&gt; directory exists (even if empty), Aidermacs or Aider may silently ignore command-line arguments and unexpectedly prompt for provider selection (e.g., forcing OpenRouter), even if your configuration is correct for Ollama or other providers.&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;Workaround:&lt;/strong&gt; Remove the existing aider directory and restart Emacs:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;rm -rf ~/.aider*
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;After this, Aidermacs should start as expected with your configured provider (e.g., Ollama).&lt;/p&gt; 
&lt;h3&gt;Aidermacs vs Aider CLI vs aider.el?&lt;/h3&gt; 
&lt;p&gt;Aidermacs is designed to provide a more Emacs-native experience while integrating with &lt;a href=&quot;https://github.com/paul-gauthier/aider&quot;&gt;Aider CLI&lt;/a&gt;. It began as a fork of &lt;code&gt;aider.el&lt;/code&gt;, but has since diverged significantly to prioritize Emacs workflow integration, built by Emacser, for Emacser.&lt;/p&gt; 
&lt;p&gt;While aider.el tries to mirror Aider&#39;s CLI behavior, Aidermacs is built around Emacs-specific features and paradigms. This design philosophy allows you to harness Aider&#39;s powerful capabilities through a natural, Emacs-native coding experience.&lt;/p&gt; 
&lt;p&gt;With Aidermacs, you get:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt; &lt;p&gt;Built-in Ediff Integration for AI-Generated Changes&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;Seamless Code Review: Automatically shows diffs for all AI-modified files using Emacs&#39; powerful &lt;code&gt;ediff&lt;/code&gt; interface&lt;/li&gt; 
   &lt;li&gt;Familiar Interface: Uses Emacs&#39; native &lt;code&gt;ediff&lt;/code&gt; workflow for reviewing changes&lt;/li&gt; 
   &lt;li&gt;Interactive Workflow: Accept or reject changes with standard &lt;code&gt;ediff&lt;/code&gt; commands&lt;/li&gt; 
   &lt;li&gt;Syntax Highlighting: Maintains proper syntax highlighting during comparisons&lt;/li&gt; 
   &lt;li&gt;Safe Change Management: Preserves original file states for easy comparison and rollback&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Intelligent Model Selection&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;Automatic discovery of available models from multiple providers&lt;/li&gt; 
   &lt;li&gt;Real-time model compatibility checking&lt;/li&gt; 
   &lt;li&gt;Seamless integration with your configured API keys&lt;/li&gt; 
   &lt;li&gt;Caching for quick access to frequently used models&lt;/li&gt; 
   &lt;li&gt;Support for both popular pre-configured models and dynamically discovered ones&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Flexible Terminal Backend Support&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;Aidermacs supports multiple terminal backends (comint and vterm) for better compatibility and performance&lt;/li&gt; 
   &lt;li&gt;Easy configuration to choose your preferred terminal emulation&lt;/li&gt; 
   &lt;li&gt;Extensible architecture for adding new backends&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Smarter Syntax Highlighting&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;AI-generated code appears with proper syntax highlighting in major languages.&lt;/li&gt; 
   &lt;li&gt;Ensures clarity and readability without additional configuration.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Better Support for Multiline Input&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;Aider is designed as a CLI program, where multiline input is restricted by terminal limitations.&lt;/li&gt; 
   &lt;li&gt;Terminal-based tools require special syntax or manual formatting to handle multiline input, which can be cumbersome and unintuitive.&lt;/li&gt; 
   &lt;li&gt;Aidermacs eliminates these restrictions by handling multiline prompts natively within Emacs, allowing you to compose complex AI requests just like any other text input.&lt;/li&gt; 
   &lt;li&gt;Whether you&#39;re pasting blocks of code or refining AI-generated responses, multiline interactions in Aidermacs feel natural and seamless.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Enhanced File Management from Emacs&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;List files currently in chat with &lt;code&gt;M-x aidermacs-list-added-files&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;Drop specific files from chat with &lt;code&gt;M-x aidermacs-drop-file&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;View output history with &lt;code&gt;M-x aidermacs-show-output-history&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;Interactively select files to add with &lt;code&gt;M-x aidermacs-add-files-interactively&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;Add content from any file to a specific session with &lt;code&gt;M-x aidermacs-add-file-to-session&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;Create a temporary file for adding code snippets or notes to the Aider session with &lt;code&gt;M-x aidermacs-create-session-scratchpad&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;Full support for remote files via Tramp (SSH, Docker, etc.)&lt;/li&gt; 
   &lt;li&gt;and more&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Greater Configurability&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;Aidermacs offers more customization options to tailor the experience to your preferences.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Streamlined Transient Menu Selection&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;The transient menus have been completely redesigned to encompass functionality and ergonomics, prioritizing user experience.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Flexible Ways to Add Content&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;Aidermacs provides multiple ways to add content to the Aider session, including adding files, creating temporary scratchpad files, and more.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Community-Driven Development&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;Aidermacs is actively developed and maintained by the community, incorporating user feedback and contributions.&lt;/li&gt; 
   &lt;li&gt;We prioritize features and improvements that directly benefit Emacs users, ensuring a tool that evolves with your needs.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;... and more to come 🚀&lt;/p&gt; 
&lt;h2&gt;Video Demo&lt;/h2&gt; 
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=fB3-ie6zs4Y&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/fB3-ie6zs4Y/0.jpg&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;h2&gt;Community-Driven Development&lt;/h2&gt; 
&lt;p&gt;Aidermacs thrives on community involvement. We believe collaborative development with user and contributor input creates the best software. We encourage you to:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Contribute Code: Submit pull requests with bug fixes, new features, or improvements to existing functionality.&lt;/li&gt; 
 &lt;li&gt;Report Issues: Let us know about any bugs, unexpected behavior, or feature requests through GitHub Issues.&lt;/li&gt; 
 &lt;li&gt;Share Ideas: Participate in discussions and propose new ideas for making Aidermacs even better.&lt;/li&gt; 
 &lt;li&gt;Improve Documentation: Help us make the documentation clearer, more comprehensive, and easier to use.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Your contributions are essential for making Aidermacs the best AI pair programming tool in Emacs!&lt;/p&gt; 
&lt;a href=&quot;https://github.com/MatthewZMD/aidermacs/graphs/contributors&quot;&gt; &lt;img src=&quot;https://contrib.rocks/image?repo=MatthewZMD/aidermacs&quot; /&gt; &lt;/a&gt;</description>
      
    </item>
    
    <item>
      <title>xenodium/agent-shell</title>
      <link>https://github.com/xenodium/agent-shell</link>
      <description>&lt;p&gt;A native Emacs buffer to interact with LLM agents powered by ACP&lt;/p&gt;&lt;hr&gt;&lt;p&gt;#+TITLE: Emacs Agent Shell #+AUTHOR: Álvaro Ramírez&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://melpa.org/#/agent-shell&quot;&gt;https://melpa.org/#/agent-shell&lt;/a&gt;][file:&lt;a href=&quot;https://melpa.org/packages/agent-shell-badge.svg&quot;&gt;https://melpa.org/packages/agent-shell-badge.svg&lt;/a&gt;]]&lt;/p&gt; 
&lt;p&gt;👉 [[&lt;a href=&quot;https://github.com/sponsors/xenodium&quot;&gt;https://github.com/sponsors/xenodium&lt;/a&gt;][Support this work via GitHub Sponsors]] by [[&lt;a href=&quot;https://github.com/xenodium&quot;&gt;https://github.com/xenodium&lt;/a&gt;][@xenodium]] (check out my [[&lt;a href=&quot;https://xenodium.com&quot;&gt;https://xenodium.com&lt;/a&gt;][blog]])&lt;/p&gt; 
&lt;p&gt;[[file:agent-shell.png]]&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;This project needs your funding&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;As you pay for those useful LLM tokens, consider [[&lt;a href=&quot;https://github.com/sponsors/xenodium&quot;&gt;https://github.com/sponsors/xenodium&lt;/a&gt;][sponsoring]] development and maintenance of this project. With your help, I can make this effort more [[&lt;a href=&quot;https://github.com/sponsors/xenodium&quot;&gt;https://github.com/sponsors/xenodium&lt;/a&gt;][sustainable]].&lt;/p&gt; 
&lt;p&gt;Thank you!&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://xenodium.com/&quot;&gt;https://xenodium.com/&lt;/a&gt;][Alvaro]]&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;agent-shell&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;A native Emacs shell to interact with LLM agents powered by ACP ([[&lt;a href=&quot;https://agentclientprotocol.com&quot;&gt;https://agentclientprotocol.com&lt;/a&gt;][Agent Client Protocol]]).&lt;/p&gt; 
&lt;p&gt;With agent-shell, you can interact with any ACP-driven agent like:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://code.claude.com/docs/en/overview&quot;&gt;https://code.claude.com/docs/en/overview&lt;/a&gt;][Claude Agent]] (Anthropic)&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/agentclientprotocol/codex-acp&quot;&gt;https://github.com/agentclientprotocol/codex-acp&lt;/a&gt;][Codex]] (OpenAI)&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/google-gemini/gemini-cli&quot;&gt;https://github.com/google-gemini/gemini-cli&lt;/a&gt;][Gemini CLI]] (Google)&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://goose-docs.ai/docs/getting-started/installation&quot;&gt;https://goose-docs.ai/docs/getting-started/installation&lt;/a&gt;][Goose]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://docs.x.ai/docs/overview&quot;&gt;https://docs.x.ai/docs/overview&lt;/a&gt;][Grok Build]] (xAI)&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://cursor.com/docs/cli&quot;&gt;https://cursor.com/docs/cli&lt;/a&gt;][Cursor]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://www.kimi.com/code&quot;&gt;https://www.kimi.com/code&lt;/a&gt;][Kimi Code CLI]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://www.codebuddy.ai&quot;&gt;https://www.codebuddy.ai&lt;/a&gt;][CodeBuddy]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://kiro.dev&quot;&gt;https://kiro.dev&lt;/a&gt;][Kiro CLI]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/QwenLM/qwen-code&quot;&gt;https://github.com/QwenLM/qwen-code&lt;/a&gt;][Qwen Code]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://docs.augmentcode.com/cli/overview&quot;&gt;https://docs.augmentcode.com/cli/overview&lt;/a&gt;][Auggie]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/mistralai/mistral-vibe&quot;&gt;https://github.com/mistralai/mistral-vibe&lt;/a&gt;][Mistral Vibe]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://factory.ai&quot;&gt;https://factory.ai&lt;/a&gt;][Factory Droid]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/svkozak/pi-acp&quot;&gt;https://github.com/svkozak/pi-acp&lt;/a&gt;][Pi]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/can1357/oh-my-pi&quot;&gt;https://github.com/can1357/oh-my-pi&lt;/a&gt;][Oh My Pi]]&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://opencode.ai&quot;&gt;https://opencode.ai&lt;/a&gt;][Opencode]]&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://www.youtube.com/watch?v=R2Ucr3amgGg&quot;&gt;https://www.youtube.com/watch?v=R2Ucr3amgGg&lt;/a&gt;][agent-shell - YouTube]]&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://www.youtube.com/watch?v=R2Ucr3amgGg&quot;&gt;https://www.youtube.com/watch?v=R2Ucr3amgGg&lt;/a&gt;][file:yt.png]]&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://www.youtube.com/watch?v=ymMlftdGx4I&quot;&gt;https://www.youtube.com/watch?v=ymMlftdGx4I&lt;/a&gt;][agent-shell + Claude Skills - YouTube]]&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://www.youtube.com/watch?v=ymMlftdGx4I&quot;&gt;https://www.youtube.com/watch?v=ymMlftdGx4I&lt;/a&gt;][&lt;a href=&quot;https://img.youtube.com/vi/ymMlftdGx4I/0.jpg&quot;&gt;https://img.youtube.com/vi/ymMlftdGx4I/0.jpg&lt;/a&gt;]]&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://www.youtube.com/watch?v=HJQ86HuSIJI&quot;&gt;https://www.youtube.com/watch?v=HJQ86HuSIJI&lt;/a&gt;][agent-shell + Claude Skills + Charts - YouTube]]&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://www.youtube.com/watch?v=HJQ86HuSIJI&quot;&gt;https://www.youtube.com/watch?v=HJQ86HuSIJI&lt;/a&gt;][&lt;a href=&quot;https://img.youtube.com/vi/HJQ86HuSIJI/0.jpg&quot;&gt;https://img.youtube.com/vi/HJQ86HuSIJI/0.jpg&lt;/a&gt;]]&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://www.youtube.com/watch?v=7fdHeUoRRgg&quot;&gt;https://www.youtube.com/watch?v=7fdHeUoRRgg&lt;/a&gt;][Bending Emacs Episode 14: Prototyping iOS apps with agent-shell, artist-mode, and Claude Skills - YouTube]]&lt;/p&gt; 
&lt;p&gt;[[&lt;a href=&quot;https://www.youtube.com/watch?v=7fdHeUoRRgg&quot;&gt;https://www.youtube.com/watch?v=7fdHeUoRRgg&lt;/a&gt;][&lt;a href=&quot;https://img.youtube.com/vi/7fdHeUoRRgg/0.jpg&quot;&gt;https://img.youtube.com/vi/7fdHeUoRRgg/0.jpg&lt;/a&gt;]]&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;News&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Do take a look at all these blog posts as they showcase most =agent-shell= features.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://xenodium.com/agent-shell-0-63-updates&quot;&gt;https://xenodium.com/agent-shell-0-63-updates&lt;/a&gt;][agent-shell 0.63 updates]].&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://xenodium.com/agent-shell-0-55-updates&quot;&gt;https://xenodium.com/agent-shell-0-55-updates&lt;/a&gt;][agent-shell 0.55 updates]].&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://xenodium.com/agent-shell-0-47-1-updates&quot;&gt;https://xenodium.com/agent-shell-0-47-1-updates&lt;/a&gt;][agent-shell 0.47 updates]].&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://xenodium.com/agent-shell-0-25-updates&quot;&gt;https://xenodium.com/agent-shell-0-25-updates&lt;/a&gt;][agent-shell 0.25 updates]].&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://xenodium.com/agent-shell-016-improvements-melpa&quot;&gt;https://xenodium.com/agent-shell-016-improvements-melpa&lt;/a&gt;][agent-shell 0.17 improvements + MELPA]].&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://xenodium.com/agent-shell-0-5-improvements&quot;&gt;https://xenodium.com/agent-shell-0-5-improvements&lt;/a&gt;][agent-shell 0.5 improvements]].&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://xenodium.com/introducing-agent-shell&quot;&gt;https://xenodium.com/introducing-agent-shell&lt;/a&gt;][Introducing Emacs agent-shell (powered by ACP)]].&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://xenodium.com/introducing-acpel&quot;&gt;https://xenodium.com/introducing-acpel&lt;/a&gt;][Introducing acp.el]].&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;Related projects&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;=agent-shell= relies on [[&lt;a href=&quot;https://github.com/xenodium/acp.el&quot;&gt;https://github.com/xenodium/acp.el&lt;/a&gt;][acp.el]] to communicate with agents via ACP ([[&lt;a href=&quot;https://agentclientprotocol.com/&quot;&gt;https://agentclientprotocol.com/&lt;/a&gt;][Agent Client Protocol]]).&lt;/p&gt; 
&lt;p&gt;We now have a handful of additional packages to extend the =agent-shell= experience:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/xenodium/emacs-skills&quot;&gt;https://github.com/xenodium/emacs-skills&lt;/a&gt;][emacs-skills]]: Claude Agent skills for Emacs.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/ElleNajt/agent-shell-to-go&quot;&gt;https://github.com/ElleNajt/agent-shell-to-go&lt;/a&gt;][agent-shell-to-go]]: Interact with =agent-shell= sessions from your mobile or any other device via Slack.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/Embedded-Focus/agent-circus&quot;&gt;https://github.com/Embedded-Focus/agent-circus&lt;/a&gt;][agent-circus]]: Run AI coding agents in sandboxed Docker containers.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/cmacrae/agent-shell-sidebar&quot;&gt;https://github.com/cmacrae/agent-shell-sidebar&lt;/a&gt;][agent-shell-sidebar]]: A sidebar add-on for =agent-shell=.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/dcluna/agent-shell-bookmark&quot;&gt;https://github.com/dcluna/agent-shell-bookmark&lt;/a&gt;][agent-shell-bookmark]]: Bookmark support for agent-shell sessions.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/gveres/agent-shell-workspace&quot;&gt;https://github.com/gveres/agent-shell-workspace&lt;/a&gt;][agent-shell-workspace]]: Dedicated tab-bar workspace for managing multiple =agent-shell= sessions.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/jethrokuan/agent-shell-manager&quot;&gt;https://github.com/jethrokuan/agent-shell-manager&lt;/a&gt;][agent-shell-manager]]: Tabulated view and management of =agent-shell= buffers.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/nineluj/agent-review&quot;&gt;https://github.com/nineluj/agent-review&lt;/a&gt;][agent-review]]: Code review interface for =agent-shell=.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/ultronozm/agent-shell-attention.el&quot;&gt;https://github.com/ultronozm/agent-shell-attention.el&lt;/a&gt;][agent-shell-attention.el]]: Mode-line attention tracker for =agent-shell=.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/xenodium/agent-shell-knockknock&quot;&gt;https://github.com/xenodium/agent-shell-knockknock&lt;/a&gt;][agent-shell-knockknock]]: Notifications for =agent-shell= via [[&lt;a href=&quot;https://github.com/konrad1977/knockknock&quot;&gt;https://github.com/konrad1977/knockknock&lt;/a&gt;][knockknock.el]].&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/zackattackz/agent-shell-notifications&quot;&gt;https://github.com/zackattackz/agent-shell-notifications&lt;/a&gt;][agent-shell-notifications]]: Desktop notifications for =agent-shell= events.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/ElleNajt/meta-agent-shell&quot;&gt;https://github.com/ElleNajt/meta-agent-shell&lt;/a&gt;][meta-agent-shell]]: Multi-agent coordination system for =agent-shell= with inter-agent communication, task tracking, and project-level dispatching.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/cxa/agent-shell-macext&quot;&gt;https://github.com/cxa/agent-shell-macext&lt;/a&gt;][agent-shell-macext]]: macOS-specific enhancements for =agent-shell=.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/lllShamanlll/agent-shell-org-transcript&quot;&gt;https://github.com/lllShamanlll/agent-shell-org-transcript&lt;/a&gt;][agent-shell-org-transcript]]: Org-mode transcripts for =agent-shell= sessions, with org-roam integration.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/eddof13/ob-agent-shell&quot;&gt;https://github.com/eddof13/ob-agent-shell&lt;/a&gt;][ob-agent-shell]]: Org Babel backend for executing =agent-shell= source blocks.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/Marx-A00/agent-recall&quot;&gt;https://github.com/Marx-A00/agent-recall&lt;/a&gt;][agent-recall]]: Search, browse, and resume =agent-shell= conversation transcripts.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/lgmoneda/agent-shell-pet&quot;&gt;https://github.com/lgmoneda/agent-shell-pet&lt;/a&gt;][agent-shell-pet]]: Codex-like pets that broadcast agent-shell session states.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/alberti42/agent-shell-math-renderer&quot;&gt;https://github.com/alberti42/agent-shell-math-renderer&lt;/a&gt;][agent-shell-math-renderer]]: Render LaTeX math equations as SVGs in =agent-shell=.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/junyi-hou/agent-shell-tramp&quot;&gt;https://github.com/junyi-hou/agent-shell-tramp&lt;/a&gt;][agent-shell-tramp]]: Tramp integration for =agent-shell=.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/nohzafk/agent-shell-hud&quot;&gt;https://github.com/nohzafk/agent-shell-hud&lt;/a&gt;][agent-shell-hud]]: Real-time =agent-shell= status overlay via a floating dashboard.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/timfel/agent-shell-desktop.el&quot;&gt;https://github.com/timfel/agent-shell-desktop.el&lt;/a&gt;][agent-shell-desktop]]: Desktop save mode integration for =agent-shell=. Saves and resumes shells by folder, config, and session id.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/ultronozm/agent-shell-links.el&quot;&gt;https://github.com/ultronozm/agent-shell-links.el&lt;/a&gt;][agent-shell-links.el]]: Bookmarks and Org links for =agent-shell= sessions.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/wandersoncferreira/agent-shell-dashboard&quot;&gt;https://github.com/wandersoncferreira/agent-shell-dashboard&lt;/a&gt;][agent-shell-dashboard]]: A landing page for =agent-shell=.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/SreenivasVRao/agent-shell-hq&quot;&gt;https://github.com/SreenivasVRao/agent-shell-hq&lt;/a&gt;][agent-shell-hq]]: A heads-up display and peek interface for managing multiple =agent-shell= sessions, organized by project.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;Articles&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;20Y: [[&lt;a href=&quot;https://20y.hu/~slink/journal/agent-shell/index.html&quot;&gt;https://20y.hu/~slink/journal/agent-shell/index.html&lt;/a&gt;][Agentic development workflow in Emacs]]&lt;/li&gt; 
 &lt;li&gt;Skye: [[&lt;a href=&quot;https://skyefreeman.com/blog/2026/04/15/how-im-using-llms-with-emacs&quot;&gt;https://skyefreeman.com/blog/2026/04/15/how-im-using-llms-with-emacs&lt;/a&gt;][How I&#39;m using LLM&#39;s via Emacs]].&lt;/li&gt; 
 &lt;li&gt;sincebyte: [[&lt;a href=&quot;https://neoemacs.com/posts/agent-shell-cursor-agent-cli/&quot;&gt;https://neoemacs.com/posts/agent-shell-cursor-agent-cli/&lt;/a&gt;][Agent Shell Cursor Agent Cli]].&lt;/li&gt; 
 &lt;li&gt;Naputo: [[&lt;a href=&quot;https://blog.n-daisuke897.com/posts/2026-03-01-agent-shell-session-selection/&quot;&gt;https://blog.n-daisuke897.com/posts/2026-03-01-agent-shell-session-selection/&lt;/a&gt;][How to Select Sessions When Starting the agent-shell ACP Client Running on Emacs]]&lt;/li&gt; 
 &lt;li&gt;vandee: [[&lt;a href=&quot;https://www.vandee.art/blog/2026-01-23-my-agent-practice-with-opencode-in-emacs.html&quot;&gt;https://www.vandee.art/blog/2026-01-23-my-agent-practice-with-opencode-in-emacs.html&lt;/a&gt;][My Agent Practice with OpenCode in Emacs]].&lt;/li&gt; 
 &lt;li&gt;Fedora Project Wiki: [[&lt;a href=&quot;https://fedoraproject.org/wiki/SIGs/AI-ML#agent-shell&quot;&gt;https://fedoraproject.org/wiki/SIGs/AI-ML#agent-shell&lt;/a&gt;][AI/ML Special Interest Group]].&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;Icons&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Thanks to [[&lt;a href=&quot;https://github.com/lobehub/lobe-icons&quot;&gt;https://github.com/lobehub/lobe-icons&lt;/a&gt;][Lobe Icons]] for the lovely icons.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Setup&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** External dependencies&lt;/p&gt; 
&lt;p&gt;*** Claude Agent SDK&lt;/p&gt; 
&lt;p&gt;For Anthropic&#39;s [[&lt;a href=&quot;https://code.claude.com/docs/en/overview&quot;&gt;https://code.claude.com/docs/en/overview&lt;/a&gt;][Claude Agent]] (formerly known as the Claude Code), follow [[&lt;a href=&quot;https://github.com/agentclientprotocol/claude-agent-acp&quot;&gt;https://github.com/agentclientprotocol/claude-agent-acp&lt;/a&gt;][claude-agent-acp instructions]], typically something like:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash npm install -g @agentclientprotocol/claude-agent-acp #+end_src&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; The =-g= flag is required to install the binary globally so it&#39;s available in your PATH. After installation, verify it&#39;s available by running =which claude-agent-acp= in your terminal.&lt;/p&gt; 
&lt;p&gt;Optionally: You may also need [[&lt;a href=&quot;https://code.claude.com/docs/en/overview&quot;&gt;https://code.claude.com/docs/en/overview&lt;/a&gt;][Claude Agent]] itself if you want to use a Claude subscription (run the CLI outside of Emacs at least once to log in to your subscription and then use =agent-shell= from Emacs). Follow Claude Agent&#39;s [[&lt;a href=&quot;https://code.claude.com/docs/en/overview#get-started&quot;&gt;https://code.claude.com/docs/en/overview#get-started&lt;/a&gt;][get started]] for installation.&lt;/p&gt; 
&lt;p&gt;*** Codex&lt;/p&gt; 
&lt;p&gt;For OpenAI&#39;s Codex, install [[&lt;a href=&quot;https://github.com/agentclientprotocol/codex-acp&quot;&gt;https://github.com/agentclientprotocol/codex-acp&lt;/a&gt;][@agentclientprotocol/codex-acp]] (=npm install -g @agentclientprotocol/codex-acp=) and ensure the =codex-acp= executable is in PATH.&lt;/p&gt; 
&lt;p&gt;*** Gemini CLI&lt;/p&gt; 
&lt;p&gt;For Google&#39;s [[&lt;a href=&quot;https://github.com/google-gemini/gemini-cli&quot;&gt;https://github.com/google-gemini/gemini-cli&lt;/a&gt;][Gemini CLI]], be sure to get a recent release supporting the =--experimental-acp= flag.&lt;/p&gt; 
&lt;p&gt;*** Goose&lt;/p&gt; 
&lt;p&gt;For Goose CLI, install [[&lt;a href=&quot;https://goose-docs.ai/docs/getting-started/installation&quot;&gt;https://goose-docs.ai/docs/getting-started/installation&lt;/a&gt;][goose]] and ensure the =goose= executable is in PATH.&lt;/p&gt; 
&lt;p&gt;*** Grok Build (xAI)&lt;/p&gt; 
&lt;p&gt;For [[&lt;a href=&quot;https://docs.x.ai/docs/overview&quot;&gt;https://docs.x.ai/docs/overview&lt;/a&gt;][Grok Build]], install the Grok CLI so =grok= is on =PATH= (the installer typically puts it at =~/.grok/bin=). Authenticate once via the CLI login flow (credentials live in =~/.grok/auth.json=).&lt;/p&gt; 
&lt;p&gt;Grok Build speaks ACP over stdio:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash grok agent stdio #+end_src&lt;/p&gt; 
&lt;p&gt;Optional flags (set via =agent-shell-xai-acp-command=):&lt;/p&gt; 
&lt;p&gt;#+begin_src bash grok agent -m grok-build stdio grok agent --always-approve stdio #+end_src&lt;/p&gt; 
&lt;p&gt;See also the [[&lt;a href=&quot;https://zed.dev/acp/agent/grok-build&quot;&gt;https://zed.dev/acp/agent/grok-build&lt;/a&gt;][Zed ACP registry listing]] for Grok Build.&lt;/p&gt; 
&lt;p&gt;*** Cursor&lt;/p&gt; 
&lt;p&gt;For Cursor agent, install the official [[&lt;a href=&quot;https://cursor.com/docs/cli&quot;&gt;https://cursor.com/docs/cli&lt;/a&gt;][Cursor CLI]] and ensure the =agent= executable is in PATH. =agent-shell= uses its official ACP server (=agent acp=).&lt;/p&gt; 
&lt;p&gt;A recent Cursor CLI is required (the =acp= subcommand was added in 2026). Older CLIs won&#39;t expose =agent acp=.&lt;/p&gt; 
&lt;p&gt;*** Kimi Code CLI&lt;/p&gt; 
&lt;p&gt;For Kimi Code CLI, install with:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash curl -L &lt;a href=&quot;http://code.kimi.com/install.sh&quot;&gt;code.kimi.com/install.sh&lt;/a&gt; | bash #+end_src&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://www.kimi.com/code&quot;&gt;https://www.kimi.com/code&lt;/a&gt; for details.&lt;/p&gt; 
&lt;p&gt;*** CodeBuddy&lt;/p&gt; 
&lt;p&gt;For CodeBuddy agent, install the CodeBuddy CLI and ensure ACP mode is available. For example:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash codebuddy --acp #+end_src&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://www.codebuddy.ai/docs/zh/ide/Getting-Started/Installation&quot;&gt;https://www.codebuddy.ai/docs/zh/ide/Getting-Started/Installation&lt;/a&gt; for details.&lt;/p&gt; 
&lt;p&gt;*** Kiro CLI&lt;/p&gt; 
&lt;p&gt;For Kiro CLI, install with:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash curl -fsSL &lt;a href=&quot;https://cli.kiro.dev/install&quot;&gt;https://cli.kiro.dev/install&lt;/a&gt; | bash #+end_src&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://kiro.dev/docs/cli/acp/&quot;&gt;https://kiro.dev/docs/cli/acp/&lt;/a&gt; for details.&lt;/p&gt; 
&lt;p&gt;*** Qwen Code&lt;/p&gt; 
&lt;p&gt;For Qwen Code, install with:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash npm install -g @qwen-code/qwen-code@latest #+end_src&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://github.com/QwenLM/qwen-code&quot;&gt;https://github.com/QwenLM/qwen-code&lt;/a&gt; for details.&lt;/p&gt; 
&lt;p&gt;*** Auggie&lt;/p&gt; 
&lt;p&gt;For Auggie CLI, install with:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash npm install -g @augmentcode/auggie #+end_src&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://docs.augmentcode.com/cli/overview&quot;&gt;https://docs.augmentcode.com/cli/overview&lt;/a&gt; for details. *** Mistral Vibe&lt;/p&gt; 
&lt;p&gt;For Mistral Vibe, install with:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash uv tool install mistral-vibe #+end_src&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://github.com/mistralai/mistral-vibe&quot;&gt;https://github.com/mistralai/mistral-vibe&lt;/a&gt; for details.&lt;/p&gt; 
&lt;p&gt;*** Factory Droid&lt;/p&gt; 
&lt;p&gt;For Factory Droid, install Droid:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash curl -fsSL &lt;a href=&quot;https://app.factory.ai/cli&quot;&gt;https://app.factory.ai/cli&lt;/a&gt; | sh #+end_src&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://factory.ai&quot;&gt;https://factory.ai&lt;/a&gt; for details.&lt;/p&gt; 
&lt;p&gt;*** Pi&lt;/p&gt; 
&lt;p&gt;For Pi coding agent, install the =pi-acp= adapter:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash npm install -g pi-acp #+end_src&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://github.com/svkozak/pi-acp&quot;&gt;https://github.com/svkozak/pi-acp&lt;/a&gt; for details. *** Oh My Pi (=omp=)&lt;/p&gt; 
&lt;p&gt;For the =omp= agent, install with:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash bun install -g @oh-my-pi/pi-coding-agent #+end_src&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://github.com/can1357/oh-my-pi&quot;&gt;https://github.com/can1357/oh-my-pi&lt;/a&gt; for details.&lt;/p&gt; 
&lt;p&gt;*** Opencode + local ollama models&lt;/p&gt; 
&lt;p&gt;For opencode coding agent, install with:&lt;/p&gt; 
&lt;p&gt;#+begin_src bash curl -fsSL &lt;a href=&quot;https://opencode.ai/install&quot;&gt;https://opencode.ai/install&lt;/a&gt; | bash #+end_src&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://opencode.ai/&quot;&gt;https://opencode.ai/&lt;/a&gt; for details.&lt;/p&gt; 
&lt;p&gt;For local ollama models, sudo permission is needed to initialize ~ollama.service~. The following will install ollama and a local Qwen2.5:7b model.&lt;/p&gt; 
&lt;p&gt;#+begin_src bash curl -fsSL &lt;a href=&quot;https://ollama.com/install.sh&quot;&gt;https://ollama.com/install.sh&lt;/a&gt; | sh ollama pull qwen2.5:7b #+end_src&lt;/p&gt; 
&lt;p&gt;If you are behind a network proxy, ~ollama pull~ will timeout. You then need to add proxy settings inside ~/etc/systemd/system/ollama.service~&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://ollama.com/&quot;&gt;https://ollama.com/&lt;/a&gt; for details&lt;/p&gt; 
&lt;p&gt;** Installation&lt;/p&gt; 
&lt;p&gt;=agent-shell= is powered by built-in =comint-shell=, via [[&lt;a href=&quot;https://github.com/xenodium/shell-maker&quot;&gt;https://github.com/xenodium/shell-maker&lt;/a&gt;][shell-maker]], available on [[&lt;a href=&quot;https://melpa.org/#/shell-maker&quot;&gt;https://melpa.org/#/shell-maker&lt;/a&gt;][MELPA]].&lt;/p&gt; 
&lt;p&gt;Both [[&lt;a href=&quot;https://melpa.org/#/agent-shell&quot;&gt;https://melpa.org/#/agent-shell&lt;/a&gt;][agent-shell]] and its dependency [[&lt;a href=&quot;https://melpa.org/#/acp&quot;&gt;https://melpa.org/#/acp&lt;/a&gt;][acp.el]] are now available on MELPA.&lt;/p&gt; 
&lt;p&gt;You can install via:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (use-package agent-shell :ensure t :ensure-system-package ;; Add agent installation configs here ((claude . &quot;brew install claude-code&quot;) (claude-agent-acp . &quot;npm install -g @agentclientprotocol/claude-agent-acp&quot;))) #+end_src&lt;/p&gt; 
&lt;p&gt;This will automatically install the required dependencies ([[&lt;a href=&quot;https://melpa.org/#/acp&quot;&gt;https://melpa.org/#/acp&lt;/a&gt;][acp.el]] and [[&lt;a href=&quot;https://melpa.org/#/shell-maker&quot;&gt;https://melpa.org/#/shell-maker&lt;/a&gt;][shell-maker]]).&lt;/p&gt; 
&lt;p&gt;*** Optional: image utilities&lt;/p&gt; 
&lt;p&gt;Pasting images from the clipboard (=agent-shell-send-clipboard-image= or =yank= or =C-y=) and capturing screenshots (=agent-shell-send-screenshot=) rely on external tools. Install the ones for your platform:&lt;/p&gt; 
&lt;p&gt;| Platform | Clipboard paste | Screenshot capture | |-----------------+------------------------------------------+------------------------------| | macOS | =brew install pngpaste= | =screencapture= (preinstalled) | | Linux (Wayland) | =wl-paste= (e.g. =apt install wl-clipboard=) | =import= (from ImageMagick) | | Linux (X11) | =apt install xclip= | =import= (from ImageMagick) | | Windows | =powershell= | (not bundled) |&lt;/p&gt; 
&lt;p&gt;Handlers are detected at runtime via =executable-find=. See =agent-shell-clipboard-image-handlers= and =agent-shell-screenshot-command= to customize.&lt;/p&gt; 
&lt;p&gt;*** Doom Emacs&lt;/p&gt; 
&lt;p&gt;If you are using Doom Emacs and would like to use the =package!= macro:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (package! shell-maker) (package! acp) (package! agent-shell) #+end_src&lt;/p&gt; 
&lt;p&gt;Run =doom sync= and restart.&lt;/p&gt; 
&lt;p&gt;Include =require= before configuration:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (require &#39;acp) (require &#39;agent-shell) ;; rest of config... #+end_src&lt;/p&gt; 
&lt;p&gt;** Configuration&lt;/p&gt; 
&lt;p&gt;Configure authentication for the agent providers you want to use.&lt;/p&gt; 
&lt;p&gt;*** Environment variables&lt;/p&gt; 
&lt;p&gt;Pass environment variables to the spawned agent process by customizing the &lt;code&gt;agent-shell-*-environment&lt;/code&gt; variable with &lt;code&gt;agent-shell-make-environment-variables&lt;/code&gt;. The helper accepts key/value pairs and exports them when the agent starts.&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-anthropic-claude-environment (agent-shell-make-environment-variables &quot;ANTHROPIC_API_KEY&quot; (auth-source-pass-get &#39;secret &quot;anthropic-api-key&quot;) &quot;HTTPS_PROXY&quot; &quot;&lt;a href=&quot;http://proxy.example.com:8080&quot;&gt;http://proxy.example.com:8080&lt;/a&gt;&quot;)) #+end_src&lt;/p&gt; 
&lt;p&gt;**** Inheriting environment variables&lt;/p&gt; 
&lt;p&gt;By default, the agent process starts with a minimal environment. To inherit environment variables from the parent Emacs process, use the &lt;code&gt;:inherit-env t&lt;/code&gt; parameter in &lt;code&gt;agent-shell-make-environment-variables&lt;/code&gt;:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setenv &quot;ANTHROPIC_API_KEY&quot; (auth-source-pass-get &#39;secret &quot;anthropic-api-key&quot;))&lt;/p&gt; 
&lt;p&gt;(setq agent-shell-anthropic-claude-environment (agent-shell-make-environment-variables :inherit-env t)) #+end_src&lt;/p&gt; 
&lt;p&gt;This ensures that environment variables like &lt;code&gt;PATH&lt;/code&gt;, &lt;code&gt;HOME&lt;/code&gt;, and others from your Emacs session are available to the agent process, while still allowing you to override or add specific variables.&lt;/p&gt; 
&lt;p&gt;**** Loading environment variables from files&lt;/p&gt; 
&lt;p&gt;You can load environment variables from .env files using the &lt;code&gt;:load-env&lt;/code&gt; parameter. This supports both single and multiple files:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp ;; Load from a single .env file (setq agent-shell-anthropic-claude-environment (agent-shell-make-environment-variables :load-env &quot;~/.env&quot; &quot;CUSTOM_VAR&quot; &quot;custom_value&quot;))&lt;/p&gt; 
&lt;p&gt;;; Load from multiple .env files (setq agent-shell-anthropic-claude-environment (agent-shell-make-environment-variables :load-env &#39;(&quot;~/.env&quot; &quot;.env.local&quot;) :inherit-env t)) #+end_src&lt;/p&gt; 
&lt;p&gt;The .env files should contain variables in the format &lt;code&gt;KEY=value&lt;/code&gt;, with one variable per line. Comments (lines starting with &lt;code&gt;#&lt;/code&gt;) and empty lines are ignored.&lt;/p&gt; 
&lt;p&gt;*** Anthropic Claude&lt;/p&gt; 
&lt;p&gt;For login-based authentication (default):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-anthropic-authentication (agent-shell-anthropic-make-authentication :login t)) #+end_src&lt;/p&gt; 
&lt;p&gt;For API key authentication:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp ;; With string (setq agent-shell-anthropic-authentication (agent-shell-anthropic-make-authentication :api-key &quot;your-anthropic-api-key-here&quot;))&lt;/p&gt; 
&lt;p&gt;;; With function (setq agent-shell-anthropic-authentication (agent-shell-anthropic-make-authentication :api-key (lambda () (auth-source-pass-get &#39;secret &quot;anthropic-api-key&quot;)))) #+end_src&lt;/p&gt; 
&lt;p&gt;For OAuth token authentication (the =CLAUDE_CODE_OAUTH_TOKEN= we get from =claude setup-token=):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp ;; With string (setq agent-shell-anthropic-authentication (agent-shell-anthropic-make-authentication :oauth &quot;your-oauth-token-here&quot;))&lt;/p&gt; 
&lt;p&gt;;; With function (setq agent-shell-anthropic-authentication (agent-shell-anthropic-make-authentication :oauth (lambda () (auth-source-pass-get &quot;secret&quot; &quot;anthropic-oauth-token&quot;)))) #+end_src&lt;/p&gt; 
&lt;p&gt;For alternative Anthropic-compatible API endpoints, configure via environment variables:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-anthropic-claude-environment (agent-shell-make-environment-variables &quot;ANTHROPIC_BASE_URL&quot; &quot;&lt;a href=&quot;https://api.moonshot.cn/anthropic&quot;&gt;https://api.moonshot.cn/anthropic&lt;/a&gt;&quot; &quot;ANTHROPIC_MODEL&quot; &quot;kimi-k2-turbo-preview&quot; &quot;ANTHROPIC_SMALL_FAST_MODEL&quot; &quot;kimi-k2-turbo-preview&quot;)) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Google Gemini&lt;/p&gt; 
&lt;p&gt;For login-based authentication (default):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-google-authentication (agent-shell-google-make-authentication :login t)) #+end_src&lt;/p&gt; 
&lt;p&gt;For API key authentication:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp ;; With string (setq agent-shell-google-authentication (agent-shell-google-make-authentication :api-key &quot;your-google-api-key-here&quot;))&lt;/p&gt; 
&lt;p&gt;;; With function (setq agent-shell-google-authentication (agent-shell-google-make-authentication :api-key (lambda () (auth-source-pass-get &#39;secret &quot;google-api-key&quot;)))) #+end_src&lt;/p&gt; 
&lt;p&gt;For Vertex AI authentication:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-google-authentication (agent-shell-google-make-authentication :vertex-ai t)) #+end_src&lt;/p&gt; 
&lt;p&gt;*** OpenAI Codex&lt;/p&gt; 
&lt;p&gt;For login-based authentication (default):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-openai-authentication (agent-shell-openai-make-authentication :login t)) #+end_src&lt;/p&gt; 
&lt;p&gt;For API key authentication:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp ;; With string (setq agent-shell-openai-authentication (agent-shell-openai-make-authentication :api-key &quot;your-openai-api-key-here&quot;))&lt;/p&gt; 
&lt;p&gt;;; With function (setq agent-shell-openai-authentication (agent-shell-openai-make-authentication :api-key (lambda () (auth-source-pass-get &#39;secret &quot;openai-api-key&quot;)))) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Goose&lt;/p&gt; 
&lt;p&gt;By default, authentication is handled by Goose&#39;s built-in configuration. This needs no =agent-shell= configuration.&lt;/p&gt; 
&lt;p&gt;Optionally, pass an OpenAI API key from =agent-shell= instead:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp ;; With string (setq agent-shell-goose-authentication (agent-shell-make-goose-authentication :openai-api-key &quot;your-openai-api-key-here&quot;))&lt;/p&gt; 
&lt;p&gt;;; With function (setq agent-shell-goose-authentication (agent-shell-make-goose-authentication :openai-api-key (lambda () (auth-source-pass-get &#39;secret &quot;openai-api-key&quot;)))) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Qwen Code&lt;/p&gt; 
&lt;p&gt;For OAuth login-based authentication:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-qwen-authentication (agent-shell-qwen-make-authentication :login t)) #+end_src&lt;/p&gt; 
&lt;p&gt;For an OpenAI-compatible provider (for example OpenRouter), pass the API key and set the base URL and model via =agent-shell-qwen-environment=:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp ;; With string (setq agent-shell-qwen-authentication (agent-shell-qwen-make-authentication :openai-api-key &quot;your-openai-api-key-here&quot;))&lt;/p&gt; 
&lt;p&gt;;; With function (setq agent-shell-qwen-authentication (agent-shell-qwen-make-authentication :openai-api-key (lambda () (auth-source-pass-get &#39;secret &quot;openrouter-api-key&quot;))))&lt;/p&gt; 
&lt;p&gt;(setq agent-shell-qwen-environment (agent-shell-make-environment-variables &quot;OPENAI_BASE_URL&quot; &quot;&lt;a href=&quot;https://openrouter.ai/api/v1&quot;&gt;https://openrouter.ai/api/v1&lt;/a&gt;&quot; &quot;OPENAI_MODEL&quot; &quot;x-ai/grok-4.3&quot;)) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Cursor&lt;/p&gt; 
&lt;p&gt;By default authentication is handled externally: run =agent login= once outside Emacs and agent-shell uses that existing login (it sends no ACP authenticate request). This needs no configuration.&lt;/p&gt; 
&lt;p&gt;Optionally, have agent-shell drive login-based authentication (=cursor_login=):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-cursor-authentication (agent-shell-cursor-make-authentication :login t)) #+end_src&lt;/p&gt; 
&lt;p&gt;For API key authentication (passed via the =CURSOR_API_KEY= environment variable):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp ;; With string (setq agent-shell-cursor-authentication (agent-shell-cursor-make-authentication :api-key &quot;your-cursor-api-key-here&quot;))&lt;/p&gt; 
&lt;p&gt;;; With function (setq agent-shell-cursor-authentication (agent-shell-cursor-make-authentication :api-key (lambda () (auth-source-pass-get &#39;secret &quot;cursor-api-key&quot;)))) #+end_src&lt;/p&gt; 
&lt;p&gt;For auth token authentication (passed via the =CURSOR_AUTH_TOKEN= environment variable):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-cursor-authentication (agent-shell-cursor-make-authentication :auth-token &quot;your-cursor-auth-token&quot;)) #+end_src&lt;/p&gt; 
&lt;p&gt;For no authentication (already authenticated externally):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-cursor-authentication (agent-shell-cursor-make-authentication :none t)) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Auggie&lt;/p&gt; 
&lt;p&gt;For login-based authentication (default):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-auggie-authentication (agent-shell-make-auggie-authentication :login t)) #+end_src&lt;/p&gt; 
&lt;p&gt;For no authentication (when using alternative authentication methods):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-auggie-authentication (agent-shell-make-auggie-authentication :none t)) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Mistral Vibe&lt;/p&gt; 
&lt;p&gt;For API key authentication:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp ;; With string (setq agent-shell-mistral-authentication (agent-shell-mistral-make-authentication :api-key &quot;your-mistral-api-key-here&quot;))&lt;/p&gt; 
&lt;p&gt;;; With function (reusing the API key configured in vibe) (setq agent-shell-mistral-authentication (agent-shell-mistral-make-authentication :api-key (lambda () (string-trim (shell-command-to-string &quot;source ~/.vibe/.env; echo $MISTRAL_API_KEY&quot;))))) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Opencode + local ollama Qwen2.5&lt;/p&gt; 
&lt;p&gt;If ~opencode~ is not found by ~agent-shell~, you can add it to the search path&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (use-package agent-shell :ensure t :config (add-to-list &#39;exec-path &quot;~/.opencode/bin/&quot;)) #+end_src&lt;/p&gt; 
&lt;p&gt;To register the local Qwen2.5:7b model in opencode, two files needs to be edited:&lt;/p&gt; 
&lt;p&gt;~/.config/opencode/opencode.json~ #+BEGIN_SRC js { &quot;$schema&quot;: &quot;&lt;a href=&quot;https://opencode.ai/config.json&quot;&gt;https://opencode.ai/config.json&lt;/a&gt;&quot;, &quot;permission&quot;: { &quot;edit&quot;: &quot;ask&quot;, &quot;bash&quot;: &quot;ask&quot;, &quot;webfetch&quot;: &quot;allow&quot; }, &quot;provider&quot;: { &quot;ollama&quot;: { &quot;name&quot;: &quot;qwen2.5:7b&quot;, &quot;npm&quot;: &quot;@ai-sdk/openai-compatible&quot;, &quot;options&quot;: { &quot;baseURL&quot;: &quot;&lt;a href=&quot;http://localhost:11434/v1&quot;&gt;http://localhost:11434/v1&lt;/a&gt;&quot; }, &quot;models&quot;: { &quot;qwen2.5:7b&quot;: { &quot;name&quot;: &quot;Qwen2.5 7b&quot; } } } } } #+END_SRC&lt;/p&gt; 
&lt;p&gt;and a dummy auth file ~/.local/share/opencode/auth.json~&lt;/p&gt; 
&lt;p&gt;#+begin_src js { &quot;ollama&quot;: { &quot;type&quot;: &quot;api&quot;, &quot;key&quot;: &quot;ollama&quot; } } #+end_src&lt;/p&gt; 
&lt;p&gt;Huge thanks for /gdindi/ for finding and and describing this in &lt;a href=&quot;https://github.com/xenodium/agent-shell/issues/526&quot;&gt;https://github.com/xenodium/agent-shell/issues/526&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;*** Customizing Available Agents&lt;/p&gt; 
&lt;p&gt;By default, =agent-shell= includes configurations for all supported agents (Claude Agent, Gemini CLI, Codex, Goose, Grok Build, Cursor, CodeBuddy, Qwen Code, and Auggie). You can customize which agents are available through the =agent-shell-agent-configs= variable.&lt;/p&gt; 
&lt;p&gt;** Usage&lt;/p&gt; 
&lt;p&gt;*** Quick Start&lt;/p&gt; 
&lt;p&gt;=M-x agent-shell= - Start or reuse any of the known agents.&lt;/p&gt; 
&lt;p&gt;You can select and start any of the known agent shells (see =agent-shell-agent-configs=) via the =agent-shell= interactive command and enables reusing existing shells when available. With a prefix argument (=C-u M-x agent-shell=), it forces starting a new shell session, thus instantiating multiple agent shells.&lt;/p&gt; 
&lt;p&gt;*** Viewport interaction&lt;/p&gt; 
&lt;p&gt;Viewport is an alternative interface for composing prompts and viewing one request/response interaction at a time. It uses a separate buffer named after its associated shell with =&quot; [viewport]&quot;= appended. This buffer switches between =agent-shell-viewport-edit-mode= while composing and =agent-shell-viewport-view-mode= while reading.&lt;/p&gt; 
&lt;p&gt;Use one of these entry points to create and initialize the viewport buffer:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;From an agent shell, type =C-c C-o= (=agent-shell-other-buffer=). At the live prompt this opens the viewport for composing; from an earlier interaction it opens the viewport at that interaction. Use =C-c C-o= again to return to the shell (=o= also works from viewport view mode).&lt;/li&gt; 
 &lt;li&gt;Run =M-x agent-shell-prompt-compose= to compose in a dedicated buffer. With the default configuration, =C-c C-c= sends or queues the prompt and dismisses the compose window.&lt;/li&gt; 
 &lt;li&gt;Set =agent-shell-prefer-viewport-interaction= to make the normal =agent-shell= command and related commands prefer the viewport:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setopt agent-shell-prefer-viewport-interaction t) #+end_src&lt;/p&gt; 
&lt;p&gt;In edit mode, =C-c C-c= sends or queues the prompt and switches to view mode when viewport interaction is preferred. Use =C-u C-c C-c= to send or queue while keeping the compose buffer open, =C-c C-p= to peek at the latest interaction without losing the draft, =C-c C-k= to cancel, and =C-c C-h= for help.&lt;/p&gt; 
&lt;p&gt;In view mode, use =r= to compose a reply, =R= to quote the response in a reply, =b= / =f= to move between interactions, =p= / =n= to move between items, =?= for help, and =q= to bury the viewport.&lt;/p&gt; 
&lt;p&gt;#+begin_quote [!NOTE]&lt;/p&gt; 
&lt;p&gt;Do not invoke =agent-shell-viewport-edit-mode= or =agent-shell-viewport-view-mode= directly in an agent shell buffer. They are major modes installed by the entry points above on the separate viewport buffer, not commands for converting the shell buffer. #+end_quote&lt;/p&gt; 
&lt;p&gt;*** Specific Agent Commands&lt;/p&gt; 
&lt;p&gt;Start a specific agent shell session directly:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;=M-x agent-shell-anthropic-start-claude-code= - Start a Claude Agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-auggie-start-agent= - Start an Auggie agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-codebuddy-start-agent= - Start a CodeBuddy agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-openai-start-codex= - Start a Codex agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-google-start-gemini= - Start a Gemini agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-goose-start-agent= - Start a Goose agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-xai-start-grok= - Start a Grok Build (xAI) agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-cursor-start-agent= - Start a Cursor agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-kiro-start-agent= - Start a Kiro CLI agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-mistral-start-vibe= - Start a Mistral Vibe agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-qwen-start= - Start a Qwen Code agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-droid-start-agent= - Start a Factory Droid agent session&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-pi-start-agent= - Start a Pi coding agent session&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;*** Setting a default agent for all new shells&lt;/p&gt; 
&lt;p&gt;You can set a default agent to use for all new shells started via =agent-shell= like so:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-preferred-agent-config (agent-shell-anthropic-make-claude-code-config)) #+end_src&lt;/p&gt; 
&lt;p&gt;Or by identifier (e.g. Grok Build):&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-preferred-agent-config &#39;grok-build) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Configuring MCP servers&lt;/p&gt; 
&lt;p&gt;You can configure MCP servers directly via =agent-shell=. This allows you to avoid having to repeat configurations across every agent that you use.&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-mcp-servers &#39;(((name . &quot;notion&quot;) (type . &quot;http&quot;) (headers . []) (url . &quot;&lt;a href=&quot;https://mcp.notion.com/mcp&quot;&gt;https://mcp.notion.com/mcp&lt;/a&gt;&quot;)))) #+end_src&lt;/p&gt; 
&lt;p&gt;** Running agents in Devcontainers / Docker containers (Experimental)&lt;/p&gt; 
&lt;p&gt;=agent-shell= provides rudimentary support for running agents and shell commands in containers.&lt;/p&gt; 
&lt;p&gt;Use =agent-shell-command-prefix= to prefix the command that starts the agent, or a shell command that should be run so it is executed inside the container.&lt;/p&gt; 
&lt;p&gt;*** Static command list&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-command-prefix &#39;(&quot;devcontainer&quot; &quot;exec&quot; &quot;--workspace-folder&quot; &quot;.&quot;)) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Function-based configuration&lt;/p&gt; 
&lt;p&gt;For dynamic per-agent containers, provide a function that takes the current agent-shell buffer and returns the command list:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-command-prefix (lambda (buffer) (let ((config (agent-shell-get-config buffer))) (pcase (map-elt config :identifier) (&#39;claude-code &#39;(&quot;docker&quot; &quot;exec&quot; &quot;claude-dev&quot; &quot;--&quot;)) (&#39;gemini-cli &#39;(&quot;docker&quot; &quot;exec&quot; &quot;gemini-dev&quot; &quot;--&quot;)) (_ &#39;(&quot;devcontainer&quot; &quot;exec&quot; &quot;.&quot;)))))) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Per-session containers&lt;/p&gt; 
&lt;p&gt;You can use different containers for different shell sessions, even of the same agent type:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-command-prefix (lambda (buffer) ;; Different container based on project (if (string-match &quot;project-a&quot; (buffer-name buffer)) &#39;(&quot;docker&quot; &quot;exec&quot; &quot;project-a-dev&quot; &quot;--&quot;) &#39;(&quot;docker&quot; &quot;exec&quot; &quot;project-b-dev&quot; &quot;--&quot;)))) #+end_src&lt;/p&gt; 
&lt;p&gt;Note that any =:environment-variables= you may have passed to =acp-make-client= will not apply to the agent process running inside the container. It&#39;s expected to inject environment variables by means of your devcontainer configuration / Dockerfile.&lt;/p&gt; 
&lt;p&gt;Next, set an =agent-shell-path-resolver-function= that resolves container paths in the local working directory, and vice versa. Agent shell provides the =agent-shell-devcontainer-resolve-path= function for use with devcontainers specifically: it reads the =workspaceFolder= specified in =.devcontainer/devcontainer.json=, or uses the default value of =/workspaces/
 &lt;repository-name&gt;
  = otherwise.
 &lt;/repository-name&gt;&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-path-resolver-function #&#39;agent-shell-devcontainer-resolve-path) #+end_src&lt;/p&gt; 
&lt;p&gt;Note that this allows the agent to access files on your local file-system. While care has been taken to restrict access to files in the local working directory, it&#39;s probably possible for a malicious agent to circumvent this restriction.&lt;/p&gt; 
&lt;p&gt;Optional: to prevent the agent running inside the container to access your local file-system altogether and to have it read/modify files inside the container directly, in addition to setting the resolver function, disable the &quot;read/write text file&quot; client capabilities:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setq agent-shell-text-file-capabilities nil) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Data storage location&lt;/p&gt; 
&lt;p&gt;By default, agent-shell stores per-project data (transcripts, screenshots, etc.) under a =.agent-shell/= directory in the project root, and automatically adds that directory to =.gitignore= the first time it is created. This is a one-time operation: removing the entry from =.gitignore= will not cause it to be re-added. If you configure =agent-shell-dot-subdir-function= to store data outside the project =.agent-shell/= directory, agent-shell will not update the project&#39;s =.gitignore=.&lt;/p&gt; 
&lt;p&gt;You can change where this data is stored by setting =agent-shell-dot-subdir-function= to a custom function. The function receives one argument, SUBDIR (e.g. =&quot;screenshots&quot;=), and must return the absolute path to that subdirectory (without creating it).&lt;/p&gt; 
&lt;p&gt;For example, to store data under =user-emacs-directory= instead of the project tree, flattening the project path into a directory name:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (defun my/agent-shell-dot-subdir (subdir) (let* ((cwd (string-remove-suffix &quot;/&quot; (agent-shell-cwd))) (sanitized (replace-regexp-in-string &quot;/&quot; &quot;-&quot; (string-remove-prefix &quot;/&quot; cwd)))) (expand-file-name subdir (locate-user-emacs-file (concat &quot;agent-shell/&quot; sanitized)))))&lt;/p&gt; 
&lt;p&gt;(setopt agent-shell-dot-subdir-function #&#39;my/agent-shell-dot-subdir) #+end_src&lt;/p&gt; 
&lt;p&gt;This stores data at a path like =~/.emacs.d/agent-shell/home-user-src-myproject/screenshots/=.&lt;/p&gt; 
&lt;p&gt;*** Screenshots from clipboard&lt;/p&gt; 
&lt;p&gt;You can send a screenshot from your clipboard to your shell with =agent-shell-send-clipboard-image=. Call with =C-u= to =agent-shell-send-clipboard-image-to= to select from your shells. agent-shell relies on external programs to write an image from clipboard to file as configured in =agent-shell-clipboard-image-handlers=. Preconfigured handlers are&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;=wl-paste= for Wayland desktops,&lt;/li&gt; 
 &lt;li&gt;=xclip= for Xorg,&lt;/li&gt; 
 &lt;li&gt;=pngpaste= for MacOS.&lt;/li&gt; 
 &lt;li&gt;=powershell= for Windows.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;*** Inhibiting minor modes during file writes&lt;/p&gt; 
&lt;p&gt;Some minor modes (for example, =aggressive-indent-mode=) can interfere with an agent&#39;s edits. Agent Shell can temporarily disable selected per-buffer minor modes while applying edits.&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setopt agent-shell-write-inhibit-minor-modes &#39;(aggressive-indent-mode)) #+end_src&lt;/p&gt; 
&lt;p&gt;*** Keeping the system awake during long turns&lt;/p&gt; 
&lt;p&gt;Long agent turns can outlast the system idle-sleep timeout, suspending the machine (and the agent) before the turn completes. On Emacs 31.1 or later, =agent-shell-inhibit-system-sleep= (enabled by default) keeps the system awake for the duration of each turn and releases the block once the turn finishes, so the system is only kept awake while there is work in progress (the display is still allowed to blank). This relies on the built-in [[&lt;a href=&quot;https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/system-sleep.el&quot;&gt;https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/system-sleep.el&lt;/a&gt;][=system-sleep=]] library and has no effect on earlier Emacs versions. It does not prevent &quot;hard&quot; sleep such as closing a laptop lid.&lt;/p&gt; 
&lt;p&gt;To turn it off:&lt;/p&gt; 
&lt;p&gt;#+begin_src emacs-lisp (setopt agent-shell-inhibit-system-sleep nil) #+end_src&lt;/p&gt; 
&lt;p&gt;All of the above settings can be applied on a per-project basis using [[&lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html&quot;&gt;https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html&lt;/a&gt;][directory-local variables]].&lt;/p&gt; 
&lt;p&gt;** Key bindings&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;=RET= - Submits prompt.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=M-J= - Iserts newline.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=C-c C-c= - Interrupt current agent operation&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;=TAB and Shift-TAB= - Navigate interactive elements&lt;/p&gt; &lt;p&gt;To customize =RET= binding behaviour, you can use something like:&lt;/p&gt; &lt;p&gt;#+begin_src emacs-lisp :lexical no (use-package agent-shell :bind (:map agent-shell-mode-map (&quot;RET&quot; . newline) (&quot;M-RET&quot; . shell-maker-submit))) #+end_src&lt;/p&gt; &lt;p&gt;Or if you prefer C-c C-c to send and C-c C-k to interrupt, use the following:&lt;/p&gt; &lt;p&gt;#+begin_src emacs-lisp :lexical no (use-package agent-shell :bind (:map agent-shell-mode-map (&quot;RET&quot; . newline) (&quot;C-c C-c&quot; . shell-maker-submit) (&quot;C-c C-k&quot; . agent-shell-interrupt))) #+end_src&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;*** Session controls&lt;/p&gt; 
&lt;p&gt;When the active agent advertises the corresponding session option, you can switch it from the shell buffer:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;=C-c C-v= - Set model.&lt;/li&gt; 
 &lt;li&gt;=C-c C-m= - Set session mode.&lt;/li&gt; 
 &lt;li&gt;=C-c C-t= - Set thought level (reasoning effort).&lt;/li&gt; 
 &lt;li&gt;=C-
  &lt;tab&gt;
   = - Cycle session mode.
  &lt;/tab&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The current selections are shown in the header right after the agent name; click any segment to open a popup menu. The thought level segment only appears for models that expose it (e.g. Claude Sonnet/Opus with effort levels; Codex&#39;s reasoning_effort).&lt;/p&gt; 
&lt;p&gt;From the viewport (=agent-shell-viewport-view-mode= / =agent-shell-viewport-edit-mode=), the same controls are bound to:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;View mode: =v= (model), =s= (mode), =t= (thought level).&lt;/li&gt; 
 &lt;li&gt;Edit mode: =C-c C-v=, =C-c C-m=, =C-c C-t=.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;*** Evil Evil users may want to rebind ~RET~ for inserting a new line in =insert mode= and sending the prompt in =normal mode=.&lt;/p&gt; 
&lt;p&gt;Also, when viewing diffs (before accepting changes) it may be annoying having to enter =insert mode= to send keys (~y/n/p/q/etc~). If this is your case, you can make these buffers start in Emacs mode (you can always go to Evil modes if you need to with ~C-z~). #+begin_src emacs-lisp (use-package agent-shell :config ;; Evil state-specific RET behavior: insert mode = newline, normal mode = send (evil-define-key &#39;insert agent-shell-mode-map (kbd &quot;RET&quot;) #&#39;newline) (evil-define-key &#39;normal agent-shell-mode-map (kbd &quot;RET&quot;) #&#39;comint-send-input)&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;;; Configure *agent-shell-diff* buffers to start in Emacs state
(add-hook &#39;diff-mode-hook
    (lambda ()
      (when (string-match-p &quot;\\*agent-shell-diff\\*&quot; (buffer-name))
	(evil-emacs-state)))))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;#+end_src&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Customizations&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;#+BEGIN_SRC emacs-lisp :results table :colnames &#39;(&quot;Custom variable&quot; &quot;Description&quot;) :exports results (let ((rows)) (mapatoms (lambda (symbol) (when (and (string-match &quot;^agent-shell&quot; (symbol-name symbol)) (custom-variable-p symbol)) (push `(,symbol ,(car (split-string (or (documentation-property symbol &#39;variable-documentation) (get (indirect-variable symbol) &#39;variable-documentation) (get symbol &#39;variable-documentation) &quot;&quot;) &quot;\n&quot;))) rows)))) (sort rows (lambda (a b) (string&amp;lt; (symbol-name (car a)) (symbol-name (car b)))))) #+END_SRC&lt;/p&gt; 
&lt;p&gt;#+RESULTS: | Custom variable | Description | |-----------------------------------------------+---------------------------------------------------------------------------------| | agent-shell-activity-group-expand-by-default | When activity group sections should be expanded. | | agent-shell-agent-configs | The list of known agent configurations. | | agent-shell-anthropic-authentication | Configuration for Anthropic authentication. | | agent-shell-anthropic-claude-acp-command | Command and parameters for the Anthropic Claude client. | | agent-shell-anthropic-claude-command | Command and parameters for the Anthropic Claude client. | | agent-shell-anthropic-claude-environment | Environment variables for the Anthropic Claude client. | | agent-shell-anthropic-default-model-id | Default Anthropic model ID. | | agent-shell-anthropic-default-session-mode-id | Default Anthropic session mode ID. | | agent-shell-auggie-acp-command | Command and parameters for the Auggie client. | | agent-shell-auggie-authentication | Configuration for Auggie authentication. | | agent-shell-auggie-environment | Environment variables for the Auggie client. | | agent-shell-buffer-name-format | Format to use when generating agent shell buffer names. | | agent-shell-busy-indicator-frames | Frames for the busy indicator animation. | | agent-shell-clipboard-image-handlers | Handlers for saving clipboard images to a file. | | agent-shell-completion-mode-hook | Hook run after entering or leaving ‘agent-shell-completion-mode’. | | agent-shell-command-prefix | Command prefix for executing commands in a container. | | agent-shell-context-sources | Sources to consider when determining M-x agent-shell automatic context. | | agent-shell-cursor-acp-command | Command and parameters for the Cursor agent client. | | agent-shell-cursor-environment | Environment variables for the Cursor agent client. | | agent-shell-display-action | Display action for agent shell buffers. | | agent-shell-droid-acp-command | Command and parameters for the Factory Droid ACP client. | | agent-shell-droid-authentication | Configuration for Factory Droid authentication. | | agent-shell-droid-environment | Environment variables for the Factory Droid ACP client. | | agent-shell-embed-file-size-limit | Maximum file size in bytes for embedding with ContentBlock::Resource. | | agent-shell-file-completion-enabled | Non-nil automatically enables file completion when starting shells. | | agent-shell-github-acp-command | Command and parameters for the GitHub Copilot agent client. | | agent-shell-github-default-model-id | Default GitHub Copilot model ID. | | agent-shell-github-default-session-mode-id | Default GitHub Copilot session mode ID. | | agent-shell-github-environment | Environment variables for the GitHub Copilot agent client. | | agent-shell-google-authentication | Configuration for Google authentication. | | agent-shell-google-gemini-acp-command | Command and parameters for the Gemini client. | | agent-shell-google-gemini-environment | Environment variables for the Google Gemini client. | | agent-shell-goose-acp-command | Command and parameters for the Goose client. | | agent-shell-goose-authentication | Configuration for Goose authentication. | | agent-shell-goose-environment | Environment variables for the Goose client. | | agent-shell-header-style | Style for agent shell buffer headers. | | agent-shell-highlight-blocks | Whether or not to highlight source blocks. | | agent-shell-mcp-servers | List of MCP servers to initialize when creating a new session. | | agent-shell-mistral-acp-command | Command and parameters for the Mistral Vibe client. | | agent-shell-mistral-authentication | Configuration for Mistral AI authentication. | | agent-shell-mistral-default-model-id | Default Mistral AI model ID. | | agent-shell-mistral-default-session-mode-id | Default Mistral AI session mode ID. | | agent-shell-mistral-environment | Environment variables for the Mistral Vibe client. | | agent-shell-openai-authentication | Configuration for OpenAI authentication. | | agent-shell-openai-codex-acp-command | Command and parameters for the OpenAI Codex client. | | agent-shell-openai-codex-environment | Environment variables for the OpenAI Codex client. | | agent-shell-openai-default-model-id | Default Codex model ID. | | agent-shell-openai-default-session-mode-id | Default Codex session mode ID. | | agent-shell-opencode-acp-command | Command and parameters for the OpenCode client. | | agent-shell-opencode-authentication | Configuration for OpenCode authentication. | | agent-shell-opencode-default-model-id | Default OpenCode model ID. | | agent-shell-opencode-default-session-mode-id | Default OpenCode session mode ID. | | agent-shell-opencode-environment | Environment variables for the OpenCode client. | | agent-shell-path-resolver-function | Function for resolving remote paths on the local file-system, and vice versa. | | agent-shell-permission-icon | Icon displayed when shell commands require permission to execute. | | agent-shell-pi-acp-command | Command and parameters for the Pi ACP client. | | agent-shell-pi-environment | Environment variables for the Pi client. | | agent-shell-prefer-viewport-interaction | Non-nil makes ‘agent-shell’ prefer viewport interaction over shell interaction. | | agent-shell-preferred-agent-config | Default agent to use for all new shells. | | agent-shell-qwen-acp-command | Command and parameters for the Qwen Code client. | | agent-shell-qwen-authentication | Configuration for Qwen Code authentication. | | agent-shell-qwen-environment | Environment variables for the Qwen Code client. | | agent-shell-session-restore-verbosity | How much prior context to show when restoring a session. | | agent-shell-screenshot-command | The program to use for capturing screenshots. | | agent-shell-section-functions | Abnormal hook run after overlays are applied (experimental). | | agent-shell-session-strategy | How to handle sessions when starting a new shell. | | agent-shell-show-busy-indicator | Non-nil to show the busy indicator animation in the header and mode line. | | agent-shell-show-config-icons | Whether to show icons in agent config selection. | | agent-shell-show-context-usage-indicator | Non-nil to show the context usage indicator in the header and mode line. | | agent-shell-show-usage-at-turn-end | Whether to display usage information when agent turn ends. | | agent-shell-show-welcome-message | Non-nil to show welcome message. | | agent-shell-text-file-capabilities | Whether agents are initialized with read/write text file capabilities. | | agent-shell-thought-process-expand-by-default | Whether thought process sections should be expanded by default. | | agent-shell-thought-process-icon | Icon displayed during the AI’s thought process. | | agent-shell-tool-use-expand-by-default | Whether tool use sections should be expanded by default. | | agent-shell-transcript-file-path-function | Function to generate the full transcript file path. | | agent-shell-ui-mode-hook | Hook run after entering or leaving ‘agent-shell-ui-mode’. | | agent-shell-user-message-expand-by-default | Whether user message sections should be expanded by default. | | agent-shell-write-inhibit-minor-modes | List of minor mode commands to inhibit during ‘fs/write_text_file’ edits. | | agent-shell-xai-acp-command | Command and parameters for the Grok Build (xAI) ACP client. | | agent-shell-xai-default-model-id | Default Grok Build model ID. | | agent-shell-xai-default-session-mode-id | Default Grok Build session mode ID. | | agent-shell-xai-environment | Environment variables for the Grok Build ACP client. |&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Commands #+BEGIN_SRC emacs-lisp :results table :colnames &#39;(&quot;Binding&quot; &quot;Command&quot; &quot;Description&quot;) :exports results (let ((rows)) (mapatoms (lambda (symbol) (when (and (string-match &quot;^agent-shell&quot; (symbol-name symbol)) (commandp symbol)) (push `(,(string-join (seq-filter (lambda (symbol) (not (string-match &quot;menu&quot; symbol))) (mapcar (lambda (keys) (key-description keys)) (or (where-is-internal (symbol-function symbol) comint-mode-map nil nil (command-remapping &#39;comint-next-input)) (where-is-internal symbol agent-shell-mode-map nil nil (command-remapping symbol)) (where-is-internal (symbol-function symbol) agent-shell-mode-map nil nil (command-remapping symbol))))) &quot; or &quot;) ,(symbol-name symbol) ,(car (split-string (or (documentation symbol t) &quot;&quot;) &quot;\n&quot;))) rows)))) (sort rows (lambda (a b) (string&amp;lt; (cadr a) (cadr b))))) #+END_SRC&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;#+RESULTS: | Binding | Command | Description | |-----------------+---------------------------------------------------------+-------------------------------------------------------------------------------| | | agent-shell | Start or reuse an existing agent shell. | | | agent-shell--display-buffer | Toggle agent SHELL-BUFFER display. | | | agent-shell-anthropic-start-claude-code | Start an interactive Claude Agent shell. | | | agent-shell-auggie-start-agent | Start an interactive Auggie agent shell. | | | agent-shell-clear-buffer | Clear the current shell buffer. | | | agent-shell-completion-mode | Toggle agent shell completion with @ or / prefix. | | | agent-shell-cursor-start-agent | Start an interactive Cursor agent shell. | | C-
 &lt;tab&gt;
   | agent-shell-cycle-session-mode | Cycle through available session modes for the current 
  &lt;code&gt;agent-shell&#39; session. | | | agent-shell-delete-interaction-at-point | Delete interaction (request and response) at point. | | | agent-shell-droid-start-agent | Start an interactive Factory Droid agent shell. | | | agent-shell-fakes-load-session | Load and replay a traffic session from file. | | | agent-shell-github-start-copilot | Start an interactive GitHub Copilot agent shell. | | | agent-shell-google-start-gemini | Start an interactive Gemini CLI agent shell. | | | agent-shell-goose-start-agent | Start an interactive Goose agent shell. | | | agent-shell-help-menu | Transient menu for &lt;/code&gt;agent-shell&#39; commands. | | | agent-shell-insert-file | Insert a file into 
  &lt;code&gt;agent-shell&#39;. | | | agent-shell-insert-shell-command-output | Execute a shell command and insert output as a code block. | | C-c C-c | agent-shell-interrupt | Interrupt in-progress request and reject all pending permissions. | | | agent-shell-jump-to-latest-permission-button-row | Jump to the latest permission button row. | | | agent-shell-mistral-start-vibe | Start an interactive Mistral Vibe agent shell. | | | agent-shell-mode | Major mode for agent shell. | | | agent-shell-new-shell | Start a new agent shell. | | S-&amp;lt;return&amp;gt; | agent-shell-newline | Insert a newline, and move to left margin of the new line. | | C-&amp;lt;down&amp;gt; or M-n | agent-shell-next-input | Cycle forwards through input history. | | n or TAB | agent-shell-next-item | Go to next item. | | | agent-shell-next-permission-button | Jump to the next button. | | | agent-shell-open-transcript | Open the transcript file for the current &lt;/code&gt;agent-shell&#39; buffer. | | | agent-shell-openai-start-codex | Start an interactive Codex agent shell. | | | agent-shell-opencode-start-agent | Start an interactive OpenCode agent shell. | | C-c C-o | agent-shell-other-buffer | Switch to other associated buffer (viewport vs shell). | | C-
  &lt;up&gt;
    or M-p | agent-shell-previous-input | Cycle backwards through input history, saving input. | | p or 
   &lt;backtab&gt;
     | agent-shell-previous-item | Go to previous item. | | | agent-shell-previous-permission-button | Jump to the previous button. | | | agent-shell-prompt-compose | Compose an 
    &lt;code&gt;agent-shell&#39; prompt in a dedicated buffer. | | | agent-shell-prompt-queue | Queue or immediately send a prompt depending on shell busy state. | | | agent-shell-prompt-queue-remove | Remove all pending prompts or a specific prompt by REMOVE-INDEX. | | | agent-shell-prompt-queue-resume | Resume processing pending prompts in the queue. | | r | agent-shell-quote-region | Quote the active region into the shell&#39;s latest prompt. | | | agent-shell-qwen-start | Start an interactive Qwen Code CLI agent shell. | | C-x x r | agent-shell-rename-buffer | Rename current shell buffer. | | | agent-shell-reset-logs | Reset all log buffers. | | | agent-shell-run-all-tests | Run all agent-shell tests in batch mode. | | M-r | agent-shell-search-history | Search previous input history. | | | agent-shell-send-current-file | Insert a file into &lt;/code&gt;agent-shell&#39;. | | | agent-shell-send-dwim | Send region or error at point to last accessed shell buffer in project. | | | agent-shell-send-file | Insert a file into 
    &lt;code&gt;agent-shell&#39;. | | | agent-shell-send-other-file | Prompt to send a file into &lt;/code&gt;agent-shell&#39;. | | | agent-shell-send-region | Send region to last accessed shell buffer in project. | | | agent-shell-send-screenshot | Capture a screenshot and insert it into 
    &lt;code&gt;agent-shell&#39;. | | C-c RET | agent-shell-set-session-mode | Set session mode (if any available). | | C-c C-v | agent-shell-set-session-model | Set session model. | | RET | agent-shell-submit | Submit current input. | | | agent-shell-toggle | Toggle agent shell display. | | | agent-shell-toggle-logging | Toggle logging. | | | agent-shell-ui-backward-block | Jump to the previous block. | | | agent-shell-ui-forward-block | Jump to the next block. | | | agent-shell-ui-mode | Minor mode for SUI block navigation. | | | agent-shell-ui-toggle-fragment | Toggle fragment fold at or near point. | | | agent-shell-ui-toggle-all-fragments | Toggle global fold state: all-expanded ↔ all-collapsed. | | | agent-shell-version | Show &lt;/code&gt;agent-shell&#39; mode version. | | | agent-shell-view-acp-logs | View agent shell ACP logs buffer. | | | agent-shell-view-traffic | View agent shell traffic buffer. | | | agent-shell-viewport-compose-cancel | Cancel prompt composition. | | | agent-shell-viewport-compose-send | Send the viewport composed prompt to the agent shell. | | | agent-shell-viewport-compose-send-and-kill | Send the viewport composed prompt to the agent shell and kill compose buffer. | | | agent-shell-viewport-compose-send-and-wait-for-response | Send the viewport composed prompt and display response in viewport. | | | agent-shell-viewport-cycle-session-mode | Cycle through available session modes. | | | agent-shell-viewport-edit-mode | Major mode for composing agent shell prompts. | | | agent-shell-viewport-interrupt | Interrupt active agent shell request. | | | agent-shell-viewport-next-item | Go to next item. | | | agent-shell-viewport-next-page | Show next interaction (request / response). | | | agent-shell-viewport-previous-item | Go to previous item. | | | agent-shell-viewport-previous-page | Show previous interaction (request / response). | | | agent-shell-viewport-refresh | Refresh viewport buffer content with current item from shell. | | | agent-shell-viewport-reply | Reply as a follow-up and compose another prompt/query. | | | agent-shell-viewport-quote-reply | Reply with the entire response block-quoted. | | | agent-shell-viewport-set-session-mode | Set session mode. | | | agent-shell-viewport-set-session-model | Set session model. | | | agent-shell-viewport-view-last | Display the last request/response interaction. | | | agent-shell-viewport-view-mode | Major mode for viewing agent shell prompts (read-only). |
   &lt;/backtab&gt;
  &lt;/up&gt;
 &lt;/tab&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Filing issues When filing an issue, please keep the checkboxes from the [[&lt;a href=&quot;https://github.com/xenodium/agent-shell/raw/main/.github/ISSUE_TEMPLATE/issue.md&quot;&gt;https://github.com/xenodium/agent-shell/blob/main/.github/ISSUE_TEMPLATE/issue.md&lt;/a&gt;][issue template]] and check them off as applicable. They help ensure I have enough information to help.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Please read through this section before filing issues or feature requests. I won&#39;t be able to help unless I have enough information to help. This section shows how to get the details I need.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;em&gt;Versions&lt;/em&gt;: What version of =agent-shell=, =acp.el=, the ACP package (e.g. =claude-code-acp=), and the agent CLI (e.g. =claude=, =gemini=) are you running?&lt;/li&gt; 
 &lt;li&gt;&lt;em&gt;Steps to reproduce&lt;/em&gt;: What exact steps lead to the issue? Be specific about what you did and in what order.&lt;/li&gt; 
 &lt;li&gt;&lt;em&gt;ACP traffic&lt;/em&gt;: See [[&lt;a href=&quot;https://github.com/xenodium/agent-shell?tab=readme-ov-file#how-do-i-viewget-agent-client-protocol-traffic&quot;&gt;https://github.com/xenodium/agent-shell?tab=readme-ov-file#how-do-i-viewget-agent-client-protocol-traffic&lt;/a&gt;][how to get ACP traffic]] above. This is the most useful piece of information for diagnosing issues.&lt;/li&gt; 
 &lt;li&gt;&lt;em&gt;Screenshots&lt;/em&gt;: A screenshot helps correlate what you see with the protocol data.&lt;/li&gt; 
 &lt;li&gt;&lt;em&gt;Your agent-shell config&lt;/em&gt;: Share any relevant =agent-shell= variable settings from your Emacs config.&lt;/li&gt; 
 &lt;li&gt;&lt;em&gt;Profiling data&lt;/em&gt; (for performance issues): Use =M-x profiler-start=, reproduce the issue, then =M-x profiler-report= (and =M-x profiler-stop=). Share the report.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;ul&gt; 
 &lt;li&gt;FAQ&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;** Why doesn&#39;t =agent-shell= offer all slash commands/skills available in CLI agent?&lt;/p&gt; 
&lt;p&gt;=agent-shell= can only offer the slash commands/skills advertised by the agent via [[&lt;a href=&quot;https://agentclientprotocol.com&quot;&gt;https://agentclientprotocol.com&lt;/a&gt;][Agent Client Protocol]]. To view what&#39;s exposed by your agent, expand the &quot;Available /commands&quot; section. Is the command you&#39;re after missing? Please consider filing a feature-request with the respective agent (ie. Gemini CLI) or their ACP layer (claude-code-acp).&lt;/p&gt; 
&lt;p&gt;[[file:slash-commands.png]]&lt;/p&gt; 
&lt;p&gt;** Can you add support for another agent?&lt;/p&gt; 
&lt;p&gt;Does the agent support ACP ([[&lt;a href=&quot;https://agentclientprotocol.com&quot;&gt;https://agentclientprotocol.com&lt;/a&gt;][Agent Client Protocol]])? If so, =agent-shell= can likely support this agent. Some agents have ACP support built-in (like [[&lt;a href=&quot;https://github.com/google-gemini/gemini-cli&quot;&gt;https://github.com/google-gemini/gemini-cli&lt;/a&gt;][gemini-cli]]). Others require a separate ACP package (like [[&lt;a href=&quot;https://github.com/zed-industries/claude-code-acp&quot;&gt;https://github.com/zed-industries/claude-code-acp&lt;/a&gt;][claude-code-acp]] for [[&lt;a href=&quot;https://github.com/anthropics/claude-code&quot;&gt;https://github.com/anthropics/claude-code&lt;/a&gt;][claude-code]]). When filing a feature request to add a new agent, please include a link to the project supporting [[&lt;a href=&quot;https://agentclientprotocol.com&quot;&gt;https://agentclientprotocol.com&lt;/a&gt;][Agent Client Protocol]] (built-in or otherwise).&lt;/p&gt; 
&lt;p&gt;Agents without ACP support are out of scope for integrating with =agent-shell=. Having said that, if you do build an ACP layer like =claude-agent-acp=, then =agent-shell= can work with it.&lt;/p&gt; 
&lt;p&gt;** =agent-shell= not behaving as expected?&lt;/p&gt; 
&lt;p&gt;Could be the agent itself missing an [[&lt;a href=&quot;https://agentclientprotocol.com&quot;&gt;https://agentclientprotocol.com&lt;/a&gt;][Agent Client Protocol]] feature, =agent-shell= missing the feature, or both 😃 So which one is it? It&#39;s hard to tell unless we look at [[&lt;a href=&quot;https://agentclientprotocol.com&quot;&gt;https://agentclientprotocol.com&lt;/a&gt;][Agent Client Protocol]] traffic between the two.&lt;/p&gt; 
&lt;p&gt;** Is shx supported? No. There are reports that [[&lt;a href=&quot;https://github.com/xenodium/agent-shell/issues/543&quot;&gt;https://github.com/xenodium/agent-shell/issues/543&lt;/a&gt;][it does not work]] with agent-shell. ** How do I view/get [[&lt;a href=&quot;https://agentclientprotocol.com&quot;&gt;https://agentclientprotocol.com&lt;/a&gt;][Agent Client Protocol]] traffic?&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;=M-x agent-shell-toggle-logging= (make sure logging is ON).&lt;/li&gt; 
 &lt;li&gt;Reproduce the issue&lt;/li&gt; 
 &lt;li&gt;=M-x agent-shell-view-traffic=&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;Browse through traffic and see if you can spot the issue. For example, if you see a request sent by the agent asking for user permission, but =agent-shell= isn&#39;t surfacing this permission, it looks like perhaps =agent-shell= is missing a feature.&lt;/p&gt; 
&lt;p&gt;For example, here&#39;s what a [[&lt;a href=&quot;https://agentclientprotocol.com/protocol/schema#session%2Frequest-permission&quot;&gt;https://agentclientprotocol.com/protocol/schema#session%2Frequest-permission&lt;/a&gt;][session/request_permission]] request would look like from the traffic viewer.&lt;/p&gt; 
&lt;p&gt;[[file:traffic.png]]&lt;/p&gt; 
&lt;p&gt;Sometimes including a traffic screenshot in an issue is enough. Other times including the full traffic is needed. From the traffic viewer, you can =M-x acp-traffic-save-to= to save as =.traffic=.&lt;/p&gt; 
&lt;p&gt;** Where should I file bug or feature request?&lt;/p&gt; 
&lt;p&gt;*** Agent issues or feature requests&lt;/p&gt; 
&lt;p&gt;If you&#39;re able to determine the agent is missing a feature (or a bug is present) in their [[&lt;a href=&quot;https://agentclientprotocol.com&quot;&gt;https://agentclientprotocol.com&lt;/a&gt;][Agent Client Protocol]] implementation, please file an issue directly with the agent folks. For example:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/agentclientprotocol/claude-agent-acp&quot;&gt;https://github.com/agentclientprotocol/claude-agent-acp&lt;/a&gt;][claude-agent-acp]]: For Claude Agent.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/zed-industries/codex-acp&quot;&gt;https://github.com/zed-industries/codex-acp&lt;/a&gt;][codex-acp]]: For Codex.&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/google-gemini/gemini-cli&quot;&gt;https://github.com/google-gemini/gemini-cli&lt;/a&gt;][Gemini CLI]].&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://block.github.io/goose/docs/getting-started/installation&quot;&gt;https://block.github.io/goose/docs/getting-started/installation&lt;/a&gt;][Goose]].&lt;/li&gt; 
 &lt;li&gt;[[&lt;a href=&quot;https://github.com/QwenLM/qwen-code&quot;&gt;https://github.com/QwenLM/qwen-code&lt;/a&gt;][Qwen Code]].&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;*** =agent-shell= issues or feature requests&lt;/p&gt; 
&lt;p&gt;Alternatively, if you noticed =agent-shell= is missing a feature (or has a bug), please [[&lt;a href=&quot;https://github.com/xenodium/agent-shell/issues&quot;&gt;https://github.com/xenodium/agent-shell/issues&lt;/a&gt;][file an agent-shell issue]].&lt;/p&gt; 
&lt;p&gt;*** Not sure where to file an issue?&lt;/p&gt; 
&lt;p&gt;File [[&lt;a href=&quot;https://github.com/xenodium/agent-shell/issues&quot;&gt;https://github.com/xenodium/agent-shell/issues&lt;/a&gt;][in agent-shell]], but please try to provide details, so I can determine whether =agent-shell= or the agent itself needs work. Traffic data would be very useful here. Provide a screenshot or a .traffic file if you think it&#39;ll help. See [[&lt;a href=&quot;https://github.com/xenodium/agent-shell?tab=readme-ov-file#how-do-i-viewget-agent-client-protocol-traffic&quot;&gt;https://github.com/xenodium/agent-shell?tab=readme-ov-file#how-do-i-viewget-agent-client-protocol-traffic&lt;/a&gt;][how to get ACP traffic]].&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Contributing&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;See [[file:CONTRIBUTING.org][&lt;a href=&quot;http://CONTRIBUTING.org&quot;&gt;CONTRIBUTING.org&lt;/a&gt;]].&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Contributors&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;#+HTML: &lt;a href=&quot;https://github.com/xenodium/agent-shell/graphs/contributors&quot;&gt; #+HTML: &lt;img src=&quot;https://contrib.rocks/image?repo=xenodium/agent-shell&quot; /&gt; #+HTML: &lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;Made with [[&lt;a href=&quot;https://contrib.rocks&quot;&gt;https://contrib.rocks&lt;/a&gt;][contrib.rocks]].&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>protesilaos/modus-themes</title>
      <link>https://github.com/protesilaos/modus-themes</link>
      <description>&lt;p&gt;Highly accessible themes for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA).&lt;/p&gt;&lt;hr&gt;&lt;h1&gt;Modus themes for GNU Emacs&lt;/h1&gt; 
&lt;p&gt;IMAGES HERE: &lt;a href=&quot;https://protesilaos.com/emacs/modus-themes-pictures&quot;&gt;https://protesilaos.com/emacs/modus-themes-pictures&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;Highly accessible themes, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA). They also are optimised for users with red-green colour deficiency.&lt;/p&gt; 
&lt;p&gt;The themes are very customisable and provide support for a very wide range of packages. Their manual is detailed so that new users can get started, while it also provides custom code for all sorts of more advanced customisations.&lt;/p&gt; 
&lt;p&gt;Since August 2020, the original Modus themes (&lt;code&gt;modus-operandi&lt;/code&gt;, &lt;code&gt;modus-vivendi&lt;/code&gt;) are built into Emacs version 28 or higher. Emacs 28 ships with &lt;code&gt;modus-themes&lt;/code&gt; version &lt;code&gt;1.6.0&lt;/code&gt;. Emacs 29 includes version &lt;code&gt;3.0.0&lt;/code&gt;. Emacs 30 provides a newer, refactored version that thoroughly refashions how the themes are implemented and customized. Such major versions are not backward-compatible due to the limited resources at my disposal to support multiple versions of Emacs and of the themes across the years.&lt;/p&gt; 
&lt;p&gt;Starting with version &lt;code&gt;5.0.0&lt;/code&gt; of the &lt;code&gt;modus-themes&lt;/code&gt;, other packages can be built on top to provide their own &quot;Modus&quot; derivative themes. The manual has a section about building on top of Modus. My &lt;code&gt;ef-themes&lt;/code&gt; and &lt;code&gt;standard-themes&lt;/code&gt; are done in this way (versions &lt;code&gt;2.0.0&lt;/code&gt; and &lt;code&gt;3.0.0&lt;/code&gt;, respectively).&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Package name (GNU ELPA): &lt;code&gt;modus-themes&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;Official manual: &lt;a href=&quot;https://protesilaos.com/emacs/modus-themes&quot;&gt;https://protesilaos.com/emacs/modus-themes&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;Change log: &lt;a href=&quot;https://protesilaos.com/emacs/modus-themes-changelog&quot;&gt;https://protesilaos.com/emacs/modus-themes-changelog&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;Colour palette: &lt;a href=&quot;https://protesilaos.com/emacs/modus-themes-colors&quot;&gt;https://protesilaos.com/emacs/modus-themes-colors&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;Sample pictures: &lt;a href=&quot;https://protesilaos.com/emacs/modus-themes-pictures&quot;&gt;https://protesilaos.com/emacs/modus-themes-pictures&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;Git repositories: 
  &lt;ul&gt; 
   &lt;li&gt;GitHub: &lt;a href=&quot;https://github.com/protesilaos/modus-themes&quot;&gt;https://github.com/protesilaos/modus-themes&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;GitLab: &lt;a href=&quot;https://gitlab.com/protesilaos/modus-themes&quot;&gt;https://gitlab.com/protesilaos/modus-themes&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;Backronym: My Old Display Unexpectedly Sharpened ... themes.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(use-package modus-themes
  :ensure t
  :demand t
  :init
  ;; Starting with version 5.0.0 of the `modus-themes&#39;, other packages
  ;; can be built on top to provide their own &quot;Modus&quot; derivatives.
  ;; For example, this is what I do with my `ef-themes&#39; and
  ;; `standard-themes&#39; (starting with versions 2.0.0 and 3.0.0,
  ;; respectively).
  ;;
  ;; The `modus-themes-include-derivatives-mode&#39; makes all Modus
  ;; commands that act on a theme consider all such derivatives, if
  ;; their respective packages are available and have been loaded.
  ;;
  ;; Note that those packages can even completely take over from the
  ;; Modus themes such that, for example, `modus-themes-rotate&#39; only
  ;; goes through the Ef themes (to this end, the Ef themes provide
  ;; the `ef-themes-take-over-modus-themes-mode&#39; and the Standard
  ;; themes have the `standard-themes-take-over-modus-themes-mode&#39;
  ;; equivalent).
  ;;
  ;; If you only care about the Modus themes, then (i) you do not need
  ;; to enable the `modus-themes-include-derivatives-mode&#39; and (ii) do
  ;; not install and activate those other theme packages.
  (modus-themes-include-derivatives-mode 1)
  :bind
  ((&quot;&amp;lt;f5&amp;gt;&quot; . modus-themes-rotate)
   (&quot;C-&amp;lt;f5&amp;gt;&quot; . modus-themes-select)
   (&quot;M-&amp;lt;f5&amp;gt;&quot; . modus-themes-load-random))
  :config
  ;; Your customizations here.  All customizations must evaluated
  ;; BEFORE loading the theme.
  (setq modus-themes-to-toggle &#39;(modus-operandi modus-vivendi)
        modus-themes-to-rotate modus-themes-items
        modus-themes-mixed-fonts t
        modus-themes-variable-pitch-ui t
        modus-themes-italic-constructs t
        modus-themes-bold-constructs t
        modus-themes-completions &#39;((t . (bold)))
        modus-themes-prompts &#39;(bold)
        modus-themes-headings
        &#39;((agenda-structure . (variable-pitch light 2.2))
          (agenda-date . (variable-pitch regular 1.3))
          (t . (regular 1.15))))

  (setq modus-themes-common-palette-overrides nil)

  ;; Finally, load your theme of choice (or a random one with
  ;; `modus-themes-load-random&#39;, `modus-themes-load-random-dark&#39;,
  ;; `modus-themes-load-random-light&#39;).
  (modus-themes-load-theme &#39;modus-operandi))
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Emacs themes based on Modus&lt;/h2&gt; 
&lt;p&gt;This is not an exhaustive list. You are welcome to add your package here. Newer projects are at the bottom and are added as I am made aware of them.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;ef-themes&lt;/code&gt; by Protesilaos &lt;a href=&quot;https://github.com/protesilaos/ef-themes&quot;&gt;https://github.com/protesilaos/ef-themes&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;standard-themes&lt;/code&gt; by Protesilaos &lt;a href=&quot;https://github.com/protesilaos/standard-themes&quot;&gt;https://github.com/protesilaos/standard-themes&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;modus-ewal-theme&lt;/code&gt; by Oliwier Czerwiński &lt;a href=&quot;https://github.com/deadendpl/modus-ewal-theme&quot;&gt;https://github.com/deadendpl/modus-ewal-theme&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;modus-flexoki&lt;/code&gt; by Derek Passen &lt;a href=&quot;https://github.com/dpassen/modus-flexoki&quot;&gt;https://github.com/dpassen/modus-flexoki&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;faff-theme&lt;/code&gt; (since version 4) by James Ferguson &lt;a href=&quot;https://github.com/WJCFerguson/emacs-faff-theme&quot;&gt;https://github.com/WJCFerguson/emacs-faff-theme&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;modus-catpuccin&lt;/code&gt; by Magnus Therning &lt;a href=&quot;https://gitlab.com/magus/modus-catppuccin&quot;&gt;https://gitlab.com/magus/modus-catppuccin&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;pixel-themes&lt;/code&gt; by Lucas &lt;a href=&quot;https://github.com/lucasobx/pixel-themes&quot;&gt;https://github.com/lucasobx/pixel-themes&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;modus-nordic&lt;/code&gt; (&lt;code&gt;modus-nordic-night&lt;/code&gt; and &lt;code&gt;modus-nordic-midnight&lt;/code&gt;) by Ashton Wiersdorf &lt;a href=&quot;https://codeberg.org/ashton314/modus-nordic-night&quot;&gt;https://codeberg.org/ashton314/modus-nordic-night&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;folio-theme&lt;/code&gt; by kn66 (nobu43) &lt;a href=&quot;https://github.com/kn66/folio-theme.el&quot;&gt;https://github.com/kn66/folio-theme.el&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;modus-alabaster&lt;/code&gt; by Derek Passen &lt;a href=&quot;https://github.com/dpassen/modus-alabaster&quot;&gt;https://github.com/dpassen/modus-alabaster&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Other Emacs packages based on Modus&lt;/h2&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;modus-themes-exporter&lt;/code&gt; by Protesilaos &lt;a href=&quot;https://github.com/protesilaos/modus-themes-exporter&quot;&gt;https://github.com/protesilaos/modus-themes-exporter&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Projects inspired by the Modus themes&lt;/h2&gt; 
&lt;p&gt;This is not an exhaustive list. You are welcome to add your project here.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;hugo-modus&lt;/code&gt; by Yejun Su is a theme for the Hugo static site generator: &lt;a href=&quot;https://github.com/goofansu/hugo-modus&quot;&gt;https://github.com/goofansu/hugo-modus&lt;/a&gt;. It uses colours from the Modus themes.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;modus-themes.nvim&lt;/code&gt; by Miika Nissi and others is a port for NeoVim: &lt;a href=&quot;https://github.com/miikanissi/modus-themes.nvim&quot;&gt;https://github.com/miikanissi/modus-themes.nvim&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;zed-modus-themes&lt;/code&gt; by Vitaly Slobodin is a port for the Zed editor: &lt;a href=&quot;https://github.com/vitallium/zed-modus-themes&quot;&gt;https://github.com/vitallium/zed-modus-themes&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;word-smith&lt;/code&gt; by Sadsnake1 is a distraction-free writing for Obsidian that includes ports of the Modus themes: &lt;a href=&quot;https://github.com/Sadsnake1/word-smith&quot;&gt;https://github.com/Sadsnake1/word-smith&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt;</description>
      
    </item>
    
    <item>
      <title>mhayashi1120/Emacs-wgrep</title>
      <link>https://github.com/mhayashi1120/Emacs-wgrep</link>
      <description>&lt;p&gt;Writable grep buffer and apply the changes to files&lt;/p&gt;&lt;hr&gt;&lt;h1&gt;wgrep.el&lt;/h1&gt; 
&lt;p&gt;&lt;a href=&quot;https://github.com/mhayashi1120/Emacs-wgrep/actions/workflows/test.yml&quot;&gt;&lt;img src=&quot;https://github.com/mhayashi1120/Emacs-wgrep/actions/workflows/test.yml/badge.svg?sanitize=true&quot; alt=&quot;CI&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;h2&gt;Summary:&lt;/h2&gt; 
&lt;p&gt;wgrep allows you to edit a grep buffer and apply those changes to the file buffer like &lt;code&gt;sed&lt;/code&gt; interactively. No need to learn sed script, just learn Emacs.&lt;/p&gt; 
&lt;h2&gt;Install:&lt;/h2&gt; 
&lt;p&gt;Put this file into load-path&#39;ed directory, and byte compile it if desired. And put the following expression into your ~/.emacs.&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;(require &#39;wgrep)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Usage:&lt;/h2&gt; 
&lt;p&gt;You can edit the text in the &lt;em&gt;grep&lt;/em&gt; buffer after typing &lt;code&gt;C-c C-p&lt;/code&gt; . After that the changed text is highlighted. The following keybindings are defined:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;C-c C-e&lt;/code&gt;: Apply the changes to file buffers.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;C-c C-u&lt;/code&gt;: All changes are unmarked and ignored.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;C-c C-d&lt;/code&gt;: Mark as delete to current line (including newline).&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;C-c C-r&lt;/code&gt;: Remove the changes in the region (these changes are not applied to the files. Of course, the remaining changes can still be applied to the files.)&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;C-c C-p&lt;/code&gt;: Toggle read-only area.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;C-c C-k&lt;/code&gt;: Discard all changes and exit.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;C-x C-q&lt;/code&gt;: Exit wgrep mode.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;To save all buffers that wgrep has changed, run&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code&gt;M-x wgrep-save-all-buffers
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt;To save buffer automatically when &lt;code&gt;wgrep-finish-edit&lt;/code&gt;.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code&gt;(setq wgrep-auto-save-buffer t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt;You can change the default key binding to switch to wgrep.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code&gt;(setq wgrep-enable-key &quot;r&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt;To apply all changes regardless of whether or not buffer is read-only.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code&gt;(setq wgrep-change-readonly-file t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h3&gt;Trivial features:&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;wdired.el like interface.&lt;/li&gt; 
 &lt;li&gt;Support GNU grep &lt;code&gt;--context&lt;/code&gt; (&lt;code&gt;-A&lt;/code&gt; &lt;code&gt;-B&lt;/code&gt; and &lt;code&gt;-C&lt;/code&gt;) option.&lt;/li&gt; 
 &lt;li&gt;Can handle too many files.&lt;/li&gt; 
 &lt;li&gt;Can handle newline insertion in &lt;em&gt;grep&lt;/em&gt; buffer.&lt;/li&gt; 
 &lt;li&gt;Delete whole line include newline.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Similar software:&lt;/h3&gt; 
&lt;p&gt;&lt;a href=&quot;https://www.gnu.org/software/sed/&quot;&gt;GNU sed&lt;/a&gt; &lt;a href=&quot;https://github.com/syohex/emacs-helm-ag&quot;&gt;helm-ag&lt;/a&gt; has a similar feature.&lt;/p&gt; 
&lt;h2&gt;History:&lt;/h2&gt; 
&lt;p&gt;This program was forked from Matsushita Akihisa&#39;s &lt;a href=&quot;http://www.bookshelf.jp/elc/grep-edit.el&quot;&gt;grep-edit.el v2.11&lt;/a&gt;. As this website is now inaccessible, &lt;a href=&quot;https://www.emacswiki.org/emacs/grep-edit.el&quot;&gt;emacswiki.org&#39;s&lt;/a&gt; copy may be consulted.&lt;/p&gt; 
&lt;p&gt;Imported version can be downloaded from this orphan commit: &lt;a href=&quot;https://github.com/mhayashi1120/Emacs-wgrep/tree/import-original-author/&quot;&gt;https://github.com/mhayashi1120/Emacs-wgrep/tree/import-original-author/&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;Following added implementations and differences.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Support GNU grep context option -A -B and -C&lt;/li&gt; 
 &lt;li&gt;Some bugfix. (wrong coloring text etc..)&lt;/li&gt; 
 &lt;li&gt;wdired.el like interface.&lt;/li&gt; 
 &lt;li&gt;Remove all advice.&lt;/li&gt; 
 &lt;li&gt;Bind to local variables. (grep-a-lot.el works well)&lt;/li&gt; 
 &lt;li&gt;After save buffer, colored face will be removed.&lt;/li&gt; 
 &lt;li&gt;Change face easy to see.&lt;/li&gt; 
 &lt;li&gt;Reinforce checking error.&lt;/li&gt; 
 &lt;li&gt;Support removing whole line include new-line.&lt;/li&gt; 
&lt;/ul&gt;</description>
      
    </item>
    
    <item>
      <title>radian-software/straight.el</title>
      <link>https://github.com/radian-software/straight.el</link>
      <description>&lt;p&gt;🍀 Next-generation, purely functional package manager for the Emacs hacker.&lt;/p&gt;&lt;hr&gt;&lt;p&gt;&lt;strong&gt;straight.el&lt;/strong&gt;: next-generation, purely functional package manager for the &lt;a href=&quot;https://www.gnu.org/software/emacs/&quot;&gt;Emacs&lt;/a&gt; hacker.&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;Please check out the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#faq&quot;&gt;FAQ&lt;/a&gt; and &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#news&quot;&gt;news&lt;/a&gt; 😃&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://gitter.im/radian-software/straight.el&quot;&gt;&lt;img src=&quot;https://badges.gitter.im/radian-software/straight.el.svg?sanitize=true&quot; alt=&quot;Gitter chat&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;!-- longlines-start --&gt; 
&lt;!-- toc --&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#features&quot;&gt;Features&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#guiding-principles&quot;&gt;Guiding principles&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#getting-started&quot;&gt;Getting started&lt;/a&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#debugging&quot;&gt;Debugging&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#install-packages&quot;&gt;Install packages&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#but-what-about-my-fork-of-obscure-el-package&quot;&gt;But what about my fork of (obscure .el package)?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#integration-with-use-package&quot;&gt;Integration with &lt;code&gt;use-package&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#edit-packages-locally&quot;&gt;Edit packages locally&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#automatic-repository-management&quot;&gt;Automatic repository management&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#configuration-reproducibility&quot;&gt;Configuration reproducibility&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#conceptual-overview&quot;&gt;Conceptual overview&lt;/a&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#tldr&quot;&gt;TL;DR&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#what-is-a-package&quot;&gt;What is a package?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#where-do-packages-come-from&quot;&gt;Where do packages come from?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#what-does-this-look-like-on-disk&quot;&gt;What does this look like on disk?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#where-do-repositories-come-from&quot;&gt;Where do repositories come from?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#what-does-it-mean-to-load-a-package&quot;&gt;What does it mean to load a package?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#where-do-recipes-come-from&quot;&gt;Where do recipes come from?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#what-happens-when-i-call-straight-use-package&quot;&gt;What happens when I call &lt;code&gt;straight-use-package&lt;/code&gt;?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#what-does-it-mean-to-register-a-package&quot;&gt;What does it mean to register a package?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#how-does-straightel-know-when-to-rebuild-packages&quot;&gt;How does &lt;code&gt;straight.el&lt;/code&gt; know when to rebuild packages?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#how-does-straightel-know-what-packages-are-installed&quot;&gt;How does &lt;code&gt;straight.el&lt;/code&gt; know what packages are installed?&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#comparison-to-other-package-managers&quot;&gt;Comparison to other package managers&lt;/a&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#tldr-1&quot;&gt;TL;DR&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#comparison-to-packageel&quot;&gt;Comparison to &lt;code&gt;package.el&lt;/code&gt;&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-straightel&quot;&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-packageel&quot;&gt;Advantages of &lt;code&gt;package.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#additional-notes&quot;&gt;Additional notes&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#comparison-to-quelpa&quot;&gt;Comparison to Quelpa&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-straightel-1&quot;&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-quelpa&quot;&gt;Advantages of Quelpa&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#additional-notes-1&quot;&gt;Additional notes&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#comparison-to-cask&quot;&gt;Comparison to Cask&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-straightel-2&quot;&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-cask&quot;&gt;Advantages of Cask&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#comparison-to-el-get&quot;&gt;Comparison to el-get&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-straightel-3&quot;&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-el-get&quot;&gt;Advantages of el-get&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#comparison-to-borg&quot;&gt;Comparison to Borg&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-straightel-4&quot;&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-borg&quot;&gt;Advantages of Borg&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#comparison-to-nix&quot;&gt;Comparison to Nix&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-straightel-5&quot;&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-nix&quot;&gt;Advantages of Nix&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#comparison-to-the-manual-approach&quot;&gt;Comparison to the manual approach&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-straightel-6&quot;&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-the-manual-approach&quot;&gt;Advantages of the manual approach&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#user-manual&quot;&gt;User manual&lt;/a&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#bootstrapping-straightel&quot;&gt;Bootstrapping &lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#installing-packages-programmatically&quot;&gt;Installing packages programmatically&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#installing-with-a-custom-recipe&quot;&gt;Installing with a custom recipe&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#additional-arguments-to-straight-use-package&quot;&gt;Additional arguments to &lt;code&gt;straight-use-package&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#variants-of-straight-use-package&quot;&gt;Variants of &lt;code&gt;straight-use-package&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#customizing-when-packages-are-built&quot;&gt;Customizing when packages are built&lt;/a&gt; 
      &lt;ul&gt; 
       &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#custom-or-manual-modification-detection&quot;&gt;Custom or manual modification detection&lt;/a&gt;&lt;/li&gt; 
       &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#summary-of-options-for-package-modification-detection&quot;&gt;Summary of options for package modification detection&lt;/a&gt; 
        &lt;ul&gt; 
         &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#find-at-startup&quot;&gt;&lt;code&gt;find-at-startup&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
         &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#check-on-save&quot;&gt;&lt;code&gt;check-on-save&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
         &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#watch-files&quot;&gt;&lt;code&gt;watch-files&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
        &lt;/ul&gt; &lt;/li&gt; 
      &lt;/ul&gt; &lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#customizing-how-packages-are-built&quot;&gt;Customizing how packages are built&lt;/a&gt; 
      &lt;ul&gt; 
       &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#autoload-generation&quot;&gt;Autoload generation&lt;/a&gt;&lt;/li&gt; 
       &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#byte-compilation&quot;&gt;Byte compilation&lt;/a&gt;&lt;/li&gt; 
       &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#native-compilation&quot;&gt;Native compilation&lt;/a&gt;&lt;/li&gt; 
       &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#symbolic-links&quot;&gt;Symbolic links&lt;/a&gt;&lt;/li&gt; 
      &lt;/ul&gt; &lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#customizing-how-packages-are-made-available&quot;&gt;Customizing how packages are made available&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#hooks-run-by-straight-use-package&quot;&gt;Hooks run by &lt;code&gt;straight-use-package&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-recipe-format&quot;&gt;The recipe format&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-backends&quot;&gt;Version-control backends&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#git-backend&quot;&gt;Git backend&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#recipe-lookup&quot;&gt;Recipe lookup&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#updating-recipe-repositories&quot;&gt;Updating recipe repositories&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#customizing-recipe-repositories&quot;&gt;Customizing recipe repositories&lt;/a&gt; 
      &lt;ul&gt; 
       &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#gnu-elpa&quot;&gt;GNU ELPA&lt;/a&gt;&lt;/li&gt; 
       &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#emacsmirror&quot;&gt;Emacsmirror&lt;/a&gt;&lt;/li&gt; 
       &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#defining-new-recipe-repositories&quot;&gt;Defining new recipe repositories&lt;/a&gt;&lt;/li&gt; 
      &lt;/ul&gt; &lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#overriding-recipes&quot;&gt;Overriding recipes&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#overriding-the-recipe-for-straightel&quot;&gt;Overriding the recipe for &lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#interactive-usage&quot;&gt;Interactive usage&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-operations&quot;&gt;Version control operations&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#lockfile-management&quot;&gt;Lockfile management&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-profile-system&quot;&gt;The profile system&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#packages-and-the-init-file&quot;&gt;Packages and the init-file&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#byte-compiling-the-init-file&quot;&gt;Byte-compiling the init-file&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#using-straightel-to-reproduce-bugs&quot;&gt;Using &lt;code&gt;straight.el&lt;/code&gt; to reproduce bugs&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#-in-other-packages&quot;&gt;... in other packages&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#-in-straightel-itself&quot;&gt;... in &lt;code&gt;straight.el&lt;/code&gt; itself&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#using-straightel-to-develop-packages&quot;&gt;Using &lt;code&gt;straight.el&lt;/code&gt; to develop packages&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#development-on-built-in-packages&quot;&gt;Development on built-in packages&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#development-on-gnu-elpa-packages&quot;&gt;Development on GNU ELPA packages&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#integration-with-other-packages&quot;&gt;Integration with other packages&lt;/a&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#integration-with-use-package-1&quot;&gt;Integration with &lt;code&gt;use-package&lt;/code&gt;&lt;/a&gt; 
      &lt;ul&gt; 
       &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#loading-packages-conditionally&quot;&gt;Loading packages conditionally&lt;/a&gt;&lt;/li&gt; 
      &lt;/ul&gt; &lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#integration-with-packageel&quot;&gt;&quot;Integration&quot; with &lt;code&gt;package.el&lt;/code&gt;&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#integration-with-flycheck&quot;&gt;Integration with Flycheck&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#integration-with-hydra&quot;&gt;Integration with Hydra&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#miscellaneous&quot;&gt;Miscellaneous&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#troubleshooting&quot;&gt;Troubleshooting&lt;/a&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#why-are-my-packages-alwaysnever-rebuilding&quot;&gt;Why are my packages always/never rebuilding?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#i-changed-something-but-straightel-is-still-using-the-old-value&quot;&gt;I changed something but &lt;code&gt;straight.el&lt;/code&gt; is still using the old value!&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#developer-manual&quot;&gt;Developer manual&lt;/a&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#low-level-functions&quot;&gt;Low-level functions&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#trivia&quot;&gt;Trivia&lt;/a&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#comments-and-docstrings&quot;&gt;Comments and docstrings&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#contributing&quot;&gt;Contributing&lt;/a&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#ci-administration&quot;&gt;CI administration&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#faq&quot;&gt;FAQ&lt;/a&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#my-init-time-got-slower&quot;&gt;My init time got slower&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#could-not-find-package-in-recipe-repositories&quot;&gt;&quot;Could not find package in recipe repositories&quot;&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#how-do-i-update-melpa-et-al&quot;&gt;How do I update MELPA et al.?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#my-use-package-form-isnt-working-properly&quot;&gt;My &lt;code&gt;use-package&lt;/code&gt; form isn&#39;t working properly&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#how-do-i-uninstall-a-package&quot;&gt;How do I uninstall a package?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-wrong-version-of-my-package-was-loaded&quot;&gt;The wrong version of my package was loaded&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#i-get-could-not-read-usernamepassword-errors&quot;&gt;I get &quot;could not read username/password&quot; errors&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#how-do-i-pin-package-versions-or-use-only-tagged-releases&quot;&gt;How do I pin package versions or use only tagged releases?&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#how-can-i-use-the-built-in-version-of-a-package&quot;&gt;How can I use the built-in version of a package?&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#news&quot;&gt;News&lt;/a&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jul-1-2025&quot;&gt;Jul 1, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jul-1-2025-1&quot;&gt;Jul 1, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jun-26-2025&quot;&gt;Jun 26, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jun-25-2025&quot;&gt;Jun 25, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jun-23-2025&quot;&gt;Jun 23, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jun-23-2025-1&quot;&gt;Jun 23, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jun-17-2025&quot;&gt;Jun 17, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jun-16-2025&quot;&gt;Jun 16, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jun-13-2025&quot;&gt;Jun 13, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jun-13-2025-1&quot;&gt;Jun 13, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jun-10-2025&quot;&gt;Jun 10, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#jun-9-2025&quot;&gt;Jun 9, 2025&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#apr-5-2025&quot;&gt;Apr 5, 2025&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;!-- tocstop --&gt; 
&lt;!-- longlines-stop --&gt; 
&lt;h2&gt;Features&lt;/h2&gt; 
&lt;ul&gt; 
 &lt;li&gt;Install Emacs packages listed on &lt;a href=&quot;http://melpa.org/#/&quot;&gt;MELPA&lt;/a&gt;, &lt;a href=&quot;https://elpa.gnu.org/&quot;&gt;GNU ELPA&lt;/a&gt;, or &lt;a href=&quot;https://emacsmirror.net/&quot;&gt;Emacsmirror&lt;/a&gt;, or provide your own recipes.&lt;/li&gt; 
 &lt;li&gt;Packages are cloned as Git (or other) repositories, not as opaque tarballs.&lt;/li&gt; 
 &lt;li&gt;Make changes to a package simply by editing its source code, no additional steps required. Contribute upstream just by pushing your changes.&lt;/li&gt; 
 &lt;li&gt;Powerful interactive workflows (with popups à la Magit) for performing bulk maintenance on the Git repositories for your packages.&lt;/li&gt; 
 &lt;li&gt;Save and load version lockfiles that ensure 100% reproducibility for your Emacs configuration. Package state is defined entirely by your init-file and (optional) lockfile, with no extra persistent data floating around.&lt;/li&gt; 
 &lt;li&gt;Specify package descriptions using a powerful format based on &lt;a href=&quot;https://github.com/melpa/melpa#recipe-format&quot;&gt;MELPA recipes&lt;/a&gt; (with a familiar but improved syntax).&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/jwiegley/use-package&quot;&gt;&lt;code&gt;use-package&lt;/code&gt;&lt;/a&gt; integration.&lt;/li&gt; 
 &lt;li&gt;Modular: you can install your packages manually and straight.el will load them for you. Or you can also have straight.el install your packages, while you provide the recipes explicitly. Or straight.el can also fetch recipes, if you want. Bulk repository management and package updates are also optional.&lt;/li&gt; 
 &lt;li&gt;Extensible APIs to add new recipe sources and version-control backends.&lt;/li&gt; 
 &lt;li&gt;The cleanest source code you&#39;ve ever seen. &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#comments-and-docstrings&quot;&gt;45%&lt;/a&gt; of &lt;code&gt;straight.el&lt;/code&gt; is comments and docstrings.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Note: &lt;code&gt;straight.el&lt;/code&gt; is a replacement for &lt;code&gt;package.el&lt;/code&gt;, &lt;strong&gt;not&lt;/strong&gt; &lt;code&gt;use-package&lt;/code&gt;. &lt;code&gt;use-package&lt;/code&gt; can be used with either &lt;code&gt;package.el&lt;/code&gt; or &lt;code&gt;straight.el&lt;/code&gt;.&lt;/p&gt; 
&lt;h2&gt;Guiding principles&lt;/h2&gt; 
&lt;ul&gt; 
 &lt;li&gt;Init-file and version lockfiles as the sole source of truth. No persistent state kept elsewhere.&lt;/li&gt; 
 &lt;li&gt;100% reproducible package management, accounting for changes in packages, recipe repositories, configuration, and the package manager itself.&lt;/li&gt; 
 &lt;li&gt;No support whatsoever for &lt;code&gt;package.el&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;Edit packages by editing their code, no extra steps required. Allow for manual version control operations.&lt;/li&gt; 
 &lt;li&gt;Compatibility with MELPA, GNU ELPA, and Emacsmirror.&lt;/li&gt; 
 &lt;li&gt;Trivial to quickly try out a package without permanently installing it.&lt;/li&gt; 
 &lt;li&gt;Good for reproducing an issue with &lt;code&gt;emacs -Q&lt;/code&gt;.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Getting started&lt;/h2&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;strong&gt;Note: &lt;code&gt;straight.el&lt;/code&gt; supports a minimum version of Emacs 25.1, and works on macOS, Windows, and most flavors of Linux. You must install &lt;a href=&quot;https://git-scm.com/&quot;&gt;Git&lt;/a&gt; in order to use &lt;code&gt;straight.el&lt;/code&gt;.&lt;/strong&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;First, place the following bootstrap code in your init-file:&lt;/p&gt; 
&lt;!-- longlines-start --&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name
        &quot;straight/repos/straight.el/bootstrap.el&quot;
        (or (bound-and-true-p straight-base-dir)
            user-emacs-directory)))
      (bootstrap-version 7))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         &quot;https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el&quot;
         &#39;silent &#39;inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil &#39;nomessage))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;(If &lt;code&gt;raw.githubusercontent.com&lt;/code&gt; is blocked by your ISP, try replacing the URL with &lt;code&gt;https://radian-software.github.io/straight.el/install.el&lt;/code&gt;. Or you can clone &lt;code&gt;straight.el&lt;/code&gt; manually to &lt;code&gt;~/.emacs.d/straight/repos/straight.el&lt;/code&gt;.)&lt;/p&gt; 
&lt;!-- longlines-stop --&gt; 
&lt;p&gt;Here are some variables you may be interested in (some of them must be set &lt;strong&gt;before&lt;/strong&gt; the bootstrap code runs, if they might affect how &lt;code&gt;straight.el&lt;/code&gt; itself is loaded - see the &lt;code&gt;:set&lt;/code&gt; option on any &lt;code&gt;defcustom&lt;/code&gt; in &lt;code&gt;straight.el&lt;/code&gt; source code for specific information about when the option needs to be set):&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#overriding-the-recipe-for-straightel&quot;&gt;&lt;code&gt;straight-repository-branch&lt;/code&gt;&lt;/a&gt; -- to get the latest version of &lt;code&gt;straight.el&lt;/code&gt; from the &lt;code&gt;develop&lt;/code&gt; branch, rather than the default &lt;code&gt;main&lt;/code&gt; which is updated less frequently but which is ostensibly more stable.&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#customizing-when-packages-are-built&quot;&gt;&lt;code&gt;straight-check-for-modifications&lt;/code&gt;&lt;/a&gt; -- to configure an alternate way for &lt;code&gt;straight.el&lt;/code&gt; to check for modifications made to package source code, rather than the default (which is 100% reliable, but has a minor cost to startup time).&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#integration-with-use-package-1&quot;&gt;&lt;code&gt;straight-use-package-by-default&lt;/code&gt;&lt;/a&gt; -- if you use &lt;a href=&quot;https://github.com/jwiegley/use-package&quot;&gt;&lt;code&gt;use-package&lt;/code&gt;&lt;/a&gt;, then this makes each &lt;code&gt;use-package&lt;/code&gt; form also invoke &lt;code&gt;straight.el&lt;/code&gt; to install the package, unless otherwise specified.&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#git-backend&quot;&gt;&lt;code&gt;straight-vc-git-default-protocol&lt;/code&gt;&lt;/a&gt; -- by default, &lt;code&gt;straight.el&lt;/code&gt; clones over HTTPS. If you need packages from private Git repositories in your configuration, then you might want to use SSH instead.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight-base-dir&lt;/code&gt; -- by default, straight&#39;s main directory, containing its build files and package repos, is located in &lt;code&gt;user-emacs-directory&lt;/code&gt;. You can change the location of straight&#39;s base directory via this variable.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight-build-dir&lt;/code&gt; -- by default, the directory in which packages are built is located at &lt;code&gt;straight-base-dir&lt;/code&gt;/build. Changing this variable will change the name of that directory and the name of the build cache file (unless &lt;code&gt;straight-build-cache-fixed-name&lt;/code&gt; is non-nil).&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight-use-version-specific-build-dir&lt;/code&gt; -- if non-nil, use an Emacs-version-specific &lt;code&gt;straight-build-dir&lt;/code&gt; directory to support running multiple versions of Emacs against the same &lt;code&gt;user-emacs-directory&lt;/code&gt;. There is a minor performance penalty on startup because &lt;code&gt;straight.el&lt;/code&gt; will not be byte-compiled.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;You should remove any code that relates to &lt;code&gt;package.el&lt;/code&gt;; for example, references to &lt;code&gt;package-initialize&lt;/code&gt;, &lt;code&gt;package-archives&lt;/code&gt;, and (if you&#39;re using &lt;a href=&quot;https://github.com/jwiegley/use-package&quot;&gt;&lt;code&gt;use-package&lt;/code&gt;&lt;/a&gt;) &lt;code&gt;:ensure&lt;/code&gt; or &lt;code&gt;use-package-always-ensure&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;Users of Emacs versions &amp;gt;= 27 will want to add:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq package-enable-at-startup nil)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;to their &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/emacs/Early-Init-File.html&quot;&gt;early init-file&lt;/a&gt; to prevent package.el loading packages prior to their init-file loading. Alternatively you can also remove &lt;code&gt;~/.emacs.d/elpa&lt;/code&gt;, which will have the same effect. If you do neither, &lt;code&gt;straight.el&lt;/code&gt; will signal a warning.&lt;/p&gt; 
&lt;p&gt;While it is technically possible to use both &lt;code&gt;package.el&lt;/code&gt; and &lt;code&gt;straight.el&lt;/code&gt; at the same time, there is no real reason to, and it might result in oddities like packages getting loaded more than once.&lt;/p&gt; 
&lt;h4&gt;Debugging&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;Sometimes, in a corporate environment, &lt;code&gt;url-retrieve-synchronously&lt;/code&gt; may not work and &lt;code&gt;straight.el&lt;/code&gt; will be unable to download the installation script mentioned in the bootstrap snippet. In this case, you may simply clone this repository into &lt;code&gt;~/.emacs.d/straight/repos/straight.el&lt;/code&gt; and check out your desired revision/branch. The installation script is just a more convenient way of doing that automatically when necessary (and looking up the correct revision of &lt;code&gt;straight.el&lt;/code&gt; in your lockfile, if any).&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;On macOS, you may receive an error:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;Could not create connection to raw.githubusercontent.com:443
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;This is likely because you are using an ancient version of Emacs which has a broken TLS configuration. Upgrade with &lt;code&gt;brew upgrade emacs&lt;/code&gt;.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Install packages&lt;/h3&gt; 
&lt;p&gt;Out of the box, you can install any package listed on &lt;a href=&quot;http://melpa.org/#/&quot;&gt;MELPA&lt;/a&gt;, &lt;a href=&quot;https://elpa.gnu.org/&quot;&gt;GNU ELPA&lt;/a&gt;, or &lt;a href=&quot;https://emacsmirror.net/&quot;&gt;Emacsmirror&lt;/a&gt;, which is to say any package in existence. (Although MELPA is used as a package listing, packages are installed by cloning their Git repositories rather than by downloading tarballs like &lt;code&gt;package.el&lt;/code&gt; does.) To install a package temporarily (until you restart Emacs), run &lt;code&gt;M-x straight-use-package&lt;/code&gt; and select the package you want. To install a package permanently, place a call to &lt;code&gt;straight-use-package&lt;/code&gt; in your init-file, like:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;el-patch)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Note that installing a package will activate all of its autoloads, but it will not actually &lt;code&gt;require&lt;/code&gt; the features provided by the package. This means that you might need to use &lt;code&gt;require&lt;/code&gt; or &lt;code&gt;autoload&lt;/code&gt; for some antiquated packages that do not properly declare their autoloads.&lt;/p&gt; 
&lt;p&gt;To learn more, see the documentation on &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#installing-packages-programmatically&quot;&gt;the package lifecycle&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;But what about my fork of (obscure .el package)?&lt;/h3&gt; 
&lt;p&gt;Instead of passing just a package name to &lt;code&gt;straight-use-package&lt;/code&gt;, you can pass a list (&quot;recipe&quot;). You can see the default recipe for any given package by running &lt;code&gt;M-x straight-get-recipe&lt;/code&gt;. For example, the recipe for &lt;code&gt;el-patch&lt;/code&gt; is:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(el-patch :type git :host github :repo &quot;radian-software/el-patch&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;So, if you have forked &lt;code&gt;el-patch&lt;/code&gt; and you want to use your fork instead of the upstream, do:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package
 &#39;(el-patch :type git :host github :repo &quot;your-name/el-patch&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;In fact, &lt;code&gt;straight.el&lt;/code&gt; has explicit support for using a forked package, since this is so common:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package
 &#39;(el-patch :type git :host github :repo &quot;radian-software/el-patch&quot;
            :fork (:host github
                   :repo &quot;your-name/el-patch&quot;)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;In the above, &lt;code&gt;:type git&lt;/code&gt; may be omitted if you leave &lt;code&gt;straight-default-vc&lt;/code&gt; at its default value of &lt;code&gt;git&lt;/code&gt;. Parts of the &lt;code&gt;:fork&lt;/code&gt; keyword may be omitted as well. One common case is when your fork is on the same host and has the same name as the upstream repository. In this case, assuming &lt;code&gt;straight-host-usernames&lt;/code&gt; is set, specifying a fork is as simple as:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package
 &#39;(el-patch :type git :host github :repo &quot;radian-software/el-patch&quot;
            :fork t))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Note that &lt;code&gt;straight.el&lt;/code&gt; doesn&#39;t do any Git operations during startup unless it needs to clone a package from scratch. This is for performance. You can explicitly request for &lt;code&gt;straight.el&lt;/code&gt; to fix up the Git configuration after you change a package recipe, e.g. to add a fork. See &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#automatic-repository-management&quot;&gt;Automatic repository management&lt;/a&gt; below.&lt;/p&gt; 
&lt;p&gt;To learn more, see the documentation on &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-recipe-format&quot;&gt;the recipe format&lt;/a&gt; and &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#git-backend&quot;&gt;the Git backend&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;Integration with &lt;code&gt;use-package&lt;/code&gt;&lt;/h3&gt; 
&lt;p&gt;&lt;a href=&quot;https://github.com/jwiegley/use-package&quot;&gt;&lt;code&gt;use-package&lt;/code&gt;&lt;/a&gt; is a macro that provides convenient syntactic sugar for many common tasks related to installing and configuring Emacs packages. Of course, it does not actually install the packages, but instead defers to a package manager, like &lt;code&gt;straight.el&lt;/code&gt; (which comes with &lt;code&gt;use-package&lt;/code&gt; integration by default).&lt;/p&gt; 
&lt;p&gt;To use &lt;code&gt;use-package&lt;/code&gt;, first install it with &lt;code&gt;straight.el&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;use-package)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Now &lt;code&gt;use-package&lt;/code&gt; will use &lt;code&gt;straight.el&lt;/code&gt; to automatically install missing packages if you provide &lt;code&gt;:straight t&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package el-patch
  :straight t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;You can still provide a custom recipe for the package:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package el-patch
  :straight (el-patch :type git :host github :repo &quot;radian-software/el-patch&quot;
                      :fork (:host github
                             :repo &quot;your-name/el-patch&quot;)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The &lt;code&gt;:straight&lt;/code&gt; keyword accepts backquoted forms. This makes it possible to dynamically compute part of the recipe:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package el-patch
  :straight `(el-patch :type git
                       :repo ,(alist-get &#39;el-patch my-package-urls)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Specifying &lt;code&gt;:straight t&lt;/code&gt; is unnecessary if you set &lt;code&gt;straight-use-package-by-default&lt;/code&gt; to a non-nil value. (Note that the variable &lt;code&gt;use-package-always-ensure&lt;/code&gt; is associated with &lt;code&gt;package.el&lt;/code&gt;, and you should not use it with &lt;code&gt;straight.el&lt;/code&gt;.)&lt;/p&gt; 
&lt;p&gt;To learn more, see the documentation on &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#integration-with-use-package-1&quot;&gt;&lt;code&gt;straight.el&lt;/code&gt;&#39;s &lt;code&gt;use-package&lt;/code&gt; integration&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;Edit packages locally&lt;/h3&gt; 
&lt;p&gt;One of the biggest strengths of &lt;code&gt;straight.el&lt;/code&gt; is that editing packages locally is trivial. You literally just edit the files (&lt;code&gt;find-function&lt;/code&gt; and friends all work as you would expect). Packages will be automatically rebuilt if necessary when Emacs next starts up.&lt;/p&gt; 
&lt;p&gt;You can even commit your changes and push or pull to various remotes using Git. You have complete control over your packages&#39; Git repositories.&lt;/p&gt; 
&lt;p&gt;To learn more, see the documentation on &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#installing-packages-programmatically&quot;&gt;the package lifecycle&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;Automatic repository management&lt;/h3&gt; 
&lt;p&gt;While being able to make arbitrary changes to your packages is very powerful, it can also get tiring to keep track of the all those changes. For this reason, &lt;code&gt;straight.el&lt;/code&gt; provides a suite of powerful interactive workflows to perform bulk operations on your packages.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;To restore each package to its canonical state (a clean working directory with the main branch checked out, and the remotes set correctly), run &lt;code&gt;M-x straight-normalize-package&lt;/code&gt; or &lt;code&gt;M-x straight-normalize-all&lt;/code&gt;.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;To fetch from each package&#39;s configured remote, run &lt;code&gt;M-x straight-fetch-package-and-deps&lt;/code&gt; or &lt;code&gt;M-x straight-fetch-all&lt;/code&gt;; to also fetch from the upstream for forked packages, supply a prefix argument.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;To merge changes from each package&#39;s configured remote, run &lt;code&gt;M-x straight-merge-package-and-deps&lt;/code&gt; or &lt;code&gt;M-x straight-merge-all&lt;/code&gt;; to also merge from the upstream for forked packages, supply a prefix argument.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;To push all local changes to each package&#39;s configured remote, run &lt;code&gt;M-x straight-push-package&lt;/code&gt; or &lt;code&gt;M-x straight-push-all&lt;/code&gt;.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;All of these commands are highly interactive and ask you before making any changes. At any point, you can stop and perform manual operations with Magit or other tools in a recursive edit.&lt;/p&gt; 
&lt;p&gt;To learn more, see the documentation on &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-operations&quot;&gt;bulk repository management&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;Configuration reproducibility&lt;/h3&gt; 
&lt;p&gt;To save the currently checked out revisions of all of your packages, run &lt;code&gt;M-x straight-freeze-versions&lt;/code&gt;. The resulting file (&lt;code&gt;~/.emacs.d/straight/versions/default.el&lt;/code&gt;), together with your init-file, perfectly define your package configuration. Keep your version lockfile checked into version control; when you install your Emacs configuration on another machine, the versions of packages specified in your lockfile will automatically be checked out after the packages are installed. You can manually revert all packages to the revisions specified in the lockfile by running &lt;code&gt;M-x straight-thaw-versions&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;To learn more, see the documentation on &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#lockfile-management&quot;&gt;version lockfiles&lt;/a&gt;.&lt;/p&gt; 
&lt;h2&gt;Conceptual overview&lt;/h2&gt; 
&lt;p&gt;This section describes, at a high level, how the different mechanisms in &lt;code&gt;straight.el&lt;/code&gt; play together. This illustrates how &lt;code&gt;straight.el&lt;/code&gt; manages to accomplish all of its &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#guiding-principles&quot;&gt;guiding principles&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;TL;DR&lt;/h3&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; operates by cloning Git repositories and then symlinking files into Emacs&#39; load path. The collection of symlinked files constitutes the package, which is defined by its recipe. The recipe also describes which local repository to link the files from, and how to clone that repository, if it is absent.&lt;/p&gt; 
&lt;p&gt;When you call &lt;code&gt;straight-use-package&lt;/code&gt;, the recipe you provide is registered with &lt;code&gt;straight.el&lt;/code&gt; for future reference. Then the package&#39;s repository is cloned if it is absent, the package is rebuilt if its files have changed since the last build (as determined by &lt;code&gt;find(1)&lt;/code&gt;), and its autoloads are evaluated.&lt;/p&gt; 
&lt;p&gt;You can also provide only a package name, in which case the recipe will be looked up in one of several configurable recipe repositories, which are just packages themselves (albeit with the build step disabled).&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; determines which packages are installed solely by how and when &lt;code&gt;straight-use-package&lt;/code&gt; is invoked in your init-file.&lt;/p&gt; 
&lt;h3&gt;What is a package?&lt;/h3&gt; 
&lt;p&gt;A &lt;em&gt;package&lt;/em&gt; is a collection of Emacs Lisp (and possibly other) files. The most common case is just a single &lt;code&gt;.el&lt;/code&gt; file, but some packages have many &lt;code&gt;.el&lt;/code&gt; files, and some even have a directory structure.&lt;/p&gt; 
&lt;p&gt;Note that a package is defined only as a collection of files. It doesn&#39;t necessarily correspond to a Git repository, or an entry on MELPA, or anything like that. Frequently there is a relationship between all of these concepts, but that relationship does not always have to be direct or one-to-one.&lt;/p&gt; 
&lt;p&gt;A package also has a name, which must be unique. This is the name that is used for the folder holding the package&#39;s files. It is frequently the same as the name of a Git repository, or an entry on MELPA, but again this does not have to be the case.&lt;/p&gt; 
&lt;h3&gt;Where do packages come from?&lt;/h3&gt; 
&lt;p&gt;If you really wanted all of your packages to be unambiguously defined, you could just copy and paste all of their files into version control. But that would defeat the purpose of using a package manager like &lt;code&gt;straight.el&lt;/code&gt;. In &lt;code&gt;straight.el&lt;/code&gt;, packages are defined by two sources of information:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;a &lt;em&gt;local repository&lt;/em&gt;&lt;/li&gt; 
 &lt;li&gt;a &lt;em&gt;build recipe&lt;/em&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The local repository is just a directory containing some files. Of course, it also has a name, which may or may not be the same as the package&#39;s name. Frequently, the local repository is also a Git repository, but this is not necessary.&lt;/p&gt; 
&lt;p&gt;The build recipe is not a literal data structure. It is a concept that represents a certain subset of the package&#39;s recipe. Specifically, the &lt;code&gt;:files&lt;/code&gt;, &lt;code&gt;:local-repo&lt;/code&gt;, and &lt;code&gt;:build&lt;/code&gt; keywords.&lt;/p&gt; 
&lt;p&gt;To transform this &lt;em&gt;information&lt;/em&gt; into an actual package that Emacs can load, &lt;code&gt;straight.el&lt;/code&gt; &lt;em&gt;builds&lt;/em&gt; the package. This means that some symbolic links are created in the package&#39;s directory that point back into the local repository&#39;s directory. Exactly how these symlinks are created is determined by the &lt;code&gt;:files&lt;/code&gt; directive, and which local repository the symlinks point to is determined by the &lt;code&gt;:local-repo&lt;/code&gt; directive.&lt;/p&gt; 
&lt;p&gt;After the symlinks are created, the resulting files are byte-compiled, and their autoloads are generated and written into a file in the package&#39;s directory.&lt;/p&gt; 
&lt;p&gt;If &lt;code&gt;:build nil&lt;/code&gt; is specified, however, this entire process is skipped. This mechanism is used for recipe repositories.&lt;/p&gt; 
&lt;h3&gt;What does this look like on disk?&lt;/h3&gt; 
&lt;p&gt;The local repositories are kept in &lt;code&gt;~/.emacs.d/straight/repos&lt;/code&gt;, and the built packages are kept in &lt;code&gt;~/.emacs.d/straight/build&lt;/code&gt;. If you have initialized &lt;code&gt;straight.el&lt;/code&gt; and loaded package &lt;code&gt;el-patch&lt;/code&gt;, then your &lt;code&gt;~/.emacs.d/straight&lt;/code&gt; directory will look roughly like this (some irrelevant details have been omitted for pedagogical purposes):&lt;/p&gt; 
&lt;!-- longlines-start --&gt; 
&lt;pre&gt;&lt;code&gt;straight
├── build
│   ├── el-patch
│   │   ├── el-patch-autoloads.el
│   │   ├── el-patch.el -&amp;gt; ~/.emacs.d/straight/repos/el-patch/el-patch.el
│   │   └── el-patch.elc
│   └── straight
│       ├── straight-autoloads.el
│       ├── straight.el -&amp;gt; ~/.emacs.d/straight/repos/straight.el/straight.el
│       └── straight.elc
└── repos
    ├── el-patch
    │   ├── CHANGELOG.md
    │   ├── LICENSE.md
    │   ├── README.md
    │   └── el-patch.el
    └── straight.el
        ├── LICENSE.md
        ├── Makefile
        ├── README.md
        ├── bootstrap.el
        ├── install.el
        └── straight.el
&lt;/code&gt;&lt;/pre&gt; 
&lt;!-- longlines-stop --&gt; 
&lt;p&gt;As you can see, the package names are &lt;code&gt;el-patch&lt;/code&gt; and &lt;code&gt;straight&lt;/code&gt;. While &lt;code&gt;el-patch&lt;/code&gt; is built from a local repository of the same name, &lt;code&gt;straight&lt;/code&gt; is built from a local repository by the name &lt;code&gt;straight.el&lt;/code&gt;. Also note that only &lt;code&gt;.el&lt;/code&gt; files are symlinked, since only they are relevant to Emacs.&lt;/p&gt; 
&lt;h3&gt;Where do repositories come from?&lt;/h3&gt; 
&lt;p&gt;Local repositories provide a way to define packages without specifying the contents of all of their files explicitly. But that&#39;s not helpful without a higher-level way to define local repositories without specifying the contents of all of &lt;em&gt;their&lt;/em&gt; files. In &lt;code&gt;straight.el&lt;/code&gt;, local repositories are defined by two sources of information:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;a &lt;em&gt;fetch recipe&lt;/em&gt;&lt;/li&gt; 
 &lt;li&gt;the &lt;em&gt;version lockfiles&lt;/em&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The fetch recipe is, like the build recipe, a concept representing a certain subset of the package&#39;s overall recipe. The situation is more interesting here because &lt;code&gt;straight.el&lt;/code&gt; supports multiple version-control backends. The version-control backend specified by the fetch recipe is determined by the &lt;code&gt;:type&lt;/code&gt; directive (which defaults to &lt;code&gt;straight-default-vc&lt;/code&gt;). Each version-control backend then accepts some set of additional directives. For example, the &lt;code&gt;git&lt;/code&gt; backend accepts:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;:repo&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:host&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:branch&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:nonrecursive&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:fork&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:protocol&lt;/code&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;If a local repository is not present, then its fetch recipe describes how to obtain it. This is done using the &lt;code&gt;straight-vc-clone&lt;/code&gt; function, which delegates to one of the backend implementations of the &lt;code&gt;clone&lt;/code&gt; operation, according to &lt;code&gt;:type&lt;/code&gt;. (The option &lt;code&gt;:type built-in&lt;/code&gt; is a special case that results in all version-control operations for the package being ignored. You can also use &lt;code&gt;:type nil&lt;/code&gt; to accomplish the same, but with the difference that the package is still loaded from its specified &lt;code&gt;:local-repo&lt;/code&gt;.)&lt;/p&gt; 
&lt;p&gt;However, even with a particular repository source specified, there is still the question of which version of the repository to use. This is where the version lockfiles come in. When a local repository is cloned, the version lockfiles are searched to see if there is a particular commit specified for that local repository&#39;s name. If so, that commit is checked out. (For the &lt;code&gt;git&lt;/code&gt; backend, commits are 40-character strings representing SHA-1 hashes, but the representation of a commit identifier could be different across different backends.)&lt;/p&gt; 
&lt;p&gt;The &lt;code&gt;straight-freeze-versions&lt;/code&gt; and &lt;code&gt;straight-thaw-versions&lt;/code&gt; methods also use backend-delegating methods; in this case, they are &lt;code&gt;straight-vc-get-commit&lt;/code&gt; and &lt;code&gt;straight-vc-check-out-commit&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;The fetch recipe and version lockfiles, together with the configuration options for &lt;code&gt;straight.el&lt;/code&gt;, precisely define the state of a local repository. Of course, you may make any changes you want to the local repository. But this information defines a &quot;canonical&quot; state that you may revert to at any time.&lt;/p&gt; 
&lt;p&gt;When this information is combined with the build recipe, &lt;code&gt;straight.el&lt;/code&gt; is able to construct canonical, universal versions of your Emacs packages that will be the same everywhere and forever.&lt;/p&gt; 
&lt;p&gt;Note that you do not have to provide fetch recipes or version lockfiles. You may manage your local repositories manually, if you wish, although this has obvious disadvantages in terms of repeatability and maintainability.&lt;/p&gt; 
&lt;h3&gt;What does it mean to load a package?&lt;/h3&gt; 
&lt;p&gt;A prerequisite to loading a package is making sure the package has been built. After that is done, loading the package means adding its directory to the load path and evaluating its autoloads file.&lt;/p&gt; 
&lt;p&gt;Adding the directory to the load path means that you can use &lt;code&gt;require&lt;/code&gt; to load the package&#39;s files. Note that &lt;code&gt;straight.el&lt;/code&gt; does not do this for you, since loading packages immediately is usually not necessary and it immensely slows down Emacs startup.&lt;/p&gt; 
&lt;p&gt;Evaluating the autoloads file means that calling the functions that are defined in the autoloads file will automatically &lt;code&gt;require&lt;/code&gt; the files that define those functions. All modern packages define their functions in autoloads and are designed to be loaded on-demand when those functions are called. Antiquated packages may need you to explicitly define autoloads, or to just &lt;code&gt;require&lt;/code&gt; the package right away.&lt;/p&gt; 
&lt;h3&gt;Where do recipes come from?&lt;/h3&gt; 
&lt;p&gt;&lt;code&gt;straight-use-package&lt;/code&gt; does not require an actual recipe. You can just give it a package name, and it will look up the recipe. This is done using &lt;em&gt;recipe repositories&lt;/em&gt;. Recipe repositories are set up as a swappable backend system, much like the version-control backend system.&lt;/p&gt; 
&lt;p&gt;A recipe repository consists of four parts:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;a fetch recipe for the local repository (this will typically include &lt;code&gt;:build nil&lt;/code&gt;, since recipe repositories usually do not need to be built)&lt;/li&gt; 
 &lt;li&gt;a function that, provided the local repository is already available, returns a list of all packages that have recipes in the recipe repository&lt;/li&gt; 
 &lt;li&gt;a function that, given a package name, returns the recipe for that package, or nil if the recipe repository does not provide a recipe for the package&lt;/li&gt; 
 &lt;li&gt;an entry in &lt;code&gt;straight-recipe-repositories&lt;/code&gt; indicating that the recipe provided actually corresponds to a recipe repository (otherwise it would just be a regular package)&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Note that recipe repositories are implemented as regular packages! This means that all the usual package management operations work on them as well. It also means that you use &lt;code&gt;straight-use-package&lt;/code&gt; to register them (although typically you will provide arguments to &lt;code&gt;straight-use-package&lt;/code&gt; so that the recipe repository is only registered, and not cloned until it is needed; see &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#what-happens-when-i-call-straight-use-package&quot;&gt;the section on &lt;code&gt;straight-use-package&lt;/code&gt;&lt;/a&gt;).&lt;/p&gt; 
&lt;p&gt;If you give &lt;code&gt;straight-use-package&lt;/code&gt; just a package name, then each recipe repository in &lt;code&gt;straight-recipe-repositories&lt;/code&gt; is checked for a recipe for that package. Once one is found, it is used. Otherwise, an error is signaled (unless the package is built-in to Emacs, according to &lt;code&gt;package.el&lt;/code&gt;).&lt;/p&gt; 
&lt;p&gt;Note that &lt;code&gt;straight.el&lt;/code&gt; uses its own recipe format which is similar, but not identical, to the one used by MELPA (see &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-recipe-format&quot;&gt;the section on the recipe format&lt;/a&gt; for information on the differences). The recipe repository backends abstract over the formatting differences in different recipe sources to translate recipes into the uniform format used by &lt;code&gt;straight.el&lt;/code&gt;. When you run &lt;code&gt;M-x straight-get-recipe&lt;/code&gt;, the translated recipe is what is returned.&lt;/p&gt; 
&lt;h3&gt;What happens when I call &lt;code&gt;straight-use-package&lt;/code&gt;?&lt;/h3&gt; 
&lt;p&gt;There are three actions that &lt;code&gt;straight-use-package&lt;/code&gt; can take:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Register a package&#39;s recipe with &lt;code&gt;straight.el&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;Clone a package&#39;s local repository, if it is missing.&lt;/li&gt; 
 &lt;li&gt;Build a package, if it has been changed since the last time it was built, and load it.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;These actions must be performed in order. Depending on the arguments you pass to &lt;code&gt;straight-use-package&lt;/code&gt;, one, two, or all three may be performed.&lt;/p&gt; 
&lt;p&gt;The normal case is to do all three. The fetch recipe is only required if the local repository is actually missing, but the build recipe is always required.&lt;/p&gt; 
&lt;p&gt;Deferred installation can be accomplished by telling &lt;code&gt;straight-use-package&lt;/code&gt; to stop if the local repository is not already available. The deferred installation can be triggered by invoking &lt;code&gt;straight-use-package&lt;/code&gt; again, but telling it to go ahead and clone the repository (this is the default behavior). Because &lt;code&gt;straight-use-package&lt;/code&gt; already registered the package&#39;s recipe the first time, you don&#39;t have to provide it again.&lt;/p&gt; 
&lt;p&gt;In some extraordinary circumstances (such as when &lt;code&gt;straight.el&lt;/code&gt; is bootstrapping its own installation), it may be desirable to clone a package&#39;s local repository if it is missing, but to stop before building and loading the package. This can also be done by &lt;code&gt;straight-use-package&lt;/code&gt;.&lt;/p&gt; 
&lt;h3&gt;What does it mean to register a package?&lt;/h3&gt; 
&lt;p&gt;Package registration is the first action taken by &lt;code&gt;straight-use-package&lt;/code&gt;, before building and cloning. First, if only a package name was provided to &lt;code&gt;straight-use-package&lt;/code&gt;, a recipe is obtained from the configured recipe repositories. Next, the resulting recipe is recorded in various caches.&lt;/p&gt; 
&lt;p&gt;This is important, since it allows for several things to happen:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;if you later want to perform another operation on the package using &lt;code&gt;straight.el&lt;/code&gt;, you do not need to provide the recipe again&lt;/li&gt; 
 &lt;li&gt;if you use a custom recipe for Package A, and Package B requires Package A as a dependency, your custom recipe is remembered and re-used when Package A is used as a dependency, to avoid conflicts.&lt;/li&gt; 
 &lt;li&gt;when multiple packages are built from the same local repository, and you have specified a custom fetch recipe for one of those packages, &lt;code&gt;straight.el&lt;/code&gt; can intelligently merge that fetch recipe into the automatically retrieved recipes of dependencies, in order to avoid conflicts.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; knows which packages you have installed, if you want to perform interactive operations on them.&lt;/li&gt; 
 &lt;li&gt;if you accidentally provide two different recipes for the same package, &lt;code&gt;straight.el&lt;/code&gt; can issue a helpful warning, since this may lead to surprising behavior.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;How does &lt;code&gt;straight.el&lt;/code&gt; know when to rebuild packages?&lt;/h3&gt; 
&lt;p&gt;When you request for &lt;code&gt;straight.el&lt;/code&gt; to load a package (using &lt;code&gt;straight-use-package&lt;/code&gt;), it first checks if the package needs to be rebuilt. This means that some of the files in its local repository have been modified since the last time the package was built. &lt;code&gt;straight.el&lt;/code&gt; uses an optimized &lt;code&gt;find(1)&lt;/code&gt; command to check for package modifications, and it uses some caching mechanisms to perform bulk &lt;code&gt;find(1)&lt;/code&gt; operations on multiple packages, to speed up these checks (although it never performs optimizations that may result in erroneous behavior).&lt;/p&gt; 
&lt;p&gt;This check occurs during Emacs init, when your init-file makes calls to &lt;code&gt;straight-use-package&lt;/code&gt;. You may notice a significant delay on the first &lt;code&gt;straight-use-package&lt;/code&gt; call, because this is when &lt;code&gt;straight.el&lt;/code&gt; performs a bulk &lt;code&gt;find(1)&lt;/code&gt; call and caches the results for later usage (this speeds up init considerably). The total delay is likely to be on the order of 100ms for a double-digit number of packages.&lt;/p&gt; 
&lt;p&gt;The rebuild detection system is what allows for you to make changes to packages whenever you would like, without performing any additional operations.&lt;/p&gt; 
&lt;p&gt;(Packages are also rebuilt when their recipes change, of course.)&lt;/p&gt; 
&lt;h3&gt;How does &lt;code&gt;straight.el&lt;/code&gt; know what packages are installed?&lt;/h3&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; does not require you to declare a central list of packages anywhere, like Cask does. Instead, it determines what packages are to be loaded implicitly, by your invocations of &lt;code&gt;straight-use-package&lt;/code&gt; during Emacs initialization. Furthermore, &lt;code&gt;straight.el&lt;/code&gt; allows you to install packages after initialization using &lt;code&gt;M-x straight-use-package&lt;/code&gt; (or even by evaluating &lt;code&gt;straight-use-package&lt;/code&gt; forms). However, &lt;code&gt;straight.el&lt;/code&gt; still provides advanced features such as bulk package management and version locking. This creates some interesting challenges which other package managers do not have to deal with.&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; solves these problems using a concept called &lt;em&gt;transactions&lt;/em&gt;. The operation of the transaction system is mostly transparent to the user, at least in recent versions of &lt;code&gt;straight.el&lt;/code&gt;. Basically, it provides a way for &lt;code&gt;straight.el&lt;/code&gt; to keep track of what happens within a single user operation (e.g. evaluate a buffer of &lt;code&gt;straight-use-package&lt;/code&gt; calls, or load the init-file).&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; uses the transaction system to keep track of what packages you request in your init-file. If you invoke &lt;code&gt;straight-use-package&lt;/code&gt; interactively, then this invalidates that information, since you have now requested a package that is not in your init-file. For this reason, if you have invoked &lt;code&gt;straight-use-package&lt;/code&gt; interactively, running &lt;code&gt;M-x straight-freeze-versions&lt;/code&gt; will prompt you to first reload your init-file.&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;Note: reloading your init-file must have the effect of running all of the same &lt;code&gt;straight.el&lt;/code&gt;-related functions again. For example, if you bootstrap &lt;code&gt;straight.el&lt;/code&gt; in a sub-file that you only &lt;code&gt;require&lt;/code&gt; instead of &lt;code&gt;load&lt;/code&gt;, then the reloading functionality will not work correctly and you may receive the message &lt;code&gt;Caches are still outdated; something is seriously wrong&lt;/code&gt;. See &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/437&quot;&gt;#437&lt;/a&gt; for discussion.&lt;/strong&gt;&lt;/p&gt; 
&lt;h2&gt;Comparison to other package managers&lt;/h2&gt; 
&lt;p&gt;(Disclaimer: while I try to be as objective and comprehensive as possible here, I&#39;m obviously biased. Please submit corrections if I have unfairly disparaged your favorite package manager!)&lt;/p&gt; 
&lt;p&gt;There are many package managers for Emacs, ranging from simple scripts to download files from EmacsWiki to full-featured package management solutions like &lt;code&gt;straight.el&lt;/code&gt;. Here are the most feature-rich alternatives to &lt;code&gt;straight.el&lt;/code&gt;:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html&quot;&gt;&lt;code&gt;package.el&lt;/code&gt;&lt;/a&gt;: de facto standard, bundled with Emacs.&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/quelpa/quelpa&quot;&gt;Quelpa&lt;/a&gt;: allows you to use external sources like GitHub with &lt;code&gt;package.el&lt;/code&gt;. Essentially a local &lt;a href=&quot;http://melpa.org/#/&quot;&gt;MELPA&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/cask/cask&quot;&gt;Cask&lt;/a&gt;: another &lt;code&gt;package.el&lt;/code&gt; wrapper. Specify your dependencies in a &lt;code&gt;Cask&lt;/code&gt; file; can be used for project management or an Emacs configuration.&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/dimitri/el-get&quot;&gt;el-get&lt;/a&gt;: ridiculously OP in terms of how many different sources you can pull packages from (&lt;code&gt;package.el&lt;/code&gt;, every known VCS, distro package managers, &lt;code&gt;go get&lt;/code&gt;(!!)).&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;https://github.com/emacscollective/borg&quot;&gt;Borg&lt;/a&gt;: assimilates packages as Git submodules into &lt;code&gt;.emacs.d&lt;/code&gt;, relying on &lt;a href=&quot;https://emacsmirror.net/&quot;&gt;Emacsmirror&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;&quot;Screw package managers! I&#39;ll just handle it all myself!&quot;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;TL;DR&lt;/h3&gt; 
&lt;p&gt;Here is a summary of the main differences in philosophy between the package managers:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Use &lt;code&gt;package.el&lt;/code&gt; if you want package management to be as easy as possible, and do not much care for installing packages from specific sources, keeping track of their versions, or doing local development on them.&lt;/li&gt; 
 &lt;li&gt;Use Quelpa if you like &lt;code&gt;package.el&lt;/code&gt; but really wish you could specify the sources of your packages.&lt;/li&gt; 
 &lt;li&gt;Use Cask if you like &lt;code&gt;package.el&lt;/code&gt; but wish it came with some project management tools, as well.&lt;/li&gt; 
 &lt;li&gt;Use el-get if you want to easily install packages from as many different sources as possible.&lt;/li&gt; 
 &lt;li&gt;Use Borg if you like a more lightweight approach to package management that leverages existing solutions, if contributing changes to packages upstream is important to you, and if using Git submodules isn&#39;t a deal-breaker.&lt;/li&gt; 
 &lt;li&gt;Use the manual approach if you need to contribute changes to a package that is versioned in something other than Git.&lt;/li&gt; 
 &lt;li&gt;Use &lt;code&gt;straight.el&lt;/code&gt; if you like reproducibility in your Emacs configuration, you regularly contribute changes to packages upstream, or you are writing an Emacs configuration to be used by others.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;And here is a brief list of the main reasons you might not want to use &lt;code&gt;straight.el&lt;/code&gt;:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; is largely unusable if you do not have Git installed, although it is still possible to use the package-building features if you manage your repositories manually (you also cannot use the magic bootstrap snippet, in that case). If you don&#39;t want to install Git, you&#39;ll have to use &lt;code&gt;package.el&lt;/code&gt; or take the manual approach.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; is not built in to Emacs. If you want something that will work right out of the box, you&#39;re stuck with &lt;code&gt;package.el&lt;/code&gt; or the manual approach.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; takes a minute or two to update all your packages, since it does not rely on a centralized server. If you want quick update checking, you&#39;ll have to use &lt;code&gt;package.el&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; does not provide any user interface for package management. For that, you&#39;ll have to use &lt;code&gt;package.el&lt;/code&gt;, el-get, Cask, or Borg (which expects you to use &lt;a href=&quot;https://github.com/emacscollective/epkg&quot;&gt;&lt;code&gt;epkg&lt;/code&gt;&lt;/a&gt; for browsing packages).&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; does not currently support using only stable versions of packages (i.e. tagged revisions), although this is a &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/31&quot;&gt;planned feature&lt;/a&gt;. If this is important to you, you probably want to go with &lt;code&gt;package.el&lt;/code&gt; (with GNU ELPA and MELPA Stable), Cask, or Quelpa.&lt;/li&gt; 
 &lt;li&gt;If you don&#39;t like having to modify your init-file to do package management, then &lt;code&gt;straight.el&lt;/code&gt; is absolutely not for you. You want &lt;code&gt;package.el&lt;/code&gt;, Quelpa, el-get, or Borg.&lt;/li&gt; 
 &lt;li&gt;If you really want to contribute changes to packages that are not versioned in Git, then &lt;code&gt;straight.el&lt;/code&gt; will not help you. You&#39;ll have to manage the package&#39;s repository manually. Unfortunately, there is no existing package manager that supports both non-Git version-control systems and contributing changes upstream. You&#39;ll have to go with the manual approach.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; does not provide project management tools. It is a package manager. If you want project management tools, check out Cask.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; is quite new and moving fast. Things might break. The other package managers can generally be ranked as follows, from most active to least active: el-get, Quelpa, Borg, Cask, &lt;code&gt;package.el&lt;/code&gt; (glacial).&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Comparison to &lt;code&gt;package.el&lt;/code&gt;&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;package.el&lt;/code&gt; downloads pre-built packages from central servers using a special (undocumented?) HTTP protocol, while &lt;code&gt;straight.el&lt;/code&gt; clones Git (or other) repositories and builds packages locally.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to install a package from any branch of any Git repository. &lt;code&gt;package.el&lt;/code&gt; only allows you to install a package from a &lt;code&gt;package.el&lt;/code&gt;-compliant central server.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to check out any Git revision of any package. &lt;code&gt;package.el&lt;/code&gt; only allows you to install the latest version, and there is no way to downgrade.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; supports Emacsmirror, while &lt;code&gt;package.el&lt;/code&gt; does not.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; uses your init-file as the sole source of truth for package operations. &lt;code&gt;package.el&lt;/code&gt; loads every package you ever installed at startup, even if some of those packages are no longer referenced by your init-file.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; supports 100% reproducibility for your Emacs packages with version lockfiles. &lt;code&gt;package.el&lt;/code&gt; cannot provide reproducibility for the set of packages installed, the central servers they were installed from, or the versions in use.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to make arbitrary changes to your packages locally. While it is possible to make local changes to &lt;code&gt;package.el&lt;/code&gt; packages, these changes cannot be version-controlled and they will be silently overwritten whenever &lt;code&gt;package.el&lt;/code&gt; performs an update.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to perform arbitrary version-control operations on your package&#39;s Git repositories, including contributing changes upstream. &lt;code&gt;straight.el&lt;/code&gt; has explicit support for specifying both an upstream and a fork for a package. Contributing changes upstream with &lt;code&gt;package.el&lt;/code&gt; is impossible.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; is designed with &lt;code&gt;emacs -Q&lt;/code&gt; bug reports in mind. &lt;code&gt;package.el&lt;/code&gt; is unsuitable for minimal bug reproductions, since it automatically loads all of your packages on any package operation, even in &lt;code&gt;emacs -Q&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; operates quietly when all is going well. &lt;code&gt;package.el&lt;/code&gt; displays all messages, errors, and warnings that come from byte-compilation and autoload generation.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; considers modifying the user&#39;s init-file extremely uncouth. &lt;code&gt;package.el&lt;/code&gt; aggressively inserts (via Customize) auto-generated code setting &lt;code&gt;package-selected-packages&lt;/code&gt; into the init-file whenever a package is installed. Furthermore, &lt;code&gt;package.el&lt;/code&gt; has a history of impolite treatment of user configuration, which I think says some things about the design: until Emacs 27.1 (when &lt;a href=&quot;https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=24acb31c04b4048b85311d794e600ecd7ce60d3b&quot;&gt;my patch to fix this issue&lt;/a&gt; was adopted after around 300 emails&#39; worth of squabbling on emacs-devel), it also inserted a call to the &lt;code&gt;package-initialize&lt;/code&gt; function into the init-file if it was not already present, with the officially recommended workaround &quot;comment it out if you don&#39;t want it, but don&#39;t get rid of it&quot;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has a profile system that allows users of someone else&#39;s Emacs configuration to manage an additional subset of packages, or to override upstream package configuration, without forking the upstream. &lt;code&gt;package.el&lt;/code&gt; has no such concept.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; is developed openly on GitHub, using a modern &lt;a href=&quot;https://github.com/radian-software/straight.el/issues&quot;&gt;issue tracker&lt;/a&gt; and continuous integration from GitHub Actions. It welcomes contributions of any type. &lt;code&gt;straight.el&lt;/code&gt; is licensed under the permissive MIT license and does not require a copyright assignment. &lt;code&gt;straight.el&lt;/code&gt; is developed actively and has explicit support for installing development versions of itself, as well as for contributing upstream changes. &lt;code&gt;package.el&lt;/code&gt; is maintained as a part of Emacs core, meaning that the contribution process is poorly documented and discouraging. Releases of &lt;code&gt;package.el&lt;/code&gt; coincide with releases of Emacs, which are infrequent and inflexible. There is no issue tracker specifically for &lt;code&gt;package.el&lt;/code&gt;, only the Emacs bug tracker and the emacs-devel mailing list. Contributing to &lt;code&gt;package.el&lt;/code&gt; requires a poorly-documented, cumbersome copyright assignment process and is done by submitting patches to an antiquated mailing list, unsupported by modern code review tooling or continuous integration.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of &lt;code&gt;package.el&lt;/code&gt;&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;package.el&lt;/code&gt; does not require that you have Git installed, since the central server deals with where the packages originally came from. &lt;code&gt;straight.el&lt;/code&gt; cannot be used at all without Git.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;package.el&lt;/code&gt; is built in to Emacs and does not require additional configuration to get started with. &lt;code&gt;straight.el&lt;/code&gt; requires the use of a 10-line bootstrap snippet in your init-file.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;package.el&lt;/code&gt; can perform bulk package updates more quickly since it relies on central servers.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;package.el&lt;/code&gt; has a user interface for package management that also displays package metadata. &lt;code&gt;straight.el&lt;/code&gt; has no user interface for package management; any UI is provided by the user&#39;s &lt;code&gt;completing-read&lt;/code&gt; framework.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;package.el&lt;/code&gt; does not require you to touch your init-file to install packages, while &lt;code&gt;straight.el&lt;/code&gt; absolutely refuses to permanently install a package without an explicit reference to it in your init-file (although this may be considered an advantage, depending on your perspective).&lt;/li&gt; 
 &lt;li&gt;Using MELPA Stable, &lt;code&gt;package.el&lt;/code&gt; can install only stable versions of packages. By default, &lt;code&gt;package.el&lt;/code&gt; also installs only stable versions of packages from GNU ELPA. These modes of operation are unsupported by &lt;code&gt;straight.el&lt;/code&gt; at this time, although this is a &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/31&quot;&gt;planned feature&lt;/a&gt;.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Additional notes&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;package.el&lt;/code&gt; and &lt;code&gt;straight.el&lt;/code&gt; usually take approximately the same time to install packages, despite the fact that &lt;code&gt;straight.el&lt;/code&gt; is cloning entire Git repositories. This is because network latency and byte-compilation are the dominant factors.&lt;/li&gt; 
 &lt;li&gt;Some &lt;code&gt;package.el&lt;/code&gt; servers build packages from non-Git upstreams. &lt;code&gt;package.el&lt;/code&gt; can install these packages, while &lt;code&gt;straight.el&lt;/code&gt; cannot. However, since &lt;code&gt;package.el&lt;/code&gt; has no version-control support, this is more or less equivalent to installing those packages from the &lt;a href=&quot;https://emacsmirror.net/&quot;&gt;Emacsmirror&lt;/a&gt;, which &lt;code&gt;straight.el&lt;/code&gt; can do by default.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Comparison to Quelpa&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;Quelpa allows for fetching packages from arbitrary sources and building them into a format that can be installed by &lt;code&gt;package.el&lt;/code&gt;. &lt;code&gt;straight.el&lt;/code&gt; has a philosophy which is fundamentally incompatible with &lt;code&gt;package.el&lt;/code&gt;, and non-compatibility with &lt;code&gt;package.el&lt;/code&gt; is one of its design goals.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has out-of-the-box compatibility with MELPA, GNU ELPA, and Emacsmirror, while Quelpa only has support for MELPA. To use GNU ELPA, you must drop down to &lt;code&gt;package.el&lt;/code&gt;. &lt;a href=&quot;https://emacsmirror.net/&quot;&gt;Emacsmirror&lt;/a&gt; is not supported by default, although it is easy to specify an Emacsmirror repository in a recipe. While Quelpa allows you to specify custom recipe folders, it does not have support for cloning these folders automatically from version control, nor for generating the recipes in any way other than copying them literally from files. &lt;code&gt;straight.el&lt;/code&gt; allows you full flexibility in this regard.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has integrated support for selecting particular Git revisions of packages. This process is more manual in Quelpa, as it requires placing the commit hash into the recipe, which disables updates.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; uses your init-file as the sole source of truth for package operations. Since Quelpa is based on &lt;code&gt;package.el&lt;/code&gt;, it also loads every package you ever installed at startup, even if those packages are no longer referenced by your init-file. Furthermore, there is an additional caching layer, so that deleting a package from the &lt;code&gt;package.el&lt;/code&gt; interface and removing it from your init-file still does not actually delete it.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; supports 100% reproducibility for your Emacs packages with version lockfiles. Quelpa can theoretically provide some measure of reproducibility, but this requires significant manual effort since all packages are not associated with specific revisions by default, nor is the revision of MELPA saved anywhere.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to make arbitrary changes to your packages locally. While it is possible to make local changes to Quelpa packages, there are two places to do so: the built package, which is the default destination of &lt;code&gt;find-function&lt;/code&gt;, and the original repository. Changes to the former are not version-controlled and will be silently overwritten by &lt;code&gt;package.el&lt;/code&gt; operations, while changes to the latter will be silently overwritten by Quelpa operations.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has explicit support for configuring both an upstream repository and a fork for the same package. Quelpa does not have such a concept.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you complete control over how your repositories are managed, and the default behavior is to draw all packages versioned in a single repository from a single copy of that repository. Quelpa is hardcoded to require a separate repository for each package, so that installing Magit requires three copies of the Magit repository.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; builds packages using symlinks, meaning that &lt;code&gt;find-function&lt;/code&gt; works as expected. Quelpa builds packages by copying, a feature inherited from MELPA. This means that &lt;code&gt;find-function&lt;/code&gt; brings you to the built package, instead of the actual repository, which is not version-controlled and will be overwritten whenever &lt;code&gt;package.el&lt;/code&gt; performs an update.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to perform arbitrary version-control operations on your package&#39;s Git repositories. Quelpa allows this, but all local changes will be silently overridden whenever Quelpa performs an update.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; is designed with &lt;code&gt;emacs -Q&lt;/code&gt; bug reports in mind. Since Quelpa is based on &lt;code&gt;package.el&lt;/code&gt;, it is also unsuitable for minimal bug reproductions, since it automatically loads all of your packages on any package operation, even in &lt;code&gt;emacs -Q&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; operates quietly when all is going well. Since Quelpa is based on &lt;code&gt;package.el&lt;/code&gt;, it displays all messages, errors, and warnings that come from byte-compilation and autoload generation. It also displays additional messages while cloning Git repositories, downloading files, and building packages from their repositories into &lt;code&gt;package.el&lt;/code&gt; format.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; does not modify your init-file. Since Quelpa is based on &lt;code&gt;package.el&lt;/code&gt;, it inherits the behavior of aggressively inserting a call to &lt;code&gt;package-initialize&lt;/code&gt; into your init-file on any package management operation.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has a profile system that allows users of someone else&#39;s Emacs configuration to manage an additional subset of packages, or to override upstream package configuration, without forking the upstream. Quelpa has no such concept.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of Quelpa&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;Quelpa supports all the version-control systems supported by MELPA, which is to say almost every commonly and uncommonly used VCS. &lt;code&gt;straight.el&lt;/code&gt; only supports Git, although it is designed to support other version-control backends.&lt;/li&gt; 
 &lt;li&gt;Quelpa allows for installing only stable versions of packages, from any source. This mode of operation is unsupported by &lt;code&gt;straight.el&lt;/code&gt;, although it is a &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/31&quot;&gt;planned feature&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;Since Quelpa is based on &lt;code&gt;package.el&lt;/code&gt;, it inherits a user interface for package management that also displays package metadata. &lt;code&gt;straight.el&lt;/code&gt; has no such interface.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Additional notes&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; and Quelpa both allow you to manage your package&#39;s local repositories manually, if you wish.&lt;/li&gt; 
 &lt;li&gt;In principle, &lt;code&gt;straight.el&lt;/code&gt; and Quelpa have identical package installation times, since they are performing the same operations. In practice, Quelpa is slightly slower since it builds packages by copying rather than symlinking, and it clones multiple copies of the same Git repository when multiple packages are built from it.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; encourages you to keep a tight handle on your package versions by default. Quelpa encourages you to stick to the latest versions of your packages, and to upgrade them automatically.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Comparison to Cask&lt;/h3&gt; 
&lt;p&gt;I have not used Cask extensively, so please feel especially free to offer corrections for this section.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Cask installs packages using the &lt;code&gt;package.el&lt;/code&gt; protocol, based on a &lt;code&gt;Cask&lt;/code&gt; file written in the Cask DSL. &lt;code&gt;straight.el&lt;/code&gt; eschews &lt;code&gt;package.el&lt;/code&gt; entirely, and clones packages from source based on how you invoke &lt;code&gt;straight-use-package&lt;/code&gt; in your init-file.&lt;/li&gt; 
 &lt;li&gt;Cask focuses more on being a build manager, like Maven or Leiningen, while &lt;code&gt;straight.el&lt;/code&gt; focuses &lt;em&gt;exclusively&lt;/em&gt; on being a package manager.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has out-of-the-box compatibility with Emacsmirror, while Cask only supports &lt;code&gt;package.el&lt;/code&gt;-compliant repositories. However, it is easy to specify an Emacsmirror repository in a recipe. Cask does not support custom package sources. &lt;code&gt;straight.el&lt;/code&gt; supports MELPA, GNU ELPA, and Emacsmirror, and allows you to add any other sources you would like.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has integrated support for selecting particular Git revisions of packages. This process is more manual in Cask, as it requires placing the commit hash into the recipe, which disables updates.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; uses your init-file as the sole source of truth for package operations. Since Cask is based on &lt;code&gt;package.el&lt;/code&gt;, it loads every package you ever installed at startup, even if some of those packages are no longer referenced by your &lt;code&gt;Cask&lt;/code&gt; file.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; determines your package management configuration implicitly by detecting how you call &lt;code&gt;straight-use-package&lt;/code&gt; in your init-file and making the appropriate changes immediately. Cask requires manual intervention (for example, issuing a &lt;code&gt;cask install&lt;/code&gt; command when you have updated your &lt;code&gt;Cask&lt;/code&gt; file). However, both &lt;code&gt;straight.el&lt;/code&gt; and Cask can be considered declarative package managers.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; supports 100% reproducibility for your Emacs packages with version lockfiles. Cask can theoretically provide some measure of reproducibility, but this requires significant manual effort since all packages are not associated with specific revisions by default, nor is the revision of Cask saved anywhere.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to make arbitrary changes to your packages locally. While it is possible to make local changes to Cask packages, these will not be version-controlled and they will be silently overwritten or shadowed when Cask performs an update.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to perform arbitrary version-control operations on your package&#39;s Git repositories, including contributing changes upstream. &lt;code&gt;straight.el&lt;/code&gt; has explicit support for specifying both an upstream and a fork for a package. Contributing changes upstream with Cask is impossible.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; is designed with &lt;code&gt;emacs -Q&lt;/code&gt; bug reports in mind. Cask appears to be unsuitable for minimal bug reproductions, since there does not appear to be a straightforward way to load a single package, without loading all other packages configured in your &lt;code&gt;Cask&lt;/code&gt; file.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; operates quietly when all is going well. Since Cask is based on &lt;code&gt;package.el&lt;/code&gt;, it displays all messages, errors, and warnings that come from byte-compilation and autoload generation.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has a profile system that allows users of someone else&#39;s Emacs configuration to manage an additional subset of packages, or to override upstream package configuration, without forking the upstream. Cask has no such concept.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of Cask&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;Cask provides a useful toolbox of operations for project management, which are completely absent from &lt;code&gt;straight.el&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;Since Cask is based on &lt;code&gt;package.el&lt;/code&gt;, it does not require that you have Git installed. (It does require Python, however.) &lt;code&gt;straight.el&lt;/code&gt; is mostly unusable without Git.&lt;/li&gt; 
 &lt;li&gt;Since Cask is based on &lt;code&gt;package.el&lt;/code&gt;, it can perform bulk package updates more quickly than &lt;code&gt;straight.el&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;Since Cask is based on &lt;code&gt;package.el&lt;/code&gt;, it inherits a user interface for package management that also displays package metadata.&lt;/li&gt; 
 &lt;li&gt;Since Cask is based on &lt;code&gt;package.el&lt;/code&gt;, you can install packages without editing a file manually, although this rather defeats the entire purpose of using Cask instead of &lt;code&gt;package.el&lt;/code&gt;. &lt;code&gt;straight.el&lt;/code&gt; absolutely refuses to permanently install a package without an explicit reference to it in your init-file (although this may be considered an advantage, depending on your perspective).&lt;/li&gt; 
 &lt;li&gt;Using MELPA Stable, Cask can install only stable versions of packages. By default, Cask also installs only stable versions of packages from GNU ELPA. These modes of operation are unsupported by &lt;code&gt;straight.el&lt;/code&gt; at this time, although this is a &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/31&quot;&gt;planned feature&lt;/a&gt;.&lt;/li&gt; 
 &lt;li&gt;Cask supports more version-control systems than &lt;code&gt;straight.el&lt;/code&gt; (which only supports Git).&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Comparison to el-get&lt;/h3&gt; 
&lt;p&gt;I have not used el-get extensively, so please feel especially free to offer corrections for this section.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Both el-get and &lt;code&gt;straight.el&lt;/code&gt; implement their own package management abstractions instead of delegating to &lt;code&gt;package.el&lt;/code&gt;. However: 
  &lt;ul&gt; 
   &lt;li&gt;el-get goes the route of adding as many package sources as possible (e.g. &lt;code&gt;package.el&lt;/code&gt;, many different version-control systems, various specific websites, and even system package managers) so that packages can be used very easily.&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; only supports Git and in doing so is able to provide more advanced package management features.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; uses your init-file as the sole source of truth for package operations. el-get has additional metadata stored outside the init-file, although specifying all packages in your init-file is a supported mode of operation.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; supports 100% reproducibility for your Emacs packages with version lockfiles. el-get can theoretically provide some measure of reproducibility, but this requires significant manual effort since all packages are not associated with specific revisions by default, nor is the revision of el-get saved anywhere.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to make arbitrary changes to your packages locally, and conflicts during updates are presented to the user and resolved interactively. While it is possible to make local changes to el-get packages, the el-get manual warns that such changes may break the update mechanism.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has explicit support for configuring both an upstream repository and a fork for the same package. el-get does not have such a concept.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to perform arbitrary version-control operartions on your package&#39;s Git repositories. el-get allows this, but local changes will be overwritten when el-get performs an update.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; provides a suite of powerful interactive workflows for performing bulk operations on your package&#39;s Git repositories. el-get only allows you to install, uninstall, and update packages.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; operates quietly when all is going well. el-get reports its progress verbosely.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has a profile system that allows users of someone else&#39;s Emacs configuration to manage an additional subset of packages, or to override upstream package configuration, without forking the upstream. el-get has no such concept.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of el-get&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;el-get supports virtually all known version-control systems, as well as system package managers, EmacsWiki, arbitrary HTTP, and even &lt;code&gt;go get&lt;/code&gt;. &lt;code&gt;straight.el&lt;/code&gt; supports only Git, although it does allow you to manage your local repositories manually if you would like.&lt;/li&gt; 
 &lt;li&gt;el-get has been around since 2010 and is on its fifth major version, whereas &lt;code&gt;straight.el&lt;/code&gt; was created in January 2017 and is only now approaching a 1.0 release. Clearly, el-get is more stable, although despite its recency &lt;code&gt;straight.el&lt;/code&gt; is already almost 50% of the size of el-get, by the line count. Both package managers are actively maintained.&lt;/li&gt; 
 &lt;li&gt;el-get has a recipe format which is several orders of magnitude more powerful than that of &lt;code&gt;straight.el&lt;/code&gt;, since it supports many more package sources that can be configured and since it allows for a more complex build process.&lt;/li&gt; 
 &lt;li&gt;el-get provides a number of features for running per-package initialization and setup code, including pulling that code from arbitrary sources. &lt;code&gt;straight.el&lt;/code&gt; does not support this and expects you to use a dedicated tool like &lt;a href=&quot;https://github.com/jwiegley/use-package&quot;&gt;&lt;code&gt;use-package&lt;/code&gt;&lt;/a&gt; (with which integration is built in) for that purpose.&lt;/li&gt; 
 &lt;li&gt;el-get has a user interface for package management that also displays package metadata, similarly to &lt;code&gt;package.el&lt;/code&gt;. &lt;code&gt;straight.el&lt;/code&gt; has no user interface for package management; any UI is provided by the user&#39;s &lt;code&gt;completing-read&lt;/code&gt; framework.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Comparison to Borg&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;Borg and &lt;code&gt;straight.el&lt;/code&gt; are perhaps the two most similar package managers on this list. The difference is that Borg is very minimal and expects you to complement it with other tools such as &lt;a href=&quot;https://magit.vc/&quot;&gt;Magit&lt;/a&gt;, &lt;a href=&quot;https://github.com/emacscollective/epkg&quot;&gt;epkg&lt;/a&gt;, &lt;a href=&quot;https://github.com/jwiegley/use-package&quot;&gt;&lt;code&gt;use-package&lt;/code&gt;&lt;/a&gt;, and &lt;a href=&quot;https://github.com/tarsius/auto-compile&quot;&gt;auto-compile&lt;/a&gt;. On the other hand, &lt;code&gt;straight.el&lt;/code&gt; aspires to be a one-stop package management solution, although it does not try to replace dedicated version-control packages (Magit) or dedicated package &lt;em&gt;configuration&lt;/em&gt; packages (&lt;code&gt;use-package&lt;/code&gt;).&lt;/li&gt; 
 &lt;li&gt;Borg uses Git submodules, while &lt;code&gt;straight.el&lt;/code&gt; uses independently managed Git repositories.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; supports MELPA, GNU ELPA, Emacsmirror, and custom recipe sources. Borg only supports Emacsmirror and custom recipe sources. However, as the Emacsmirror is a near-complete superset of both GNU ELPA and MELPA, this does not necessarily mean you have access to more packages: it just means you benefit from the recipe maintenance efforts of the MELPA team and the Emacsmirror team, rather than only the latter.&lt;/li&gt; 
 &lt;li&gt;Borg, even when combined with related tools, do not allow for the kind of massive interactive repository management provided by &lt;code&gt;straight.el&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; provides an API designed for other version-control backends to be added in future. Borg is inextricably tied to Git.&lt;/li&gt; 
 &lt;li&gt;The interface for Git submodules has a number of sharp edges.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; provides dependency management. This is a manual process in Borg.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; provides mechanisms for updating your packages. This is a manual process in Borg.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; is configured solely by how you use in your init-file. Configuring Borg requires customizing &lt;code&gt;~/.emacs.d/.gitmodules&lt;/code&gt;, which means (for example) that you cannot generate recipes dynamically. (However, the handling of configuration is &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/95#issuecomment-316379495&quot;&gt;planned&lt;/a&gt; to be improved in a future release.)&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; has a profile system that allows users of someone else&#39;s Emacs configuration to manage an additional subset of packages, or to override upstream package configuration, without forking the upstream. Borg has no such concept.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of Borg&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;Borg does a heck of a lot less magic, so if you want a solution with simple implementation details, &lt;code&gt;straight.el&lt;/code&gt; may not be for you. (But see the developer manual and docstrings, first.)&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Comparison to Nix&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;Nix and &lt;code&gt;straight.el&lt;/code&gt; both use the tagline &quot;purely functional&quot;, but Nix probably uses it in a more correct sense than &lt;code&gt;straight.el&lt;/code&gt;. Nix, by default, uses a fully static and 100% reproducible format for everything, based on the regularly-updated package definitions in the nixpkgs repository. &lt;code&gt;straight.el&lt;/code&gt; on the other hand clones packages directly from source; while it provides lockfiles to theoretically ensure reproducibility, nothing on a technical level prevents you from directly modifying the source code.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;When you want to hack on a package or contribute upstream, you can navigate directly to the source code and edit it immediately. The Git repository is ready for branching and pull requests right away. With Nix, package derivations are read-only, and setting up a package for local development requires you to clone it yourself and reconfigure your Nix environment to pull from the local copy, similarly to &lt;code&gt;package.el&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;Configuration for &lt;code&gt;straight.el&lt;/code&gt; happens all within Emacs Lisp as opposed to an external configuration language, so there is not a new language (unless you are already using Nix).&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of Nix&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;Nix community contributions in nixpkgs contain lots of repackaging and fixes for various packages to make them work better.&lt;/li&gt; 
 &lt;li&gt;Being integrated with the rest of the Nix package manager means that installing an Emacs package can also install any required system dependencies, something that &lt;code&gt;straight.el&lt;/code&gt; has no support for (by design) as it is limited to within-Emacs package management.&lt;/li&gt; 
 &lt;li&gt;Package configuration is much more guaranteed to be fully reproducible on any system.&lt;/li&gt; 
 &lt;li&gt;Due to the use of a centralized and versioned package repository, security is likely higher, since published changes to individual Git repositories of package authors have slightly more opportunity to go through community auditing (although the system is still automated, as opposed to requiring review by individual package maintainers like in Linux distribution packaging).&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Comparison to the manual approach&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;The manual approach is to download packages yourself and put them on your &lt;code&gt;load-path&lt;/code&gt;. &lt;code&gt;straight.el&lt;/code&gt; is more or less what you get when you take the manual approach, think very hard about the best way to do everything, and then automate all of it.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of &lt;code&gt;straight.el&lt;/code&gt;&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; figures out where to clone your packages from for you.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; byte-compiles your packages for you and generates their autoloads automatically.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; frees you from needing to manually recompile and regenerate autoloads.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; keeps track of dependencies for you.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; provides tools to manage all your packages in bulk, which would otherwise be a long, tedious process.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; allows you to get reproducibility for your configuration without needing to keep all of your packages under version control.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; links packages into a separate build directories. Running packages directly from their repositories has a number of problems, including: 
  &lt;ul&gt; 
   &lt;li&gt;making it impossible to run only one package, if others are provided in the same repository.&lt;/li&gt; 
   &lt;li&gt;making your working directory dirty when the package author forgot to add their build artifacts like &lt;code&gt;*.elc&lt;/code&gt; and autoload files to the &lt;code&gt;.gitignore&lt;/code&gt;.&lt;/li&gt; 
   &lt;li&gt;instantly losing compatibility with MELPA recipes.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; offers you a single entry point to install only a single package in isolation, for a minimal bug reproduction. With the manual approach this would be more complicated, especially if the package has dependencies.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; frees you from needing to think about package management, since I already did all the thinking to figure how best to design everything.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Advantages of the manual approach&lt;/h4&gt; 
&lt;ul&gt; 
 &lt;li&gt;No dependencies.&lt;/li&gt; 
 &lt;li&gt;You learn a lot, if you don&#39;t give up first.&lt;/li&gt; 
 &lt;li&gt;You might end up writing a package manager (case in point).&lt;/li&gt; 
 &lt;li&gt;This is the only way to deal with packages that have non-Git upstreams which you need to contribute changes to. (However, you can always use the manual approach for one package and &lt;code&gt;straight.el&lt;/code&gt; for the rest. Or you can just eschew &lt;code&gt;straight.el&lt;/code&gt;&#39;s version-control support for that package, and use it only for building the package.)&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;User manual&lt;/h2&gt; 
&lt;p&gt;This section tells you everything you need to know about the user-facing features of &lt;code&gt;straight.el&lt;/code&gt;. For implementation details, see the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#developer-manual&quot;&gt;developer manual&lt;/a&gt;. It may also be helpful to get some perspective on the overarching concepts of &lt;code&gt;straight.el&lt;/code&gt; from the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#conceptual-overview&quot;&gt;conceptual overview&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;Bootstrapping &lt;code&gt;straight.el&lt;/code&gt;&lt;/h3&gt; 
&lt;p&gt;In order to use &lt;code&gt;straight.el&lt;/code&gt;, you will need to somehow get it loaded into Emacs. (This is easy for &lt;code&gt;package.el&lt;/code&gt;, since &lt;code&gt;package.el&lt;/code&gt; is built in to Emacs. &lt;code&gt;straight.el&lt;/code&gt; must work a little harder.)&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; comes with a file to do just this, &lt;code&gt;bootstrap.el&lt;/code&gt;. All you need to do is load that file. You can do this with &lt;code&gt;M-x load-file&lt;/code&gt; or by a call to &lt;code&gt;load&lt;/code&gt; in your init-file. However, there is an obvious shortcoming: &lt;code&gt;bootstrap.el&lt;/code&gt; will only be available once &lt;code&gt;straight.el&lt;/code&gt; is already installed.&lt;/p&gt; 
&lt;p&gt;You could just invoke &lt;code&gt;git clone&lt;/code&gt; from your init-file, if &lt;code&gt;straight.el&lt;/code&gt; is not installed, but then you would have to manually take care of selecting the correct branch, parsing your version lockfile to check out the right revision, and so on. Instead, you can just use this snippet, which uses a copious amount of magic to take care of all these details for you:&lt;/p&gt; 
&lt;!-- longlines-start --&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name
        &quot;straight/repos/straight.el/bootstrap.el&quot;
        (or (bound-and-true-p straight-base-dir)
            user-emacs-directory)))
      (bootstrap-version 7))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         &quot;https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el&quot;
         &#39;silent &#39;inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil &#39;nomessage))
&lt;/code&gt;&lt;/pre&gt; 
&lt;!-- longlines-stop --&gt; 
&lt;p&gt;Despite the reference to &lt;code&gt;develop&lt;/code&gt;, this snippet actually installs from the &lt;code&gt;main&lt;/code&gt; branch by default, just like every other package. Furthermore, the correct revision of &lt;code&gt;straight.el&lt;/code&gt; is checked out, if you have one specified in your lockfile. Even better, you can &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#overriding-the-recipe-for-straightel&quot;&gt;override the recipe for &lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;, just like for any other package.&lt;/p&gt; 
&lt;h3&gt;Installing packages programmatically&lt;/h3&gt; 
&lt;p&gt;The primary entry point to &lt;code&gt;straight.el&lt;/code&gt; is the &lt;code&gt;straight-use-package&lt;/code&gt; function. It can be invoked interactively (for installing a package temporarily) or programmatically (for installing a package permanently). This section covers the programmatic usage; see &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#interactive-usage&quot;&gt;later&lt;/a&gt; for interactive usage.&lt;/p&gt; 
&lt;p&gt;Here is the basic usage of &lt;code&gt;straight-use-package&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;el-patch)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;This will ensure that the package &lt;code&gt;el-patch&lt;/code&gt; is installed and loaded. (Note that &lt;code&gt;straight-use-package&lt;/code&gt; takes a symbol, not a string, for the name of the package.) Precisely, this is what happens:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;If the local Git repository for &lt;code&gt;el-patch&lt;/code&gt; is not available, it is cloned, and the appropriate revision is checked out (if one is specified in your version lockfiles).&lt;/li&gt; 
 &lt;li&gt;If the local Git repository has been modified since the last time the package was built, it is rebuilt. This means: 
  &lt;ul&gt; 
   &lt;li&gt;The &lt;code&gt;.el&lt;/code&gt; files are symlinked into a separate directory to isolate them from other, irrelevant files.&lt;/li&gt; 
   &lt;li&gt;The main package file is checked for dependencies, which are installed recursively if necessary using &lt;code&gt;straight-use-package&lt;/code&gt;.&lt;/li&gt; 
   &lt;li&gt;The &lt;code&gt;.el&lt;/code&gt; files are byte-compiled.&lt;/li&gt; 
   &lt;li&gt;Autoloads are extracted from the &lt;code&gt;.el&lt;/code&gt; files and saved into a separate file.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;The package&#39;s directory is added to Emacs&#39; &lt;code&gt;load-path&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;The package&#39;s autoloads are evaluated.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Package authors should note that &lt;code&gt;straight.el&lt;/code&gt; checks for dependencies that are specified in the &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/elisp/Packaging-Basics.html&quot;&gt;&lt;code&gt;package.el&lt;/code&gt; format&lt;/a&gt;. To spare you reading that documentation, this is either a &lt;code&gt;Package-Requires&lt;/code&gt; header in &lt;code&gt;PACKAGENAME.el&lt;/code&gt;, or an argument to a &lt;code&gt;define-package&lt;/code&gt; invocation in &lt;code&gt;PACKAGENAME-pkg.el&lt;/code&gt;. Despite the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#advantages-of-straightel&quot;&gt;many shortcomings&lt;/a&gt; of &lt;code&gt;package.el&lt;/code&gt;, it has done a good job of creating a standardized format for dependency declarations.&lt;/p&gt; 
&lt;p&gt;There is one exception to the above statement: not all entries specified in the &lt;code&gt;Package-Requires&lt;/code&gt; header necessarily correspond to packages. For example, specifying a minimum Emacs version for a package is done by depending on the &lt;code&gt;emacs&lt;/code&gt; pseudo-package. Such packages are simply ignored by &lt;code&gt;straight.el&lt;/code&gt;, using the variable &lt;code&gt;straight-built-in-pseudo-packages&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;Note that loading a package does not entail invoking &lt;code&gt;require&lt;/code&gt; on any of its features. If you wish to actually load the files of the package, you need to do this separately. This is because most packages do not need to be loaded immediately, and are better served by the autoload system.&lt;/p&gt; 
&lt;h4&gt;Installing with a custom recipe&lt;/h4&gt; 
&lt;p&gt;&lt;code&gt;straight-use-package&lt;/code&gt; can also take a list instead of a symbol. In that case, the first member of the list is a symbol giving the package name, and the remainder of the list is a &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/elisp/Property-Lists.html&quot;&gt;property list&lt;/a&gt; providing information about how to install and build the package. Here is an example:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package
 &#39;(el-patch :type git :host github :repo &quot;radian-software/el-patch&quot;
            :fork (:host github
                   :repo &quot;your-name/el-patch&quot;)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;If you give &lt;code&gt;straight-use-package&lt;/code&gt; just a package name, then a recipe will be looked up by default (see the section on &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#recipe-lookup&quot;&gt;recipe lookup&lt;/a&gt;). You can see the default recipe for a package by invoking &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#interactive-usage&quot;&gt;&lt;code&gt;M-x straight-get-recipe&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;If &lt;code&gt;straight-allow-recipe-inheritance&lt;/code&gt; is non-nil, then you only need to specify the components of the recipe that you want to override. All other components will still be looked up in the default recipe. In the example above, we are only interested in changing the &lt;code&gt;:fork&lt;/code&gt; component. Therefore if &lt;code&gt;straight-allow-recipe-inheritance&lt;/code&gt; is set, the recipe could be simplified as follows:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package
 &#39;(el-patch :fork (:repo &quot;your-name/el-patch&quot;)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;or even simpler:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package
 &#39;(el-patch :fork &quot;your-name/el-patch&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The &lt;code&gt;:files&lt;/code&gt; keyword and all version control keywords support inheritance.&lt;/p&gt; 
&lt;p&gt;To learn more, see the section on &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-recipe-format&quot;&gt;the recipe format&lt;/a&gt;.&lt;/p&gt; 
&lt;h4&gt;Additional arguments to &lt;code&gt;straight-use-package&lt;/code&gt;&lt;/h4&gt; 
&lt;p&gt;The full user-facing signature of &lt;code&gt;straight-use-package&lt;/code&gt; is:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package PACKAGE-OR-RECIPE &amp;amp;optional NO-CLONE NO-BUILD)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;As discussed &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#installing-packages-programmatically&quot;&gt;previously&lt;/a&gt;, by default &lt;code&gt;straight-use-package&lt;/code&gt; will do three things:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Register the recipe provided with &lt;code&gt;straight.el&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;Clone the package&#39;s local repository, if it is absent.&lt;/li&gt; 
 &lt;li&gt;Rebuild the package if necessary, and load it.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;By providing the optional arguments, you may cause processing to halt before all three of these tasks are completed. Specifically, providing &lt;code&gt;NO-CLONE&lt;/code&gt; causes processing to halt after registration but before cloning, and providing &lt;code&gt;NO-BUILD&lt;/code&gt; causes processing to halt after cloning (if necessary) but before building and loading.&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; supports lazy-loading by means of a special value for &lt;code&gt;NO-CLONE&lt;/code&gt;, the symbol &lt;code&gt;lazy&lt;/code&gt;. If this symbol is passed, then processing will halt at the clone step, unless the package is already cloned. This means that the package is built and loaded if it is already installed, but otherwise installation is deferred until later. When you want to trigger the lazy installation, simply call &lt;code&gt;straight-use-package&lt;/code&gt; again, but without &lt;code&gt;NO-CLONE&lt;/code&gt;. (There is no need to pass the recipe again; see &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#recipe-lookup&quot;&gt;recipe lookup&lt;/a&gt;.)&lt;/p&gt; 
&lt;p&gt;You can also pass functions for &lt;code&gt;NO-CLONE&lt;/code&gt; or &lt;code&gt;NO-BUILD&lt;/code&gt;, which will be called with the package name as a string; their return values will then be used instead.&lt;/p&gt; 
&lt;p&gt;Note that if it makes no sense to build a package, then you should put &lt;code&gt;:build nil&lt;/code&gt; in its &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-recipe-format&quot;&gt;recipe&lt;/a&gt;, rather than specifying &lt;code&gt;NO-BUILD&lt;/code&gt; every time you register it with &lt;code&gt;straight.el&lt;/code&gt;. (This is especially relevant when writing recipes for &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#customizing-recipe-repositories&quot;&gt;recipe repositories&lt;/a&gt;.)&lt;/p&gt; 
&lt;h4&gt;Variants of &lt;code&gt;straight-use-package&lt;/code&gt;&lt;/h4&gt; 
&lt;p&gt;For convenience, &lt;code&gt;straight.el&lt;/code&gt; provides some functions that wrap &lt;code&gt;straight-use-package&lt;/code&gt; with particular arguments, to cover all of the common cases. Each of these functions takes only a package name or recipe, and no additional arguments.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight-register-package&lt;/code&gt;: always stop after the registration step. This may be useful for specifying the recipe for an optional dependency (see &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#recipe-lookup&quot;&gt;recipe lookup&lt;/a&gt;, but see also &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#overriding-recipes&quot;&gt;recipe overrides&lt;/a&gt;).&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight-use-package-no-build&lt;/code&gt;: always stop before the build step. This is used by &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#lockfile-management&quot;&gt;&lt;code&gt;straight-freeze-versions&lt;/code&gt;&lt;/a&gt; to make sure packages are cloned, since building them is unnecessary for writing the lockfiles.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight-use-package-lazy&lt;/code&gt;: stop at the clone step if the package&#39;s local repository is not already cloned. This is used for lazy-loading.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Customizing when packages are built&lt;/h4&gt; 
&lt;p&gt;By default, when &lt;code&gt;straight.el&lt;/code&gt; is bootstrapped during Emacs init, it uses a bulk &lt;code&gt;find(1)&lt;/code&gt; command to identify files that were changed since the last time a package depending on them was built. These packages are then rebuilt when they are requested via &lt;code&gt;straight-use-package&lt;/code&gt;. Normally, &lt;code&gt;straight.el&lt;/code&gt; will try to detect what sort of &lt;code&gt;find(1)&lt;/code&gt; program is installed, and issue the appropriate command. If it makes a mistake, then you can manually customize &lt;code&gt;straight-find-flavor&lt;/code&gt;. Alternately, you can install GNU find and customize the variable &lt;code&gt;straight-find-executable&lt;/code&gt; to point to it.&lt;/p&gt; 
&lt;p&gt;For about 100 packages on an SSD, calling &lt;code&gt;find(1)&lt;/code&gt; to detect modifications takes about 500ms. You can save this time by customizing &lt;code&gt;straight-check-for-modifications&lt;/code&gt;. This is a list of symbols which determines how &lt;code&gt;straight.el&lt;/code&gt; detects package modifications. The default value is &lt;code&gt;(find-at-startup find-when-checking)&lt;/code&gt;, which means that &lt;code&gt;find(1)&lt;/code&gt; is used to detect modifications at startup, and also when you invoke &lt;code&gt;M-x straight-check-package&lt;/code&gt; or &lt;code&gt;M-x straight-check-all&lt;/code&gt;. If you prefer to avoid this performance hit, or do not have &lt;code&gt;find(1)&lt;/code&gt; installed, then you can remove these symbols from the list. In that case, you will probably want to add either &lt;code&gt;check-on-save&lt;/code&gt; or &lt;code&gt;watch-files&lt;/code&gt; to the list.&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;check-on-save&lt;/code&gt; causes &lt;code&gt;straight.el&lt;/code&gt; to use &lt;code&gt;before-save-hook&lt;/code&gt; to detect package modifications as you make them (modifications made by the &lt;code&gt;straight.el&lt;/code&gt; repository management commands are also detected). This reduces init time, but modifications made outside of Emacs (or modifications that bypass &lt;code&gt;before-save-hook&lt;/code&gt;) are not detected. Pull requests extending the number of cases in which &lt;code&gt;straight.el&lt;/code&gt; is able to detect live modifications are welcome. Also, for the sake of efficiency, this form of modification checking is restricted to subdirectories of &lt;code&gt;~/.emacs.d/straight/repos&lt;/code&gt;, so you must put your local repositories into that directory for it to work. (Pull requests to change this would be welcome.)&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;watch-files&lt;/code&gt; causes &lt;code&gt;straight.el&lt;/code&gt; to automatically invoke a filesystem watcher to detect modifications as they are made, inside or outside of Emacs. For this setting to work, you must have &lt;a href=&quot;https://www.python.org/&quot;&gt;&lt;code&gt;python3&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://github.com/mattgreen/watchexec&quot;&gt;&lt;code&gt;watchexec&lt;/code&gt;&lt;/a&gt; installed on your &lt;code&gt;PATH&lt;/code&gt;. By default, the watcher persists after Emacs is closed. You can stop it manually by running &lt;code&gt;M-x straight-watcher-stop&lt;/code&gt;, and start it again by running &lt;code&gt;M-x straight-watcher-start&lt;/code&gt;. The watcher script is designed so that when one instance is started, all the others gracefully shut down, so you don&#39;t have to worry about accidentally ending up with more than one. There is nothing exciting in the process buffer for the watcher, but if you are interested in it then its name is given by &lt;code&gt;straight-watcher-process-buffer&lt;/code&gt;. (By default, the name has a leading space so that the buffer does not appear in the buffer list.)&lt;/p&gt; 
&lt;p&gt;There is probably no good reason to use both &lt;code&gt;check-on-save&lt;/code&gt; and &lt;code&gt;watch-files&lt;/code&gt; at the same time. Your configuration can dynamically switch between which one is used depending on &lt;code&gt;(executable-find &quot;watchexec&quot;)&lt;/code&gt; or similar.&lt;/p&gt; 
&lt;p&gt;If you prefer to eschew automatic package rebuilding entirely, you can just set &lt;code&gt;straight-check-for-modifications&lt;/code&gt; to &lt;code&gt;nil&lt;/code&gt;. In that case, packages will only be rebuilt when metadata (e.g. the recipe or the Emacs version) changes, or when you manually invoke &lt;code&gt;M-x straight-rebuild-package&lt;/code&gt; or &lt;code&gt;M-x straight-rebuild-all&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;Regardless of your preferred setting for &lt;code&gt;straight-check-for-modifications&lt;/code&gt;, you should set it before the &lt;code&gt;straight.el&lt;/code&gt; bootstrap snippet is run, since hooks relating to this variable are set during bootstrap.&lt;/p&gt; 
&lt;p&gt;On Microsoft Windows, &lt;code&gt;find(1)&lt;/code&gt; is generally not available, so the default value of &lt;code&gt;straight-check-for-modifications&lt;/code&gt; is instead &lt;code&gt;(check-on-save)&lt;/code&gt;.&lt;/p&gt; 
&lt;h5&gt;Custom or manual modification detection&lt;/h5&gt; 
&lt;p&gt;You can also use the low-level functions for modification detection directly.&lt;/p&gt; 
&lt;p&gt;The function &lt;code&gt;straight-register-repo-modification&lt;/code&gt; takes a string (e.g. &lt;code&gt;&quot;straight.el&quot;&lt;/code&gt;) corresponding to the name of a local repository, and marks all packages from that local repository to be rebuilt at next Emacs startup. This function silently ignores local repositories which contain slashes, a limitation which might be removed in future.&lt;/p&gt; 
&lt;p&gt;The function &lt;code&gt;straight-register-file-modification&lt;/code&gt; takes no arguments and checks if the file visited by the current buffer (if any) is contained by any local repository. If so, it delegates to &lt;code&gt;straight-register-repo-modification&lt;/code&gt;. The &lt;code&gt;check-on-save&lt;/code&gt; value for &lt;code&gt;straight-check-for-modifications&lt;/code&gt; just adds &lt;code&gt;straight-register-file-modification&lt;/code&gt; to &lt;code&gt;before-save-hook&lt;/code&gt;.&lt;/p&gt; 
&lt;h5&gt;Summary of options for package modification detection&lt;/h5&gt; 
&lt;h6&gt;&lt;code&gt;find-at-startup&lt;/code&gt;&lt;/h6&gt; 
&lt;p&gt;Save build timestamps and run &lt;code&gt;find(1)&lt;/code&gt; at startup to detect changes&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Most reliable, never misses changes&lt;/li&gt; 
 &lt;li&gt;Requires &lt;code&gt;find(1)&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;Slows down startup&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h6&gt;&lt;code&gt;check-on-save&lt;/code&gt;&lt;/h6&gt; 
&lt;p&gt;Use &lt;code&gt;before-save-hook&lt;/code&gt; to detect changes&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;No external dependencies&lt;/li&gt; 
 &lt;li&gt;No startup delay&lt;/li&gt; 
 &lt;li&gt;No additional CPU or memory impact&lt;/li&gt; 
 &lt;li&gt;Doesn&#39;t catch changes made except via &lt;code&gt;save-file&lt;/code&gt; inside Emacs&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h6&gt;&lt;code&gt;watch-files&lt;/code&gt;&lt;/h6&gt; 
&lt;p&gt;Run filesystem watcher to detect changes&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Requires Python 3 and Watchexec&lt;/li&gt; 
 &lt;li&gt;No startup delay&lt;/li&gt; 
 &lt;li&gt;Takes a few seconds to build virtualenv the first time&lt;/li&gt; 
 &lt;li&gt;Memory and CPU impact of running filesystem watcher&lt;/li&gt; 
 &lt;li&gt;Only misses changes if you make them after booting the system but before starting Emacs&lt;/li&gt; 
&lt;/ul&gt; 
&lt;hr /&gt; 
&lt;h4&gt;Customizing how packages are built&lt;/h4&gt; 
&lt;p&gt;By specifying &lt;code&gt;:build nil&lt;/code&gt; in a package&#39;s &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-recipe-format&quot;&gt;recipe&lt;/a&gt;, you may prevent the package from being built at all. This is usually useful for recipe repositories which do not bundle executable Lisp code. (Make sure to use &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#customizing-recipe-repositories&quot;&gt;&lt;code&gt;straight-use-recipes&lt;/code&gt;&lt;/a&gt; for registering recipe repositories.)&lt;/p&gt; 
&lt;h5&gt;Autoload generation&lt;/h5&gt; 
&lt;p&gt;By specifying &lt;code&gt;:build (:not autoloads)&lt;/code&gt; in a package&#39;s recipe, you may prevent any autoloads provided by the package from being generated and loaded into Emacs. This is mostly useful if the package provides a large number of autoloads, you know you need only a few of them, and you wish to optimize your startup time (although this is almost certainly premature optimization unless you &lt;em&gt;really&lt;/em&gt; know what you&#39;re doing). You can also customize the variable &lt;code&gt;straight-disable-autoloads&lt;/code&gt; to effect this change on all recipes which do not explicitly disable autoloads via the &lt;code&gt;:build&lt;/code&gt; keyword.&lt;/p&gt; 
&lt;h5&gt;Byte compilation&lt;/h5&gt; 
&lt;p&gt;By specifying &lt;code&gt;:build (:not compile)&lt;/code&gt; in a package&#39;s recipe, you may inhibit byte-compilation. See &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/357&quot;&gt;this issue&lt;/a&gt; for discussion of why this might be useful. You can also customize the variable &lt;code&gt;straight-disable-compile&lt;/code&gt; to effect this change on all recipes which do not explicitly disable byte-compilation via the &lt;code&gt;:build&lt;/code&gt; keyword.&lt;/p&gt; 
&lt;h5&gt;Native compilation&lt;/h5&gt; 
&lt;p&gt;Experimental support for native compilation of Emacs Lisp code can be enabled in the latest &lt;code&gt;main&lt;/code&gt; branch of the official Emacs repository (see &lt;a href=&quot;http://akrl.sdf.org/gccemacs.html&quot;&gt;gccemacs&lt;/a&gt;). When running on this version of Emacs, &lt;code&gt;straight.el&lt;/code&gt; will perform native compilation of packages.&lt;/p&gt; 
&lt;p&gt;By specifying a &lt;code&gt;:build (:not native-compile)&lt;/code&gt; in a package&#39;s recipe, you may inhibit native compilation. You can also customize the variable &lt;code&gt;straight-disable-native-compile&lt;/code&gt; to effect this change on all recipes which do not explicitly disable native-compilation via the &lt;code&gt;:build&lt;/code&gt; keyword.&lt;/p&gt; 
&lt;p&gt;Native compilation requires byte-compilation, so &lt;code&gt;:build (:not compile)&lt;/code&gt; and &lt;code&gt;straight-disable-compile&lt;/code&gt; will also disable native compilation.&lt;/p&gt; 
&lt;h5&gt;Symbolic links&lt;/h5&gt; 
&lt;p&gt;Usually, &lt;code&gt;straight.el&lt;/code&gt; uses symbolic links (&quot;symlinks&quot;) to make package files available from the build directory. This happens when &lt;code&gt;straight-use-symlinks&lt;/code&gt; is non-nil, the default. On Microsoft Windows, however, support for symlinks is not always available, so the default value of &lt;code&gt;straight-use-symlinks&lt;/code&gt; is nil on that platform. That causes copying to be used instead, and an advice is placed on &lt;code&gt;find-file&lt;/code&gt; to cause the copied files to act as symlinks if you try to edit them.&lt;/p&gt; 
&lt;p&gt;If you want to activate symlink-support on MS Windows 7, 8, or 10, you should ensure the following requirements:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-use-symlinks&lt;/code&gt; has to be set to non-nil manually.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;Your user-account needs to be assigned the right to create symbolic links. To do so, run &quot;secpol.msc&quot; and in &quot;Local Policies → User Rights Assignment&quot; assign the right to &quot;Create symbolic links&quot; to your user-account.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;If you have User Account Control (UAC) enabled and your user-account belongs to the the &lt;em&gt;Administrators&lt;/em&gt; group you&#39;ll need to run Emacs in elevated mode to be able to create symlinks (see &lt;a href=&quot;https://community.perforce.com/s/article/3472&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://stackoverflow.com/a/29065060/3538165&quot;&gt;here&lt;/a&gt; and, for an official reference, section Access Token Changes &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/bb530410.aspx#vistauac_topic8&quot;&gt;in this document&lt;/a&gt;.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;a href=&quot;https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/&quot;&gt;Windows Creators Update&lt;/a&gt; supports symlink-creation without any special permission setup.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Customizing how packages are made available&lt;/h4&gt; 
&lt;p&gt;By setting the variable &lt;code&gt;straight-cache-autoloads&lt;/code&gt; to a non-nil value, you can cause &lt;code&gt;straight.el&lt;/code&gt; to cache the autoloads of all used packages in a single file on disk, and load them from there instead of from the individual package files if they are still up to date. This reduces the number of disk IO operations during startup from O(number of packages) to O(1), so it should improve performance. No other configuration should be necessary to make this work; however, you may wish to call &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#interactive-usage&quot;&gt;&lt;code&gt;straight-prune-build&lt;/code&gt;&lt;/a&gt; occasionally, since otherwise this cache file may grow quite large over time.&lt;/p&gt; 
&lt;h4&gt;Hooks run by &lt;code&gt;straight-use-package&lt;/code&gt;&lt;/h4&gt; 
&lt;p&gt;Currently, &lt;code&gt;straight-use-package&lt;/code&gt; supports four hooks:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-vc-git-post-clone-hook&lt;/code&gt;: The functions in this hook are run just after cloning a git repository. This allows users to automate custom configuration of Elisp Git repositories after they have been cloned. For example, the &lt;code&gt;user.email&lt;/code&gt; &lt;code&gt;git-config&lt;/code&gt; variable could be set on clone, to make upstream contributions more convenient for developers who use different email addresses for different repositories.&lt;/p&gt; &lt;p&gt;Each hook function is passed the following &lt;a href=&quot;https://www.emacswiki.org/emacs/KeywordArguments&quot;&gt;keyword arguments&lt;/a&gt;:&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&lt;code&gt;:repo-dir&lt;/code&gt; - the local directory to which the repository was cloned&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;:remote&lt;/code&gt; - the name of the remote from which the repository was cloned&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;:url&lt;/code&gt; - the URL from which the repository was cloned&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;:branch&lt;/code&gt; - the branch as specified by the recipe, if any, otherwise &lt;code&gt;nil&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;:depth&lt;/code&gt; - the clone depth as specified by the recipe or &lt;code&gt;straight-vc-git-default-clone-depth&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;:commit&lt;/code&gt; - the specific commit which was requested via the lockfile, if any, otherwise &lt;code&gt;nil&lt;/code&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;p&gt;Since keyword arguments are used, each function should be defined via &lt;code&gt;cl-defun&lt;/code&gt;, and &lt;code&gt;&amp;amp;key&lt;/code&gt; used at the front of the argument list.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-use-package-prepare-functions&lt;/code&gt;: The functions in this hook are run just before a package would be built, even if the package does not actually need to be rebuilt. They are passed the name of the package being (maybe) built as a string, and should take and ignore any additional arguments.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-use-package-pre-build-functions&lt;/code&gt;: The functions in this hook are run just before building a package (and only if the package needs to be built). They are passed the name of the package being built as a string, and should take and ignore any additional arguments.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-use-package-post-build-functions&lt;/code&gt;: The functions in this hook are run just after building a package (and only if the package needs to be built). They are passed the name of the package being built as a string, and should take and ignore any additional arguments.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;The recipe format&lt;/h3&gt; 
&lt;p&gt;The general format for a &lt;code&gt;straight.el&lt;/code&gt; recipe is:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(package-name :keyword value :keyword value ...)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Note that if you wish to pass a recipe to &lt;code&gt;straight-use-package&lt;/code&gt;, you will need to quote it. If you need to compute part of the recipe dynamically, use backquoting:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package
  `(el-patch :type git :repo ,(alist-get &#39;el-patch my-package-urls)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The supported keywords are &lt;em&gt;similar, but not identical&lt;/em&gt; to those used in MELPA recipes. There is a complete list below which you can compare with the &lt;a href=&quot;https://github.com/melpa/melpa#recipe-format&quot;&gt;MELPA documentation&lt;/a&gt;, but the main differences from the user&#39;s point of view are:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;We use &lt;code&gt;:host&lt;/code&gt; instead of &lt;code&gt;:fetcher&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;We only support Git recipes by default, although the system is extensible to other VCs to be added in the future or in user configurations. Thus the supported &lt;code&gt;:host&lt;/code&gt; values are: 
  &lt;ul&gt; 
   &lt;li&gt;&lt;code&gt;nil&lt;/code&gt; (any Git repository)&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;github&lt;/code&gt;, &lt;code&gt;gitlab&lt;/code&gt;, &lt;code&gt;sourcehut&lt;/code&gt;, &lt;code&gt;codeberg&lt;/code&gt;, or &lt;code&gt;bitbucket&lt;/code&gt;.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;We support &lt;code&gt;:branch&lt;/code&gt;, but not &lt;code&gt;:commit&lt;/code&gt; or &lt;code&gt;:version-regexp&lt;/code&gt;. To lock a package to a specific commit, use a &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#lockfile-management&quot;&gt;lockfile&lt;/a&gt;. See also &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/246&quot;&gt;#246&lt;/a&gt; for discussion of extensions to the recipe to support package pinning, which is a planned feature.&lt;/li&gt; 
 &lt;li&gt;We support several additional keywords that affect how a package is built; see below.&lt;/li&gt; 
 &lt;li&gt;There are consistency and feature improvements to edge cases of the &lt;code&gt;:files&lt;/code&gt; keyword as documented in &lt;code&gt;straight-expand-files-directive&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:includes&lt;/code&gt; indicates a package is a superset of another package.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Here is a comprehensive list of all keywords which have special meaning in a recipe (unknown keywords are ignored but preserved):&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:local-repo&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This is the name of the local repository that is used for the package. If a local repository by that name does not exist when you invoke &lt;code&gt;straight-use-package&lt;/code&gt;, one will be cloned according to the package&#39;s &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-backends&quot;&gt;version-control settings&lt;/a&gt;. Note that the repository does not have to be version-controlled; it can also just be a directory containing Emacs Lisp files (set &lt;code&gt;:type nil&lt;/code&gt; in this case).&lt;/p&gt; &lt;p&gt;Multiple packages can use the same local repository. If so, then a change to the local repository will cause both packages to be rebuilt. Typically, if multiple packages are drawn from the same repository, both should specify a &lt;code&gt;:files&lt;/code&gt; directive.&lt;/p&gt; &lt;p&gt;If you do not provide &lt;code&gt;:local-repo&lt;/code&gt;, then it defaults to a value derived from the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-backends&quot;&gt;version-control settings&lt;/a&gt;, or as a last resort the package name.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:files&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This is a list specifying which files in a package&#39;s local repository need to be symlinked into its build directory, and how to arrange the symlinks. For most packages, the default value (&lt;code&gt;straight-default-files-directive&lt;/code&gt;) will suffice, and you do not need to specify anything.&lt;/p&gt; &lt;p&gt;If you do need to override the &lt;code&gt;:files&lt;/code&gt; directive (this happens most commonly when you are taking a single package from a repository that holds multiple packages), it is almost always sufficient to just specify a list of globs or filenames. All matching files will be linked into the top level of the package&#39;s build directory.&lt;/p&gt; &lt;p&gt;In spite of this, the &lt;code&gt;:files&lt;/code&gt; directive supports an almost comically powerful DSL (with nested excludes and everything!) that allows you full flexibility on how the links are made; see the docstring of &lt;code&gt;straight-expand-files-directive&lt;/code&gt; for the full details.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:flavor&lt;/code&gt;&lt;/p&gt; &lt;p&gt;If this is non-nil, then it changes the interpretation of the &lt;code&gt;:files&lt;/code&gt; directive for compatibility with an existing upstream recipe source. See the docstring of &lt;code&gt;straight-expand-files-directive&lt;/code&gt; for details.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:build&lt;/code&gt; This specifies the steps taken on the files symlinked within a package&#39;s straight/build/PACKAGE directory. It may be any of the following values:&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;nil, in which case nothing is done. This also prevents :pre/:post-build commands from running.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(example :build nil)
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt;t, runs the steps listed in &lt;code&gt;straight--build-default-steps&lt;/code&gt;. Note this ignores all &lt;code&gt;straight-disable-SYMBOL&lt;/code&gt; keywords.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(example :build t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt;A list of steps. Each step is a symbol which represents a function named: &lt;code&gt;straight--build-SYMBOL&lt;/code&gt;. The function is passed the recipe as its sole argument. Steps are executed in the order they are listed. e.g.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(example :build (autoloads compile native-compile info))
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt;A list which has &lt;code&gt;:not&lt;/code&gt; as its car and step symbols as its cdr. This eliminates the listed steps from the default steps. e.g. The following recipe will not be compiled or have its texinfo generated:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(example :build (:not compile info))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Steps may be disabled globally for recipes which do not explicitly declare their &lt;code&gt;:build&lt;/code&gt; via the defcustom variables named &lt;code&gt;straight--build-SYMBOL&lt;/code&gt;. e.g. The last example but for all recipes without a &lt;code&gt;:build&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq straight-disable-compile t
      straight-disable-info t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;In the absence of a &lt;code&gt;:build&lt;/code&gt; keyword, &lt;code&gt;straight--build-default-steps&lt;/code&gt; are run.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:pre-build&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This specifies system commands and/or elisp to be evaluated before symlinking, and running a recipe&#39;s &lt;code&gt;:build&lt;/code&gt; steps.&lt;/p&gt; &lt;p&gt;Each command is either an elisp form to be evaluated or a list of strings to be executed in a shell context of the form:&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(&quot;executable&quot; &quot;arg&quot;...)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Commands are executed in the package&#39;s repository directory.&lt;/p&gt; 
&lt;p&gt;The &lt;code&gt;:pre-build&lt;/code&gt; keyword&#39;s value may be:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;A single command&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;A list of commands&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;nil, in which case no commands are executed.&lt;/p&gt; &lt;p&gt;For example:&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package
 &#39;( example :type git :host github :repo &quot;user/example.el&quot;
    :pre-build (&quot;make&quot; &quot;all&quot;)))

(straight-use-package
 `( example :type git :host github :repo &quot;user/example.el&quot;
    :pre-build ,(pcase system-type
                  (`windows-nt &#39;(message &quot;This might take a while&quot;))
                  (_ &#39;((&quot;./configure&quot;) (&quot;make&quot;) (&quot;make&quot; &quot;install&quot;))))))

&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:post-build&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This specifies system commands and/or elisp to be evaluated after the &lt;code&gt;:build&lt;/code&gt; steps are run.&lt;/p&gt; &lt;p&gt;Otherwise, it is identical to the &lt;code&gt;:pre-build&lt;/code&gt; keyword in terms of the values it accepts and how it is executed.&lt;/p&gt; &lt;p&gt;For example:&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package
 &#39;( example :type git :host github :repo &quot;user/example.el&quot;
    :pre-build  ((&quot;./pre-build.sh&quot;) (message &quot;hi&quot;))
    :post-build ((&quot;./post-build.sh&quot;) (message &quot;bye&quot;))))
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:type&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This specifies the version-control backend to use for cloning and managing the package&#39;s local repository. It defaults to the value of &lt;code&gt;straight-default-vc&lt;/code&gt;, which defaults to &lt;code&gt;git&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;The only traditional version-control backend currently supported is &lt;code&gt;git&lt;/code&gt;, although more backends may be added.&lt;/p&gt; &lt;p&gt;As a special case, however, you may specify the value &lt;code&gt;built-in&lt;/code&gt;, which results in all version-control operations on the package being ignored. This allows you to tell &lt;code&gt;straight.el&lt;/code&gt; that a package has already been provided (for example, because a version of it is shipped by Emacs) and does not have a local repository which needs to be cloned, updated, and so on. Here is how you can tell &lt;code&gt;straight.el&lt;/code&gt; that you would like to use the Emacs-provided copy of Org, rather than cloning it from the upstream repository if another package declares it as a dependency:&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;(org :type built-in))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;You can also use &lt;code&gt;:type nil&lt;/code&gt;, which has the same effect as &lt;code&gt;:type &#39;built-in&lt;/code&gt;, except that the package is still loaded from its configured &lt;code&gt;:local-repo&lt;/code&gt;.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;:source&lt;/code&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Overrides &lt;code&gt;straight-recipe-repositories&lt;/code&gt; on a per-recipe basis. Its value may be:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;a symbol representing a recipe repository&lt;/li&gt; 
 &lt;li&gt;a list of such symbols The order of the symbols determines their precedence. For example:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;(package :source melpa))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Will search only the melpa recipe repository for package&#39;s recipe. While:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;(package :source (melpa gnu-elpa-mirror)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;will search for package&#39;s recipe first in melpa. If it is not found there it will check gnu-elpa-mirror next.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;backend-specific keywords&lt;/p&gt; &lt;p&gt;Depending on the value of &lt;code&gt;:type&lt;/code&gt;, additional keywords (relevant to how the package&#39;s repository is cloned and managed) will be meaningful. See the next section.&lt;/p&gt; &lt;p&gt;The &lt;code&gt;built-in&lt;/code&gt; and &lt;code&gt;nil&lt;/code&gt; pseudo-backends do not take any other keywords.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:includes&lt;/code&gt;&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Informs &lt;code&gt;straight.el&lt;/code&gt; that a package is a superset of another package. For example &lt;code&gt;org-contrib&lt;/code&gt; includes &lt;code&gt;ol-vm&lt;/code&gt;. The following will prevent &lt;code&gt;straight.el&lt;/code&gt; from attempting to install &lt;code&gt;ol-vm&lt;/code&gt; after &lt;code&gt;org-contrib&lt;/code&gt; has been installed:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;(org-contrib :includes ol-vm))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Its value may also be a list of symbols indicating multiple packages:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;(example :includes (foo bar)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;:inherit&lt;/code&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Overrides &lt;code&gt;straight-allow-recipe-inheritance&lt;/code&gt; on a per-recipe basis. If its value is non-nil, inheritance is enabled for the recipe. Otherwise it is not.&lt;/p&gt; 
&lt;h4&gt;Version-control backends&lt;/h4&gt; 
&lt;p&gt;Defining a version-control backend consists of declaring a number of functions named as &lt;code&gt;straight-vc-BACKEND-METHOD&lt;/code&gt;, where &lt;code&gt;BACKEND&lt;/code&gt; is the name of the version-control backend being defined and &lt;code&gt;METHOD&lt;/code&gt; is a backend API method. The relevant methods are:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;clone&lt;/code&gt;: given a recipe and a commit object, clone the repository and attempt to check out the given commit.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;commit-present-p&lt;/code&gt;: given a recipe and a commit object, return whether the commit can be checked out offline, i.e., without fetching from the remote.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;normalize&lt;/code&gt;: given a recipe, &quot;normalize&quot; the repository (this generally means reverting it to a standard state, such as a clean working directory, but does not entail checking out any particular commit).&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;fetch-from-remote&lt;/code&gt;: given a recipe, fetch the latest version from its configured remote, if one is specified.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;fetch-from-upstream&lt;/code&gt;: given a recipe, fetch the latest version from its configured upstream, if the package is forked.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;merge-from-remote&lt;/code&gt;: given a recipe, merge the latest version fetched from the configured remote, if any, to the local copy.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;merge-from-upstream&lt;/code&gt;: given a recipe, merge the latest version fetched from the configured upstream, if the package is forked, to the local copy.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;push-to-remote&lt;/code&gt;: given a recipe, push the current version of the repository to its configured remote, if one is specified.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;check-out-commit&lt;/code&gt;: given a recipe and a commit object, attempt to check out that commit in the repository for that recipe.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;get-commit&lt;/code&gt;: given a local repository name, return the commit object that is currently checked out, or nil if the local repository should not be included in a lockfile.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;local-repo-name&lt;/code&gt;: given a recipe, return a good name for the local repository, or nil.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;keywords&lt;/code&gt;: return a list of keywords which are meaningful for this version-control backend.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Most of these methods are highly interactive: they don&#39;t actually do anything without prompting you to confirm it, and very often they will offer you a number of different options to proceed (including starting a recursive edit and allowing you to do whatever you would like).&lt;/p&gt; 
&lt;p&gt;Also, all of the methods in this section take &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#developer-manual&quot;&gt;&lt;code&gt;straight.el&lt;/code&gt;-style recipes&lt;/a&gt;; see the section on &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#developer-manual&quot;&gt;defining VC backends&lt;/a&gt; in the developer manual for more details.&lt;/p&gt; 
&lt;h4&gt;Git backend&lt;/h4&gt; 
&lt;p&gt;These are the keywords meaningful for the &lt;code&gt;git&lt;/code&gt; backend:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:repo&lt;/code&gt;: the clone URL for the Git repository.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:host&lt;/code&gt;: either nil or one of the symbols &lt;code&gt;github&lt;/code&gt;, &lt;code&gt;gitlab&lt;/code&gt;, &lt;code&gt;bitbucket&lt;/code&gt;, &lt;code&gt;codeberg&lt;/code&gt;, or &lt;code&gt;sourcehut&lt;/code&gt;.&lt;/p&gt; 
  &lt;ul&gt; 
   &lt;li&gt;If nil, then &lt;code&gt;:repo&lt;/code&gt; should be a string which is the full URL of the target repository. For example:&lt;/li&gt; 
  &lt;/ul&gt; &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;( :package &quot;package&quot; :host nil :type git
  :repo &quot;http://myhost.tld/repo&quot;)
&lt;/code&gt;&lt;/pre&gt; 
  &lt;ul&gt; 
   &lt;li&gt;If non-nil, then &lt;code&gt;:repo&lt;/code&gt; should be a string &quot;username/repo&quot;, and the URL is constructed automatically. For example:&lt;/li&gt; 
  &lt;/ul&gt; &lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;( :package &quot;package&quot; :host github :type git
  :repo &quot;username/repo&quot;)
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:branch&lt;/code&gt;: the name of the branch used for primary development, as a string. If your version lockfiles do not specify a commit to check out when the repository is cloned, then this branch is checked out, if possible. This branch is also viewed as the &quot;primary&quot; branch for the purpose of normalization and interaction with the remote.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:remote&lt;/code&gt;: the name to use for the Git remote. If the package is forked, this name is used for the upstream remote.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:nonrecursive&lt;/code&gt;: if non-nil, then submodules are not cloned. This is particularly important for the Emacsmirror recipe repository, which contains every known Emacs package in existence as submodules.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:fork&lt;/code&gt;: the settings for a fork, if desired. This causes the &lt;code&gt;fetch-from-remote&lt;/code&gt; method to operate on the fork; you can use the &lt;code&gt;fetch-from-upstream&lt;/code&gt; method to operate on the upstream instead.&lt;/p&gt; &lt;p&gt;Note: the following section assumes &lt;code&gt;straight-host-usernames&lt;/code&gt; has a value of:&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;&#39;((github    . &quot;githubUser&quot;)
  (gitlab    . &quot;gitlabUser&quot;)
  (codeberg  . &quot;codebergUser&quot;)
  (sourcehut . &quot;sourcehutUser&quot;)
  (bitbucket . &quot;bitbucketUser&quot;)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Its value may be:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;t&lt;/code&gt;: Look up the username in &lt;code&gt;straight-host-usernames&lt;/code&gt;. Inherit the repository name from the upstream repository. For example:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;( :package &quot;package&quot; :host github :type git :repo &quot;upstream/repo&quot;
  :fork t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;computes the fork&#39;s &lt;code&gt;:repo&lt;/code&gt; value as &lt;code&gt;githubUser/repo&lt;/code&gt;.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;a string (optionally ending with &quot;/&quot;): Use the string as the username. Inherit repository name from the upstream repository. For example:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;( :package &quot;package&quot; :host github :type git :repo &quot;upstream/repo&quot;
  :fork &quot;user&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;computes the fork&#39;s &lt;code&gt;:repo&lt;/code&gt; value as &lt;code&gt;user/repo&lt;/code&gt;.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;a string starting with &quot;/&quot;: Look up the username in &lt;code&gt;straight-host-usernames&lt;/code&gt;. Use the string as the repository name. For example:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;( :package &quot;package&quot; :host github :type git :repo &quot;upstream/repo&quot;
  :fork &quot;/renamed&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;computes the fork&#39;s &lt;code&gt;:repo&lt;/code&gt; value as &lt;code&gt;githubUser/renamed&lt;/code&gt;.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;a string with both the recipe and repository specified: Use string as the &lt;code&gt;:repo&lt;/code&gt; value for the fork. For example:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;( :package &quot;package&quot; :host github :type git :repo &quot;upstream/repo&quot;
  :fork &quot;user/renamed&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;computes the fork&#39;s &lt;code&gt;:repo&lt;/code&gt; value as &lt;code&gt;user/renamed&lt;/code&gt;.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;a plist: The allowed keywords are &lt;code&gt;:repo&lt;/code&gt;, &lt;code&gt;:host&lt;/code&gt;, &lt;code&gt;:branch&lt;/code&gt;, and &lt;code&gt;:remote&lt;/code&gt;. The same rules as above apply for the &lt;code&gt;:repo&lt;/code&gt; string. Likewise, if the &lt;code&gt;:host&lt;/code&gt; is overridden and the &lt;code&gt;:repo&lt;/code&gt; does not provide the username, it is looked up in &lt;code&gt;straight-host-usernames&lt;/code&gt;. For example:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;( :package &quot;package&quot; :host github :type git :repo &quot;upstream/repo&quot;
  :fork (:host gitlab))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;computes the fork&#39;s &lt;code&gt;:repo&lt;/code&gt; value as &lt;code&gt;gitlabUser/repo&lt;/code&gt;.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;( :package &quot;package&quot; :host github :type git :repo &quot;upstream/repo&quot;
  :fork (:host gitlab :repo &quot;/renamed&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;computes the fork&#39;s &lt;code&gt;:repo&lt;/code&gt; value as &lt;code&gt;gitlabUser/renamed&lt;/code&gt;.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;( :package &quot;package&quot; :host github :type git :repo &quot;upstream/repo&quot;
  :fork (:host gitlab :repo &quot;user&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;computes the fork&#39;s &lt;code&gt;:repo&lt;/code&gt; value as &lt;code&gt;user/repo&lt;/code&gt;.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;:depth&lt;/code&gt;: either the symbol &lt;code&gt;full&lt;/code&gt; or an integer. If &lt;code&gt;full&lt;/code&gt;, then the repository is cloned with its whole history. If an integer &lt;code&gt;N&lt;/code&gt;, then the repository is cloned with the option &lt;code&gt;--depth N&lt;/code&gt;. This works even when a commit is specified (e.g. by version lockfiles). The default value is &lt;code&gt;full&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:protocol&lt;/code&gt;: If non-nil, force this protocol to be used when interacting with the remote repository. Takes the same values as &lt;code&gt;straight-vc-git-default-protocol&lt;/code&gt;.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;This section tells you how the &lt;code&gt;git&lt;/code&gt; backend, specifically, implements the version-control backend API:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;clone&lt;/code&gt;: clones the repository, including submodules if &lt;code&gt;:nonrecursive&lt;/code&gt; is not provided. Checks out the commit specified in your revision lockfile, or the &lt;code&gt;:branch&lt;/code&gt; (from the &lt;code&gt;:fork&lt;/code&gt; configuration, if given), or &lt;code&gt;origin/HEAD&lt;/code&gt;. If a &lt;code&gt;:fork&lt;/code&gt; is specified, also fetches from the upstream.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;commit-present-p&lt;/code&gt;: checks if the commit SHA is among the revisions that are present locally.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;normalize&lt;/code&gt;: verifies that remote URLs are set correctly, that no merge is in progress, that the worktree is clean, and that the primary &lt;code&gt;:branch&lt;/code&gt; (from the &lt;code&gt;:fork&lt;/code&gt; configuration, if given) is checked out.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;fetch-from-remote&lt;/code&gt;: checks that remote URLs are set correctly, then fetches from the primary remote (the fork, if the package is forked).&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;fetch-from-upstream&lt;/code&gt;: checks that remote URLs are set correctly, then fetches from the upstream remote. If the package is not a fork, does nothing.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;merge-from-remote&lt;/code&gt;: performs normalization, then merges from the primary remote (the fork, if the package is forked) into the primary local &lt;code&gt;:branch&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;merge-from-upstream&lt;/code&gt;: performs normalization, then merges from the upstream remote into the primary local &lt;code&gt;:branch&lt;/code&gt;. If the package is not a fork, does not attempt to merge.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;push-to-remote&lt;/code&gt;: performs normalization, pulls from the primary remote if necessary, and then pushes if necessary. This operation acts on the fork, if the package is forked.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;check-out-commit&lt;/code&gt;: verifies that no merge is in progress and that the worktree is clean, then resets the worktree to the specified commit.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;get-commit&lt;/code&gt;: returns HEAD as a 40-character string.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;local-repo-name&lt;/code&gt;: if &lt;code&gt;:host&lt;/code&gt; is non-nil, then &lt;code&gt;:repo&lt;/code&gt; will be of the form &quot;username/repository&quot;, and &quot;repository&quot; is used. Otherwise, if the URL is of the form &lt;code&gt;.../&amp;lt;something&amp;gt;.git&lt;/code&gt;, then &lt;code&gt;&amp;lt;something&amp;gt;&lt;/code&gt; is used. Otherwise, nil is returned.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;keywords&lt;/code&gt;: see the list of keywords above.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;You can customize the following user options:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-vc-git-default-remote-name&lt;/code&gt;: the name to use for the primary remote, or the upstream remote if the package is forked. Defaults to &quot;origin&quot;. The &lt;code&gt;:remote&lt;/code&gt; keyword may be used to override the value of this variable on a per-repository basis.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-vc-git-default-fork-name&lt;/code&gt;: the name to use for the fork remote, if the package is forked. Defaults to &quot;fork&quot;. The &lt;code&gt;:remote&lt;/code&gt; keyword may be used to override the value of this variable on a per-repository basis.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-vc-git-default-protocol&lt;/code&gt;: the default protocol to use for automatically generated URLs when &lt;code&gt;:host&lt;/code&gt; is non-nil. It can be either &lt;code&gt;https&lt;/code&gt; or &lt;code&gt;ssh&lt;/code&gt;, and defaults to &lt;code&gt;https&lt;/code&gt; because this requires less work to set up.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-vc-git-force-protocol&lt;/code&gt;: if this is non-nil, then HTTPS and SSH URLs are not treated as equivalent, so that bulk version-control operations will offer to re-set your remote URLs from HTTPS to SSH or vice versa, depending on the value of &lt;code&gt;straight-vc-git-default-protocol&lt;/code&gt;. This is nil by default.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-vc-git-auto-fast-forward&lt;/code&gt;: if this is non-nil, pulling will quietly do fast-forward, to suppress asking for instructions on each package with updates, unless they&#39;re not trivial. Set to nil if you&#39;d prefer to inspect all changes.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;straight-vc-git-default-clone-depth&lt;/code&gt;: the default value for the &lt;code&gt;:depth&lt;/code&gt; keyword. It can be either the symbol &lt;code&gt;full&lt;/code&gt; or an integer, and defaults to &lt;code&gt;full&lt;/code&gt;. Setting this variable to a small integer will reduce the size of repositories. This variable affects all packages, even those whose versions are locked.&lt;/p&gt; &lt;p&gt;Please be careful with setting &lt;code&gt;straight-vc-git-default-clone-depth&lt;/code&gt;, which may break some packages&#39; installing processes such as &lt;code&gt;elfeed&lt;/code&gt; that depend on &lt;code&gt;org&lt;/code&gt;.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Recipe lookup&lt;/h3&gt; 
&lt;p&gt;If you only provide a symbol (package name) to &lt;code&gt;straight-use-package&lt;/code&gt;, then the recipe is looked up automatically. By default, &lt;a href=&quot;http://melpa.org/#/&quot;&gt;MELPA&lt;/a&gt;, &lt;a href=&quot;https://elpa.gnu.org/&quot;&gt;GNU ELPA&lt;/a&gt;, and &lt;a href=&quot;https://emacsmirror.net/&quot;&gt;Emacsmirror&lt;/a&gt; are searched for recipes, in that order. This means that one or more of them may need to be cloned. Recipe repositories are actually just the same as ordinary packages, except that their recipes specify &lt;code&gt;:build nil&lt;/code&gt;, so they are not symlinked or added to the &lt;code&gt;load-path&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;Note that dependencies always use the default recipes, since the only information &lt;code&gt;straight.el&lt;/code&gt; gets about a package&#39;s dependencies are their names.&lt;/p&gt; 
&lt;p&gt;This leads to a few interesting questions regarding requesting a package multiple times. For example, you might need to load two features using &lt;a href=&quot;https://github.com/jwiegley/use-package&quot;&gt;&lt;code&gt;use-package&lt;/code&gt;&lt;/a&gt; that are provided from the same package, or one of the packages you have installed is also requested as a dependency by another package. &lt;code&gt;straight.el&lt;/code&gt; uses a number of heuristics to try to make these interactions as intuitive and painless as possible:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;The first time a package is registered with &lt;code&gt;straight.el&lt;/code&gt;, its recipe (either the recipe that you provided, or the one that was looked up from a recipe repository) is recorded. In future registration, if you just provide the package name to &lt;code&gt;straight-use-package&lt;/code&gt;, the existing recipe is reused.&lt;/p&gt; &lt;p&gt;Note, however: &lt;em&gt;if&lt;/em&gt; you want to use a custom recipe for a given package, you must load it &lt;em&gt;before&lt;/em&gt; all of its dependencies. Otherwise, the package will first be registered as a dependency, using the default recipe.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;If a package has already been registered with &lt;code&gt;straight.el&lt;/code&gt;, and you attempt to load it again with an explicit recipe which is different from the one previously registered, the new recipe is used but a warning is signalled.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;If you attempt to register a package which shares a &lt;code&gt;:local-repo&lt;/code&gt; (either by default, or due to explicit specification) with a previously registered package, and the two packages specify different values for their version-control keywords (see &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-backends&quot;&gt;version-control backends&lt;/a&gt;), then the new recipe is used but a warning is signalled. If the repository was already cloned, this means the second recipe will have no effect.&lt;/p&gt; &lt;p&gt;But if the second recipe was fetched automatically from a recipe repository, all of its version-control keywords will be silently overwritten with the ones from the first recipe, to avoid conflicts (although if there are conflicts in other parts of the recipe, a warning will still be displayed).&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Updating recipe repositories&lt;/h4&gt; 
&lt;p&gt;As mentioned in the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#where-do-recipes-come-from&quot;&gt;conceptual overview&lt;/a&gt;, recipe repositories are just regular packages, with some extra code to look up recipes in the relevant local repository.&lt;/p&gt; 
&lt;p&gt;This means that updating a recipe repository may be done the same way as updating a regular package, i.e. with &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-operations&quot;&gt;&lt;code&gt;M-x straight-pull-package&lt;/code&gt;&lt;/a&gt;. A convenience command with interactive completion for recipe repositories, &lt;code&gt;straight-pull-recipe-repositories&lt;/code&gt;, is provided as well. You should use one of these if you find that a package isn&#39;t listed by &lt;code&gt;M-x straight-use-package&lt;/code&gt;—perhaps it was added recently.&lt;/p&gt; 
&lt;p&gt;Note that there is currently some potentially surprising behavior if you update all packages at once using &lt;code&gt;M-x straight-pull-all&lt;/code&gt; or &lt;code&gt;M-x straight-merge-all&lt;/code&gt;, and this bulk update includes recipe repository updates: see &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/323&quot;&gt;#323&lt;/a&gt;.&lt;/p&gt; 
&lt;h4&gt;Customizing recipe repositories&lt;/h4&gt; 
&lt;p&gt;The recipe repository system is designed to be extended. Firstly, you can control which recipe repositories are searched, and in what order of precedence, by customizing &lt;code&gt;straight-recipe-repositories&lt;/code&gt;. The default value is defined by the &lt;code&gt;straight-use-recipes&lt;/code&gt; declarations present in the file &lt;code&gt;bootstrap.el&lt;/code&gt; in the &lt;code&gt;straight.el&lt;/code&gt; version you are using, as customized by the user options you configure in your init-file before loading the bootstrap snippet. As of the time of this writing, with no custom user options set, that works out to be:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(org-elpa melpa gnu-elpa-mirror nongnu-elpa el-get emacsmirror-mirror)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h5&gt;GNU ELPA&lt;/h5&gt; 
&lt;p&gt;You can customize the following user options:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight-recipes-gnu-elpa-url&lt;/code&gt;: The Git URL to use for the &lt;code&gt;gnu-elpa&lt;/code&gt; recipe repository.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight-recipes-gnu-elpa-use-mirror&lt;/code&gt;: GNU ELPA uses a stupidly complex build system for no good reason, and it&#39;s unlikely to change any time soon. What this means for you is that you have to run the Elisp-powered Makefile of the GNU ELPA repository (which has a fatal bug last I checked, so you&#39;d have to patch it locally) &lt;em&gt;and&lt;/em&gt; have a full checkout of the Emacs source repository (more than 1GB) if you want all the packages to work correctly. To work around this problem, I maintain a &lt;a href=&quot;https://github.com/emacs-straight&quot;&gt;full mirror of GNU ELPA on GitHub&lt;/a&gt;. (The tooling used to maintain this mirror is located &lt;a href=&quot;https://github.com/radian-software/gnu-elpa-mirror&quot;&gt;here&lt;/a&gt;.) By default, &lt;code&gt;straight.el&lt;/code&gt; retrieves packages from this mirror instead of the source repository; this behavior is controlled by the value of &lt;code&gt;straight-recipes-gnu-elpa-use-mirror&lt;/code&gt;. You must do any customization of this variable &lt;em&gt;before&lt;/em&gt; the &lt;code&gt;straight.el&lt;/code&gt; &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#getting-started&quot;&gt;bootstrap&lt;/a&gt;. Note that setting the value of this user option to nil causes the default value of &lt;code&gt;straight-recipe-repositories&lt;/code&gt; to shift to:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(org-elpa melpa gnu-elpa el-get emacsmirror)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h5&gt;Emacsmirror&lt;/h5&gt; 
&lt;p&gt;You can customize the following user option:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;straight-recipes-emacsmirror-use-mirror&lt;/code&gt;: Yes, there is also a mirror for Emacsmirror. This is because the &lt;a href=&quot;https://github.com/emacsmirror/epkgs&quot;&gt;epkgs&lt;/a&gt; repository contains a fair amount of metadata, which means it can take a little on the long side to clone with slow network connections (see &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/356&quot;&gt;#356&lt;/a&gt; and &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/700&quot;&gt;#700&lt;/a&gt;). My solution to this problem is to generate a new repository which contains the information that &lt;code&gt;straight.el&lt;/code&gt; needs but which is much smaller. By default, &lt;code&gt;straight.el&lt;/code&gt; uses the official &lt;a href=&quot;https://github.com/emacsmirror/epkgs&quot;&gt;epkgs&lt;/a&gt; repository to find packages on Emacsmirror, but you can tell it to use my mirror by configuring the value of this variable to non-nil. You must do any customization of this variable &lt;em&gt;before&lt;/em&gt; the &lt;code&gt;straight.el&lt;/code&gt; &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#getting-started&quot;&gt;bootstrap&lt;/a&gt;. Note that setting the value of this user option to non-nil causes the default value of &lt;code&gt;straight-recipe-repositories&lt;/code&gt; to shift to:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(org-elpa melpa gnu-elpa-mirror el-get emacsmirror-mirror)
&lt;/code&gt;&lt;/pre&gt; 
&lt;h5&gt;Defining new recipe repositories&lt;/h5&gt; 
&lt;p&gt;To define a new recipe repository called &lt;code&gt;NAME&lt;/code&gt;, you should do the following things:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;Define a function &lt;code&gt;straight-recipes-NAME-retrieve&lt;/code&gt;, which takes a package name as a symbol and returns a recipe for that package if it is available, else nil. This is used for recipe lookup. This function may assume that the local repository for the recipe repository has already been cloned, and that &lt;code&gt;default-directory&lt;/code&gt; has been set to that local repository. This is used for recipe lookup during the course of &lt;code&gt;straight-use-package&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;If the returned recipe is a backquoted list, it will be evaluated during &lt;code&gt;straight--convert-recipe&lt;/code&gt;. This is useful for specifying dynamic elements within the recipe such as system-specific build commands. For example, if &lt;code&gt;straight-recipes-NAME-retrieve&lt;/code&gt; returns:&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;&#39;`( package :type git :repo &quot;host/repo&quot;
    :pre-build ,(pcase system-type
                  (`berkeley-unix &#39;(&quot;gmake&quot;))
                  (_ &#39;(&quot;make&quot;)))
    :files (:defaults))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The recipe is converted to:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(package :type git :repo &quot;host/repo&quot;
 :pre-build (&quot;make&quot;)
 :files (:defaults))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;on a &lt;code&gt;gnu/linux&lt;/code&gt; system, and:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(package :type git :repo &quot;host/repo&quot;
         :pre-build (&quot;gmake&quot;)
         :files (:defaults))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;on a &lt;code&gt;berkely-unix&lt;/code&gt; system.&lt;/p&gt; 
&lt;p&gt;The recipe could be read from a file in the recipe repository as well. In this case, the quote is &lt;em&gt;not&lt;/em&gt; included in the recipe, as &lt;code&gt;straight-recipes-NAME-retrieve&lt;/code&gt; would make use of &lt;code&gt;read&lt;/code&gt;, which will return the literal Lisp object. For example, considering the following retrieval function:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(defun straight-recipes-example-retrieve (name)
  (with-temp-buffer
    (insert-file-literally &quot;./recipes/example.recipe&quot;)
    (read (buffer-string))))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The recipe from above could be stored in the file, &lt;code&gt;example.recipe&lt;/code&gt;, as:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;`( package :type git :repo &quot;host/repo&quot;
   :pre-build ,(pcase system-type
                 (`berkeley-unix &#39;(&quot;gmake&quot;))
                 (_ &#39;(&quot;make&quot;)))
   :files (:defaults))
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt;Define a function &lt;code&gt;straight-recipes-NAME-list&lt;/code&gt;, which takes no arguments and returns a list of strings representing packages for which recipes are available. It is permissible to return some strings for which recipes are actually not available, for performance reasons. However, this is discouraged. (The &lt;a href=&quot;http://melpa.org/#/&quot;&gt;MELPA&lt;/a&gt; backend uses this functionality, since all files in the &lt;code&gt;recipes&lt;/code&gt; directory are potentially recipes, but only the Git-based ones can actually be used.)&lt;/li&gt; 
 &lt;li&gt;(Optional) Define a function &lt;code&gt;straight-recipes-NAME-version&lt;/code&gt; which returns a non-nil value indicating the current version of the logic in your &lt;code&gt;straight-recipes-NAME-retrieve&lt;/code&gt; function. Each time you change the logic, this version value must be changed. If this function is defined, then &lt;code&gt;straight.el&lt;/code&gt; automatically and transparently caches calls to &lt;code&gt;straight-recipes-NAME-retrieve&lt;/code&gt; persistently, using your version value (and its detection of modifications to the recipe repository) to decide when to invalidate the cache.&lt;/li&gt; 
 &lt;li&gt;Call &lt;code&gt;straight-use-recipes&lt;/code&gt; with the recipe for your recipe repository. Make sure to include &lt;code&gt;:build nil&lt;/code&gt; in the recipe, unless you also want to use the recipe repository as an executable Emacs Lisp package. Alternatively, you can take the manual approach: 
  &lt;ul&gt; 
   &lt;li&gt;Call &lt;code&gt;straight-use-package-lazy&lt;/code&gt; with the recipe for your recipe repository.&lt;/li&gt; 
   &lt;li&gt;Add the symbol for your recipe repository&#39;s name (the car of the recipe you provided, that is) to &lt;code&gt;straight-recipe-repositories&lt;/code&gt;, at the appropriate place.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Overriding recipes&lt;/h3&gt; 
&lt;p&gt;You can always use &lt;code&gt;straight-register-package&lt;/code&gt; to specify a specific recipe for a package without cloning or building it, so that just in case that package is requested later (possibly as a dependency, or in somebody else&#39;s code) your recipe will be used instead of the default one. However, this does not help in the case that a specific recipe is passed to &lt;code&gt;straight-use-package&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;Also, it is obviously impossible to call &lt;code&gt;straight-register-package&lt;/code&gt; before &lt;code&gt;straight.el&lt;/code&gt; has been loaded, so you can&#39;t use it to specify a custom recipe for &lt;code&gt;straight.el&lt;/code&gt; itself.&lt;/p&gt; 
&lt;p&gt;To remedy these difficulties, &lt;code&gt;straight.el&lt;/code&gt; provides a mechanism for specifically overriding the recipe for a particular package. You can use it by customizing &lt;code&gt;straight-recipe-overrides&lt;/code&gt;, or by calling &lt;code&gt;straight-override-recipe&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;straight-recipe-overrides&lt;/code&gt; is an association list from &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-profile-system&quot;&gt;profile names&lt;/a&gt; to &lt;em&gt;override alists&lt;/em&gt;. If you don&#39;t care about the profile system, you can just use a single override specification, with the profile name nil. Each override alist is just a list of recipes. Because the car of a recipe is just the package name as a symbol, this list of recipes is also an alist whose keys are recipe names and whose values are the plists for those recipes.&lt;/p&gt; 
&lt;p&gt;Even if an explicit recipe is supplied to &lt;code&gt;straight-use-package&lt;/code&gt;, the one given in &lt;code&gt;straight-recipe-overrides&lt;/code&gt; will be used instead, if such a recipe is specified there.&lt;/p&gt; 
&lt;p&gt;For convenience, you may add to &lt;code&gt;straight-recipe-overrides&lt;/code&gt; by passing a recipe to &lt;code&gt;straight-override-recipe&lt;/code&gt;. This will register it in the override alist for the current profile. Note that if you do this, you will probably want to explicitly set &lt;code&gt;straight-recipe-overrides&lt;/code&gt; to nil before bootstrapping &lt;code&gt;straight.el&lt;/code&gt;. This will make it so that if you remove a call to &lt;code&gt;straight-override-recipe&lt;/code&gt; from your init-file and then reload it, the entry will actually be removed from &lt;code&gt;straight-recipe-overrides&lt;/code&gt;.&lt;/p&gt; 
&lt;h4&gt;Overriding the recipe for &lt;code&gt;straight.el&lt;/code&gt;&lt;/h4&gt; 
&lt;p&gt;As was briefly mentioned earlier, you can actually override the recipe of &lt;code&gt;straight.el&lt;/code&gt; itself using &lt;code&gt;straight-recipe-overrides&lt;/code&gt;! How does this work? Well, it&#39;s basically black magic. If you want the details, go read the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#developer-manual&quot;&gt;developer manual&lt;/a&gt;. All you need to know is that you can set &lt;code&gt;straight-recipe-overrides&lt;/code&gt;, and it will magically work. The only caveat is that if you change the &lt;code&gt;:local-repo&lt;/code&gt; for &lt;code&gt;straight.el&lt;/code&gt;, then you will also need to adjust the value of &lt;code&gt;bootstrap-file&lt;/code&gt; in the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#getting-started&quot;&gt;bootstrap snippet&lt;/a&gt; accordingly, since otherwise your init-file will not know where to find &lt;code&gt;straight.el&lt;/code&gt;. (You must use &lt;code&gt;straight-recipe-overrides&lt;/code&gt; instead of &lt;code&gt;straight-override-recipe&lt;/code&gt;, since the latter function definition hasn&#39;t been loaded yet before &lt;code&gt;straight.el&lt;/code&gt; is installed and bootstrapped.)&lt;/p&gt; 
&lt;p&gt;Here is the default recipe used for &lt;code&gt;straight.el&lt;/code&gt;, if you don&#39;t override it:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight :type git :host github
          :repo ,(format &quot;%s/straight.el&quot; straight-repository-user)
          :files (&quot;straight*.el&quot;)
          :branch ,straight-repository-branch)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Note that even though the bootstrap snippet references the &lt;code&gt;develop&lt;/code&gt; branch of &lt;code&gt;straight.el&lt;/code&gt;, the default recipe installs from &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;If all you want to do is change which branch you are installing &lt;code&gt;straight.el&lt;/code&gt; from, simply customize the variable &lt;code&gt;straight-repository-branch&lt;/code&gt;, which is provided for this purpose. (Although using &lt;code&gt;straight-recipe-overrides&lt;/code&gt; will work just as well, at least until the recipe happens to be changed upstream and your init-file isn&#39;t updated.)&lt;/p&gt; 
&lt;p&gt;Similarly, if all you want to do is switch to your own fork of &lt;code&gt;straight.el&lt;/code&gt; on GitHub, simply customize the variable &lt;code&gt;straight-repository-user&lt;/code&gt; to your GitHub username.&lt;/p&gt; 
&lt;p&gt;There is one minor caveat to the above discussion. If your fork makes changes to the way in which recipes are interpreted, then those changes will not be effective during the interpretation of your own recipe for &lt;code&gt;straight.el&lt;/code&gt;. If you wish for them to be, then you will have to follow the same procedure that is followed in &lt;code&gt;straight.el&lt;/code&gt; itself for making changes to recipe interpretation. These details are outlined in the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#developer-manual&quot;&gt;developer manual&lt;/a&gt;; see also &lt;code&gt;install.el&lt;/code&gt; for an explanation of this aspect of the bootstrap mechanism.&lt;/p&gt; 
&lt;h3&gt;Interactive usage&lt;/h3&gt; 
&lt;p&gt;The primary usage of &lt;code&gt;straight.el&lt;/code&gt; is expected to be in your init-file. For example, this is where you will need to put the bootstrap code as well as any packages that you always want to be installed. However, there are three important interactive uses of &lt;code&gt;straight.el&lt;/code&gt;: temporary installation of packages, various helpful utility functions, and &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-operations&quot;&gt;version control operations&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;To install a package temporarily, run &lt;code&gt;M-x straight-use-package&lt;/code&gt;. All registered recipe repositories will be cloned, and you will be presented with a combined list of all recipes available from them. Simply select a package and it will be cloned, built, and loaded automatically. This does not affect future Emacs sessions.&lt;/p&gt; 
&lt;p&gt;If you provide a prefix argument to &lt;code&gt;M-x straight-use-package&lt;/code&gt;, then you are presented with a list of registered recipe repositories. After you select one, you are shown a list of recipes specifically from that recipe repository. This is helpful if you do not want to clone all registered recipe repositories, or you have a particular recipe repository in mind.&lt;/p&gt; 
&lt;p&gt;You can also call &lt;code&gt;M-x straight-get-recipe&lt;/code&gt;, which has the same interface as &lt;code&gt;M-x straight-use-package&lt;/code&gt;, except that instead of the package being cloned, built, and loaded, its recipe is copied to the kill ring. If you are writing a custom recipe, this may be helpful, because you may be able to reuse parts of the existing recipe, particularly the &lt;code&gt;:files&lt;/code&gt; directive.&lt;/p&gt; 
&lt;p&gt;Normally, packages are rebuilt automatically if needed, when Emacs restarts. If you for some reason want them to be rebuilt at another time, you can call &lt;code&gt;M-x straight-check-all&lt;/code&gt; to rebuild all packages that have been modified since their last build. Alternatively, use &lt;code&gt;M-x straight-rebuild-all&lt;/code&gt; to unconditionally rebuild all packages. Note that this will probably take a while. There are also &lt;code&gt;M-x straight-check-package&lt;/code&gt; and &lt;code&gt;M-x straight-rebuild-package&lt;/code&gt;, which allow you to select a particular package to check or rebuild.&lt;/p&gt; 
&lt;p&gt;Finally, you may use &lt;code&gt;M-x straight-prune-build&lt;/code&gt; in order to tell &lt;code&gt;straight.el&lt;/code&gt; to forget about any packages which were not registered since the last time you loaded your init-file. This may improve performance, although only slightly, and will clean up stale entries in the &lt;code&gt;build&lt;/code&gt; directory. You can call this function in your init-file if you really wish your filesystem to be as clean as possible, although it&#39;s not particularly recommended as the performance implications are uninvestigated. If you do call it in your init-file, be sure to only call it on a fully successful init; otherwise, an error during init will result in some packages&#39; build information being discarded, and they will need to be rebuilt next time.&lt;/p&gt; 
&lt;p&gt;If you have enabled &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#customizing-how-packages-are-made-available&quot;&gt;autoloads caching&lt;/a&gt;, it is advisable to call &lt;code&gt;straight-prune-build&lt;/code&gt; occasionally, since otherwise the build cache may grow quite large over time.&lt;/p&gt; 
&lt;h4&gt;Version control operations&lt;/h4&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; provides a number of highly interactive workflows for managing your package&#39;s local repositories, using the configured &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-backends&quot;&gt;version-control backends&lt;/a&gt;. They are as follows:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-normalize-package&lt;/code&gt;: normalize a package&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-normalize-all&lt;/code&gt;: normalize all packages&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-fetch-package&lt;/code&gt;: fetch from a package&#39;s configured remote; with prefix argument, then for forks also fetch from the upstream&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-fetch-package-and-deps&lt;/code&gt;: fetch from the configured remotes of a package and all of its dependencies (including the dependencies of its dependencies); with prefix argument, then for forks also fetch from the upstream&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-fetch-all&lt;/code&gt;: fetch from all packages&#39; configured remotes; with prefix argument, then for forks also fetch from the upstreams&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-merge-package&lt;/code&gt;: merge the latest version fetched from a package&#39;s configured remote into the local copy; with prefix argument, then for forks also merge from the upstream&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-merge-package-and-deps&lt;/code&gt;: merge the latest versions fetched from the configured remotes of a package and all of its dependencies (including the dependencies of its dependencies); with prefix argument, then for forks also merge from the upstreams&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-merge-all&lt;/code&gt;: merge the latest versions fetched from each package&#39;s configured remote into its local copy; with prefix argument, then for forks also merge from the upstreams&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-pull-package&lt;/code&gt;: combination of &lt;code&gt;M-x straight-fetch-package&lt;/code&gt; and &lt;code&gt;M-x straight-merge-package&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-pull-package-and-deps&lt;/code&gt;: combination of &lt;code&gt;M-x straight-fetch-package-and-deps&lt;/code&gt; and &lt;code&gt;M-x straight-merge-package-and-deps&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-pull-all&lt;/code&gt;: combination of &lt;code&gt;M-x straight-fetch-all&lt;/code&gt; and &lt;code&gt;M-x straight-merge-all&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-push-package&lt;/code&gt;: push a package to its remote, if necessary&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;M-x straight-push-all&lt;/code&gt;: push all packages to their remotes, if necessary&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;See the sections on &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-backends&quot;&gt;version-control backends&lt;/a&gt; and the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#git-backend&quot;&gt;Git backend&lt;/a&gt; in particular for more information about the meanings of these operations.&lt;/p&gt; 
&lt;h3&gt;Lockfile management&lt;/h3&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; determines your package management configuration from two, and only two, sources: the contents of your init-file, and your version lockfiles (which are optional). Your init-file specifies the configuration of &lt;code&gt;straight.el&lt;/code&gt; (for example, the values of &lt;code&gt;straight-recipe-overrides&lt;/code&gt; and &lt;code&gt;straight-default-vc&lt;/code&gt;), the packages you want to use, and their recipes. Your version lockfiles specify the exact revisions of each package, recipe repository, and even &lt;code&gt;straight.el&lt;/code&gt; itself. Together, they lock down your Emacs configuration to a state of no uncertainty: perfect reproducibility.&lt;/p&gt; 
&lt;p&gt;To write the current revisions of all your packages into version lockfiles, run &lt;code&gt;M-x straight-freeze-versions&lt;/code&gt;. This will first check that &lt;code&gt;straight.el&lt;/code&gt; has an up-to-date account of what packages are installed by your init-file, then ensure that all your local changes are pushed (remember, we are aiming for perfect reproducibility!). If you wish to bypass these checks, provide a prefix argument.&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;Note: reloading your init-file must have the effect of running all of the same &lt;code&gt;straight.el&lt;/code&gt;-related functions again. For example, if you bootstrap &lt;code&gt;straight.el&lt;/code&gt; in a sub-file that you only &lt;code&gt;require&lt;/code&gt; instead of &lt;code&gt;load&lt;/code&gt;, then the reloading functionality will not work correctly and you may receive the message &lt;code&gt;Caches are still outdated; something is seriously wrong&lt;/code&gt;. See &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/437&quot;&gt;#437&lt;/a&gt; for discussion.&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;Version lockfiles are written into &lt;code&gt;~/.emacs.d/straight/versions&lt;/code&gt;. By default, there will be one, called &lt;code&gt;default.el&lt;/code&gt;. It is recommended that you keep your version lockfiles under version control with the rest of your Emacs configuration. If you symlink your init-file into &lt;code&gt;~/.emacs.d&lt;/code&gt; from somewhere else, you should also make sure to symlink your version lockfiles into &lt;code&gt;~/.emacs.d/straight/versions&lt;/code&gt;. On a new machine, do this &lt;em&gt;before&lt;/em&gt; launching Emacs: that way, &lt;code&gt;straight.el&lt;/code&gt; can make sure to check out the specified revisions of each package when cloning them for the first time.&lt;/p&gt; 
&lt;p&gt;To install the versions of the packages specified in your version lockfiles, run &lt;code&gt;M-x straight-thaw-versions&lt;/code&gt;. Thawing will interactively check for local changes before checking out the relevant revisions, so don&#39;t worry about things getting overwritten.&lt;/p&gt; 
&lt;h4&gt;The profile system&lt;/h4&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; has support for writing multiple version lockfiles, instead of just one. Why? Consider a large Emacs configuration such as &lt;a href=&quot;https://github.com/radian-software/radian&quot;&gt;Radian&lt;/a&gt;, &lt;a href=&quot;http://spacemacs.org/&quot;&gt;Spacemacs&lt;/a&gt;, or &lt;a href=&quot;https://github.com/bbatsov/prelude&quot;&gt;Prelude&lt;/a&gt;, which is used by many different people. There are two parts to the configuration that is actually loaded: the &quot;default&quot; part, and the local customizations that each user has added. Generally, these configurations have a mechanism for making local customizations without forking the entire project.&lt;/p&gt; 
&lt;p&gt;So Radian will have some set of packages that it requires, and my local customizations of Radian have some other set of packages that they require. In order for me to maintain Radian, I need to be able to separate Radian&#39;s packages (which go into a versions lockfile in the Radian repository) from my own local packages (which go into a versions lockfile in my own private local dotfiles repository). &lt;code&gt;straight.el&lt;/code&gt; provides this ability through the &lt;em&gt;profile system&lt;/em&gt;.&lt;/p&gt; 
&lt;p&gt;The idea is that whenever a package is registered, either directly or as a dependency, it is associated with a given profile. Any given package can be associated with multiple profiles.&lt;/p&gt; 
&lt;p&gt;When you call &lt;code&gt;straight-use-package&lt;/code&gt;, which profile the registered packages are associated with is determined by the value of &lt;code&gt;straight-current-profile&lt;/code&gt;, which defaults to nil. In Radian, for example, &lt;code&gt;straight-current-profile&lt;/code&gt; is bound to &lt;code&gt;radian&lt;/code&gt; while the Radian libraries are being loaded, and it is bound to &lt;code&gt;radian-local&lt;/code&gt; while the user&#39;s local customizations are being loaded. This results in Radian packages being associated with the &lt;code&gt;radian&lt;/code&gt; profile, and the user&#39;s local packages being associated with the &lt;code&gt;radian-local&lt;/code&gt; profile.&lt;/p&gt; 
&lt;p&gt;When you call &lt;code&gt;M-x straight-freeze-versions&lt;/code&gt;, one or more version lockfiles are written, according to the value of &lt;code&gt;straight-profiles&lt;/code&gt;. This variable is an association list whose keys are symbols naming profiles and whose values are filenames for the corresponding version lockfiles to be written into &lt;code&gt;~/.emacs.d/straight/versions&lt;/code&gt;. You should make sure that each potential value of &lt;code&gt;straight-current-profile&lt;/code&gt; has a corresponding entry in &lt;code&gt;straight-profiles&lt;/code&gt;, since otherwise some packages might not be written into your lockfiles.&lt;/p&gt; 
&lt;p&gt;When customizing &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#overriding-recipes&quot;&gt;&lt;code&gt;straight-recipe-overrides&lt;/code&gt;&lt;/a&gt;, note that if multiple profiles are set to override the same recipe, then the last one listed in &lt;code&gt;straight-profiles&lt;/code&gt; will take precedence. Similarly, when using &lt;code&gt;M-x straight-thaw-versions&lt;/code&gt;, if different lockfiles specify revisions for the same local repository, the last one in &lt;code&gt;straight-profiles&lt;/code&gt; will take precedence.&lt;/p&gt; 
&lt;h3&gt;Packages and the init-file&lt;/h3&gt; 
&lt;p&gt;Package managers like &lt;code&gt;package.el&lt;/code&gt; store mutable state outside your init-file, including the set of packages that are installed. &lt;code&gt;straight.el&lt;/code&gt; does not do this, so it has a rather different way of determining what packages are installed. To &lt;code&gt;straight.el&lt;/code&gt;, a package is part of your Emacs configuration if it is passed to &lt;code&gt;straight-use-package&lt;/code&gt; when your init-file is loaded.&lt;/p&gt; 
&lt;p&gt;Note that this means packages installed interactively (using &lt;code&gt;M-x straight-use-package&lt;/code&gt;) are not considered part of your Emacs configuration, since the invocation of &lt;code&gt;straight-use-package&lt;/code&gt; does not happen in your init-file.&lt;/p&gt; 
&lt;p&gt;This raises an interesting question: if you &lt;em&gt;add&lt;/em&gt; a package to your init-file, how can you convince &lt;code&gt;straight.el&lt;/code&gt; that it really is part of your init-file, and not just part of a temporary &lt;code&gt;straight-use-package&lt;/code&gt; form that you evaluated ad-hoc? The answer is simple: &lt;em&gt;reload your entire init-file&lt;/em&gt;. That way, &lt;code&gt;straight.el&lt;/code&gt; will see whether or not that package is registered during your init-file.&lt;/p&gt; 
&lt;p&gt;One might ask how &lt;code&gt;straight.el&lt;/code&gt; determines that you have finished loading your init-file. The answer is simple: &lt;code&gt;post-command-hook&lt;/code&gt; is used to execute code only after the current interactive operation has finished. The implementation of this concept is part of the &lt;em&gt;transaction system&lt;/em&gt; of &lt;code&gt;straight.el&lt;/code&gt;, and it is also used to amortize certain performance costs when many calls to &lt;code&gt;straight-use-package&lt;/code&gt; are made sequentially. However, since the transaction system (at least in recent versions of &lt;code&gt;straight.el&lt;/code&gt;) operates transparently, its details are relegated to the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#developer-manual&quot;&gt;developer manual&lt;/a&gt;.&lt;/p&gt; 
&lt;h4&gt;Byte-compiling the init-file&lt;/h4&gt; 
&lt;p&gt;There is considerable complexity with byte-compiling your init-file, with any configuration (not just with &lt;code&gt;straight.el&lt;/code&gt;). In fact, the &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html&quot;&gt;official Emacs manual&lt;/a&gt; recommends against doing so. However, you can still do it, and this is supported by &lt;code&gt;straight.el&lt;/code&gt;. This section explains what you have to know in order to do it correctly.&lt;/p&gt; 
&lt;p&gt;The biggest issue with byte-compilation is that the environment in which you are byte-compiling the code, may affect how the code is byte-compiled. This may not be obvious because in other languages such as C, there is no such thing as there being an &quot;existing environment&quot; derived from the runtime state of a program, when you compile something.&lt;/p&gt; 
&lt;p&gt;Consider a case where you depend on macros in your init-file, for example &lt;code&gt;use-package&lt;/code&gt;. &lt;code&gt;use-package&lt;/code&gt; has various extension libraries which provide additional keywords, including &lt;code&gt;straight.el&lt;/code&gt; itself which provides the &lt;code&gt;:straight&lt;/code&gt; keyword. If those libraries are not loaded in the context in which the &lt;code&gt;use-package&lt;/code&gt; macro is expanded, then the keywords will not process correctly, because the keyword logic is implemented at macroexpansion time, not runtime (and macros are expanded during byte-compilation, unless the macros are not defined yet).&lt;/p&gt; 
&lt;p&gt;So, in order to correctly byte-compile an init-file which contains &lt;code&gt;use-package&lt;/code&gt; declarations, you must ensure that any keyword-providing libraries are loaded not only in your runtime context, but also the byte-compilation context. In the case that the libraries are provided by &lt;code&gt;straight.el&lt;/code&gt;, then you would also need to load &lt;code&gt;straight.el&lt;/code&gt; at byte-compilation time. You can arrange for this sort of thing via &lt;code&gt;eval-when-compile&lt;/code&gt; or &lt;code&gt;eval-and-compile&lt;/code&gt;, however there are additional complications, for example invoking &lt;code&gt;straight.el&lt;/code&gt; during byte-compilation may lead to &lt;code&gt;straight.el&lt;/code&gt; trying to clone or build packages during byte-compilation, possibly leading to unexpected results since byte-compilation generally does not have stateful effects on files outside the one being compiled. Furthermore &lt;code&gt;straight.el&lt;/code&gt; expects that all relevant packages are registered during a single initialization session, so creating a second context in which a different set of packages are registered for byte-compilation, may create unexpected results with respect to modification detection and the build cache.&lt;/p&gt; 
&lt;p&gt;Personally, my &quot;foolproof&quot; way of byte-compiling the init-file is to always byte-compile it from within an Emacs instance which has already loaded the init-file, which guarantees that the environment matches what would be expected. I then wrote a wrapper script that allows me to perform the byte-compilation from the command line, by invoking a child Emacs process to load the init-file and then (if that was successful), running a byte-compilation from within that process. This wrapper script is in fact triggered asynchronously after a successful Emacs initialization, if the init-file has changed since the last compilation. See &lt;a href=&quot;https://github.com/radian-software/radian&quot;&gt;Radian&lt;/a&gt; for an example of this implementation.&lt;/p&gt; 
&lt;h3&gt;Using &lt;code&gt;straight.el&lt;/code&gt; to reproduce bugs&lt;/h3&gt; 
&lt;h4&gt;... in other packages&lt;/h4&gt; 
&lt;p&gt;One of the major reasons I wanted to write &lt;code&gt;straight.el&lt;/code&gt; was that existing package managers were not good for reproducing bugs. For instance, some of them would load all installed packages when the package manager was initialized! Obviously that is not acceptable for a &quot;minimal test case&quot;.&lt;/p&gt; 
&lt;p&gt;On the contrary, bootstrapping &lt;code&gt;straight.el&lt;/code&gt; does not load anything except for &lt;code&gt;straight.el&lt;/code&gt; itself (the default recipe repositories are registered, but not cloned until needed). You should normally be loading &lt;code&gt;straight.el&lt;/code&gt; by means of the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#getting-started&quot;&gt;bootstrap snippet&lt;/a&gt;, but when you are in &lt;code&gt;emacs -Q&lt;/code&gt;, here is how you can initialize &lt;code&gt;straight.el&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;M-x load-file RET ~/.emacs.d/straight/repos/straight.el/bootstrap.el RET
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;You can also do this from the command line, perhaps by creating an alias for it:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$ emacs -Q -l ~/.emacs.d/straight/repos/straight.el/bootstrap.el
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Let&#39;s say you are making a bug report for Projectile. To load just Projectile and all of its dependencies, run:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;M-x straight-use-package RET projectile RET
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Note that this will use the currently checked-out revisions of Projectile and all of its dependencies, so you should take note of those in order to make your bug report.&lt;/p&gt; 
&lt;h4&gt;... in &lt;code&gt;straight.el&lt;/code&gt; itself&lt;/h4&gt; 
&lt;p&gt;&lt;code&gt;straight.el&lt;/code&gt; provides a macro, &lt;code&gt;straight-bug-report&lt;/code&gt;, to test &lt;code&gt;straight.el&lt;/code&gt; in a clean environment. If possible, please use this when creating bug reports.&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;straight-bug-report&lt;/code&gt; accepts the following keyword value pairs:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;:pre-bootstrap (Form)...&lt;/code&gt; Forms evaluated before bootstrapping &lt;code&gt;straight.el&lt;/code&gt; e.g.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq straight-repository-branch &quot;develop&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;pre&gt;&lt;code&gt;Note this example is already in the default bootstrapping code.
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;:post-bootstrap (Form)...&lt;/code&gt; Forms evaluated in the testing environment after bootstrapping. e.g.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;(example :type git :host github))
&lt;/code&gt;&lt;/pre&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:interactive Boolean&lt;/code&gt; If nil, the subprocess will immediately exit after the test. Output will be printed to &lt;code&gt;straight-bug-report--process-buffer&lt;/code&gt; Otherwise, the subprocess will be interactive.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:preserve Boolean&lt;/code&gt; If t, the test directory is left in the directory stored in the variable `temporary-file-directory&#39;. Otherwise, it is immediately removed after the test is run.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:executable String&lt;/code&gt; Indicate the Emacs executable to launch. Defaults to &lt;code&gt;&quot;emacs&quot;&lt;/code&gt;.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;:raw Boolean&lt;/code&gt; If t, the raw process output is sent to &lt;code&gt;straight-bug-report--process-buffer&lt;/code&gt;. Otherwise, it is formatted as markdown for submitting as an issue.&quot;&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;For example:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-bug-report
  :pre-bootstrap
  (message &quot;before bootstrap&quot;)
  (message &quot;multiple forms allowed&quot;)
  :post-bootstrap
  (message &quot;after bootstrap&quot;)
  (message &quot;multiple forms allowed&quot;)
  (straight-use-package &#39;(my-broken-package))
  (message &quot;bye&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The above will run your test in a clean environment and produce a buffer with information you can paste directly into the issue body.&lt;/p&gt; 
&lt;h3&gt;Using &lt;code&gt;straight.el&lt;/code&gt; to develop packages&lt;/h3&gt; 
&lt;p&gt;The workflow for developing a package using &lt;code&gt;straight.el&lt;/code&gt; is quite straightforward:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Add the package to your configuration as usual, via a call to &lt;code&gt;straight-use-package&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;Use &lt;code&gt;M-x find-function&lt;/code&gt; or a similar command to jump to the code you wish to edit.&lt;/li&gt; 
 &lt;li&gt;Edit the code.&lt;/li&gt; 
 &lt;li&gt;Either evaluate the edited code using &lt;code&gt;M-x eval-buffer&lt;/code&gt;, &lt;code&gt;M-x eval-defun&lt;/code&gt;, or a similar command, or just restart Emacs to pick up your changes.&lt;/li&gt; 
 &lt;li&gt;When you are satisfied with your changes, use &lt;a href=&quot;https://magit.vc/&quot;&gt;Magit&lt;/a&gt; or just Git directly in order to commit and possibly push them. I suggest using &lt;a href=&quot;https://github.com/magit/forge&quot;&gt;Forge&lt;/a&gt; to create pull requests directly from Emacs, with Magit integration.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Development on built-in packages&lt;/h4&gt; 
&lt;p&gt;Unfortunately, you cannot edit packages that are built-in to Emacs in the same way as you can for external packages. However, there are a few options for how you can go about working on contributions to packages in Emacs core.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;One option is to see if the package is distributed separately from Emacs, in addition to being distributed in Emacs core. Believe it or not this is the case for several packages, which is a frequent cause of confusion. Typically in this case there is a most recent version of the package available from a separate repository, versus an older version vendored into Emacs core. 
  &lt;ul&gt; 
   &lt;li&gt;In this case, you can load the package from the separate repository using &lt;code&gt;straight.el&lt;/code&gt; (making sure to register it with &lt;code&gt;straight.el&lt;/code&gt; &lt;em&gt;before&lt;/em&gt; anything causes the built-in version of the package to be &lt;code&gt;require&lt;/code&gt;-ed or &lt;code&gt;load&lt;/code&gt;-ed, else you will get the wrong version already loaded). Then proceed with normal development workflow.&lt;/li&gt; 
   &lt;li&gt;If the package is already pre-loaded during Emacs init before your init-file even runs (check with &lt;code&gt;featurep&lt;/code&gt;), you are sort of out of luck here, as there is no way to run an external version of the package instead. You might be able to &lt;code&gt;unload-feature&lt;/code&gt; and then load the external version, or maybe just forcibly loading the external version on top of the built-in version will work in some situations, however no guarantees.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;Another option is to switch to the development version of Emacs, i.e. clone the Git repository and build it from source. Then you can modify the built-in package files directly and commit your changes to a branch. 
  &lt;ul&gt; 
   &lt;li&gt;If you don&#39;t want to build from source, but you still want to modify the package files in Emacs core directly, one option that avoids the need to interfere with your system package manager is to duplicate the files you want to modify, and put them elsewhere, earlier on the &lt;code&gt;load-path&lt;/code&gt; (or forcibly load them if they are pre-loaded packages, as mentioned above). You can then even version-control the copies, if you wish.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;Alternatively, if you don&#39;t need to contribute changes upstream, consider using hooks, advice, or &lt;code&gt;el-patch&lt;/code&gt; to make internal changes to packages directly within your configuration without the need for source code modification. Emacs is extremely mutable, so you can even overwrite internal functions directly in your configuration without any additional framework or access to upstream.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h4&gt;Development on GNU ELPA packages&lt;/h4&gt; 
&lt;p&gt;Development on GNU ELPA packages is somewhat complicated by the strange nature of GNU ELPA development, where some packages are copied out of Emacs core and into the repository, while others are copied from external repositories, while still others are maintained directly in the GNU ELPA repository itself, and all the packages are in the same repository but on different branches.&lt;/p&gt; 
&lt;p&gt;Since &lt;code&gt;straight.el&lt;/code&gt; does not have support for using Git worktrees at present (which is the only really reasonable way to deal with a one-package-per-worktree model), there are not too many good options, which is why GNU ELPA Mirror was created. However using GEM obviously does not allow external contributions back, since the source code is repackaged into a different (more convenient) format than is used for upstream development.&lt;/p&gt; 
&lt;p&gt;Some work could be done here to find a good solution.&lt;/p&gt; 
&lt;h3&gt;Integration with other packages&lt;/h3&gt; 
&lt;h4&gt;Integration with &lt;code&gt;use-package&lt;/code&gt;&lt;/h4&gt; 
&lt;p&gt;By default, &lt;code&gt;straight.el&lt;/code&gt; installs a new keyword &lt;code&gt;:straight&lt;/code&gt; for &lt;code&gt;use-package&lt;/code&gt; which may be used to install packages via &lt;code&gt;straight.el&lt;/code&gt;. The algorithm is extremely simple. This:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package el-patch
  :straight t)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;macroexpands (essentially) to:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;el-patch)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;And this:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package el-patch
  :straight (:host github :repo &quot;radian-software/el-patch&quot;
             :branch &quot;develop&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;becomes:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package
 &#39;(el-patch :host github :repo &quot;radian-software/el-patch&quot;
            :branch &quot;develop&quot;))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;If the feature you are requiring with &lt;code&gt;use-package&lt;/code&gt; is different from the package name, you can provide a full recipe:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package tex-site
  :straight (auctex :host github
                    :repo &quot;emacsmirror/auctex&quot;
                    :files (:defaults (:exclude &quot;*.el.in&quot;))))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;And you may also provide just the package name:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package tex-site
  :straight auctex)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;If you don&#39;t provide &lt;code&gt;:straight&lt;/code&gt;, then by default nothing happens. You may customize &lt;code&gt;straight-use-package-by-default&lt;/code&gt; to make it so that &lt;code&gt;:straight t&lt;/code&gt; is assumed unless you explicitly override it with &lt;code&gt;:straight nil&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;Previously, &lt;code&gt;straight.el&lt;/code&gt; used a different syntax for its &lt;code&gt;use-package&lt;/code&gt; integration. For backwards compatibility, you can use this syntax instead by customizing &lt;code&gt;straight-use-package-version&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;You can disable &lt;code&gt;use-package&lt;/code&gt; integration entirely by customizing &lt;code&gt;straight-enable-use-package-integration&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;For more details on the available keywords inside a recipe, see &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-recipe-format&quot;&gt;the recipe format&lt;/a&gt;.&lt;/p&gt; 
&lt;h5&gt;Loading packages conditionally&lt;/h5&gt; 
&lt;p&gt;&lt;code&gt;use-package&lt;/code&gt; has various features intended to support code being executed conditionally for a package. For example, the &lt;code&gt;:when&lt;/code&gt; keyword lets you provide a form that will essentially disable the &lt;code&gt;use-package&lt;/code&gt; form if it evaluates to nil.&lt;/p&gt; 
&lt;p&gt;However, when using the &lt;code&gt;:straight&lt;/code&gt; keyword, either explicitly or via &lt;code&gt;straight-use-package-by-default&lt;/code&gt;, then &lt;code&gt;:when&lt;/code&gt; has no effect on it. &lt;code&gt;straight.el&lt;/code&gt; is invoked unconditionally. The reason for this behavior is that if you invoke &lt;code&gt;straight-use-package&lt;/code&gt; on a different set of packages during different init sessions, then your version lockfile would end up containing different sets of packages depending on which session you generated it in.&lt;/p&gt; 
&lt;p&gt;Currently, the officially recommended pattern for conditionally loading a package is the following:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(straight-register-package &#39;foobar)
(when some-condition
  (use-package foobar
    :straight t))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;This ensures that the package is registered to &lt;code&gt;straight.el&lt;/code&gt;, so it will be cloned if absent, and will be added to the lockfile, but it will not be compiled or loaded unless the subsequent &lt;code&gt;use-package&lt;/code&gt; form is evaluated. You can also invoke &lt;code&gt;straight-register-package&lt;/code&gt; only in the case that &lt;code&gt;some-condition&lt;/code&gt; is nil; either way will produce the same result with roughly the same performance due to idempotency and caching.&lt;/p&gt; 
&lt;p&gt;If you do this for a lot of packages, it may be advisable to wrap it in a macro, as &lt;a href=&quot;https://github.com/radian-software/radian/raw/20c0c9d929a57836754559b470ba4c3c20f4212a/emacs/radian.el#L606-L619&quot;&gt;my own Emacs configuration Radian does&lt;/a&gt; in the macro &lt;code&gt;radian-use-package&lt;/code&gt;. It would be a good idea if &lt;code&gt;straight.el&lt;/code&gt; did this by default in its &lt;code&gt;use-package&lt;/code&gt; integration but this has not been implemented yet.&lt;/p&gt; 
&lt;p&gt;If you want to not even clone a package when it is disabled, you can also technically achieve it by simply making the entire &lt;code&gt;use-package&lt;/code&gt; form conditional, without using &lt;code&gt;straight-register-package&lt;/code&gt;. However, this is not recommended because it will cause the generated lockfile to be deterministic, so &lt;code&gt;straight.el&lt;/code&gt; will not be changed to make &lt;code&gt;:when&lt;/code&gt; act that way by default.&lt;/p&gt; 
&lt;p&gt;It would be desirable if you could clone a package conditionally without breaking the lockfile functionality; this is a hopefully planned future feature, but it needs design work.&lt;/p&gt; 
&lt;h4&gt;&quot;Integration&quot; with &lt;code&gt;package.el&lt;/code&gt;&lt;/h4&gt; 
&lt;p&gt;By default, &lt;code&gt;package.el&lt;/code&gt; will automatically insert a call to &lt;code&gt;package-initialize&lt;/code&gt; into your init-file as soon as Emacs starts, which is ridiculous. It will also do this when you perform any package management operation. A separate system inserts some &lt;code&gt;custom&lt;/code&gt; forms into your init-file when you install a package. &lt;code&gt;straight.el&lt;/code&gt; disables all of these &quot;features&quot; by setting &lt;code&gt;package-enable-at-startup&lt;/code&gt; to nil and enabling some advice. You can override this behavior by customizing &lt;code&gt;straight-enable-package-integration&lt;/code&gt;, however.&lt;/p&gt; 
&lt;p&gt;To help avoid you shooting yourself in the foot by using both &lt;code&gt;:ensure&lt;/code&gt; and &lt;code&gt;:straight&lt;/code&gt; at the same time in a &lt;code&gt;use-package&lt;/code&gt; form (which would cause the same package to be installed twice using two different package managers), &lt;code&gt;straight.el&lt;/code&gt; will helpfully disable &lt;code&gt;:ensure&lt;/code&gt; whenever you include &lt;code&gt;:straight&lt;/code&gt; in a &lt;code&gt;use-package&lt;/code&gt; form. See &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/425&quot;&gt;#425&lt;/a&gt;.&lt;/p&gt; 
&lt;h4&gt;Integration with Flycheck&lt;/h4&gt; 
&lt;p&gt;&lt;a href=&quot;https://www.flycheck.org/en/latest/&quot;&gt;Flycheck&lt;/a&gt; sometimes creates temporary files in order to perform syntax checking. This is a problem for &lt;code&gt;straight.el&lt;/code&gt; because creation of temporary files will cause &lt;code&gt;straight.el&lt;/code&gt; to think that you have modified a package when you actually have not. (You might ask why &lt;code&gt;straight.el&lt;/code&gt; cannot recognize temporary files and ignore them. The answer is that for eager modification checking, all we see is that the directory mtime for the repository has been updated, and there&#39;s no way to disambiguate between temporary file shenanigans versus if you, say, deleted a file.)&lt;/p&gt; 
&lt;p&gt;To work around the problem, a user option &lt;code&gt;straight-fix-flycheck&lt;/code&gt; is provided, disabled by default (for now). You can enable it &lt;em&gt;before&lt;/em&gt; loading &lt;code&gt;straight.el&lt;/code&gt;, and it will work around the Flycheck problem in the following way. When you first visit a buffer, any Flycheck checker that involves creation of temporary files will be inhibited automatically, although other checkers will still run. (In practice this means no byte-compilation errors for Emacs Lisp, but you still get Checkdoc errors.) However, after you make a change to the buffer (by typing, etc.) then all checkers will be re-enabled. This means that &lt;code&gt;straight.el&lt;/code&gt; won&#39;t think the package was modified unless you actually modify the buffer of a file inside it, which I think is a reasonable compromise.&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/508&quot;&gt;#508&lt;/a&gt; for discussion.&lt;/p&gt; 
&lt;h4&gt;Integration with Hydra&lt;/h4&gt; 
&lt;p&gt;See &lt;a href=&quot;https://github.com/abo-abo/hydra/wiki/straight.el&quot;&gt;the Hydra wiki&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;Miscellaneous&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;By default, &lt;code&gt;straight.el&lt;/code&gt; explains what it is doing in the echo area, like this:&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code&gt;Looking for cider recipe → Cloning melpa...
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;If your terminal does not support Unicode characters nicely, you can customize &lt;code&gt;straight-arrow&lt;/code&gt; to display something else for the arrow.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;By default, &lt;code&gt;straight.el&lt;/code&gt; reports process output the &lt;code&gt;*straight-process*&lt;/code&gt; buffer. You can customize the name of this buffer via the &lt;code&gt;straight-process-buffer&lt;/code&gt; user option. If you want to hide this buffer by default, consider adding a leading space to the name.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;You can prevent &lt;code&gt;straight.el&lt;/code&gt; from making any modifications to the filesystem (though it may still read) by customizing the user option &lt;code&gt;straight-safe-mode&lt;/code&gt; to non-nil. This may be useful for running tasks automatically in batch mode, to avoid multiple concurrent Emacs processes all making changes to the filesystem. For an example of how this feature may be used to safely implement asynchronous byte-compilation of the init-file on successful startup, see &lt;a href=&quot;https://github.com/radian-software/radian&quot;&gt;Radian&lt;/a&gt;.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Troubleshooting&lt;/h2&gt; 
&lt;p&gt;There are a couple of commonly encountered issues with &lt;code&gt;straight.el&lt;/code&gt;. I would like to change things so these problems do not happen, or are repaired automatically. But, I can write documentation faster than I can fix code, so here are tips in the meantime.&lt;/p&gt; 
&lt;p&gt;When investigating an issue, consider turning on logging. You can set &lt;code&gt;straight-log&lt;/code&gt; to non-nil at the start of your init-file, and then check &lt;code&gt;*straight-log*&lt;/code&gt; to see detailed information about exactly what &lt;code&gt;straight.el&lt;/code&gt; is doing to process package management operations. You can also see &lt;code&gt;*straight-process*&lt;/code&gt; for exact process output for any subcommands executed.&lt;/p&gt; 
&lt;h3&gt;Why are my packages always/never rebuilding?&lt;/h3&gt; 
&lt;p&gt;So, the first thing you have to check is the value of &lt;code&gt;straight-check-for-modifications&lt;/code&gt;. You can set it to nil, obviously then &lt;code&gt;straight.el&lt;/code&gt; will never rebuild anything, but that is probably not what you want. Based on the enabled checkers, we can dive into what is malfunctioning with the ones you have enabled. The basic principle is &lt;code&gt;straight.el&lt;/code&gt; uses various methods to detect when the source repo of a package is changed, and if it has changed since the last time the package was built, then it is rebuilt on next Emacs init (or re-init).&lt;/p&gt; 
&lt;p&gt;You should start by looking at the docstring of that variable and seeing if the enabled modes match the behavior you are &lt;em&gt;expecting&lt;/em&gt; to see. This is because there are different limitations to the modes, for example if you only use &lt;code&gt;check-on-save&lt;/code&gt;, then modifications will only register when you edit a file within Emacs, and not from an external program. The rest of this section will assume you have the user option set to what you want, and it is some technical bug that is preventing the rebuild system from working properly.&lt;/p&gt; 
&lt;p&gt;You can probably ignore &lt;code&gt;check-on-save&lt;/code&gt; and &lt;code&gt;find-when-checking&lt;/code&gt;, neither of those have ever caused anyone problems that I have known of. The ones that are complicated (and thus prone to failure) are &lt;code&gt;find-at-startup&lt;/code&gt; and &lt;code&gt;watch-files&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;The way &lt;code&gt;find-at-startup&lt;/code&gt; works is by using the &lt;code&gt;find&lt;/code&gt; utility (GNU or BSD is supported) to scan for files in &lt;code&gt;~/.emacs.d/straight/repos&lt;/code&gt; that are more recent than the corresponding packages were built. If a package directory contains files that have filesystem mtimes more recent than the timestamp of the last time &lt;code&gt;straight.el&lt;/code&gt; rebuilt the package, another rebuild is triggered.&lt;/p&gt; 
&lt;p&gt;So, a couple of ways this could fail:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;filesystem doesn&#39;t support mtimes properly, or some tooling is updating mtimes constantly instead of letting them be&lt;/li&gt; 
 &lt;li&gt;maybe building a package causes its own files to get updated, so &lt;code&gt;straight.el&lt;/code&gt; thinks it needs to be rebuilt again 
  &lt;ul&gt; 
   &lt;li&gt;normally this does not happen, because files are linked from the source repo into the build directory, and then build steps are run in the build directory&lt;/li&gt; 
   &lt;li&gt;however, custom code in the package could potentially reach back into the source repo on purpose somehow, which can cause problems. This is rare but I&#39;ve seen it happen, especially with big complicated packages like Org/AUCTeX&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;weird version of &lt;code&gt;find&lt;/code&gt; installed? you can go to &lt;code&gt;*straight-process*&lt;/code&gt; and see the exact command that&#39;s being run, as well as the output - this may give a clue as to what modifications are being detected, as the filenames will be printed, or if there is some kind of warning being printed by &lt;code&gt;find&lt;/code&gt; 
  &lt;ul&gt; 
   &lt;li&gt;try copying and pasting the &lt;code&gt;find&lt;/code&gt; command to your terminal and experimenting with it to find out why it is returning results when it shouldn&#39;t be&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; is not completing the init process properly and writing the build cache file, so next time it does not remember that it built anything 
  &lt;ul&gt; 
   &lt;li&gt;check &lt;code&gt;~/.emacs.d/straight/build-cache.el&lt;/code&gt;, you can see the recorded last build time of each package, is that getting updated?&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Now let&#39;s talk &lt;code&gt;watch-files&lt;/code&gt;, the most obvious failure condition for this is you don&#39;t have watchexec installed since that is a dependency. Get it from your distro package manager. Python 3 is also required, as well as the venv-whatever package that is needed on Ubuntu to run &lt;code&gt;python3 -m venv&lt;/code&gt; successfully.&lt;/p&gt; 
&lt;p&gt;The filesystem watcher runs in the background and uses &lt;code&gt;nohup&lt;/code&gt; to fork out and survive Emacs termination. The invocation of &lt;code&gt;nohup&lt;/code&gt; itself logs to &lt;code&gt;*straight-watcher*&lt;/code&gt;, and includes log lines that tell you it has forked successfully, as well as pointing to the watchexec log file, which is &lt;code&gt;~/.emacs.d/straight/watcher/nohup.out&lt;/code&gt;. You might see warnings or fatal errors here. We should really be reporting those proactively but we don&#39;t currently.&lt;/p&gt; 
&lt;p&gt;The most common cause that the filesystem watcher doesn&#39;t work, for me at least, is the virtualenv gets bricked. This seems to happen every time I upgrade Python versions, no matter what operating system I&#39;m on. Thanks Python. However this case should be caught proactively by &lt;code&gt;straight.el&lt;/code&gt; and reported in the echo area during startup. You can run &lt;code&gt;C-u M-x straight-watcher-start&lt;/code&gt; to delete and recreate it.&lt;/p&gt; 
&lt;p&gt;It&#39;s also possible you have a wrong (or just different than expected) version of watchexec, maybe the command-line options we are passing. Check for warnings in the &lt;code&gt;nohup.out&lt;/code&gt; log, maybe try out the watchexec invocation in your terminal and see if it works. You can also compare your &lt;code&gt;watchexec --version&lt;/code&gt; and see the upstream changelog. Our watchexec invocation should be running the Python callback file for every file modification and that should be mapping it back to a &lt;code&gt;straight.el&lt;/code&gt; repository.&lt;/p&gt; 
&lt;p&gt;There may also be warnings from watchexec notifying you that there are issues with your system configuration; some cases are known to work best with some custom &lt;code&gt;sysctl&lt;/code&gt; configuration, and will tell you so in that log file.&lt;/p&gt; 
&lt;p&gt;If that&#39;s working then the next step is that when a modification is detected, the callback script creates a file in &lt;code&gt;~/.emacs.d/straight/modified&lt;/code&gt;. Each file in here corresponds to the name of a directory in &lt;code&gt;~/.emacs.d/straight/repo&lt;/code&gt;, and the directory listing is read on Emacs startup to determine repos to rebuild. This is how the information is collected over time by the watcher but then collated into a place where it can be read in all at once quickly.&lt;/p&gt; 
&lt;p&gt;One thing that&#39;s not super well tested is what happens with &lt;em&gt;either&lt;/em&gt; &lt;code&gt;find-at-startup&lt;/code&gt; or &lt;code&gt;watch-files&lt;/code&gt; when you have custom repo locations. Custom base directory &lt;em&gt;should&lt;/em&gt; work, but if you have specific repos with hardcoded absolute paths (instead of having them all in the &lt;code&gt;repos&lt;/code&gt; base-dir), my scripting might not take that into account properly. That&#39;s an area for improvement.&lt;/p&gt; 
&lt;h3&gt;I changed something but &lt;code&gt;straight.el&lt;/code&gt; is still using the old value!&lt;/h3&gt; 
&lt;p&gt;For performance reasons, &lt;code&gt;straight.el&lt;/code&gt; uses many many caches. The implementation goal is that all caches are transparent to the user, i.e. if anything is changed that would make the cached data no longer valid, then the cache is automatically invalidated without the need for user action. Sometimes however this may not work correctly. This doc section is about helping you find out what&#39;s going wrong and how to make &lt;code&gt;straight.el&lt;/code&gt; do what you want without needing to delete everything and start again.&lt;/p&gt; 
&lt;p&gt;I don&#39;t know any perfect way to provide a universal guide, so let&#39;s start with a list of all the different types of data that is cached by &lt;code&gt;straight.el&lt;/code&gt; and why it does so / when the cache is invalidated:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Types of data that are cached &lt;em&gt;in memory, within a single Emacs session&lt;/em&gt;. All this data will be cleared by restarting Emacs. Some of it will also be cleared by re-loading your init-file. 
  &lt;ul&gt; 
   &lt;li&gt;&lt;em&gt;The set of packages registered by your init-file, and what recipes were used for them.&lt;/em&gt; 
    &lt;ul&gt; 
     &lt;li&gt;This is used to identify which set of packages should be written to the lockfile, if you use &lt;code&gt;M-x straight-freeze-versions&lt;/code&gt;.&lt;/li&gt; 
     &lt;li&gt;This cache is cleared during &lt;code&gt;straight.el&lt;/code&gt; bootstrap, which will be invoked if you re-load your init-file, and is populated as your init-file invokes &lt;code&gt;straight-use-package&lt;/code&gt;.&lt;/li&gt; 
     &lt;li&gt;&lt;code&gt;straight.el&lt;/code&gt; pays attention to whether additional packages have been registered after your init-file finished loading (e.g., via &lt;code&gt;M-x straight-use-package&lt;/code&gt; for temporary testing). If so, this cache will no longer match your init-file package-set, and &lt;code&gt;straight-freeze-versions&lt;/code&gt; will prompt you to re-load your init-file to ensure a correct lockfile is written.&lt;/li&gt; 
     &lt;li&gt;When &lt;code&gt;straight-use-package&lt;/code&gt; is invoked without providing a recipe, or interactively, or internally because a package has dependencies, normally the recipe is looked up from recipe repositories. However, if that package was already registered in the current Emacs session (tracked in this cache), then the already-registered recipe is automatically reused.&lt;/li&gt; 
     &lt;li&gt;To force the recipe to change for an already-registered package, either provide the new recipe explicitly to &lt;code&gt;straight-use-package&lt;/code&gt;, or re-load your init-file. Recipe repository lookup will only be triggered once per package per init-file load. (See also the recipe lookup cache, below.)&lt;/li&gt; 
     &lt;li&gt;The internal data structures used to maintain this cache are &lt;code&gt;straight--recipe-cache&lt;/code&gt;, &lt;code&gt;straight--repo-cache&lt;/code&gt;, &lt;code&gt;straight--profile-cache&lt;/code&gt;, and &lt;code&gt;straight--profile-cache-valid&lt;/code&gt;.&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;Types of data that are cached &lt;em&gt;on disk, between multiple Emacs sessions&lt;/em&gt;, but &lt;em&gt;are not needed for correctness&lt;/em&gt;. This data is stored in &lt;code&gt;~/.emacs.d/straight/build-cache.el&lt;/code&gt; unless otherwise specified, and that file can be safely deleted as a nuclear option (note this will trigger rebuilds of all packages). 
  &lt;ul&gt; 
   &lt;li&gt;&lt;em&gt;The built versions of every package.&lt;/em&gt; 
    &lt;ul&gt; 
     &lt;li&gt;These are stored in &lt;code&gt;~/.emacs.d/straight/build&lt;/code&gt;, which can also be removed to trigger a rebuild of all packages. However, the contents of this directory are not trusted without timestamps in the build cache to authenticate them, so removing the build cache file is also sufficient.&lt;/li&gt; 
     &lt;li&gt;When anything that would cause the package to be built differently is changed, the package should be rebuilt automatically the next time it is registered. 
      &lt;ul&gt; 
       &lt;li&gt;However, if &lt;code&gt;only-once&lt;/code&gt; is included in &lt;code&gt;straight-check-for-modifications&lt;/code&gt;, you need to actually re-load your init-file before another modification check will be run for a package that was already registered in the current session.&lt;/li&gt; 
      &lt;/ul&gt; &lt;/li&gt; 
     &lt;li&gt;The built version of a package is considered outdated if: a file in its source repository is modified (see the modification detection system); the recipe for the package changes (but see also the recipe lookup cache); or certain global configuration options affecting package builds are changed (which will invalidate the entire build cache). 
      &lt;ul&gt; 
       &lt;li&gt;A package rebuild is only triggered if one of the changed recipe keywords is actually relevant to package build behavior (e.g., &lt;code&gt;:files&lt;/code&gt; but not &lt;code&gt;:repo&lt;/code&gt;).&lt;/li&gt; 
      &lt;/ul&gt; &lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;em&gt;The timestamp for the last time a package was built, and the last used recipe for it.&lt;/em&gt; 
    &lt;ul&gt; 
     &lt;li&gt;This is used to implement the rules outlined in the previous section.&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;em&gt;The list of dependencies for each package.&lt;/em&gt; 
    &lt;ul&gt; 
     &lt;li&gt;This is a performance optimization; the list of dependencies is read out of the package from disk when building it, and then cached until the next package build, since any operation that could change the set of dependencies should also trigger a rebuild.&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;em&gt;The entire contents of the autoloads generated for each package.&lt;/em&gt; 
    &lt;ul&gt; 
     &lt;li&gt;This is also a performance optimization; the autoloads similarly only change during a package build, so they are copied out of the package into the build cache during each package build.&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
   &lt;li&gt;&lt;em&gt;The recipes looked up from recipe repositories.&lt;/em&gt; 
    &lt;ul&gt; 
     &lt;li&gt;Making changes to a recipe repository should result in the new recipes being used during the next package registration. However, it is relatively slow to always check the recipe used for each package during every init. The previously used recipes are stored in the build cache, but they may not still be valid if the recipe repository has changed.&lt;/li&gt; 
     &lt;li&gt;To track this information correctly, recipes looked up from recipe repositories are cached persistently, but the cache for a recipe repository is invalided automatically when the modification detection system detects a modification to the recipe repository, or the Emacs Lisp code for generating recipes from that recipe repository is changed (e.g. due to updating &lt;code&gt;straight.el&lt;/code&gt;).&lt;/li&gt; 
     &lt;li&gt;Note that packages are only checked for modifications at registration time (and only once per init-file load if &lt;code&gt;only-once&lt;/code&gt; is included in &lt;code&gt;straight-check-for-modifications&lt;/code&gt;). As a result, normally it would be required to re-load the entire init-file so that the modification to the recipe repository could be detected and then subsequently used for the dependent recipe. &lt;strong&gt;However&lt;/strong&gt;, as a concession to usability, reading from the recipe lookup cache is automatically disabled when &lt;code&gt;straight.el&lt;/code&gt; is not being invoked from the init-file, making it so you do not need to think about this cache when exploring interactively with changes to recipes.&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;Types of data that are stored &lt;em&gt;on disk, persistently&lt;/em&gt;, and &lt;em&gt;are needed for correctness&lt;/em&gt;. Deleting this data may change behavior as it is considered user content/configuration. 
  &lt;ul&gt; 
   &lt;li&gt;&lt;em&gt;The physical Git state for every package repository.&lt;/em&gt; 
    &lt;ul&gt; 
     &lt;li&gt;During init, &lt;code&gt;straight.el&lt;/code&gt; never makes any changes to package source repositories, nor checks that they are in a valid state. This means manual edits will be neither detected nor reverted. If you delete a source repository, it will automatically be cloned again (at the revision specified in your lockfile, or at the latest revision if there is no lockfile), but if you check out a different revision in an already-cloned source repository, that revision will remain checked out. However, the change will still be detected and will result in the package being rebuilt. 
      &lt;ul&gt; 
       &lt;li&gt;To ensure that your checked-out packages match your lockfile, or to update your lockfile to reflect changes you have made to your checked-out packages, use the VC system commands or the lockfile management commands. These commands operate orthogonally to the &lt;code&gt;straight.el&lt;/code&gt; subsystems that execute during init, and they do not use any caching, because they are not on the critical path that affects init time.&lt;/li&gt; 
      &lt;/ul&gt; &lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Developer manual&lt;/h2&gt; 
&lt;p&gt;This section tells you about all the interesting implementation details and design decisions that power &lt;code&gt;straight.el&lt;/code&gt; behind the scenes. It assumes you have already read the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#user-manual&quot;&gt;user manual&lt;/a&gt; and the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#conceptual-overview&quot;&gt;conceptual overview&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;More to be written here in future. See &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/51&quot;&gt;#51&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;Low-level functions&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;The function &lt;code&gt;straight-chase-emulated-symlink&lt;/code&gt; is provided in order for external packages to correctly handle the emulated symlinks created by &lt;code&gt;straight.el&lt;/code&gt; when &lt;code&gt;straight-use-symlinks&lt;/code&gt; is nil. See, for example, &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/520&quot;&gt;#520&lt;/a&gt;.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Trivia&lt;/h2&gt; 
&lt;p&gt;This section has random, (possibly) interesting tidbits about &lt;code&gt;straight.el&lt;/code&gt; that don&#39;t fit in the other sections.&lt;/p&gt; 
&lt;h3&gt;Comments and docstrings&lt;/h3&gt; 
&lt;p&gt;How did I get that statistic about the percentage of &lt;code&gt;straight.el&lt;/code&gt; that is comments and docstrings? Simple: by abusing the syntax highlighting.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(let ((lines (make-hash-table :test #&#39;equal)))
  (goto-char (point-min))
  (while (&amp;lt; (point) (point-max))
    (when (memq (face-at-point)
                &#39;(font-lock-comment-face
                  font-lock-doc-face))
      (puthash (line-number-at-pos) t lines))
    (forward-char))
  (* (/ (float (length (hash-table-keys lines)))
        (line-number-at-pos))
     100))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Note that you will have to scroll through the entire buffer first, since &lt;code&gt;font-lock-mode&lt;/code&gt; computes syntax highlighting lazily.&lt;/p&gt; 
&lt;h2&gt;Contributing&lt;/h2&gt; 
&lt;p&gt;Please do! Development takes place on the &lt;code&gt;develop&lt;/code&gt; branch. You can switch to that branch with&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq straight-repository-branch &quot;develop&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;and base your pull requests from it. If you have an outstanding pull request whose features you would like to use in your configuration, there is full support for defining &lt;code&gt;straight.el&lt;/code&gt; as coming from any branch in any fork:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(setq straight-repository-user &quot;my-github-username&quot;)
(setq straight-repository-branch &quot;feat/my-cool-feature&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;For additional information, please see &lt;a href=&quot;https://github.com/radian-software/contributor-guide&quot;&gt;the contributor guide for my projects&lt;/a&gt;. Note that &lt;code&gt;straight.el&lt;/code&gt; has not yet had an initial release, so you don&#39;t have to worry about a changelog.&lt;/p&gt; 
&lt;h3&gt;CI administration&lt;/h3&gt; 
&lt;p&gt;Maintaining the GitHub Container Registry images used by CI looks like this for a given Emacs version. We have the base image:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;docker pull silex/emacs:30
docker tag silex/emacs:30 ghcr.io/radian-software/emacs-base:30
docker push ghcr.io/radian-software/emacs-base:30
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;And the full image:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;DOCKER_BASE=ghcr.io/radian-software/emacs-base  \
  make docker VERSION=30 CMD=&quot;make lint test&quot;
docker tag straight.el:30 ghcr.io/radian-software/straight-ci:30
docker push ghcr.io/radian-software/straight-ci:30
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;For this you of course need GHCR authentication, for example by generating a personal access token (classic) with the &lt;code&gt;packages:write&lt;/code&gt; scope, and then &lt;code&gt;docker login https://ghcr.io -u yourlogin --password-stdin &amp;lt;&amp;lt;&amp;lt; yourtoken&lt;/code&gt;.&lt;/p&gt; 
&lt;h2&gt;FAQ&lt;/h2&gt; 
&lt;h3&gt;My init time got slower&lt;/h3&gt; 
&lt;p&gt;Your first step should be to customize the value of &lt;code&gt;straight-check-for-modifications&lt;/code&gt;. The best setting is &lt;code&gt;(watch-files find-when-checking)&lt;/code&gt;; this is not enabled by default because it is impolite to spawn persistent background processes without asking, and because you must install &lt;a href=&quot;https://www.python.org/&quot;&gt;Python 3&lt;/a&gt; and &lt;a href=&quot;https://github.com/mattgreen/watchexec&quot;&gt;&lt;code&gt;watchexec&lt;/code&gt;&lt;/a&gt; for it to work. If you can&#39;t stand the extra dependencies and background process, consider the setting &lt;code&gt;(check-on-save find-when-checking)&lt;/code&gt; instead, which is just as fast but won&#39;t catch package modifications unless they are made within Emacs via the &lt;code&gt;save-buffer&lt;/code&gt; command.&lt;/p&gt; 
&lt;p&gt;Even with lazy modification detection, as described above, &lt;code&gt;straight.el&lt;/code&gt; is not quite as fast as &lt;code&gt;package.el&lt;/code&gt; (by a few percentage points). There are some planned changes which will make &lt;code&gt;straight.el&lt;/code&gt; just as fast as &lt;code&gt;package.el&lt;/code&gt;, if not faster. See &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/9&quot;&gt;#9&lt;/a&gt;.&lt;/p&gt; 
&lt;h3&gt;&quot;Could not find package in recipe repositories&quot;&lt;/h3&gt; 
&lt;p&gt;Assuming that the package you&#39;re trying to install actually exists, you need to update your recipe repositories (most likely MELPA, possibly Emacsmirror). See the next FAQ entry. This is like running &lt;code&gt;package-refresh-contents&lt;/code&gt; under &lt;code&gt;package.el&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;Another possibility is that you are providing &lt;code&gt;straight.el&lt;/code&gt; with a feature name rather than a package name. Features are what you load with &lt;code&gt;require&lt;/code&gt; or &lt;code&gt;load&lt;/code&gt;, or find in files. For example, &lt;code&gt;org-agenda&lt;/code&gt; and &lt;code&gt;org-capture&lt;/code&gt; are features. Packages, on the other hand, can provide one or more features. They are what are listed on MELPA et al. or by &lt;code&gt;M-x straight-get-recipe&lt;/code&gt;. For example, &lt;code&gt;org&lt;/code&gt; and &lt;code&gt;org-contrib&lt;/code&gt; are packages.&lt;/p&gt; 
&lt;p&gt;When you write &lt;code&gt;(use-package foo ...)&lt;/code&gt;, the &lt;code&gt;foo&lt;/code&gt; is a &lt;em&gt;feature&lt;/em&gt;, not a package. You can give a different package name &lt;code&gt;bar&lt;/code&gt; by saying &lt;code&gt;(use-package foo :straight bar)&lt;/code&gt;. And when you write &lt;code&gt;(straight-use-package &#39;bar)&lt;/code&gt;, the &lt;code&gt;bar&lt;/code&gt; is a &lt;em&gt;package&lt;/em&gt;, not a feature.&lt;/p&gt; 
&lt;h3&gt;How do I update MELPA et al.?&lt;/h3&gt; 
&lt;p&gt;Using &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#version-control-operations&quot;&gt;&lt;code&gt;M-x straight-pull-package&lt;/code&gt;&lt;/a&gt;, like for any other package. &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#updating-recipe-repositories&quot;&gt;Read more.&lt;/a&gt;&lt;/p&gt; 
&lt;h3&gt;My &lt;code&gt;use-package&lt;/code&gt; form isn&#39;t working properly&lt;/h3&gt; 
&lt;p&gt;There are a number of common problems you might be encountering. Check out the following list to see if there is an easy fix.&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;Make sure you&#39;re not using &lt;code&gt;:ensure&lt;/code&gt; or &lt;code&gt;use-package-always-ensure&lt;/code&gt;. Those are for &lt;code&gt;package.el&lt;/code&gt; and using them with &lt;code&gt;straight.el&lt;/code&gt; will produce weird results (namely both &lt;code&gt;package.el&lt;/code&gt; and &lt;code&gt;straight.el&lt;/code&gt; will be invoked for the same package).&lt;/li&gt; 
 &lt;li&gt;Make sure you know &lt;em&gt;both&lt;/em&gt; the name of the feature and the name of the package. These are usually the same but not always (packages may provide more than one feature, ...). You give &lt;code&gt;use-package&lt;/code&gt; the name of a &lt;em&gt;feature&lt;/em&gt;, not a package (despite the name of the macro). With &lt;code&gt;straight-use-package-by-default&lt;/code&gt; or with &lt;code&gt;:straight t&lt;/code&gt;, the default is to try installing a package by the same name as the feature. 
  &lt;ul&gt; 
   &lt;li&gt;If you don&#39;t actually need to install a package, then pass &lt;code&gt;:straight nil&lt;/code&gt; to override &lt;code&gt;straight-use-package-by-default&lt;/code&gt;.&lt;/li&gt; 
   &lt;li&gt;If the package name is different from the feature name, then pass &lt;code&gt;:straight &amp;lt;package-name&amp;gt;&lt;/code&gt;.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;If the package or your configurations aren&#39;t being loaded, you probably have something wrong with your usage of &lt;code&gt;:init&lt;/code&gt; and &lt;code&gt;:config&lt;/code&gt;. By default, the behavior of &lt;code&gt;use-package&lt;/code&gt; is unusably inconsistent. You must set either &lt;code&gt;use-package-always-defer&lt;/code&gt; (override with &lt;code&gt;:demand t&lt;/code&gt;) or &lt;code&gt;use-package-always-demand&lt;/code&gt; (override with &lt;code&gt;:defer t&lt;/code&gt;) to set a default for whether evaluating a &lt;code&gt;use-package&lt;/code&gt; form will load the package and your configurations. 
  &lt;ul&gt; 
   &lt;li&gt;If you&#39;ve set a package to be deferred, you then need to make sure there&#39;s a way for it to get loaded when needed, for example by means of an autoload (either provided by the package, or set up automatically by &lt;code&gt;use-package&lt;/code&gt; via &lt;code&gt;:bind&lt;/code&gt;, or set up manually through &lt;code&gt;use-package&lt;/code&gt; via &lt;code&gt;:commands&lt;/code&gt;) or by an explicit &lt;code&gt;require&lt;/code&gt; in one of your custom commands.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;How do I uninstall a package?&lt;/h3&gt; 
&lt;p&gt;My first question is: do you really need to uninstall the package? Under &lt;code&gt;package.el&lt;/code&gt;, every package on disk gets loaded into Emacs, whether you asked for it or not. However, under &lt;code&gt;straight.el&lt;/code&gt;, only the packages you explicitly mention in your init-file get loaded into Emacs. So the &lt;em&gt;only&lt;/em&gt; problem with leaving a package on disk is that it takes up a little bit of disk space. (But the advantage is if you decide you want to use that package again later then you won&#39;t have to redownload it.)&lt;/p&gt; 
&lt;p&gt;If you really want to uninstall a package, simply delete its local repository from &lt;code&gt;~/.emacs.d/straight/repos&lt;/code&gt; or run the &lt;code&gt;straight-remove-unused-repos&lt;/code&gt; command.&lt;/p&gt; 
&lt;h3&gt;The wrong version of my package was loaded&lt;/h3&gt; 
&lt;p&gt;To explain this problem, let us consider a concrete example. In &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/355&quot;&gt;this issue&lt;/a&gt;, a user found that the code&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;company-lsp)
(straight-use-package &#39;eglot)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;sometimes resulted in runtime errors because an old version of Flymake was being used.&lt;/p&gt; 
&lt;p&gt;The root problem here is that you want the most recent version of Flymake to be installed by &lt;code&gt;straight.el&lt;/code&gt;, but Emacs also ships an older version, and that older version is getting loaded instead.&lt;/p&gt; 
&lt;p&gt;The older version will be loaded if &lt;code&gt;(require &#39;flymake)&lt;/code&gt; (or similar) is invoked before &lt;code&gt;straight.el&lt;/code&gt; has made Flymake available (by means of &lt;code&gt;(straight-use-package &#39;flymake)&lt;/code&gt; or similar). But why would &lt;code&gt;straight.el&lt;/code&gt; not make Flymake available?&lt;/p&gt; 
&lt;p&gt;The only way that &lt;code&gt;straight.el&lt;/code&gt; knows to make Flymake available is if either you manually invoke &lt;code&gt;straight-use-package&lt;/code&gt; in your init-file, or if one of the packages that you request in your init-file declares Flymake as a dependency. Now, any package that uses Flymake ought to declare it as a dependency. Thus, there should be no way for a package to load the Emacs-provided version of Flymake. However, sometimes package authors overlook this problem (it does not always cause an error, and sometimes package authors do not test exhaustively enough).&lt;/p&gt; 
&lt;p&gt;In this case, the problem was that &lt;code&gt;company-lsp&lt;/code&gt; declared a dependency on &lt;code&gt;lsp-mode&lt;/code&gt;, and &lt;code&gt;lsp-mode&lt;/code&gt; used Flymake without declaring a dependency on &lt;code&gt;flymake&lt;/code&gt;. There are two ways to work around the problem:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;(Preferable) Fix &lt;code&gt;lsp-mode&lt;/code&gt; to declare a dependency on &lt;code&gt;flymake&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;(Workaround) Manually invoke &lt;code&gt;(straight-use-package &#39;flymake)&lt;/code&gt; before &lt;code&gt;(straight-use-package &#39;company-lsp)&lt;/code&gt;.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;If you test this yourself, you might find it difficult to reproduce the problem. That is because there is only an issue when Flymake is actually loaded, and this doesn&#39;t necessarily happen when invoking &lt;code&gt;(straight-use-package &#39;company-lsp)&lt;/code&gt; &lt;em&gt;unless&lt;/em&gt; &lt;code&gt;straight.el&lt;/code&gt; needs to rebuild the relevant packages (which includes byte-compilation, which sometimes means actually loading dependencies). Keep this in mind when testing.&lt;/p&gt; 
&lt;p&gt;This problem commonly occurs with Org, since (1) Org is popular, (2) Emacs ships an obsolete version of Org, (3) many users want to use the up-to-date version, and (4) Org breaks backwards compatibility frequently. To solve it, simply make sure that you invoke &lt;code&gt;(straight-use-package &#39;org)&lt;/code&gt; before running any code that could load Org, including installing any package that lists it as a dependency.&lt;/p&gt; 
&lt;p&gt;See &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/236&quot;&gt;this issue&lt;/a&gt; for discussion about ways of mitigating the bad UX of this situation.&lt;/p&gt; 
&lt;h3&gt;I get &quot;could not read username/password&quot; errors&lt;/h3&gt; 
&lt;p&gt;This is because &lt;code&gt;straight.el&lt;/code&gt; is not currently able to detect when SSH or Git asks for your username and/or password/passphrase and then pipe that prompt through to the minibuffer (&lt;a href=&quot;https://github.com/radian-software/straight.el/issues/334&quot;&gt;#334&lt;/a&gt;).&lt;/p&gt; 
&lt;p&gt;To work around the problem, set up &lt;a href=&quot;https://git-scm.com/docs/git-credential-cache&quot;&gt;git-credential-cache&lt;/a&gt; if you use HTTPS, and &lt;a href=&quot;https://www.ssh.com/ssh/agent&quot;&gt;ssh-agent&lt;/a&gt; if you use SSH. That way, you won&#39;t be prompted for your username/password. When setting up ssh-agent, be careful to make sure that the relevant environment variables get set in Emacs. This might be tricky since starting Emacs from the desktop (rather than from the command line) sometimes results in it not inheriting any environment variables from your shell.&lt;/p&gt; 
&lt;h3&gt;How do I pin package versions or use only tagged releases?&lt;/h3&gt; 
&lt;p&gt;This is a planned feature. In the meantime, contributors have proposed various workarounds. See &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/246&quot;&gt;#246&lt;/a&gt; and &lt;a href=&quot;https://github.com/radian-software/straight.el/issues/31&quot;&gt;#31&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;straight-x.el&lt;/code&gt; now contains an experimental solution. In order to use it you will need to add similar snippets to your Emacs configuration.&lt;/p&gt; 
&lt;p&gt;First you need to add a new profile to &lt;code&gt;straight-profiles&lt;/code&gt; which also needs to be the last profile in the list. This should be done before you bootstrap &lt;code&gt;straight.el&lt;/code&gt;.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;;; Tell straight.el about the profiles we are going to be using.
(setq straight-profiles
      &#39;((nil . &quot;default.el&quot;)
        ;; Packages which are pinned to a specific commit.
        (pinned . &quot;pinned.el&quot;)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;After straight&#39;s install procedure you will need to add &lt;code&gt;straight-x.el&lt;/code&gt; and load the required commands.&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(autoload #&#39;straight-x-pull-all &quot;straight-x&quot;)
(autoload #&#39;straight-x-freeze-versions &quot;straight-x&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;A variable called &lt;code&gt;straight-x-pinned-packages&lt;/code&gt; has been defined in &lt;code&gt;straight-x.el&lt;/code&gt; and will contain your list of pinned packages.&lt;/p&gt; 
&lt;p&gt;From now on, you can pin a package to a specific commit like in the following example which will pin &lt;code&gt;org-mode&lt;/code&gt; to the 9.2.3 release version:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(let ((straight-current-profile &#39;pinned))
  (straight-use-package &#39;org)
  (straight-use-package &#39;org-contrib)
  ;; Pin org-mode version.
  (add-to-list &#39;straight-x-pinned-packages
               &#39;(&quot;org&quot; . &quot;924308a150ab82014b69c46c04d1ab71e874a2e6&quot;)))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;If you invoke &lt;code&gt;straight-x-freeze-versions&lt;/code&gt; it will first write the default lockfile and then pinned lockfile which takes precedence over the default one if packages are thawed. &lt;code&gt;straight-x-pull-all&lt;/code&gt; will first invoke &lt;code&gt;straight-pull-all&lt;/code&gt; and then restore all pinned packages.&lt;/p&gt; 
&lt;p&gt;You might want to assign the following aliases for more convenience:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(defalias &#39;straight-pull-all #&#39;straight-x-pull-all)
(defalias &#39;straight-freeze-versions #&#39;straight-x-freeze-versions)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Please keep in mind that this is only a temporary solution and experimental!&lt;/p&gt; 
&lt;h3&gt;How can I use the built-in version of a package?&lt;/h3&gt; 
&lt;p&gt;To tell &lt;code&gt;straight.el&lt;/code&gt; that you want to use the version of Org shipped with Emacs, rather than cloning the upstream repository:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(straight-use-package &#39;(org :type built-in))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Note that &lt;code&gt;:type&lt;/code&gt; is a keyword for &lt;code&gt;straight.el&lt;/code&gt;, not for &lt;code&gt;use-package&lt;/code&gt;. If you are using &lt;code&gt;use-package&lt;/code&gt;, then use:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(use-package org :straight (:type built-in))
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#the-recipe-format&quot;&gt;Read more.&lt;/a&gt;&lt;/p&gt; 
&lt;h2&gt;News&lt;/h2&gt; 
&lt;p&gt;Note that recent changes are available on the &lt;code&gt;develop&lt;/code&gt; branch, and are only periodically merged into the default &lt;code&gt;main&lt;/code&gt; branch once there has been the opportunity for users to test their stability.&lt;/p&gt; 
&lt;h3&gt;Jul 1, 2025&lt;/h3&gt; 
&lt;p&gt;The default branch of &lt;code&gt;straight.el&lt;/code&gt; is now called &lt;code&gt;main&lt;/code&gt; instead of &lt;code&gt;master&lt;/code&gt;, to follow prevailing conventions. For backwards compatibility, &lt;code&gt;master&lt;/code&gt; still points at the same commit, and will continue to be updated for some time.&lt;/p&gt; 
&lt;h3&gt;Jul 1, 2025&lt;/h3&gt; 
&lt;p&gt;The source code of &lt;code&gt;straight.el&lt;/code&gt; now indicates, for each user option (&lt;code&gt;defcustom&lt;/code&gt;), when that user option needs to be set to take effect. This is shown in a &lt;code&gt;:set&lt;/code&gt; property of each variable definition.&lt;/p&gt; 
&lt;h3&gt;Jun 26, 2025&lt;/h3&gt; 
&lt;p&gt;We now have a &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#i-changed-something-but-straightel-is-still-using-the-old-value&quot;&gt;troubleshooting section for caches&lt;/a&gt;, in case you changed a user option or package configuration and wondered why &lt;code&gt;straight.el&lt;/code&gt; seemed to be unable to notice the update.&lt;/p&gt; 
&lt;h3&gt;Jun 25, 2025&lt;/h3&gt; 
&lt;p&gt;Performance is improved for non-SSD users of the default &lt;code&gt;straight-check-for-modifications&lt;/code&gt; value that includes &lt;code&gt;find-at-startup&lt;/code&gt;, since it would incur a nontrivial delay when re-evaluating a &lt;code&gt;use-package&lt;/code&gt; form that invoked &lt;code&gt;straight.el&lt;/code&gt;, as a bulk &lt;code&gt;find&lt;/code&gt; command would be executed in a likely unnecessary way. The default value for &lt;code&gt;straight-check-for-modifications&lt;/code&gt; now includes &lt;code&gt;only-once&lt;/code&gt; which restricts modification checking to once per init session.&lt;/p&gt; 
&lt;h3&gt;Jun 23, 2025&lt;/h3&gt; 
&lt;p&gt;Customize &lt;code&gt;straight-vc-use-snapshot-installation&lt;/code&gt; to try out snapshot installation. Packages will be initially cloned by extracting a downloaded tarball, with a tracking file written to note which commit was installed, and can later be converted into full repository clones if you want to make changes. This massively improves bootstrap performance, especially on a slow network connection, and reduces disk space utilization. Some VC operations may not be implemented yet for packages managed as snapshots; please report any bugs.&lt;/p&gt; 
&lt;h3&gt;Jun 23, 2025&lt;/h3&gt; 
&lt;p&gt;Org is installed by default from a GitHub mirror maintained by Jonas. Customize &lt;code&gt;straight-recipes-org-url&lt;/code&gt; to configure.&lt;/p&gt; 
&lt;h3&gt;Jun 17, 2025&lt;/h3&gt; 
&lt;p&gt;GNU ELPA is usable from source again; that is, you can elect to disable &lt;code&gt;straight-recipes-gnu-elpa-use-mirror&lt;/code&gt; and operation will generally be as intended, due to the returned recipes being updated to perform single-branch clones of sub-packages rather than trying to interact with the GNU ELPA build system.&lt;/p&gt; 
&lt;h3&gt;Jun 16, 2025&lt;/h3&gt; 
&lt;p&gt;GNU ELPA and NonGNU ELPA repositories are, by default, now pulled from GitHub mirrors maintained by Jonas, rather than from source. This improves performance significantly. The change is to the default value of &lt;code&gt;straight-initial-recipe-repositories&lt;/code&gt;, and is controlled by separate user options which you can customize as well, &lt;code&gt;straight-recipes-gnu-elpa-url&lt;/code&gt; and &lt;code&gt;straight-recipes-nongnu-elpa-url&lt;/code&gt;.&lt;/p&gt; 
&lt;h3&gt;Jun 13, 2025&lt;/h3&gt; 
&lt;p&gt;The behavior of &lt;code&gt;M-x straight-use-package&lt;/code&gt; is somewhat changed: it is possible to select already-registered packages, and the existing recipes for those packages will be respected rather than being reverted to the default pulled from a recipe repository. To accomplish this the user interface is modified to present a virtual &lt;code&gt;cache&lt;/code&gt; recipe repository at the front of &lt;code&gt;straight-recipe-repositories&lt;/code&gt; within &lt;code&gt;M-x straight-use-package&lt;/code&gt;, which contains package recipes that have already been registered in the current session.&lt;/p&gt; 
&lt;h3&gt;Jun 13, 2025&lt;/h3&gt; 
&lt;p&gt;When Git requires a passphrase to be entered to clone a repository, you are now prompted for this interactively in the minibuffer, like how it works in Magit. For now, this feature is opt-in via the user option &lt;code&gt;straight-display-subprocess-prompts&lt;/code&gt;.&lt;/p&gt; 
&lt;h3&gt;Jun 10, 2025&lt;/h3&gt; 
&lt;p&gt;It&#39;s now possible to customize the default recipe repositories. You can change their recipes arbitrarily, reorder them, or remove them entirely. See the new user option &lt;code&gt;straight-initial-recipe-repositories&lt;/code&gt;, whose default value corresponds to the previous behavior.&lt;/p&gt; 
&lt;h3&gt;Jun 9, 2025&lt;/h3&gt; 
&lt;p&gt;It&#39;s now possible to register your own custom hosts with full feature parity to the built-in &lt;code&gt;:host github&lt;/code&gt;, &lt;code&gt;:host sourcehut&lt;/code&gt;, etc. See the docstring of the &lt;code&gt;straight-hosts&lt;/code&gt; for information. This changes the format of entries in &lt;code&gt;straight-hosts&lt;/code&gt;, but the previous more-limited format is still supported for backwards compatibility.&lt;/p&gt; 
&lt;h3&gt;Apr 5, 2025&lt;/h3&gt; 
&lt;p&gt;We have a troubleshooting guide available for finding out why your packages are always/never rebuilding during Emacs init. Check the &lt;a href=&quot;https://raw.githubusercontent.com/radian-software/straight.el/main/#why-are-my-packages-alwaysnever-rebuilding&quot;&gt;new README section&lt;/a&gt;.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>radian-software/apheleia</title>
      <link>https://github.com/radian-software/apheleia</link>
      <description>&lt;p&gt;🌷 Run code formatter on buffer contents without moving point, using RCS patches and dynamic programming.&lt;/p&gt;&lt;hr&gt;&lt;h1&gt;Apheleia&lt;/h1&gt; 
&lt;p&gt;Good code is automatically formatted by tools like &lt;a href=&quot;https://github.com/python/black&quot;&gt;Black&lt;/a&gt; or &lt;a href=&quot;https://prettier.io/&quot;&gt;Prettier&lt;/a&gt; so that you and your team spend less time on formatting and more time on building features. It&#39;s best if your editor can run code formatters each time you save a file, so that you don&#39;t have to look at badly formatted code or get surprised when things change just before you commit. However, running a code formatter on save suffers from the following two problems:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;It takes some time (e.g. around 200ms for Black on an empty file), which makes the editor feel less responsive.&lt;/li&gt; 
 &lt;li&gt;It invariably moves your cursor (point) somewhere unexpected if the changes made by the code formatter are too close to point&#39;s position.&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;Apheleia is an &lt;a href=&quot;https://www.gnu.org/software/emacs/&quot;&gt;Emacs&lt;/a&gt; package which solves both of these problems comprehensively for all languages, allowing you to say goodbye to language-specific packages such as &lt;a href=&quot;https://github.com/proofit404/blacken&quot;&gt;Blacken&lt;/a&gt; and &lt;a href=&quot;https://github.com/prettier/prettier-emacs&quot;&gt;prettier-js&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;The approach is as follows:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;Run code formatters on &lt;code&gt;after-save-hook&lt;/code&gt;, rather than &lt;code&gt;before-save-hook&lt;/code&gt;, and do so asynchronously. Once the formatter has finished running, check if the buffer has been modified since it started; only apply the changes if not.&lt;/li&gt; 
 &lt;li&gt;After running the code formatter, generate an &lt;a href=&quot;https://web.archive.org/web/20220527003730/https://tools.ietf.org/doc/tcllib/html/rcs.html#section4&quot;&gt;RCS patch&lt;/a&gt; showing the changes and then apply it to the buffer. This prevents changes elsewhere in the buffer from moving point. If a patch region happens to include point, then use a &lt;a href=&quot;https://en.wikipedia.org/wiki/Needleman%E2%80%93Wunsch_algorithm&quot;&gt;dynamic programming algorithm for string alignment&lt;/a&gt; to determine where point should be moved so that it remains in the same place relative to its surroundings. Finally, if the vertical position of point relative to the window has changed, adjust the scroll position to maintain maximum visual continuity. (This includes iterating through all windows displaying the buffer, if there are more than one.) The dynamic programming algorithm runs in quadratic time, which is why it is only applied if necessary and to a single patch region.&lt;/li&gt; 
&lt;/ol&gt; 
&lt;h2&gt;Installation&lt;/h2&gt; 
&lt;p&gt;Apheleia is available on &lt;a href=&quot;https://melpa.org/&quot;&gt;MELPA&lt;/a&gt;. It is easiest to install it using &lt;a href=&quot;https://github.com/radian-software/straight.el&quot;&gt;&lt;code&gt;straight.el&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;(straight-use-package &#39;apheleia)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;However, you may install using any other package manager if you prefer.&lt;/p&gt; 
&lt;h3&gt;Dependencies&lt;/h3&gt; 
&lt;p&gt;Emacs 27 or later is supported. Apheleia does not include any formatters. You must install any formatter separately that you wish to use. As long as it is on &lt;code&gt;$PATH&lt;/code&gt; then Apheleia will pick it up automatically; missing formatters will silently be skipped, but errors from invoking installed formatters will be reported on buffer save.&lt;/p&gt; 
&lt;p&gt;It is recommended to have Bash installed, as this is used as a dependency for Apheleia to invoke certain formatters (e.g. Node.js-based formatters).&lt;/p&gt; 
&lt;p&gt;Windows support is not guaranteed due to lack of support for common open standards on this platform. Pull requests adjusting Apheleia for improved cross-platform portability will be accepted, but no guarantees are made about stability on Windows.&lt;/p&gt; 
&lt;h2&gt;User guide&lt;/h2&gt; 
&lt;p&gt;To your init-file, add the following form:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;(apheleia-global-mode +1)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The autoloading has been configured so that this will &lt;em&gt;not&lt;/em&gt; cause Apheleia to be loaded until you save a file.&lt;/p&gt; 
&lt;p&gt;By default, Apheleia is configured to format with &lt;a href=&quot;https://github.com/python/black&quot;&gt;Black&lt;/a&gt;, &lt;a href=&quot;https://prettier.io/&quot;&gt;Prettier&lt;/a&gt;, and &lt;a href=&quot;https://golang.org/cmd/gofmt/&quot;&gt;Gofmt&lt;/a&gt; on save in all relevant major modes. To configure this, you can adjust the values of the following variables:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;apheleia-formatters&lt;/code&gt;: Alist mapping names of formatters (symbols like &lt;code&gt;black&lt;/code&gt; and &lt;code&gt;prettier&lt;/code&gt;) to commands used to run those formatters (such as &lt;code&gt;(&quot;black&quot; &quot;-&quot;)&lt;/code&gt; and &lt;code&gt;(npx &quot;prettier&quot; input)&lt;/code&gt;). See the docstring for more information. 
  &lt;ul&gt; 
   &lt;li&gt; &lt;p&gt;You can manipulate this alist using standard Emacs functions. For example, to add some command-line options to Black, you could use:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(setf (alist-get &#39;black apheleia-formatters)
      &#39;(&quot;black&quot; &quot;--option&quot; &quot;...&quot; &quot;-&quot;))
&lt;/code&gt;&lt;/pre&gt; &lt;/li&gt; 
   &lt;li&gt; &lt;p&gt;There are a list of symbols that are interpreted by apheleia specially when formatting a command (example: &lt;code&gt;npx&lt;/code&gt;). Any non-string entries in a formatter that doesn&#39;t equal one of these symbols is evaluated and replaced in place. This can be used to pass certain flags to the formatter process depending on the state of the current buffer. For example:&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(push &#39;(shfmt . (&quot;beautysh&quot;
                 &quot;-filename&quot; filepath
                 (when-let ((indent (bound-and-true-p sh-basic-offset)))
                   (list &quot;--indent-size&quot; (number-to-string indent)))
                 (when indent-tabs-mode &quot;--tab&quot;)
                 &quot;-&quot;))
      apheleia-formatters)
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;This adds an entry to &lt;code&gt;apheleia-formatters&lt;/code&gt; for the &lt;code&gt;beautysh&lt;/code&gt; formatter. The evaluated entries makes it so that the &lt;code&gt;--tab&lt;/code&gt; flag is only passed to &lt;code&gt;beautysh&lt;/code&gt; when the value of &lt;code&gt;indent-tabs-mode&lt;/code&gt; is true. Similarly the indent-size flag is passed the exact value of the &lt;code&gt;sh-basic-offset&lt;/code&gt; variable only when it is bound. Observe that one of these evaluations returns a list of flags whereas the other returns a single string. These are substituted into the command as you&#39;d expect.&lt;/p&gt; &lt;/li&gt; 
   &lt;li&gt; &lt;p&gt;You can also use Apheleia to format buffers that have no underlying files. In this case the value of &lt;code&gt;file&lt;/code&gt; and &lt;code&gt;filepath&lt;/code&gt; will be the name of the current buffer with any special characters for the file-system (such as &lt;code&gt;*&lt;/code&gt; on windows) being stripped out.&lt;/p&gt; &lt;p&gt;This is also how the extension for any temporary files apheleia might create will be determined. If you&#39;re using a formatter that determines the file-type from the extension you should name such buffers such that their suffixed with the extension. For example a buffer called &lt;code&gt;*foo-bar.c*&lt;/code&gt; that has no associated file will have an implicit file-name of &lt;code&gt;foo-bar.c&lt;/code&gt; and any temporary files will be suffixed with a &lt;code&gt;.c&lt;/code&gt; extension.&lt;/p&gt; &lt;/li&gt; 
   &lt;li&gt; &lt;p&gt;You can implement formatters as arbitrary Elisp functions which operate directly on a buffer, without needing to invoke an external command. This can be useful to integrate with e.g. language servers. See the docstring for more information on the expected interface for Elisp formatters.&lt;/p&gt; &lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;apheleia-mode-alist&lt;/code&gt;: Alist mapping major modes and filename regexps to names of formatters to use in those modes and files. See the docstring for more information. 
  &lt;ul&gt; 
   &lt;li&gt; &lt;p&gt;You can use this variable to configure multiple formatters for the same buffer by setting the &lt;code&gt;cdr&lt;/code&gt; of an entry to a list of formatters to run instead of a single formatter. For example you may want to run &lt;code&gt;isort&lt;/code&gt; and &lt;code&gt;black&lt;/code&gt; one after the other.&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-elisp&quot;&gt;(setf (alist-get &#39;isort apheleia-formatters)
      &#39;(&quot;isort&quot; &quot;--stdout&quot; &quot;-&quot;))
(setf (alist-get &#39;python-mode apheleia-mode-alist)
      &#39;(isort black))
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;This will make apheleia run &lt;code&gt;isort&lt;/code&gt; on the current buffer and then &lt;code&gt;black&lt;/code&gt; on the result of &lt;code&gt;isort&lt;/code&gt; and then use the final output to format the current buffer.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;: At the moment there&#39;s no smart or configurable error handling in place. This means if one of the configured formatters fail (for example if &lt;code&gt;isort&lt;/code&gt; isn&#39;t installed) then apheleia just doesn&#39;t format the buffer at all, even if &lt;code&gt;black&lt;/code&gt; is installed.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; If a formatter uses &lt;code&gt;file&lt;/code&gt; (rather than &lt;code&gt;filepath&lt;/code&gt; or &lt;code&gt;input&lt;/code&gt; or none of these keywords), it can&#39;t be chained after another formatter, because &lt;code&gt;file&lt;/code&gt; implies that the formatter must read from the &lt;em&gt;original&lt;/em&gt; file, not an intermediate temporary file. For this reason it&#39;s suggested to avoid the use of &lt;code&gt;file&lt;/code&gt; in general.&lt;/p&gt; &lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;apheleia-formatter&lt;/code&gt;: Optional buffer-local variable specifying the formatter to use in this buffer. Overrides &lt;code&gt;apheleia-mode-alist&lt;/code&gt;. You can set this in a local variables list, or in &lt;code&gt;.dir-locals.el&lt;/code&gt; (e.g. &lt;code&gt;((python-mode . ((apheleia-formatter . (isort black)))))&lt;/code&gt;), or in a custom hook of your own that sets the local variable conditionally.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;apheleia-inhibit&lt;/code&gt;: Optional buffer-local variable, if set to non-nil then Apheleia does not turn on automatically even if &lt;code&gt;apheleia-global-mode&lt;/code&gt; is on.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;You can run &lt;code&gt;M-x apheleia-mode&lt;/code&gt; to toggle automatic formatting on save in a single buffer, or &lt;code&gt;M-x apheleia-global-mode&lt;/code&gt; to toggle the default setting for all buffers. Also, even if &lt;code&gt;apheleia-mode&lt;/code&gt; is not enabled, you can run &lt;code&gt;M-x apheleia-format-buffer&lt;/code&gt; to manually invoke the configured formatter for the current buffer. Running with a prefix argument will cause the command to prompt you for which formatter to run.&lt;/p&gt; 
&lt;p&gt;Apheleia does not currently support TRAMP, and is therefore automatically disabled for remote files.&lt;/p&gt; 
&lt;p&gt;If an error occurs while formatting, a message is displayed in the echo area. You can jump to the error by invoking &lt;code&gt;M-x apheleia-goto-error&lt;/code&gt;, or manually switch to the log buffer mentioned in the message.&lt;/p&gt; 
&lt;p&gt;You can configure error reporting using the following user options:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;apheleia-hide-log-buffers&lt;/code&gt;: By default, errors from formatters are put in buffers named like &lt;code&gt;*apheleia-cmdname-log*&lt;/code&gt;. If you customize this user option to non-nil then a space is prepended to the names of these buffers, hiding them by default in &lt;code&gt;switch-to-buffer&lt;/code&gt; (you must type a space to see them).&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;apheleia-log-only-errors&lt;/code&gt;: By default, only failed formatter runs are logged. If you customize this user option to nil then all runs are logged, along with whether or not they succeeded. This could be helpful in debugging.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The following user options are also available:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;apheleia-post-format-hook&lt;/code&gt;: Normal hook run after Apheleia formats a buffer. Run if the formatting is successful, even when no changes are made to the buffer.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;apheleia-max-alignment-size&lt;/code&gt;: The maximum number of characters that a diff region can have to be processed using Apheleia&#39;s dynamic programming algorithm for point alignment. This cannot be too big or Emacs will hang noticeably on large reformatting operations, since the DP algorithm is quadratic-time.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;apheleia-mode-lighter&lt;/code&gt;: &lt;code&gt;apheleia-mode&lt;/code&gt; lighter displayed in the mode-line. If you don&#39;t want to display it, use nil. Otherwise, its value must be a string.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Apheleia exposes some hooks for advanced customization:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;apheleia-formatter-exited-hook&lt;/code&gt;: Abnormal hook which is run after a formatter has completely finished running for a buffer. Not run if the formatting was interrupted and no action was taken. Receives two arguments: the symbol for the formatter that was run (e.g. &lt;code&gt;black&lt;/code&gt;, or it could be a list if multiple formatters were run in a chain), and a boolean for whether there was an error.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;apheleia-inhibit-functions&lt;/code&gt;: List of functions to run before turning on Apheleia automatically from &lt;code&gt;apheleia-global-mode&lt;/code&gt;. If one of these returns non-nil then &lt;code&gt;apheleia-mode&lt;/code&gt; is not enabled in the buffer.&lt;/p&gt; &lt;/li&gt; 
 &lt;li&gt; &lt;p&gt;&lt;code&gt;apheleia-skip-functions&lt;/code&gt;: List of functions to run before &lt;em&gt;each&lt;/em&gt; Apheleia formatter invocation. If one of these returns non-nil then the formatter is not run, even if &lt;code&gt;apheleia-mode&lt;/code&gt; is enabled.&lt;/p&gt; &lt;/li&gt; 
&lt;/ul&gt; 
&lt;h3&gt;Formatter configuration&lt;/h3&gt; 
&lt;p&gt;There is no configuration interface in Apheleia for formatter behavior. The way to configure a formatter is by editing a standard config file that it reads (e.g. &lt;code&gt;.prettierrc.json&lt;/code&gt;), or setting an environment variable that it reads, or by changing the entry in &lt;code&gt;apheleia-formatters&lt;/code&gt; to customize the command-line arguments.&lt;/p&gt; 
&lt;p&gt;There is one exception to this, which is that Apheleia&#39;s default command-line arguments for the built-in formatters will automatically check Emacs&#39; indentation options for the corresponding major mode, and pass that information to the formatter. This way, the indentation (tabs vs spaces, and how many) applied by the formatter will match what electric indentation in Emacs is doing, preventing a shuffle back and forth as you type.&lt;/p&gt; 
&lt;p&gt;This behavior can be disabled by setting &lt;code&gt;apheleia-formatters-respect-indent-level&lt;/code&gt; to nil.&lt;/p&gt; 
&lt;h2&gt;Troubleshooting&lt;/h2&gt; 
&lt;p&gt;Try running your formatter outside of Emacs to verify it works there. Check what command-line options it is configured with in &lt;code&gt;apheleia-formatters&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;To debug internal bugs, race conditions, or performance issues, try setting &lt;code&gt;apheleia-log-debug-info&lt;/code&gt; to non-nil and check the contents of &lt;code&gt;*apheleia-debug-log*&lt;/code&gt;. It will have detailed trace information about most operations performed by Apheleia.&lt;/p&gt; 
&lt;h3&gt;Known issues&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;process aphelieia-whatever no longer connected to pipe; closed it&lt;/code&gt;: This happens on older Emacs versions when formatting a buffer with size greater than 65,536 characters. There is no known workaround besides disabling &lt;code&gt;apheleia-mode&lt;/code&gt; for the affected buffer, or upgrading to a more recent version of Emacs. See &lt;a href=&quot;https://github.com/radian-software/apheleia/issues/20&quot;&gt;#20&lt;/a&gt;.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;h2&gt;Contributing&lt;/h2&gt; 
&lt;p&gt;Please see &lt;a href=&quot;https://github.com/radian-software/contributor-guide&quot;&gt;the contributor guide for my projects&lt;/a&gt; for general information, and the following sections for Apheleia-specific details.&lt;/p&gt; 
&lt;p&gt;There&#39;s also a &lt;a href=&quot;https://github.com/radian-software/apheleia/wiki&quot;&gt;wiki&lt;/a&gt; that could do with additions/clarity. Any improvement suggestions should be submitted as an issue.&lt;/p&gt; 
&lt;h3&gt;Adding a formatter&lt;/h3&gt; 
&lt;p&gt;I have done my best to make it straightforward to add a formatter. You just follow these steps:&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;Install your formatter on your machine so you can test.&lt;/li&gt; 
 &lt;li&gt;Create an entry in &lt;code&gt;apheleia-formatters&lt;/code&gt; with how to run it. (See the docstring of this variable for explanation about the available keywords.)&lt;/li&gt; 
 &lt;li&gt;Add entries for the relevant major modes in &lt;code&gt;apheleia-mode-alist&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;See if it works for you!&lt;/li&gt; 
 &lt;li&gt;Add a file at &lt;code&gt;test/formatters/installers/yourformatter.bash&lt;/code&gt; which explains how to install the formatter on Ubuntu. This will be used by CI.&lt;/li&gt; 
 &lt;li&gt;Test with &lt;code&gt;make fmt-build FORMATTERS=yourformatter&lt;/code&gt; to do the installation, then &lt;code&gt;make fmt-docker&lt;/code&gt; to start a shell with the formatter available. Verify it runs in this environment.&lt;/li&gt; 
 &lt;li&gt;Add an example input (pre-formatting) and output (post-formatting) file at &lt;code&gt;test/formatters/samplecode/yourformatter/in.whatever&lt;/code&gt; and &lt;code&gt;test/formatters/samplecode/yourformatter/out.whatever&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;Verify that the tests are passing, using &lt;code&gt;make fmt-test FORMATTERS=yourformatter&lt;/code&gt; from inside the &lt;code&gt;fmt-docker&lt;/code&gt; shell.&lt;/li&gt; 
 &lt;li&gt;Submit a pull request, CI should now be passing!&lt;/li&gt; 
&lt;/ol&gt; 
&lt;h2&gt;Acknowledgements&lt;/h2&gt; 
&lt;p&gt;I got the idea for using RCS patches to avoid moving point too much from &lt;a href=&quot;https://github.com/prettier/prettier-emacs&quot;&gt;prettier-js&lt;/a&gt;, although that package does not implement the dynamic programming algorithm which Apheleia uses to guarantee stability of point even within a formatted region.&lt;/p&gt; 
&lt;p&gt;Note that despite this inspiration, Apheleia is a clean-room implementation which is free of the copyright terms of prettier-js.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>zkry/yaml.el</title>
      <link>https://github.com/zkry/yaml.el</link>
      <description>&lt;p&gt;YAML parser in Elisp&lt;/p&gt;&lt;hr&gt;&lt;h1&gt;yaml.el&lt;/h1&gt; 
&lt;p&gt;&lt;a href=&quot;https://melpa.org/#/yaml&quot;&gt;&lt;img src=&quot;https://melpa.org/packages/yaml-badge.svg?sanitize=true&quot; alt=&quot;MELPA&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;yaml.el is a YAML parser written in Emacs List without any external dependencies. It provides an interface similar to the Emacs JSON parsing utility. The functions provided are as follows:&lt;/p&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(yaml-parse-string string &amp;amp;rest args)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The following keyword args are accepted:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;:object-type&lt;/code&gt; specifies the Lisp data structure to store parsed objects data in. It takes the following symbols: 
  &lt;ul&gt; 
   &lt;li&gt;&lt;code&gt;hash-table&lt;/code&gt; (default)&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;alist&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;plist&lt;/code&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:object-key-type&lt;/code&gt; specifies how map keys should be handled. It takes the following symbols: 
  &lt;ul&gt; 
   &lt;li&gt;&lt;code&gt;string&lt;/code&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;symbol&lt;/code&gt; (default) Use symbols as keys. If &lt;code&gt;:object-type&lt;/code&gt; is &lt;code&gt;plist&lt;/code&gt;, this becomes the same as &lt;code&gt;keyword&lt;/code&gt;.&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;keyword&lt;/code&gt; Always use keywords as keys.&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:sequence-type&lt;/code&gt; specifies the Lisp data structure to store the parsed sequences in. It takes the following symbols: 
  &lt;ul&gt; 
   &lt;li&gt;&lt;code&gt;array&lt;/code&gt; (default)&lt;/li&gt; 
   &lt;li&gt;&lt;code&gt;list&lt;/code&gt;&lt;/li&gt; 
  &lt;/ul&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:null-object&lt;/code&gt; specifies the lisp object to use for nulls. Defaults to the symbol &lt;code&gt;:null&lt;/code&gt;.&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;:false-object&lt;/code&gt; specifies the lisp object to use for false. Defaults to the symbol &lt;code&gt;:false&lt;/code&gt;.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(yaml-encode object)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The function &lt;code&gt;yaml-encode&lt;/code&gt; will encode a Lisp object to a YAML string.&lt;/p&gt; 
&lt;h2&gt;Installation&lt;/h2&gt; 
&lt;p&gt;Until this is published to MELPA you will need to use the code from this repo directly. You can put yaml.el in you load path directly or use a tool like use-package or straight.el.&lt;/p&gt; 
&lt;h2&gt;Examples&lt;/h2&gt; 
&lt;pre&gt;&lt;code class=&quot;language-emacs-lisp&quot;&gt;(require &#39;yaml)

(yaml-parse-string &quot;
recipe:
  ingredients:
  - milk
  - eggs
  - oil
  - flour
  duration: 10
  steps: null&quot; :object-type &#39;alist
               :sequence-type &#39;array
               :null-object :empty)

;; =&amp;gt; ((&quot;recipe&quot; (&quot;ingredients&quot; . [&quot;milk&quot; &quot;eggs&quot; &quot;oil&quot; &quot;flour&quot;]) (&quot;duration&quot; . 10) (&quot;steps&quot; . :empty)))

(yaml-parse-string &quot;
translations:
  one: бір
  two: екі
  three: үш&quot;)

;; =&amp;gt; #s(hash-table ... data (&quot;translations&quot; #s(hash-table ...)))


(yaml-encode &#39;(&quot;omitted&quot; ((count . 3) (value . 10) (items (&quot;ruby&quot; &quot;diamond&quot;))) &quot;omitted&quot;))

;; =&amp;gt; &quot;
- omitted
- count: 3
  value: 10
  items:
    ruby: [diamond]
- omitted&quot;


&lt;/code&gt;&lt;/pre&gt; 
&lt;h2&gt;Caveats&lt;/h2&gt; 
&lt;p&gt;Since this is implemented in Emacs Lisp performance is probably not the best. An alternative implementation using libyaml exists and can be found &lt;a href=&quot;https://github.com/syohex/emacs-libyaml&quot;&gt;here&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;If you have a very deeply nested YAML file and your &lt;code&gt;max-lisp-eval-depth&lt;/code&gt; variable is set too low, these is a chance that you might hit the maximum Lisp eval depth limit. In the future I may work on changing the parsing algorithm to avoid this problem but in the meantime you can bump up the &lt;code&gt;max-lisp-eval-depth&lt;/code&gt; variable in your config.&lt;/p&gt; 
&lt;h2&gt;Development&lt;/h2&gt; 
&lt;p&gt;You can run the tests by executing&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$ ~/path/to/git-repo/yaml.el
$ emacs -batch -l ert -l yaml.el -l yaml-tests.el -f ert-run-tests-batch-and-exit
&lt;/code&gt;&lt;/pre&gt;</description>
      
    </item>
    
  </channel>
</rss>
