Skip to content

Commit efe9b7d

Browse files
committed
NeoMutt Guide 20251211-55-20f52d
1 parent e7ab1b7 commit efe9b7d

19 files changed

+242
-65
lines changed

_feature/custom-tags.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ <h2 class="title" style="clear: both">
7575
<div >
7676
<a id="table-custom-tags-variables"></a>
7777
<p class="title">
78-
<strong>Table&#160;30.1.&#160;Custom tags Variables</strong>
78+
<strong>Table&#160;31.1.&#160;Custom tags Variables</strong>
7979
</p>
8080
<div class="table-contents">
8181
<table summary="Custom tags Variables" border="1">
@@ -120,7 +120,7 @@ <h2 class="title" style="clear: both">
120120
<div >
121121
<a id="table-custom-tags-functions"></a>
122122
<p class="title">
123-
<strong>Table&#160;30.2.&#160;Notmuch/IMAP Functions</strong>
123+
<strong>Table&#160;31.2.&#160;Notmuch/IMAP Functions</strong>
124124
</p>
125125
<div class="table-contents">
126126
<table summary="Notmuch/IMAP Functions" border="1">
@@ -210,7 +210,7 @@ <h2 class="title" style="clear: both">
210210
<div >
211211
<a id="table-custom-tags-colors"></a>
212212
<p class="title">
213-
<strong>Table&#160;30.3.&#160;Index Colors</strong>
213+
<strong>Table&#160;31.3.&#160;Index Colors</strong>
214214
</p>
215215
<div class="table-contents">
216216
<table summary="Index Colors" border="1">

_feature/lua.html

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
title: Lua
3+
description: Embedded Lua Scripting
4+
since: 2017-04-14
5+
status: devel
6+
---
7+
{% raw %}
8+
<div class="chapter">
9+
<div class="titlepage">
10+
<div>
11+
<div>
12+
<h1 class="title">
13+
<a id="feature/lua"></a>Lua</h1>
14+
</div>
15+
<div>
16+
<h3 class="subtitle">
17+
<em>Embedded Lua Scripting</em>
18+
</h3>
19+
</div>
20+
</div>
21+
</div>
22+
<div class="sect1">
23+
<div class="titlepage">
24+
<div>
25+
<div>
26+
<h2 class="title" style="clear: both">
27+
<a id="support"></a>1.&#160;Support</h2>
28+
</div>
29+
</div>
30+
</div>
31+
<p>
32+
<span class="bold">
33+
<strong>Since:</strong>
34+
</span>NeoMutt 2017-04-14</p>
35+
<p>
36+
<span class="bold">
37+
<strong>Dependencies:</strong>
38+
</span>None</p>
39+
</div>
40+
<div class="sect1">
41+
<div class="titlepage">
42+
<div>
43+
<div>
44+
<h2 class="title" style="clear: both">
45+
<a id="intro"></a>2.&#160;Introduction</h2>
46+
</div>
47+
</div>
48+
</div>
49+
<p>Lua is a simple scripting language that's frequently embedded into other programs, such as NeoVim. It allows users to cusotomise the behaviour of the host program.</p>
50+
<p>In NeoMutt, Lua can used to get/set config options and run commands.</p>
51+
</div>
52+
<div class="sect1">
53+
<div class="titlepage">
54+
<div>
55+
<div>
56+
<h2 class="title" style="clear: both">
57+
<a id="commands"></a>3.&#160;Commands</h2>
58+
</div>
59+
</div>
60+
</div>
61+
<div class="cmdsynopsis">
62+
<p>
63+
<code class="command">lua</code>
64+
<em class="replaceable">
65+
<code>"lua-commands"</code>
66+
</em>
67+
</p>
68+
</div>
69+
<div class="cmdsynopsis">
70+
<p>
71+
<code class="command">lua-source</code>
72+
<em class="replaceable">
73+
<code>filename</code>
74+
</em>
75+
</p>
76+
</div>
77+
</div>
78+
<div class="sect1">
79+
<div class="titlepage">
80+
<div>
81+
<div>
82+
<h2 class="title" style="clear: both">
83+
<a id="usage"></a>4.&#160;Usage</h2>
84+
</div>
85+
</div>
86+
</div>
87+
<p>A simple example of running some Lua commands in NeoMutt.</p>
88+
<pre class="screen">
89+
<span class="comment"># In NeoMutt, make the Sidebar wider</span>
90+
:lua "local x = mutt.get('sidebar_width'); x = x + 5; mutt.set('sidebar_width', x)"
91+
</pre>
92+
<p>Next, create a script for easier reuse.</p>
93+
<p>Create a local Lua script,
94+
<code class="literal">sw.lua</code></p>
95+
<pre class="screen">
96+
<span class="comment">-- Make the sidebar wider</span>
97+
function sw()
98+
local width = mutt.get('sidebar_width')
99+
width = width + 5
100+
mutt.set('sidebar_width', width)
101+
end
102+
</pre>
103+
<p>Alter your NeoMutt config to add:</p>
104+
<pre class="screen">
105+
<span class="comment"># Load the script once</span>
106+
lua-source "sw.lua"
107+
108+
<span class="comment"># Create a binding to run the function in the script</span>
109+
macro index &lt;F1&gt; "&lt;enter-command&gt;lua 'sw()'&lt;enter&gt;
110+
</pre>
111+
</div>
112+
<div class="sect1">
113+
<div class="titlepage">
114+
<div>
115+
<div>
116+
<h2 class="title" style="clear: both">
117+
<a id="limitations"></a>5.&#160;Limitations</h2>
118+
</div>
119+
</div>
120+
</div>
121+
<p>Currently, the Lua Scripting is very limited. It doesn't have any way to interact with the objects within NeoMutt: the Mailboxes, the Emails, etc. Beyond that, there's almost zero documentation.</p>
122+
<p>This state is changing. There is some new work coming to NeoMutt that exposes the Accounts, Mailboxes and Emails to Lua. This would allow the user to perform meaningful actions.</p>
123+
<p>See:
124+
<a class="ulink" href="https://github.com/neomutt/neomutt/pull/4707" target="_top">https://github.com/neomutt/neomutt/pull/4707</a></p>
125+
</div>
126+
<div class="sect1">
127+
<div class="titlepage">
128+
<div>
129+
<div>
130+
<h2 class="title" style="clear: both">
131+
<a id="credits"></a>6.&#160;Credits</h2>
132+
</div>
133+
</div>
134+
</div>
135+
<p>Richard Russon, Bernard Pratz, Rayford Shireman, Darshit Shah</p>
136+
</div>
137+
</div>
138+
{% endraw %}

_feature/new-mail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ <h2 class="title" style="clear: both">
8080
<div >
8181
<a id="table-new-mail-variables"></a>
8282
<p class="title">
83-
<strong>Table&#160;28.1.&#160;New Mail Command Variables</strong>
83+
<strong>Table&#160;29.1.&#160;New Mail Command Variables</strong>
8484
</p>
8585
<div class="table-contents">
8686
<table summary="New Mail Command Variables" border="1">

_feature/nntp.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ <h2 class="title" style="clear: both">
7676
<div >
7777
<a id="table-nntp-variables"></a>
7878
<p class="title">
79-
<strong>Table&#160;29.1.&#160;NNTP Variables</strong>
79+
<strong>Table&#160;30.1.&#160;NNTP Variables</strong>
8080
</p>
8181
<div class="table-contents">
8282
<table summary="NNTP Variables" border="1">
@@ -300,7 +300,7 @@ <h2 class="title" style="clear: both">
300300
<div >
301301
<a id="table-nntp-functions"></a>
302302
<p class="title">
303-
<strong>Table&#160;29.2.&#160;NNTP Functions</strong>
303+
<strong>Table&#160;30.2.&#160;NNTP Functions</strong>
304304
</p>
305305
<div class="table-contents">
306306
<table summary="NNTP Functions" border="1">

_feature/notmuch.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ <h2 class="title" style="clear: both">
170170
<div >
171171
<a id="table-notmuch-variables"></a>
172172
<p class="title">
173-
<strong>Table&#160;31.1.&#160;Notmuch Variables</strong>
173+
<strong>Table&#160;32.1.&#160;Notmuch Variables</strong>
174174
</p>
175175
<div class="table-contents">
176176
<table summary="Notmuch Variables" border="1">
@@ -383,7 +383,7 @@ <h2 class="title" style="clear: both">
383383
<div >
384384
<a id="table-notmuch-functions"></a>
385385
<p class="title">
386-
<strong>Table&#160;31.2.&#160;Notmuch Functions</strong>
386+
<strong>Table&#160;32.2.&#160;Notmuch Functions</strong>
387387
</p>
388388
<div class="table-contents">
389389
<table summary="Notmuch Functions" border="1">

_feature/progress.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ <h2 class="title" style="clear: both">
6161
<div >
6262
<a id="table-progress-colors"></a>
6363
<p class="title">
64-
<strong>Table&#160;33.1.&#160;Progress Colors</strong>
64+
<strong>Table&#160;34.1.&#160;Progress Colors</strong>
6565
</p>
6666
<div class="table-contents">
6767
<table summary="Progress Colors" border="1">

_feature/quasi-delete.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ <h2 class="title" style="clear: both">
6363
<div >
6464
<a id="table-quasi-delete-functions"></a>
6565
<p class="title">
66-
<strong>Table&#160;34.1.&#160;Quasi-Delete Functions</strong>
66+
<strong>Table&#160;35.1.&#160;Quasi-Delete Functions</strong>
6767
</p>
6868
<div class="table-contents">
6969
<table summary="Quasi-Delete Functions" border="1">

_feature/reply-with-xorig.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ <h2 class="title" style="clear: both">
6060
<div >
6161
<a id="table-reply-with-xorig-variables"></a>
6262
<p class="title">
63-
<strong>Table&#160;35.1.&#160;Reply With X-Original-To Variables</strong>
63+
<strong>Table&#160;36.1.&#160;Reply With X-Original-To Variables</strong>
6464
</p>
6565
<div class="table-contents">
6666
<table summary="Reply With X-Original-To Variables" border="1">

_feature/sidebar.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ <h2 class="title" style="clear: both">
6363
<div >
6464
<a id="table-sidebar-variables"></a>
6565
<p class="title">
66-
<strong>Table&#160;37.1.&#160;Sidebar Variables</strong>
66+
<strong>Table&#160;38.1.&#160;Sidebar Variables</strong>
6767
</p>
6868
<div class="table-contents">
6969
<table summary="Sidebar Variables" border="1">
@@ -227,7 +227,7 @@ <h2 class="title" style="clear: both">
227227
<div >
228228
<a id="table-sidebar-functions"></a>
229229
<p class="title">
230-
<strong>Table&#160;37.2.&#160;Sidebar Functions</strong>
230+
<strong>Table&#160;38.2.&#160;Sidebar Functions</strong>
231231
</p>
232232
<div class="table-contents">
233233
<table summary="Sidebar Functions" border="1">
@@ -353,7 +353,7 @@ <h2 class="title" style="clear: both">
353353
<div >
354354
<a id="table-sidebar-colors"></a>
355355
<p class="title">
356-
<strong>Table&#160;37.3.&#160;Sidebar Colors</strong>
356+
<strong>Table&#160;38.3.&#160;Sidebar Colors</strong>
357357
</p>
358358
<div class="table-contents">
359359
<table summary="Sidebar Colors" border="1">
@@ -454,7 +454,7 @@ <h2 class="title" style="clear: both">
454454
<div >
455455
<a id="table-sidebar-sort"></a>
456456
<p class="title">
457-
<strong>Table&#160;37.4.&#160;Sidebar Sort</strong>
457+
<strong>Table&#160;38.4.&#160;Sidebar Sort</strong>
458458
</p>
459459
<div class="table-contents">
460460
<table summary="Sidebar Sort" border="1">

_feature/skip-quoted.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ <h2 class="title" style="clear: both">
7373
<div >
7474
<a id="table-quoted-functions"></a>
7575
<p class="title">
76-
<strong>Table&#160;38.1.&#160;Skip Quoted Functions</strong>
76+
<strong>Table&#160;39.1.&#160;Skip Quoted Functions</strong>
7777
</p>
7878
<div class="table-contents">
7979
<table summary="Skip Quoted Functions" border="1">
@@ -118,7 +118,7 @@ <h2 class="title" style="clear: both">
118118
<div >
119119
<a id="table-skip-quoted-variables"></a>
120120
<p class="title">
121-
<strong>Table&#160;38.2.&#160;Skip-Quoted Variables</strong>
121+
<strong>Table&#160;39.2.&#160;Skip-Quoted Variables</strong>
122122
</p>
123123
<div class="table-contents">
124124
<table summary="Skip-Quoted Variables" border="1">

0 commit comments

Comments
 (0)