This commit is contained in:
SqrtMinusOne 2024-04-08 22:42:35 +00:00
parent a181639bcc
commit fa01eaee38
8 changed files with 21 additions and 11 deletions

View file

@ -1930,6 +1930,8 @@ Emacs is also particularly great at writing Lisp code, e.g. Clojure, Common Lisp
</span></span><span style="display:flex;"><span> (<span style="color:#008000">setq</span> <span style="color:#19177c">doom-modeline-persp-icon</span> <span style="color:#800">nil</span>)
</span></span><span style="display:flex;"><span> (<span style="color:#008000">setq</span> <span style="color:#19177c">doom-modeline-persp-name</span> <span style="color:#800">nil</span>)
</span></span><span style="display:flex;"><span> (<span style="color:#008000">setq</span> <span style="color:#19177c">doom-modeline-display-misc-in-all-mode-lines</span> <span style="color:#800">nil</span>)
</span></span><span style="display:flex;"><span> (<span style="color:#008000">when</span> <span style="color:#19177c">my/is-termux</span>
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">setopt</span> <span style="color:#19177c">doom-modeline-icon</span> <span style="color:#800">nil</span>))
</span></span><span style="display:flex;"><span> <span style="color:#008000">:config</span>
</span></span><span style="display:flex;"><span> (<span style="color:#008000">setq</span> <span style="color:#19177c">doom-modeline-minor-modes</span> <span style="color:#800">nil</span>)
</span></span><span style="display:flex;"><span> (<span style="color:#008000">setq</span> <span style="color:#19177c">doom-modeline-irc</span> <span style="color:#800">nil</span>)
@ -7902,7 +7904,7 @@ Didn&rsquo;t work out as I expected, so I&rsquo;ve made <code>org-journal-tags</
<h3 id="internet-and-multimedia">Internet &amp; Multimedia</h3>
<h4 id="notmuch">Notmuch</h4>
<p>My notmuch config now resides in <a href="/configs/mail/">Mail.org</a>.</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">unless</span> (<span style="color:#008000">or</span> <span style="color:#19177c">my/is-termux</span> <span style="color:#19177c">my/remote-server</span>)
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">unless</span> (<span style="color:#008000">or</span> <span style="color:#19177c">my/remote-server</span>)
</span></span><span style="display:flex;"><span> (<span style="color:#008000">let</span> ((<span style="color:#19177c">mail-file</span> (<span style="color:#00f">expand-file-name</span> <span style="color:#ba2121">&#34;mail.el&#34;</span> <span style="color:#19177c">user-emacs-directory</span>)))
</span></span><span style="display:flex;"><span> (<span style="color:#008000">if</span> (<span style="color:#00f">file-exists-p</span> <span style="color:#19177c">mail-file</span>)
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">load-file</span> <span style="color:#19177c">mail-file</span>)

View file

@ -189,9 +189,11 @@
<p>Notmuch is an email indexer program, which handles labels in a way somewhat similar to Gmail. It also provides a frontend for Emacs, but it&rsquo;s not the only one available.</p>
<h3 id="config">Config</h3>
<p>Not much is going on here.</p>
<p>First, the database path.</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#008000;font-weight:bold">[database]</span>
</span></span><span style="display:flex;"><span><span style="color:#7d9029">path</span><span style="color:#666">=</span><span style="color:#ba2121">/home/pavel/Mail</span>
<p>First, the database path. It&rsquo;s different on desktop and termux.</p>
<p><a id="code-snippet--get-maildir-path"></a></p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#00f">expand-file-name</span> <span style="color:#ba2121">&#34;~/Mail&#34;</span>)
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#008000;font-weight:bold">[database]</span>
</span></span><span style="display:flex;"><span><span style="color:#7d9029">path</span><span style="color:#666">=</span><span style="color:#ba2121">&lt;&lt;get-maildir-path()&gt;&gt;</span>
</span></span></code></pre></div><p>My name and list of emails. It&rsquo;s not like it&rsquo;s a secret anyhow.</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#008000;font-weight:bold">[user]</span>
</span></span><span style="display:flex;"><span><span style="color:#7d9029">name</span><span style="color:#666">=</span><span style="color:#ba2121">Pavel Korytov</span>
@ -200,7 +202,8 @@
</span></span></code></pre></div><p>A list of tags which will be added by <code>notmuch new</code> and directory names which will be ignored by <code>notmuch new</code>.</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#008000;font-weight:bold">[new]</span>
</span></span><span style="display:flex;"><span><span style="color:#7d9029">tags</span><span style="color:#666">=</span><span style="color:#ba2121">new;</span>
</span></span><span style="display:flex;"><span><span style="color:#7d9029">ignore</span><span style="color:#666">=</span><span style="color:#ba2121">.osync_workdir;.mbsyncstate;.uidvalidity;.lock;/.*gmailieer\.json.*/</span>
</span></span><span style="display:flex;"><span><span style="color:#408080;font-style:italic"># ignore=.osync_workdir;.mbsyncstate;.uidvalidity;.lock;/.*gmailieer\.json.*/</span>
</span></span><span style="display:flex;"><span><span style="color:#7d9029">ignore</span><span style="color:#666">=</span><span style="color:#ba2121">/.*[.](json|lock|bak|osync_workdir|mbsyncstate|uidvalidity)$/</span>
</span></span></code></pre></div><p>Exclude these tags from search by default.</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#008000;font-weight:bold">[search]</span>
</span></span><span style="display:flex;"><span><span style="color:#7d9029">exclude_tags</span><span style="color:#666">=</span><span style="color:#ba2121">trash;spam;</span>
@ -453,6 +456,10 @@ Remove <code>TAG</code> from emails which are outside the matching <code>PATH</c
</span></span><span style="display:flex;"><span> (<span style="color:#008000">when</span> (<span style="color:#00f">file-directory-p</span> <span style="color:#19177c">dir</span>)
</span></span><span style="display:flex;"><span> (<span style="color:#008000">let</span> ((<span style="color:#19177c">default-directory</span> <span style="color:#19177c">dir</span>))
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">normal-top-level-add-subdirs-to-load-path</span>))))
</span></span></code></pre></div><p>On termux the above doesn&rsquo;t work so&hellip;</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">use-package</span> <span style="color:#19177c">notmuch</span>
</span></span><span style="display:flex;"><span> <span style="color:#008000">:straight</span> <span style="color:#800">t</span>
</span></span><span style="display:flex;"><span> <span style="color:#008000">:if</span> <span style="color:#19177c">my/is-termux</span>)
</span></span></code></pre></div><p>Some functions to toggle tags:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">defun</span> <span style="color:#19177c">my/notmuch-toggle-trash</span> ()
</span></span><span style="display:flex;"><span> (<span style="color:#008000">interactive</span>)
@ -583,6 +590,7 @@ Remove <code>TAG</code> from emails which are outside the matching <code>PATH</c
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">setq</span> <span style="color:#19177c">notmuch-saved-searches</span>
</span></span><span style="display:flex;"><span> <span style="color:#666">&#39;</span>((<span style="color:#008000">:name</span> <span style="color:#ba2121">&#34;drafts&#34;</span> <span style="color:#008000">:query</span> <span style="color:#ba2121">&#34;tag:draft&#34;</span> <span style="color:#008000">:key</span> <span style="color:#ba2121">&#34;d&#34;</span>)
</span></span><span style="display:flex;"><span> <span style="color:#19177c">&lt;&lt;format-notmuch-saved-searches</span>()<span style="color:#19177c">&gt;&gt;</span>))
</span></span><span style="display:flex;"><span>(<span style="color:#008000">setq</span> <span style="color:#19177c">notmuch-show-empty-saved-searches</span> <span style="color:#800">t</span>)
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#19177c">general-define-key</span>
</span></span><span style="display:flex;"><span> <span style="color:#008000">:states</span> <span style="color:#666">&#39;</span>(<span style="color:#19177c">normal</span> <span style="color:#19177c">visual</span>)
</span></span><span style="display:flex;"><span> <span style="color:#008000">:keymaps</span> <span style="color:#666">&#39;</span>(<span style="color:#19177c">notmuch-hello-mode-map</span>)

View file

@ -1183,9 +1183,9 @@ Customize the formatting of these records through &lt;code&gt;org-clock-agg-elem
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or clone the repository, add it to &lt;code&gt;load-path&lt;/code&gt;, and &lt;code&gt;require&lt;/code&gt; the package.&lt;/p&gt;
&lt;h3 id=&#34;issues-with-termux&#34;&gt;Issues with termux?&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;ve been trying to run this package on termux and had some issues.&lt;/p&gt;
&lt;p&gt;First, for some reason &lt;code&gt;request.el&lt;/code&gt; throws the successfully parsed response as error. Use this as a workaround:&lt;/p&gt;
&lt;p&gt;First, for some reason &lt;code&gt;request.el&lt;/code&gt; throws a successfully parsed response as an error. Use this as a workaround:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#008000&#34;&gt;setq&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;biome-api-try-parse-error-as-response&lt;/span&gt; &lt;span style=&#34;color:#800&#34;&gt;t&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Second, somehow the &lt;code&gt;&amp;lt;tab&amp;gt;&lt;/code&gt; is not the same as the &lt;code&gt;&amp;lt;TAB&amp;gt;&lt;/code&gt; key. The following might be neccessary:&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Second, somehow &lt;code&gt;&amp;lt;tab&amp;gt;&lt;/code&gt; is not the same as &lt;code&gt;&amp;lt;TAB&amp;gt;&lt;/code&gt;. The following might be necessary:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#008000&#34;&gt;setq&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;biome-query-tab-key&lt;/span&gt; &lt;span style=&#34;color:#ba2121&#34;&gt;&amp;#34;&amp;lt;TAB&amp;gt;&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Be sure to add that before the package initialization.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

View file

@ -98,9 +98,9 @@
</span></span></code></pre></div><p>Or clone the repository, add it to <code>load-path</code>, and <code>require</code> the package.</p>
<h3 id="issues-with-termux">Issues with termux?</h3>
<p>I&rsquo;ve been trying to run this package on termux and had some issues.</p>
<p>First, for some reason <code>request.el</code> throws the successfully parsed response as error. Use this as a workaround:</p>
<p>First, for some reason <code>request.el</code> throws a successfully parsed response as an error. Use this as a workaround:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">setq</span> <span style="color:#19177c">biome-api-try-parse-error-as-response</span> <span style="color:#800">t</span>)
</span></span></code></pre></div><p>Second, somehow the <code>&lt;tab&gt;</code> is not the same as the <code>&lt;TAB&gt;</code> key. The following might be neccessary:</p>
</span></span></code></pre></div><p>Second, somehow <code>&lt;tab&gt;</code> is not the same as <code>&lt;TAB&gt;</code>. The following might be necessary:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">setq</span> <span style="color:#19177c">biome-query-tab-key</span> <span style="color:#ba2121">&#34;&lt;TAB&gt;&#34;</span>)
</span></span></code></pre></div><p>Be sure to add that before the package initialization.</p>
<h2 id="usage">Usage</h2>

View file

@ -365,9 +365,9 @@ Customize the formatting of these records through &lt;code&gt;org-clock-agg-elem
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or clone the repository, add it to &lt;code&gt;load-path&lt;/code&gt;, and &lt;code&gt;require&lt;/code&gt; the package.&lt;/p&gt;
&lt;h3 id=&#34;issues-with-termux&#34;&gt;Issues with termux?&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;ve been trying to run this package on termux and had some issues.&lt;/p&gt;
&lt;p&gt;First, for some reason &lt;code&gt;request.el&lt;/code&gt; throws the successfully parsed response as error. Use this as a workaround:&lt;/p&gt;
&lt;p&gt;First, for some reason &lt;code&gt;request.el&lt;/code&gt; throws a successfully parsed response as an error. Use this as a workaround:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#008000&#34;&gt;setq&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;biome-api-try-parse-error-as-response&lt;/span&gt; &lt;span style=&#34;color:#800&#34;&gt;t&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Second, somehow the &lt;code&gt;&amp;lt;tab&amp;gt;&lt;/code&gt; is not the same as the &lt;code&gt;&amp;lt;TAB&amp;gt;&lt;/code&gt; key. The following might be neccessary:&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Second, somehow &lt;code&gt;&amp;lt;tab&amp;gt;&lt;/code&gt; is not the same as &lt;code&gt;&amp;lt;TAB&amp;gt;&lt;/code&gt;. The following might be necessary:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#008000&#34;&gt;setq&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;biome-query-tab-key&lt;/span&gt; &lt;span style=&#34;color:#ba2121&#34;&gt;&amp;#34;&amp;lt;TAB&amp;gt;&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Be sure to add that before the package initialization.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB