<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Ashish Panigrahi</title>
    <subtitle>Ashish&#x27;s website</subtitle>
    <link rel="self" type="application/atom+xml" href="https://ashishpanigrahi.com/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-06-11T00:00:00+00:00</updated>
    <id>https://ashishpanigrahi.com/atom.xml</id>
    <entry xml:lang="en">
        <title>Setting up offline email for Microsoft O365 with notmuch and emacs</title>
        <published>2026-06-07T00:00:00+00:00</published>
        <updated>2026-06-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/o365-offline-email/"/>
        <id>https://ashishpanigrahi.com/blog/o365-offline-email/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/o365-offline-email/">&lt;p&gt;Having to deal with Microsoft&#x27;s outlook has been a growing pain with
my computing needs. Of course, this is pertinent only for work email.
For personal email, I use &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;migadu.com&quot;&gt;Migadu&lt;&#x2F;a&gt; which has good
standards for email unlike Microsoft&#x27;s.&lt;&#x2F;p&gt;
&lt;p&gt;At work, I can only use either the official Outlook webmail or
Thunderbird since those are the only clients that are whitelisted by
the IT department at my university. Thunderbird is slightly better (it
has a few problems of its own but I digress) but I would like to have
an offline copy of all my emails, fully searchable with an indexed
database provided by &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;notmuchmail.org&quot;&gt;notmuch&lt;&#x2F;a&gt;, which uses
the excellent &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;xapian.org&#x2F;&quot;&gt;Xapian&lt;&#x2F;a&gt; library for indexing.
Notmuch is shipped as an emacs package in the form of &lt;code&gt;notmuch.el&lt;&#x2F;code&gt;,
which is exactly what I like given that I&#x27;m moving most of my
computing needs into emacs&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve taken inspiration from &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.cosroe.com&#x2F;2025&#x2F;04&#x2F;neomutt-notmuch-mbsync.html&quot;&gt;Fergus&#x27; excellent
blogpost&lt;&#x2F;a&gt;
which implements the same in &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;neomutt.org&#x2F;&quot;&gt;neomutt&lt;&#x2F;a&gt;. The
initial setup process is identical to Fergus&#x27; blogpost.&lt;&#x2F;p&gt;
&lt;p&gt;It should be noted that notmuch is only a mail indexer. It does not
fetch mail, nor does it send mail. Those are handled by
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;isync.sourceforge.io&#x2F;&quot;&gt;isync&lt;&#x2F;a&gt; and
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;marlam.de&#x2F;msmtp&#x2F;&quot;&gt;msmtp&lt;&#x2F;a&gt;, which are commandline programs.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;access-authentication-with-o365&quot;&gt;Access authentication with O365&lt;&#x2F;h2&gt;
&lt;p&gt;Since Thunderbird is still allowed to access O365&#x27;s authentication, we
will use the client ID provided from it (this is publicly
available from Thunderbird&#x27;s source code)&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. For authentication for
IMAP and SMTP, we will use
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;openspecs&#x2F;exchange_server_protocols&#x2F;ms-xoauth&#x2F;0b717658-4ceb-4401-9da9-7860c9ca2f2f?redirectedfrom=MSDN&quot;&gt;XOAUTH&lt;&#x2F;a&gt;,
which is a &lt;em&gt;simple authentication and security layer&lt;&#x2F;em&gt; (SASL) more
suited for email clients.&lt;&#x2F;p&gt;
&lt;p&gt;Tools like isync rely on SASL for authentication, for which we&#x27;ll
require an XOAUTH SASL plugin:
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;moriyoshi&#x2F;cyrus-sasl-xoauth2&quot;&gt;&lt;code&gt;https:&#x2F;&#x2F;github.com&#x2F;moriyoshi&#x2F;cyrus-sasl-xoauth2&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If you&#x27;re on Arch, then this plugin is installable from the AUR:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;paru&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;S&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; cyrus-sasl-xoauth2-git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If not, then we can build it from source:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; clone&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; https:&#x2F;&#x2F;github.com&#x2F;moriyoshi&#x2F;cyrus-sasl-xoauth2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; cyrus-sasl-xoauth2&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;.&#x2F;autogen.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;   #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; checks for requirements&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;.&#x2F;configure&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; configure (here we use the defaults)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;make&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;           #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; compile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; make&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; install&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;     #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; install for root user&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;token-generation-for-oauth&quot;&gt;Token generation for OAuth&lt;&#x2F;h3&gt;
&lt;p&gt;Microsoft has conditionally allowed API access to clients and the only
way to get access for any client is to register the application in
the Microsot Application portal, which is something only my org&#x27;s IT
department can do&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-3-1&quot;&gt;&lt;a href=&quot;#fn-3&quot;&gt;3&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. Fortunately, we can use Thunderbird&#x27;s
credentials to generate an access token for our purposes.&lt;&#x2F;p&gt;
&lt;p&gt;Another issue that comes up is the finite lifetime of these access
tokens (typically an hour or two), which is cumbersome to generate
each time one needs to download email. Fortunately,
&lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;www.mutt.org&#x2F;&quot;&gt;mutt&lt;&#x2F;a&gt; comes with
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;muttmua&#x2F;mutt&#x2F;blob&#x2F;master&#x2F;contrib&#x2F;mutt_oauth2.py&quot;&gt;&lt;code&gt;mutt_oauth2.py&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;,
a script to help in the automatic renewal of this token. This script
helps in decrypting the token file and renewing it everytime it is
invoked.&lt;&#x2F;p&gt;
&lt;p&gt;Fetching the initial token is fairly simple but before we do it, there
are certain changes that we need to do to &lt;code&gt;mutt_oauth2.py&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Look into the &lt;code&gt;ENCRYPTION_PIPE&lt;&#x2F;code&gt; variable (line 48) and make sure to specify your
gpg key. If you don&#x27;t have one, then generate one:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;gpg&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-full-generate-key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Select the default options (ed25519 cypher if it allows) and make sure
that the expiration of the key is set to 0 (no expiration). This makes
your life easier but of course for security reasons, this is &lt;strong&gt;not a
good practice&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Bring up your public key:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;gpg&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-list-keys&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Copy the second line (after the &lt;code&gt;pub&lt;&#x2F;code&gt; line) and paste it into
&lt;code&gt;mutt_oauth2.py&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ENCRYPTION_PIPE&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;gpg&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;--encrypt&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;--recipient&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;YOUR-GPG-KEY&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After this, look at line 79. This includes a &lt;code&gt;client_id&lt;&#x2F;code&gt; for
&lt;code&gt;microsoft&lt;&#x2F;code&gt;. For Thunderbird, the client id is
&lt;code&gt;9e5f94bc-e8a4-4e73-b8be-63364c29d753&lt;&#x2F;code&gt;. Leave the &lt;code&gt;client_secret&lt;&#x2F;code&gt;
value as is. It should look like so:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;client_id&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;9e5f94bc-e8a4-4e73-b8be-63364c29d753&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;client_secret&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we are ready to generate the access token. Simply run:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;.&#x2F;mutt_oauth2.py&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; OUTPUT_TOKEN_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-verbose&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-authorize&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A prompt should appear. Select &lt;code&gt;localhostauthcode&lt;&#x2F;code&gt;, after which you
should automatically be redirected to a browser for adding your
credentials for authentication. Doing so, should reveal the access
token in your terminal. No need to copy it, it is present in your
&lt;code&gt;OUTPUT_TOKEN_FILE&lt;&#x2F;code&gt; which is encrypted. To obtain the decrypted token,
we run the script again with just the file name as an argument&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;.&#x2F;mutt_oauth2.py&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; OUTPUT_TOKEN_FILE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A nice thing is that running this script with the token file also
checks for expiry and renews it if necessary. This can be done
multiple times without worry.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;offline-email-setup&quot;&gt;Offline email setup&lt;&#x2F;h2&gt;
&lt;p&gt;Now that we are done with the difficult part, we move onto setting up
isync (the binary is called &lt;code&gt;mbsync&lt;&#x2F;code&gt;) which is available in most
distributions. This program basically downloads your emails offline
and synchronizes it with your email&#x27;s remote IMAP servers. It supports
multiple accounts too. The program is configurable with a
&lt;code&gt;~&#x2F;.mbsyncrc&lt;&#x2F;code&gt; file&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-4-1&quot;&gt;&lt;a href=&quot;#fn-4&quot;&gt;4&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. I highly recommend reading the manual for it
via &lt;code&gt;man mbsync&lt;&#x2F;code&gt;. Here&#x27;s a starting template:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# -- Global defaults&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# These will be applied to all accounts&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Create new mail in either location, so if the remote or local has mail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# and the other does not, then create it&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Create Both&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# never remote mail from either side&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Remove None&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Remove messages marked for deletion from the local side on the&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# remote. Do not ever delete local if marked for deletion in the&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# remote. Prevents admins from deleting one&amp;#39;s local mail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Expunge Far&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Sync All&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SyncState *&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CopyArrivalDate yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# No maximum number of messages&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;MaxMessages 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# -- First email account&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IMAPAccount university&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Host outlook.office365.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Port 993&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;User my-username@university.edu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;AuthMechs XOAUTH2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PassCmd &amp;quot;~&#x2F;.local&#x2F;bin&#x2F;mutt_oauth2.py ~&#x2F;.local&#x2F;bin&#x2F;TOKEN&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Use TLS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;TLSType IMAPS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SystemCertificates yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Timeout 10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# A store defines a collection of mailboxes, so we associate the&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# remote IMAP mailbox with the account we just configured&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IMAPStore university-remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Associate the store with our account&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Account university&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Where are we going to keep the mail associated with this account&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;MaildirStore university-local&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SubFolders Verbatim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Path ~&#x2F;.local&#x2F;share&#x2F;mail&#x2F;university&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Inbox ~&#x2F;.local&#x2F;share&#x2F;mail&#x2F;university&#x2F;INBOX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Channel to synchronize everything except &amp;quot;Sent&amp;quot; email&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Channel uni-main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Far :university-remote:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Near :university-local:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Which directories to synchronize&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Patterns INBOX &amp;quot;Deleted Items&amp;quot; &amp;quot;Drafts&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Channel to synchronize &amp;quot;Sent&amp;quot; email&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Channel uni-sent&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Far :university-remote:&amp;quot;Sent Items&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Near :university-local:Sent&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Group the two channels and sync everything with `mbsync NAME`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Group university&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Channel uni-main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Channel uni-sent&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# -- Second email account&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IMAPAccount personal&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Once you have everything configured, we can start downloading all our
email by running:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;mbsync&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; university&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The first time &lt;code&gt;mbsync&lt;&#x2F;code&gt; is run, it will take a fair amount of time,
since you&#x27;ll be downloading a lot of email (assuming you&#x27;ve been using
your account for a long time). The subsequent runs would be just
incremental downloads, so it&#x27;s much faster.&lt;&#x2F;p&gt;
&lt;p&gt;After navigating to your local Maildir directory
(&lt;code&gt;~&#x2F;.local&#x2F;share&#x2F;mail&#x2F;university&lt;&#x2F;code&gt; in my case), you should see all your
emails downloaded and categorized into inbox, drafts, sent, and
deleted-items folders.&lt;&#x2F;p&gt;
&lt;p&gt;A way to automate this to run a script periodically. I use
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Systemd&#x2F;Timers&quot;&gt;systemd-timers&lt;&#x2F;a&gt;
where I have a script which is periodically run every 15 mins and
notifies me if there&#x27;s new email (I&#x27;ll cover this later in the blogpost).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;sending-mail-via-smtp&quot;&gt;Sending mail via SMTP&lt;&#x2F;h2&gt;
&lt;p&gt;Sending email is done via &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;marlam.de&#x2F;msmtp&#x2F;&quot;&gt;&lt;code&gt;msmtp&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;. It
is configured by editing &lt;code&gt;~&#x2F;.msmtprc&lt;&#x2F;code&gt;&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-5-1&quot;&gt;&lt;a href=&quot;#fn-5&quot;&gt;5&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;defaults&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;auth on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tls on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tls_trust_file system&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;logfile ~&#x2F;.cache&#x2F;msmtp.log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;timeout 10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# -- First account&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;account university&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tls_starttls on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;host smtp.office365.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;port 587&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;auth xoauth2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;user my-username@university.edu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;passwordeval &amp;quot;~&#x2F;.local&#x2F;bin&#x2F;mutt_oauth2.py ~&#x2F;.local&#x2F;bin&#x2F;TOKEN&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;from my-username@university.edu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# -- Second account&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;account personal&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This is fairly self-explanatory. One thing to note is that
&lt;code&gt;tls_starttls&lt;&#x2F;code&gt; should be on for this to work. I&#x27;m not very familiar
with email security protocols like TLS and STARTTLS but from my
understanding, STARTTLS is an automatic upgrade (if supported) from
the more insecure TLS protocol. TLS however needs to be enabled for
any email service, otherwise it won&#x27;t work.&lt;&#x2F;p&gt;
&lt;p&gt;Now, we can test our configuration by sending email directly from the
commandline. Save the contents of a file called &lt;code&gt;example-mail&lt;&#x2F;code&gt; as follows:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;From: my-username@university.edu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;To: user@example.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Subject: Hello World&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;This is a test for msmtp.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And send the email by running:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; example-mail&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; msmtp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;t&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;a&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; university&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;indexing-email-offline-with-notmuch&quot;&gt;Indexing email offline with notmuch&lt;&#x2F;h2&gt;
&lt;p&gt;We have receiving and sending email configured. How about reading and
&quot;using&quot; email via an email client. In more technical terms, an email
client is called a &lt;em&gt;mail user agent&lt;&#x2F;em&gt; (MUA), which is typically seen in
email headers. This includes clients like Thunderbird, Apple mail,
neomutt, etc. We will configure &lt;code&gt;notmuch&lt;&#x2F;code&gt; which indexes email and
provides an interface for emacs natively with notmuch.el.&lt;&#x2F;p&gt;
&lt;p&gt;Notmuch is entirely tag based. Basic tags exist like &lt;em&gt;unread&lt;&#x2F;em&gt;,
&lt;em&gt;inbox&lt;&#x2F;em&gt;, &lt;em&gt;draft&lt;&#x2F;em&gt;, &lt;em&gt;sent&lt;&#x2F;em&gt; but you can customize it with more tags to
filter out emails from a particular email address, from a
particular range of date, etc. Tags are heavily used and it&#x27;s a
different paradigm of handling email compared to your typical webmail
interface. I won&#x27;t go over the details of tagging in notmuch here for
the sake of brevity (to be covered in another blogpost).&lt;&#x2F;p&gt;
&lt;p&gt;When first setting up notmuch, simply run:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;notmuch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; setup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This will prompt you for basic information like your name, email address,
Maildir directory, etc. Once this is done, notmuch needs to index your
Maildir. Run the following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;notmuch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; new&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This should be fairly fast, even if your Maildir is big. Notmuch is
quick like that.&lt;&#x2F;p&gt;
&lt;p&gt;Now you can search an email entry via &lt;code&gt;notmuch search&lt;&#x2F;code&gt;. For example, I
can search emails from a particular sender like so:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;notmuch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; search&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;from:friend@university.edu&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I would again advise you to go through the man pages (&lt;code&gt;man notmuch-search&lt;&#x2F;code&gt;) for more details.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;emacs-setup-for-notmuch&quot;&gt;Emacs setup for notmuch&lt;&#x2F;h3&gt;
&lt;p&gt;Simply running &lt;code&gt;M-x notmuch&lt;&#x2F;code&gt; should give you a hello screen, where you
can then select tags like &lt;em&gt;inbox&lt;&#x2F;em&gt;, &lt;em&gt;unread&lt;&#x2F;em&gt; to view their respective
email. I have a fairly customized config for notmuch.el but below I
provide a fairly good starting point for a more minimal notmuch
interface&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-6-1&quot;&gt;&lt;a href=&quot;#fn-6&quot;&gt;6&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;emacs-lisp&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;; Notmuch for email&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;use-package&lt;&#x2F;span&gt;&lt;span&gt; notmuch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;  :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;load-path&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&#x2F;usr&#x2F;share&#x2F;emacs&#x2F;site-lisp&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;  :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ensure&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; nil&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;  :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;defer&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; t&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;  :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;commands&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span&gt;notmuch notmuch-mua-new-mail&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;  :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;  ;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;; Search&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-search-oldest-first &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;nil&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;  :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;  ;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; General UI&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-show-logo &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;nil&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-column-control &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;1.0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-hello-auto-refresh &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;t&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-hello-recent-searches-max &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;20&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-hello-thousands-separator &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-hello-sections &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;notmuch-hello-insert-saved-searches&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-show-all-tags-list &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;t&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;  ;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Search&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-search-result-format&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;date&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;%12s  &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;count&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;%-7s  &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;authors&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;%-20s  &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;subject&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;%-80s  &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;tags&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;(%s)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-tree-result-format&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;date&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;%12s  &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;authors&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;%-20s  &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          (&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;tree&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;%s&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;subject&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;%s&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;           .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; %-80s  &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;tags&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;(%s)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-show-empty-saved-searches &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;t&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;  ;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Tags&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-archive-tags &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;nil&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; ;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; I don&amp;#39;t archive email&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-message-replied-tags &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;+replied&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-message-forwarded-tags &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;+forwarded&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-show-mark-read-tags &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-unread&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-draft-tags &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;+draft&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-draft-folder &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;university&#x2F;Drafts&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	notmuch-draft-save-plaintext &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ask&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;  ;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Email composition&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-mua-compose-in &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;new-window&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-mua-hidden-headers &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;nil&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-address-command &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;internal&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-address-use-company &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;nil&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-always-prompt-for-sender &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;t&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-mua-cite-function&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;	&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;message-cite-original-without-signature&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-mua-user-agent-function &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;nil&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-show-relative-dates &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;t&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-show-all-multipart&#x2F;alternative-parts &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;nil&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-show-indent-messages-width &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-show-indent-multipart &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;nil&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-show-part-button-default-action &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;notmuch-show-view-part&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-wash-wrap-lines-length &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;120&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-unthreaded-show-out &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;nil&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-message-headers &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;To&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;Cc&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;Subject&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;Date&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; notmuch-message-headers-visible &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;t&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;  :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;bind&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt; global-map&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;C-c m m&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span&gt; notmuch&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;C-x m&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span&gt; notmuch-mua-new-mail&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; ;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; override &lt;&#x2F;span&gt;&lt;span&gt;`&lt;&#x2F;span&gt;&lt;span&gt;compose-mail&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt; notmuch-search-mode-map&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span&gt; notmuch-search-filter&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; ;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; alias for l&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;r&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span&gt; notmuch-search-reply-to-thread&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; ;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; easier to reply to all by default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;R&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span&gt; notmuch-search-reply-to-thread-sender&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt; notmuch-show-mode-map&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;r&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span&gt; notmuch-show-reply&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; ;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; easier to reply to all by default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;R&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span&gt; notmuch-show-reply-sender&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt; notmuch-hello-mode-map&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;J&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; .&lt;&#x2F;span&gt;&lt;span&gt; notmuch-jump-search&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You&#x27;re free to look at my
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;paniash&#x2F;dotemacs&#x2F;blob&#x2F;413f60cd2b152a581a6a8d5cb952b6fae318a5ba&#x2F;init.el#L861&quot;&gt;&lt;code&gt;init.el&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;
for my own customization for notmuch.el.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;automating-email-synchronization-with-systemd-timers&quot;&gt;Automating email synchronization with systemd timers&lt;&#x2F;h2&gt;
&lt;p&gt;Let&#x27;s automate the email sync to happen every 15 mins (or whatever
frequency you prefer). First we create a shell-script to download
email via &lt;code&gt;mbsync&lt;&#x2F;code&gt; and also index the email with &lt;code&gt;notmuch&lt;&#x2F;code&gt;. Let&#x27;s name it
it &lt;code&gt;syncmail.sh&lt;&#x2F;code&gt; and place it in &lt;code&gt;$HOME&#x2F;.local&#x2F;bin&#x2F;&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#!&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;&#x2F;bin&#x2F;sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;eu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Set environment variable for notmuch config file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;export&lt;&#x2F;span&gt;&lt;span&gt; NOTMUCH_CONFIG&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$&lt;&#x2F;span&gt;&lt;span&gt;HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&#x2F;.config&#x2F;notmuch&#x2F;notmuch-config&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;mbsync&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; university&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;before&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;notmuch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; count&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-lastmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;*&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; cut&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;f3&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;notmuch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; new&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;query&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;lastmod:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;before&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.. and path:university&#x2F;**&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;count&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;notmuch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; count&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$&lt;&#x2F;span&gt;&lt;span&gt;query&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;if&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$&lt;&#x2F;span&gt;&lt;span&gt;count&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; -gt&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    body&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;notmuch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; search&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-format=json&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-limit=5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$&lt;&#x2F;span&gt;&lt;span&gt;query&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;	       |&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; jq&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;r&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.[] | &amp;quot;\(.authors): \(.subject)&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    notify-send&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;New mail: &lt;&#x2F;span&gt;&lt;span&gt;$&lt;&#x2F;span&gt;&lt;span&gt;count&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$&lt;&#x2F;span&gt;&lt;span&gt;body&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In addition to downloading email and indexing, the script also
notifies through &lt;code&gt;notify-send&lt;&#x2F;code&gt; if there&#x27;s new email along with a
sender and subject in the notification. Make sure to make the script
executable with&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; +x&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; .&#x2F;syncmail.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then we write the systemd script to run this script periodically.
First we create a &lt;code&gt;syncmail.service&lt;&#x2F;code&gt; file in &lt;code&gt;$HOME&#x2F;.config&#x2F;systemd&#x2F;user&#x2F;&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;systemd&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Unit]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;Description&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;Sync mail with mbsync and index with notmuch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Service]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;Type&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;oneshot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ExecStart&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;%h&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;.local&#x2F;bin&#x2F;syncmail.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then we create a timer file (make sure it is named &lt;code&gt;syncmail.timer&lt;&#x2F;code&gt;) for actually running the script every &lt;code&gt;n&lt;&#x2F;code&gt; minutes.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;systemd&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Unit]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;Description&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;Run syncmail every &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;15&lt;&#x2F;span&gt;&lt;span&gt; minutes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Timer]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;OnBootSec&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;2m&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;OnUnitActiveSec&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;15m&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;Persistent&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Install]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;WantedBy&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;timers.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The advantage over cronjobs is that if your system is asleep or
shutdown, then booting up accomodates accordingly and runs the script
after &lt;code&gt;m&lt;&#x2F;code&gt; minutes (2 minutes in my case).&lt;&#x2F;p&gt;
&lt;p&gt;Finally we enable the script with &lt;code&gt;systemctl&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-user&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; daemon-reload&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-user&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-now&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; syncmail.timer&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;concluding-remarks&quot;&gt;Concluding remarks&lt;&#x2F;h2&gt;
&lt;p&gt;Now you should have a working setup for using offline email for
Microsoft&#x27;s O365. This is fairly minimal but if you&#x27;d like to have
encrypted emails, addressbooks, etc., please take a look at the
original &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.cosroe.com&#x2F;2025&#x2F;04&#x2F;neomutt-notmuch-mbsync.html&quot;&gt;blogpost from
Fergus&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;A basic emailing etiquette I like to follow is to use plaintext as
opposed to html. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;useplaintext.email&#x2F;&quot;&gt;Read more&lt;&#x2F;a&gt; on why this is better.&lt;&#x2F;p&gt;
&lt;div class=&quot;meta&quot;&gt;
Special thanks to &lt;a href=&quot;https:&#x2F;&#x2F;marci.gunyho.com&quot;&gt;Marci&lt;&#x2F;a&gt; for
pointing out grammatical errors and typos.
&lt;&#x2F;div&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;It&#x27;s like the old adage from Vi advocates, &quot;Emacs is a great
operating system, lacking only a decent text editor&quot;. Although the latter part I would disagree with. &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;I just found out that Mozilla has made it very convoluted to
find the source code and build Thunderbird locally. It uses
mercurial instead of Git (in this day and age?). Relevant docs are &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;developer.thunderbird.net&#x2F;thunderbird-development&#x2F;building-thunderbird&#x2F;linux-build-prerequisites&quot;&gt;here&lt;&#x2F;a&gt;. &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-3&quot;&gt;
&lt;p&gt;Even after asking countless times, they&#x27;ve rejected my request
to include notmuch&#x2F;emacs into the allowed clients list. Ah well, here
we are. &lt;a href=&quot;#fr-3-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-4&quot;&gt;
&lt;p&gt;Personally, I dislike that my &lt;code&gt;$HOME&lt;&#x2F;code&gt; directory gets cluttered
with config files that don&#x27;t respect the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;XDG_Base_Directory&quot;&gt;XDG
specifications&lt;&#x2F;a&gt;.
I set it to &lt;code&gt;$HOME&#x2F;.config&#x2F;mbsync&#x2F;mbsyncrc&lt;&#x2F;code&gt; by exporting the variable &lt;code&gt;MBSYNCRC&lt;&#x2F;code&gt;. &lt;a href=&quot;#fr-4-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-5&quot;&gt;
&lt;p&gt;Same issue with this. I fix it to be at &lt;code&gt;$HOME&#x2F;.config&#x2F;msmtp&#x2F;config&lt;&#x2F;code&gt;. &lt;a href=&quot;#fr-5-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-6&quot;&gt;
&lt;p&gt;The default interface is too noisy for me, so I disable a lot of the bells and whistles. &lt;a href=&quot;#fr-6-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>New update for this website</title>
        <published>2026-05-26T00:00:00+00:00</published>
        <updated>2026-05-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/zola-website/"/>
        <id>https://ashishpanigrahi.com/blog/zola-website/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/zola-website/">&lt;p&gt;It has been a while since I updated my website. Over the years, I&#x27;ve
grown to like minimal yet aesthetic websites which comply with
legibility standards.&lt;&#x2F;p&gt;
&lt;p&gt;Recently, I came across the excellent &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;bearblog.dev&quot;&gt;Bear
blog&lt;&#x2F;a&gt; and was enamored by its simplistic yet
appealing stylistic nature. I think it&#x27;s a great platform to get
started with writing your own blog page. But anyway, I was more
interested in the stylesheet rather than the actual method of
publishing a website. After diving into this &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;bearblog.dev&#x2F;discover&#x2F;&quot;&gt;rabbit hole of various
bear blogs&lt;&#x2F;a&gt;, I was pleased to come
across the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;robertbirming.com&#x2F;bearming&#x2F;&quot;&gt;Bearming theme&lt;&#x2F;a&gt; made
by &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;robertbirming.com&quot;&gt;Robert Birming&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Along with this, comes &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;getzola.org&quot;&gt;Zola&lt;&#x2F;a&gt; which is yet
another static site generator. For now, I&#x27;ve become so accustomed to
the boilerplate that SSG&#x27;s provide that it&#x27;s hard to move onto
something truly minimal&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. But like they say &lt;em&gt;perfectionism is the
enemy of progress&lt;&#x2F;em&gt;, and so here&#x27;s another attempt at updating my
website more frequently&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Now that the stylistic nature of this website is to my liking, I can
write more blogposts about things that interest me. Stay tuned!&lt;&#x2F;p&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;Hopefully I can move my entire website to being built by
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;orgmode.org&quot;&gt;orgmode&lt;&#x2F;a&gt; and
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;emacs&#x2F;&quot;&gt;emacs&lt;&#x2F;a&gt; some day. &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;Depending on how much free time I can get as a PhD student. &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Hope (my poem)</title>
        <published>2025-11-18T00:00:00+00:00</published>
        <updated>2025-11-18T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/hope/"/>
        <id>https://ashishpanigrahi.com/blog/hope/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/hope/">&lt;blockquote&gt;
&lt;p&gt;A shining light in the tunnel of darkness.&lt;br &#x2F;&gt;
That&#x27;s how I see hope, with a longingness.&lt;br &#x2F;&gt;
Sometimes good and sometimes bad,&lt;br &#x2F;&gt;
But somehow makes me glad.&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
Is it hope that I&#x27;m looking for?&lt;br &#x2F;&gt;
Like a drop of water, in a large desert outdoor.&lt;br &#x2F;&gt;
Is it just something made up?&lt;br &#x2F;&gt;
A lie told even after I slipup.&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
Hope is a dangerous thing.&lt;br &#x2F;&gt;
The results can feel like a swing.&lt;br &#x2F;&gt;
But is it enough to justify my life?&lt;br &#x2F;&gt;
The way I&#x27;m living, with so much strife.&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
I keep clinging to this hope.&lt;br &#x2F;&gt;
Even with my life being a downward slope.&lt;br &#x2F;&gt;
Sometimes I fear it won&#x27;t be there.&lt;br &#x2F;&gt;
At that point, would I still care?&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
I find myself in an abyss.&lt;br &#x2F;&gt;
At times, devoid of any bliss.&lt;br &#x2F;&gt;
Hope is the only thing in my mind.&lt;br &#x2F;&gt;
Alas it is hard to see, perhaps I left it too far behind.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Bypassing the storage limit on Zotero with Syncthing</title>
        <published>2025-03-22T00:00:00+00:00</published>
        <updated>2025-03-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/zotero-pdf-sync/"/>
        <id>https://ashishpanigrahi.com/blog/zotero-pdf-sync/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/zotero-pdf-sync/">&lt;p&gt;Recently, I found out about this neat little trick to bypass the
storage limit on &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;zotero.org&quot;&gt;Zotero&lt;&#x2F;a&gt; for PDFs. Currently on
the &quot;free&quot; tier there is a limit of 300 MB which fills up pretty
quickly when you&#x27;re doing serious research. This guide helps bypass
this limit (subject to your computer&#x27;s storage).&lt;&#x2F;p&gt;
&lt;center&gt;
&lt;img src=&quot;&#x2F;images&#x2F;zotero-storage-price.png&quot; style=width:55%&gt;
&lt;figcaption&gt;The current pricing model. Not bad but you don&#x27;t need it
if it&#x27;s just for personal use.&lt;&#x2F;figcaption&gt;
&lt;&#x2F;center&gt;
&lt;p&gt;The prices are there for if you&#x27;d like to store associated PDFs on the
cloud and makes sense if two or more people would like to share the
same bibliography data. What this blogpost helps with is storing the files locally and
syncing them &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Peer-to-peer&quot;&gt;peer-to-peer&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Best part is it&#x27;s &lt;strong&gt;free&lt;&#x2F;strong&gt;!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;prior-situation&quot;&gt;Prior situation&lt;&#x2F;h3&gt;
&lt;p&gt;Usually if you&#x27;re employed at a university&#x2F;research institution, the
institute has a subscription to various journals. I would use this
with Zotero, strictly only storing the metadata and journal links and
opening them on the browser. The PDF can then be downloaded if you&#x27;re
on the institute&#x27;s intranet.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;storage-location-for-pdfs&quot;&gt;Storage location for PDFs&lt;&#x2F;h3&gt;
&lt;p&gt;On Linux&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;, by default I believe Zotero creates a directory
&lt;code&gt;~&#x2F;Zotero&#x2F;&lt;&#x2F;code&gt; for storage of files, notes and metadata. I usually create
my own custom location for the directory, &lt;code&gt;~&#x2F;.zotero&#x2F;&lt;&#x2F;code&gt; in this case as
I don&#x27;t like having my home directory cluttered&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;To change this, go to &lt;strong&gt;Edit -&amp;gt; Settings -&amp;gt; Advanced&lt;&#x2F;strong&gt; and under
&quot;&lt;strong&gt;Data Directory Location&lt;&#x2F;strong&gt;&quot; you can specify a custom path.&lt;&#x2F;p&gt;
&lt;center&gt;
&lt;img src=&quot;&#x2F;images&#x2F;zotero-location.png&quot;&gt;
&lt;figcaption&gt;Dialog box for specifying custom location for Zotero directory.&lt;&#x2F;figcaption&gt;
&lt;&#x2F;center&gt;
&lt;p&gt;Now assuming you already have a sizeable zotero
database, we go to this location and are interested in the
&lt;code&gt;~&#x2F;.zotero&#x2F;storage&lt;&#x2F;code&gt; folder. This is where the PDFs are stored.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;changing-a-few-settings&quot;&gt;Changing a few settings&lt;&#x2F;h4&gt;
&lt;p&gt;Now, by default Zotero syncs all your files to the cloud. We don&#x27;t
want that. To disable it, go to &lt;strong&gt;Edit -&amp;gt; Settings -&amp;gt; Sync&lt;&#x2F;strong&gt; and under
&lt;strong&gt;File Syncing&lt;&#x2F;strong&gt; uncheck both &quot;Sync attachment files in My Library&quot; and
&quot;Sync attachment files in group libraries using Zotero storage&quot;.&lt;&#x2F;p&gt;
&lt;center&gt;
&lt;img src=&quot;&#x2F;images&#x2F;zotero-syncing.png&quot;&gt;
&lt;figcaption&gt;Uncheck both the boxes.&lt;&#x2F;figcaption&gt;
&lt;&#x2F;center&gt;
&lt;p&gt;Now that we have unchecked the boxes, one can simply save the PDFs as
we like and use it on their computer. But what if we need to access
files on a different computer? That&#x27;s where peer-to-peer syncing comes
in.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;syncing-with-syncthing&quot;&gt;Syncing with Syncthing&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;syncthing.net&quot;&gt;Syncthing&lt;&#x2F;a&gt; is an excellent piece of software.
As described on their website:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Syncthing is a &lt;strong&gt;continuous file synchronization&lt;&#x2F;strong&gt; program.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Basically it helps sync files between different computers in a
peer-to-peer fashion.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;quickstart-guide&quot;&gt;Quickstart guide&lt;&#x2F;h3&gt;
&lt;p&gt;I would highly recommend the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.syncthing.net&#x2F;intro&#x2F;getting-started.html&quot;&gt;official
user-guide&lt;&#x2F;a&gt; for
using syncthing. However, the following covers a quick and brief guide
to getting syncing setup with Zotero.&lt;&#x2F;p&gt;
&lt;p&gt;Launching &lt;code&gt;syncthing&lt;&#x2F;code&gt; in a terminal opens up &lt;code&gt;localhost:8384&lt;&#x2F;code&gt; on your
web browser and you&#x27;re greeted with the GUI.&lt;&#x2F;p&gt;
&lt;center&gt;
&lt;img src=&quot;&#x2F;images&#x2F;syncthing-gui.png&quot; style=width:100%&gt;
&lt;figcaption&gt;Syncthing GUI&lt;&#x2F;figcaption&gt;
&lt;&#x2F;center&gt;
&lt;p&gt;The GUI shows three components, two of which we are concerned with. On
the left are the folders that are synced. The right bottom section
consists of the devices to which certain folders are being synced. In
my case, I have the &lt;em&gt;zotero storage&lt;&#x2F;em&gt; folder synced with my office PC
and some other folders synced with my Android phone.&lt;&#x2F;p&gt;
&lt;p&gt;The &quot;Add Folder&quot; button is a good starting point. Clicking it leads us
to a dialog box asking for a &lt;em&gt;folder label&lt;&#x2F;em&gt; and a &lt;em&gt;folder path&lt;&#x2F;em&gt;. The
latter is important. For now, just ignore the &lt;em&gt;folder ID&lt;&#x2F;em&gt; variable. It
is auto-generated by syncthing and is meant to let syncthing know
which folders to sync across different computers based on this ID.&lt;&#x2F;p&gt;
&lt;center&gt;
&lt;img src=&quot;&#x2F;images&#x2F;syncthing-add-folder.png&quot; style=width:90%&gt;
&lt;figcaption&gt;Adding folder for syncing.&lt;&#x2F;figcaption&gt;
&lt;&#x2F;center&gt;
&lt;p&gt;Now, just set the folder path to &lt;code&gt;~&#x2F;.zotero&#x2F;storage&lt;&#x2F;code&gt; (or whatever is
the custom folder path you&#x27;ve set in Zotero) and click save.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;adding-remote-device&quot;&gt;Adding remote device&lt;&#x2F;h4&gt;
&lt;p&gt;On the secondary device that you&#x27;d like to access your PDFs on (laptop
or perhaps a desktop at your office like me), then you need to launch
syncthing on the remote device and add it on your main computer by
clicking &quot;Add Remote Device&quot; at the bottom right corner in the GUI.&lt;&#x2F;p&gt;
&lt;p&gt;The device can be added either via a device ID or via a QR-code, which
is accessible under the &quot;Actions&quot; tab and clicking &quot;Show ID&quot;.&lt;&#x2F;p&gt;
&lt;center&gt;
&lt;img src=&quot;&#x2F;images&#x2F;syncthing-add-device.png&quot; style=width:100%&gt;
&lt;figcaption&gt;Accessing QR code for current device.&lt;&#x2F;figcaption&gt;
&lt;&#x2F;center&gt;
&lt;p&gt;Follow similar instructions on the remote device for setting up a sync
folder (should be empty as for the first sync, we&#x27;re really
transferring PDFs from the main device to the remote one). Make sure
to have the same path in your Zotero settings on the remote device!&lt;&#x2F;p&gt;
&lt;p&gt;After adding the remote device, we need to share the folder we had set
with the remote device. To do this, simply go to the &lt;em&gt;zotero-storage&lt;&#x2F;em&gt;
folder under the &quot;Folders&quot; section and click edit. This will bring up
a dialog box that we had previously edited. Under the &quot;Sharing&quot; tab,
check the box for the added remote device&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-3-1&quot;&gt;&lt;a href=&quot;#fn-3&quot;&gt;3&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;And just hit save.&lt;&#x2F;p&gt;
&lt;center&gt;
&lt;img src=&quot;&#x2F;images&#x2F;syncthing-share-folder.png&quot; style=width:90%&gt;
&lt;figcaption&gt;Sharing the folder with remote device.&lt;&#x2F;figcaption&gt;
&lt;&#x2F;center&gt;
&lt;p&gt;If you have everything setup properly, the folder should get synced
across both the devices and you should be able to access the PDFs in
both these device! Of course, you can add more devices if you&#x27;d like.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve been extremely happy with this setup and I hope it&#x27;s useful to
you as it has been for me, thanks to my friend
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;marci.gunyho.com&quot;&gt;Marci&lt;&#x2F;a&gt; who introduced me to the idea.&lt;&#x2F;p&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;This guide assumes you&#x27;re using Linux but I see no reason why it
cannot be adapter for Windows and macOS. &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;To actually keep your &lt;code&gt;~&#x2F;&lt;&#x2F;code&gt; uncluttered, the best approach would be
something along the lines of &lt;code&gt;~&#x2F;.local&#x2F;share&#x2F;zotero&lt;&#x2F;code&gt; which is
&lt;code&gt;XDG_DATA_HOME&lt;&#x2F;code&gt; according to XDG standards. &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-3&quot;&gt;
&lt;p&gt;Don&#x27;t worry about the &quot;enter encryption password&quot;. You only need it if
you&#x27;re concerned with security and would like to have encrypted
folders. I don&#x27;t really care about that for zotero so I leave it unchecked. &lt;a href=&quot;#fr-3-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>When did I stop being a child? (my poem)</title>
        <published>2024-06-19T00:00:00+00:00</published>
        <updated>2024-06-19T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/when-did-i-become-an-adult/"/>
        <id>https://ashishpanigrahi.com/blog/when-did-i-become-an-adult/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/when-did-i-become-an-adult/">&lt;blockquote&gt;
&lt;p&gt;When did I stop being a child?&lt;br &#x2F;&gt;
It&#x27;s been so long, but I used to be quite beguiled.&lt;br &#x2F;&gt;
While I reminisce the days of not caring about the world.&lt;br &#x2F;&gt;
I wonder, when that child stopped being one, as an adult labelled.&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
Perhaps it was when my interests changed.&lt;br &#x2F;&gt;
Things that I used to like, now feel estranged.&lt;br &#x2F;&gt;
Oh, how I wish I could go back to those simpler times.&lt;br &#x2F;&gt;
That child exists no more, but an adult begrimed.&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
Carefree is the emotion I took for granted.&lt;br &#x2F;&gt;
Now that I&#x27;m older, responsibilities have been handed.&lt;br &#x2F;&gt;
I remember a time when I used to run wild.&lt;br &#x2F;&gt;
Oh, but when did I stop being a child?&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
As I grow old, my anxiety only becomes stronger.&lt;br &#x2F;&gt;
Is adulthood really supposed to be this way, with nothing more to offer?&lt;br &#x2F;&gt;
Alas, it is too late now to think about a time bygone.&lt;br &#x2F;&gt;
But the only way forward, is to look ahead and march into the unknown.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>What is my purpose (my poem)</title>
        <published>2024-04-21T00:00:00+00:00</published>
        <updated>2024-04-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/what-is-my-purpose/"/>
        <id>https://ashishpanigrahi.com/blog/what-is-my-purpose/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/what-is-my-purpose/">&lt;blockquote&gt;
&lt;p&gt;What is my purpose but a tiny speck on this big blue dot?&lt;br &#x2F;&gt;
Is it already decided or do I get myself taught?&lt;br &#x2F;&gt;
I do wonder how the rest of my life shall continue.&lt;br &#x2F;&gt;
Will it be the same things I now pursue?&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
Family it is for some people.&lt;br &#x2F;&gt;
For others, it is their career to excel.&lt;br &#x2F;&gt;
But does it matter in the end?&lt;br &#x2F;&gt;
Perhaps the greater reason is to make oneself enlighten.&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
Often I find myself asking such questions.&lt;br &#x2F;&gt;
I keep looking for entities of substance&lt;br &#x2F;&gt;
in this rollercoaster that is life.&lt;br &#x2F;&gt;
What can I do to make it more rife?&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
For far too long I&#x27;ve been looking far away.&lt;br &#x2F;&gt;
Always fearing that my life might go astray.&lt;br &#x2F;&gt;
Is it deep down something more precious?&lt;br &#x2F;&gt;
Only to find myself asking, &quot;what is my purpose?&quot;.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Switching to GNU Emacs</title>
        <published>2024-04-14T00:00:00+00:00</published>
        <updated>2024-04-14T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/switching-to-emacs/"/>
        <id>https://ashishpanigrahi.com/blog/switching-to-emacs/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/switching-to-emacs/">&lt;p&gt;Over the past five years, I&#x27;ve been using &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.vim.org&quot;&gt;Vim&lt;&#x2F;a&gt;
(well &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;neovim.io&quot;&gt;NeoVim&lt;&#x2F;a&gt; specifically) for all of my text
editing needs ranging from tinkering with config files, shell scripts,
to writing this website, making LaTeX reports and theses, etc. The
paradigm of modal text editing that is Vim, just feels right. The user
communicates exactly how text needs to be edited. For instance: delete
all characters until a specific character appears? Done. Only delete
lines in the file that cover certain patterns? Built-in regex has you
covered! The point is, once you understand how modal editing works,
any other form of text editing feels like it&#x27;s from the stone ages.&lt;&#x2F;p&gt;
&lt;p&gt;Now you might ask, why am I switching to &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;emacs&#x2F;&quot;&gt;GNU
Emacs&lt;&#x2F;a&gt;, the opposing contender to
Vim in the well known &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Editor_war&quot;&gt;editor
war&lt;&#x2F;a&gt;? Well, the more &quot;silly&quot;
reason is that it gives me an opportunity to learn a new piece of
software, understand it&#x27;s inner workings, etc. The more pragmatic
reason is that, like any rivalry, both sides have their pros and cons.
GNU Emacs presents itself as a truly hackable editor in any way the
user desires. This is thanks to the editor being written and
configured in &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Emacs_Lisp&quot;&gt;Emacs lisp&lt;&#x2F;a&gt;,
a dialect of the Lisp family of languages. Vim on the other hand is
written mostly in C but is configured in an obscure language that is
Vimscript. The advantage with Emacs lisp is that one can write not
only specific functions to help in any form of text editing and beyond
(one of the charms of Emacs) but also supplements more experienced
users in contributing to the core development of Emacs. This appeals
to me from a FOSS perspective as I truly believe that free software
development being run by volunteers should be tightly knit with its
user community. This helps not only in raising issues with the
software better but also in users contributing to the
development.&lt;&#x2F;p&gt;
&lt;p&gt;This truly hackable experience, presented by Emacs also benefits in
the form of tasks that are not necessarily based around text-editing.
Thanks to the wonderful community, Emacs boasts a wide-range of
well-written packages such as &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;orgmode.org&quot;&gt;org-mode&lt;&#x2F;a&gt; (Task
management system with a markup style of its own) and
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;magit.vc&#x2F;&quot;&gt;Magit&lt;&#x2F;a&gt; (A Git porcelain inside Emacs). One of the
primary reasons I&#x27;ve decided to switch is due to org-mode (which I
intend to cover in detail in subsequent blog entries).&lt;&#x2F;p&gt;
&lt;p&gt;Some people might argue that Emacs goes against the UNIX philosophy of
minimalism and &quot;doing one thing right&quot;. Technically Emacs is
more of a Lisp environment than a text editor, or like the more famous
vim adage: &quot;Emacs is a great operating system, but it lacks a good
text editor&quot;. I cannot really comment here because I&#x27;m still very new
to Emacs but the quote does hold some truth. Emacs (atleast from my
first impressions) has esoteric keybindings which are completely
foreign to new users let alone someone coming from a vim background.
&lt;code&gt;Ctrl&lt;&#x2F;code&gt; and &lt;code&gt;Alt&lt;&#x2F;code&gt; (known as &lt;code&gt;Meta&lt;&#x2F;code&gt; in Emacs parlance) are the most
common keys which form part of the key-chord style of using emacs.
These keys obviously are placed at positions on a standard QWERTY
keyboard layout that when used frequently leads to the more infamous
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;52492&#x2F;what-is-the-best-way-to-avoid-getting-emacs-pinky&quot;&gt;Emacs
pinky&lt;&#x2F;a&gt;
which is basically &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Repetitive_strain_injury&quot;&gt;repetitive strain injury
(RSI)&lt;&#x2F;a&gt;. For
this reason, I will be using emacs with
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emacs-evil&#x2F;evil&quot;&gt;Evil&lt;&#x2F;a&gt; which is the Vi-emulation
package in emacs, atleast until I get the hang of working with Emacs
before perhaps trying the stock keybindings (which apparently most of
the emacs community adheres to).&lt;&#x2F;p&gt;
&lt;center&gt;
&lt;img src=&quot;&#x2F;images&#x2F;real_programmers.png&quot;&gt;
&lt;figcaption&gt;Relevant xkcd&lt;&#x2F;figcaption&gt;
&lt;&#x2F;center&gt;
&lt;p&gt;For the next couple weeks I will try to steadily convert to using
Emacs and hopefully perform all of my computing needs with emacs in
the not-so-long future. This blog post is mainly for me to make this
commitment. As a first step, this blog entry is written entirely in Emacs.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Easy fix for F4 mute LED light on ThinkPad laptops on GNU&#x2F;Linux</title>
        <published>2023-09-05T00:00:00+00:00</published>
        <updated>2023-09-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/thinkpad-micmute-led/"/>
        <id>https://ashishpanigrahi.com/blog/thinkpad-micmute-led/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/thinkpad-micmute-led/">&lt;p&gt;Recently I purchased a ThinkPad E14 Gen 5 laptop after spending 5 years with my
previous workhorse machine, the HP Pavilion 14 with an Intel i5 (4 cores) CPU. The
upgrade is quite significant, coming with an eight core AMD Ryzen 7 CPU... but I
digress.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-problem&quot;&gt;The Problem&lt;&#x2F;h3&gt;
&lt;p&gt;With modern day laptops, often there are backlit keys on certain media keys like mute
sound, mute mic, airplane mode and so on. The light being switched on,
for obvious reasons indicates that the particular function is in
operation. This is easy on Windows for which these machines are always
tested against&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Similarly, macOS works well on Apple devices. With GNU&#x2F;Linux&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;
however, almost all machines work but the tiny quality of life
improvements like those media key lights can be a hit or miss.&lt;&#x2F;p&gt;
&lt;p&gt;As usual, I went ahead and installed &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;archlinux.org&quot;&gt;Arch Linux&lt;&#x2F;a&gt; on my
machine with &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;dwm.suckless.org&quot;&gt;dwm&lt;&#x2F;a&gt; as my window manager. After the
installation and a test drive of my laptop, I see this...&lt;&#x2F;p&gt;
&lt;center&gt;
&lt;img src=&quot;&#x2F;images&#x2F;thinkpad-micmute-led.jpg&quot;&gt;
&lt;figcaption&gt;The annoying led being always ON&lt;&#x2F;figcaption&gt;
&lt;&#x2F;center&gt;
&lt;p&gt;At first I thought perhaps it&#x27;s a driver issue but all my drivers were up-to-date.
Looking through the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&quot;&gt;Arch wiki&lt;&#x2F;a&gt; didn&#x27;t help with the
issue. Knowing the vibrant thinkpad community, I ended up posting about my problem on
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;reddit.com&#x2F;r&#x2F;thinkpad&quot;&gt;r&#x2F;thinkpad&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;simple-fix&quot;&gt;Simple Fix&lt;&#x2F;h3&gt;
&lt;p&gt;I&#x27;d much rather have the backlight fully off than have it functional. So, a fellow
redditor let me know to check for the output in a particular system file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;~&lt;&#x2F;span&gt;&lt;span&gt;: $ cat &#x2F;sys&#x2F;class&#x2F;leds&#x2F;platform::micmute&#x2F;brightness&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&#x27;1&#x27; here represents the light in the ON state, which is exactly the problem!
&lt;del&gt;Changing the value to &#x27;0&#x27; in the file instantly fixes the problem!&lt;&#x2F;del&gt;
Changing it to &#x27;0&#x27; only fixes it temporarily until the next time the machine is
booted up. A rather simple &quot;hack&quot; is to make this change every time the user logs into
the machine. This is done simply through the &lt;code&gt;.xprofile&lt;&#x2F;code&gt; or &lt;code&gt;.xinitrc&lt;&#x2F;code&gt; file
(most people would use &lt;code&gt;.xinitrc&lt;&#x2F;code&gt;) by adding the following line in said file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &#x2F;sys&#x2F;class&#x2F;leds&#x2F;platform::micmute&#x2F;brightness&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This line simply replaces whatever the file previously had, with &#x27;0&#x27;. This works
rather well until I find a more permanent solution.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;edit&quot;&gt;Edit&lt;&#x2F;h3&gt;
&lt;p&gt;Unfortunately, the above method doesn&#x27;t work anymore. I&#x27;m not exactly sure what changed but
apparently it isn&#x27;t supposed to work in the first place simply because &lt;code&gt;&#x2F;sys&#x2F;class&#x2F;leds&#x2F;platform::micmute&#x2F;brightness&lt;&#x2F;code&gt; isn&#x27;t a real directory.&lt;&#x2F;p&gt;
&lt;p&gt;In any case, here&#x27;s an updated method for the same that is slightly more involved. It
is adapted for any Linux distribution running systemd. For other init systems
(openrc, runit, etc.), I assume it&#x27;s fairly simply to make the relevant changes.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Create a shell script &lt;code&gt;disable-mute.sh&lt;&#x2F;code&gt; in your preferred directory
(&lt;code&gt;~&#x2F;.local&#x2F;bin&#x2F;&lt;&#x2F;code&gt; in my case) containing the following:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#!&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;&#x2F;bin&#x2F;sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; tee&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &#x2F;sys&#x2F;class&#x2F;leds&#x2F;platform::micmute&#x2F;brightness&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;With root privileges, create a file &lt;code&gt;disable-mute.service&lt;&#x2F;code&gt; in
&lt;code&gt;&#x2F;etc&#x2F;systemd&#x2F;system&#x2F;&lt;&#x2F;code&gt; with the following content&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-3-1&quot;&gt;&lt;a href=&quot;#fn-3&quot;&gt;3&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[Unit]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Description=Disables the annoying mute light on keyboard&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;After=multi-user.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[Service]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ExecStart=&#x2F;bin&#x2F;sh &#x2F;home&#x2F;ashish&#x2F;.local&#x2F;bin&#x2F;disable-mute.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type=simple&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[Install]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;WantedBy=multi-user.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Simply run &lt;code&gt;sudo systemctl enable disable-mute.service&lt;&#x2F;code&gt; and the LED should turn off
the next time you boot up your machine.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Late 2024 Update&lt;&#x2F;strong&gt;: This method works so far for the 6.6-LTS Kernel,
NOT the bleeding edge one.&lt;&#x2F;p&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;The travesty being that laptop manufacturers being the profit
oriented businesses that they are, cater to the masses which
unfortunately sides with malicious, proprietary garbage like Windows. &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;Technically Linux is the kernel and not the operating system (the rest
is supplied by the GNU operating system sans its own kernel).
&lt;a href=&quot;https:&#x2F;&#x2F;www.gnu.org&#x2F;gnu&#x2F;why-gnu-linux.html&quot;&gt;Here&lt;&#x2F;a&gt; is a better
explanation. &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-3&quot;&gt;
&lt;p&gt;See &lt;a href=&quot;https:&#x2F;&#x2F;linuxhandbook.com&#x2F;create-systemd-services&#x2F;&quot;&gt;here&lt;&#x2F;a&gt;
for a detailed tutorial on writing systemd service files. &lt;a href=&quot;#fr-3-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Hello, World in Qiskit</title>
        <published>2021-07-16T00:00:00+00:00</published>
        <updated>2021-07-16T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/qiskit-hello-world/"/>
        <id>https://ashishpanigrahi.com/blog/qiskit-hello-world/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/qiskit-hello-world/">&lt;p&gt;Qiskit is a python SDK for simulating and running quantum algorithms on real quantum
computers. As mentioned on &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;qiskit.org&#x2F;&quot;&gt;qiskit.org&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Qiskit [kiss-kit] is an open-source SDK for working with quantum computers at the
level of pulses, circuits and application modules.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I plan on writing a series of tutorials on getting started with quantum computing
using qiskit, as I learn as well. Like any other programming tutorial, we start with
a simple &quot;Hello, world&quot; program.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;measuring-a-quantum-state&quot;&gt;Measuring a quantum state&lt;&#x2F;h2&gt;
&lt;p&gt;With conventional computers, the simplest program that one could perhaps make is
printing out &quot;hello, world&quot;. However, in contrast to this, in quantum systems, we go
ahead and measure a quantum state (this seems to be the most rudimentary but complete
program in quantum terms). Let&#x27;s proceed to do just that!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;defining-a-quantum-state&quot;&gt;Defining a quantum state&lt;&#x2F;h3&gt;
&lt;p&gt;We import the necessary modules from Qiskit for this operation. To define a quantum
circuit, we require the classes &lt;code&gt;QuantumCircuit&lt;&#x2F;code&gt;, &lt;code&gt;QuantumRegister&lt;&#x2F;code&gt;,
&lt;code&gt;ClassicalRegister&lt;&#x2F;code&gt; and define a state variable &lt;code&gt;psi&lt;&#x2F;code&gt; as&lt;&#x2F;p&gt;
&lt;p&gt;$$
| \psi \rangle =
\frac{1}{\sqrt{2}}
\begin{pmatrix}
1\
1
\end{pmatrix}
$$&lt;&#x2F;p&gt;
&lt;p&gt;Notice that the state $| \psi \rangle$ is normalized. This is important, otherwise we&#x27;ll end up with an error.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt; qiskit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span&gt; QuantumCircuit&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; QuantumRegister&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ClassicalRegister&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt; math&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span&gt; sqrt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; define an initial state&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;psi&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;sqrt&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;sqrt&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We then define a function &lt;code&gt;prepare()&lt;&#x2F;code&gt; which takes two parameters: a &lt;code&gt;QuantumCircuit&lt;&#x2F;code&gt;
object named &lt;code&gt;qc&lt;&#x2F;code&gt; and the initial state &lt;code&gt;psi&lt;&#x2F;code&gt;. Remember that the quantum circuit that
we define, only uses 1 qubit (notice the vector representation of $| \psi \rangle$).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;def&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; prepare&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;qc&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; psi&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    qc&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;initialize&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;psi&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;     #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; [0] indicates the zeroth index (or) the first qubit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Python by default, calls by reference, so we don&#x27;t have to worry about returning
anything from &lt;code&gt;prepare()&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;building-a-quantum-circuit&quot;&gt;Building a quantum circuit&lt;&#x2F;h3&gt;
&lt;p&gt;Let&#x27;s proceed with making an actual quantum circuit. For this, we define a
&lt;code&gt;QuantumRegister&lt;&#x2F;code&gt; object &lt;code&gt;qr&lt;&#x2F;code&gt;, which stores the qubits and a &lt;code&gt;ClassicalRegister&lt;&#x2F;code&gt;
object &lt;code&gt;cr&lt;&#x2F;code&gt; which stores the measured values of those qubits.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;qr&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; QuantumRegister&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cr&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; ClassicalRegister&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Combining the two registers, we now make a quantum circuit:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;qc&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; QuantumCircuit&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;qr&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; cr&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;initializing-and-measuring-the-qubit&quot;&gt;Initializing and measuring the qubit&lt;&#x2F;h3&gt;
&lt;p&gt;We then call our function &lt;code&gt;prepare()&lt;&#x2F;code&gt; to initialize the first qubit (the only qubit)
of our quantum circuit &lt;code&gt;qc&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;prepare&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;qc&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; psi&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;How do we go about measuring our state? That&#x27;s where the &lt;code&gt;ClassicalRegister&lt;&#x2F;code&gt; object
&lt;code&gt;cr&lt;&#x2F;code&gt; comes in. We use the &lt;code&gt;measure&lt;&#x2F;code&gt; method under the &lt;code&gt;qc&lt;&#x2F;code&gt; object to actually measure
the qubit.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;qc&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;measure&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;qr&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; cr&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The above syntax generally means that we&#x27;re measuring the state of &lt;code&gt;qr[0]&lt;&#x2F;code&gt; (the first
qubit) onto the classical register &lt;code&gt;cr[0]&lt;&#x2F;code&gt; where we store the measured value.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;visualizing-the-circuit&quot;&gt;Visualizing the circuit&lt;&#x2F;h2&gt;
&lt;p&gt;Ok so all of this is nice, but one can only describe so much. Let&#x27;s see how our
circuit actually looks like after applying the above operations. For this, we use the
&lt;code&gt;draw()&lt;&#x2F;code&gt; method with the &lt;code&gt;matplotlib&lt;&#x2F;code&gt; backend.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; qc&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;draw&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;output&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;mpl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;figure&gt;
&lt;center&gt;
    &lt;img src=&quot;&#x2F;images&#x2F;qc.png&quot; style=&quot;width:50%&quot;&gt;
&lt;&#x2F;center&gt;
&lt;&#x2F;figure&gt;
&lt;h2 id=&quot;choosing-a-backend-for-measurement&quot;&gt;Choosing a backend for measurement&lt;&#x2F;h2&gt;
&lt;p&gt;To measure the qubit and store the result in the classical register &lt;code&gt;cr&lt;&#x2F;code&gt;, we use the
&lt;code&gt;qasm_simulator&lt;&#x2F;code&gt; backend. As we know from basic quantum mechanics,&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt; qiskit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span&gt; Aer&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;backend&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; Aer&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;get_backend&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;qasm_simulator&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We then transpile our circuit for the &lt;code&gt;qasm_simulator&lt;&#x2F;code&gt; backend to understand and
execute the circuit.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt; qiskit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span&gt; transpile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;qc_compiled&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; transpile&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;qc&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; backend&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, we simply execute the circuit and gather the measurement results.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;job&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; backend&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;run&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;qc_compiled&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt; shots&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;1024&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; shots is the number of times we run the experiment&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;results&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; job&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;result&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We store the value of the &lt;code&gt;result&lt;&#x2F;code&gt; object and can further access the number of times we end up with a certain value of expected outcome with the &lt;code&gt;get_counts()&lt;&#x2F;code&gt; method.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;counts&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; results&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;get_counts&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;qc_compiled&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;print&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;counts&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&amp;#39;0&amp;#39;: 518, &amp;#39;1&amp;#39;: 506}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here we end up with a dictionary of key values &lt;code&gt;&#x27;0&#x27;&lt;&#x2F;code&gt; and &lt;code&gt;&#x27;1&#x27;&lt;&#x2F;code&gt;, which indicate the following quantum states:&lt;&#x2F;p&gt;
&lt;p&gt;$$
| 0 \rangle =
\begin{pmatrix}
1\
0
\end{pmatrix}
\qquad
| 1 \rangle =
\begin{pmatrix}
0\
1
\end{pmatrix}
$$&lt;&#x2F;p&gt;
&lt;p&gt;As expected, we get a 50-50 distribution of the states $|0\rangle$ and $|1\rangle$,
since our starting state was $|\psi\rangle$. We can also calculate this probability
via the inner-product,&lt;&#x2F;p&gt;
&lt;p&gt;$$
|\langle 0 | \psi \rangle|^2 = \frac{1}{2} \qquad |\langle 1 | \psi \rangle|^2 = \frac{1}{2}
$$&lt;&#x2F;p&gt;
&lt;p&gt;Let&#x27;s visualize this in the form of a histogram. For this, we import the
&lt;code&gt;plot_histogram&lt;&#x2F;code&gt; function.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; from&lt;&#x2F;span&gt;&lt;span&gt; qiskit&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;visualization&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span&gt; plot_histogram&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; plot_histogram&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;counts&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;figure&gt;
&lt;center&gt;
    &lt;img src=&quot;&#x2F;images&#x2F;histogram.png&quot; style=&quot;width:80%&quot;&gt;
&lt;&#x2F;center&gt;
&lt;&#x2F;figure&gt;
&lt;p&gt;You can find the entire script in this
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gist.github.com&#x2F;paniash&#x2F;52497bf574ea4570ce5f0a21fa093b12&quot;&gt;gist&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Font Rendering in Firefox</title>
        <published>2021-05-30T00:00:00+00:00</published>
        <updated>2021-05-30T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/firefox-fonts/"/>
        <id>https://ashishpanigrahi.com/blog/firefox-fonts/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/firefox-fonts/">&lt;p&gt;If you&#x27;re on a *nix system and compare the fonts on chrome and firefox, you&#x27;d notice
the difference. The fonts on the latter just look... &lt;em&gt;off&lt;&#x2F;em&gt;, or atleast that was the
case on my system.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;my-personal-odyssey&quot;&gt;My personal odyssey&lt;&#x2F;h2&gt;
&lt;p&gt;Recently I had made the switch from firefox to brave, for the naive reason that fonts
were just rendered better (and LaTeX looks like it) on it (being a chromium based
browser). However, I really missed the customizability and other nifty features of
firefox. It just felt like home. I knew for sure that I&#x27;m missing something, because
surely firefox couldn&#x27;t be responsible for messing fonts, right? (atleast I hoped).&lt;&#x2F;p&gt;
&lt;p&gt;On firefox, you may have come across the font settings that look something like this:&lt;&#x2F;p&gt;
&lt;center&gt;
&lt;img src=&quot;&#x2F;images&#x2F;firefox-font.png&quot;&gt;
&lt;&#x2F;center&gt;
&lt;p&gt;My past self would unselect the option &lt;em&gt;&lt;strong&gt;Allow pages to choose their own fonts,
instead of your selections above&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt;, just so that I can have my custom fonts
rendered. But oh boy, would that turn out disastrous to say the least. I visit a good
number of websites that render math equations in TeX, but with this setting turned
off, LaTeX looked more like some flunky &#x27;90s PC trying to render math.&lt;&#x2F;p&gt;
&lt;p&gt;What was the fix you might ask? Well, just select the option that I had unselected
earlier. But this would bring that the atrocious fonts back on many websites.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-fix&quot;&gt;The fix&lt;&#x2F;h2&gt;
&lt;p&gt;I later came across
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;nolanlawson.com&#x2F;2020&#x2F;05&#x2F;02&#x2F;customizing-fonts-in-firefox-on-linux&#x2F;&quot;&gt;this&lt;&#x2F;a&gt;
blog post where I got to know that firefox depends on an OS-level font configuration
called &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Font_configuration&quot;&gt;fontconfig&lt;&#x2F;a&gt; and is
located at &lt;code&gt;~&#x2F;.config&#x2F;fontconfig&#x2F;fonts.conf&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;create-a-fontconfig-file&quot;&gt;Create a fontconfig file&lt;&#x2F;h3&gt;
&lt;p&gt;If you don&#x27;t have one, just create it at the specific location.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot;&gt;&lt;code data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;?&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;xml&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; version&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;1.0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;?&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;!&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;DOCTYPE&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; fontconfig&lt;&#x2F;span&gt;&lt;span&gt; SYSTEM &amp;#39;fonts.dtd&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;fontconfig&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;alias&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;Helvetica&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;prefer&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;IBM Plex Sans&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;prefer&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;alias&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;alias&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;sans-serif&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;prefer&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;IBM Plex Sans&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;prefer&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;alias&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;alias&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;monospace&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;prefer&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;DejaVu Sans Mono&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;family&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;prefer&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;alias&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;fontconfig&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A lot of websites these days use Helvetica as their serif font, and firefox will
fallback to a specific font if Helvetica is not found. By default, this fallback
seems to be Nimbus Sans, which is not pretty to say the least. This is where
fontconfig comes in.&lt;&#x2F;p&gt;
&lt;p&gt;The above XML file tells firefox that, &quot;Hey! If you&#x27;re trying to render Helvetica,
just use IBM Plex Sans&quot;, and similar font rules for sans-serif and monospace fonts.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-result&quot;&gt;The result&lt;&#x2F;h3&gt;
&lt;figure&gt;
&lt;center&gt;
    &lt;img src=&quot;&#x2F;images&#x2F;oldfonts.png&quot; style=&quot;width:100%&quot;&gt;
    &lt;figcaption&gt;Daniel&lt;&#x2F;figcaption&gt;
    &lt;br&gt;&lt;&#x2F;br&gt;
    &lt;img src=&quot;&#x2F;images&#x2F;newfonts.png&quot; style=&quot;width:100%&quot;&gt;
    &lt;figcaption&gt;The cooler Daniel&lt;&#x2F;figcaption&gt;
&lt;&#x2F;center&gt;
&lt;&#x2F;figure&gt;
&lt;p&gt;I was really happy when I came across this fix! and I hope this has helped you as
well.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Intro to Public-key Cryptography</title>
        <published>2020-07-20T00:00:00+00:00</published>
        <updated>2020-07-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Ashish Panigrahi
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ashishpanigrahi.com/blog/cryptography-intro/"/>
        <id>https://ashishpanigrahi.com/blog/cryptography-intro/</id>
        
        <content type="html" xml:base="https://ashishpanigrahi.com/blog/cryptography-intro/">&lt;p&gt;We have all heard fancy jargon like &quot;encryption&quot;, &quot;cryptography&quot; and what not, but
what do these terms actually mean? In this article, I attempt to give you a brief
introduction to the world of cryptography and how in particular, public-key
cryptography, a popular means of encryption works.&lt;&#x2F;p&gt;
&lt;p&gt;In layman terms, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Cryptography&quot;&gt;&lt;em&gt;cryptography&lt;&#x2F;em&gt;&lt;&#x2F;a&gt; is the
study of securing messages between two parties without a third party knowing what the
message is. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Encryption&quot;&gt;&lt;em&gt;Encryption&lt;&#x2F;em&gt;&lt;&#x2F;a&gt; is the process
of securing these messages.&lt;&#x2F;p&gt;
&lt;p&gt;Think of encryption as a process which is easy to do in one direction but rather
difficult to do in reverse. One such example is &lt;strong&gt;colour mixing&lt;&#x2F;strong&gt;. One can mix
various colours and make a mixture out of it. However, if you ask another person, it
would be &lt;em&gt;almost&lt;&#x2F;em&gt; impossible to tell the constituent colours from the mixture.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-barebones-method-symmetric-encryption&quot;&gt;The barebones method - symmetric encryption&lt;&#x2F;h2&gt;
&lt;p&gt;The most basic and easy to understand method is the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Symmetric-key_algorithm&quot;&gt;symmetric
encryption&lt;&#x2F;a&gt; method. It
basically involves the following: Alice, who wants to send a message; Bob, who
receives the message; and a secret key used to encrypt the message (essentially
turning the message into gibberish).&lt;&#x2F;p&gt;
&lt;p&gt;Alice has a message, encrypts the message using the secret key, sends the message.
Bob now decrypts the message using the same secret key and reads the message. This
way during the process when the message is sent, even if a third party gets a hold of
the message; they cannot read the message since they do not have the secret key.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;caveats&quot;&gt;Caveats&lt;&#x2F;h3&gt;
&lt;p&gt;The above method has a major flaw, which is that both the parties must have a common
key. That means that the key to be used for encryption must be decided upon by the
two parties beforehand. So the two parties have to meet at a place or send the key to
the other through some means which isn&#x27;t secure, unless one encrypts this key
information which requires another key.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;a-better-method-asymmetric-encryption&quot;&gt;A better method - asymmetric encryption&lt;&#x2F;h2&gt;
&lt;p&gt;Asymmetric encryption AKA &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Public-key_cryptography&quot;&gt;&lt;em&gt;public-key
cryptography&lt;&#x2F;em&gt;&lt;&#x2F;a&gt; involves the
same scenario as that of symmetric encryption, the only difference being that instead
of one secret key, two keys are used (called a &lt;em&gt;key pair&lt;&#x2F;em&gt;). Let them be &lt;em&gt;key A&lt;&#x2F;em&gt; and
&lt;em&gt;key B&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Let us use the same scenario as before: Alice wishes to send a message; she encrypts
it with &lt;em&gt;key A&lt;&#x2F;em&gt; and sends it to Bob; he receives it and decrypts it using &lt;em&gt;key B&lt;&#x2F;em&gt;.
Note that there was no exchange regarding the information of the keys themselves.
&lt;em&gt;Key A&lt;&#x2F;em&gt; cannot be guessed from &lt;em&gt;key B&lt;&#x2F;em&gt; and vice-versa however they are linked in such
a way that a message encrypted with &lt;em&gt;key A&lt;&#x2F;em&gt; can only be decrypted with &lt;em&gt;key B&lt;&#x2F;em&gt; and a
message encrypted with &lt;em&gt;key B&lt;&#x2F;em&gt; can only be decrypted with &lt;em&gt;key A&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;real-world-implications&quot;&gt;Real-world implications&lt;&#x2F;h3&gt;
&lt;p&gt;When using asymmetric encryption, a key-pair is generated i.e. a &lt;em&gt;public&lt;&#x2F;em&gt; key and a
&lt;em&gt;private&lt;&#x2F;em&gt; key.&lt;&#x2F;p&gt;
&lt;p&gt;The public key is made public (who knew!) and is published everywhere, on websites,
posters and so on. The private key is kept to yourself. Any messages intended for you
could be then encrypted using your public-key that only you can decrypt since you
have the private-key.&lt;&#x2F;p&gt;
&lt;p&gt;What about the other way round? You could encrypt a message that you wish to send,
using your private-key. But then you might ask, why should I encrypt a message that
can be decrypted using my public-key since anyone can decrypt the message? (since
you&#x27;ve made your public-key, public)&lt;&#x2F;p&gt;
&lt;h3 id=&quot;signature-algorithms&quot;&gt;Signature algorithms&lt;&#x2F;h3&gt;
&lt;p&gt;By encrypting the message using your private-key, one can know that the message is
authentic since it can be decrypted using your public-key meaning, it must have been
encrypted using your private-key which only you have access to.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;a-proper-communication&quot;&gt;A proper communication&lt;&#x2F;h3&gt;
&lt;p&gt;So the best way to communicate using this protocol would be as follows: Alice has a
key-pair and Bob has a key-pair. Alice wishes to send a message; she encrypts it
using her private-key &lt;em&gt;ensuring that the message is authentic&lt;&#x2F;em&gt; and then encrypts it
again using Bob&#x27;s public key &lt;em&gt;ensuring that only Bob can read the message&lt;&#x2F;em&gt;. Bob upon
receiving the gibberish decrypts it using his private-key and then once again using
Alice&#x27;s public-key establishing a secure channel for communication.&lt;&#x2F;p&gt;
&lt;p&gt;Note that in this method no keys were exchanged, in fact, Alice and Bob might not
have even met before and this method still works. Isn&#x27;t that amazing?&lt;&#x2F;p&gt;
&lt;h2 id=&quot;disclaimer&quot;&gt;Disclaimer&lt;&#x2F;h2&gt;
&lt;p&gt;I understand that I have over-simplified things. This post is only meant to get a
brief overview of encryption. For a better understanding refer the &lt;strong&gt;Crypto 101&lt;&#x2F;strong&gt;
textbook linked below.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;This post was inspired by the book, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.crypto101.io&quot;&gt;Crypto 101&lt;&#x2F;a&gt; by Laurens
Van Houtven and this &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=GSIDS_lvRv4&quot;&gt;video&lt;&#x2F;a&gt; from the
YouTube channel &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;user&#x2F;Computerphile&quot;&gt;Computerphile&lt;&#x2F;a&gt; where Dr.
Robert Miles explains about public-key encryption.&lt;&#x2F;p&gt;
&lt;p&gt;Lastly, I would like to end this post with a quote from Bruce Schneier:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are two kinds of cryptography in this world: cryptography that will stop your kid sister from reading your files, and cryptography that will stop major governments from reading your files.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
</content>
        
    </entry>
</feed>
