[4287] in BarnOwl Developers
[barnowl/barnowl] Six small fixes for bugs in master (logging thread
daemon@ATHENA.MIT.EDU (Daniel JB Clark)
Sun Nov 1 08:00:14 2026
Date: Sun, 01 Nov 2026 05:00:07 -0800
From: Daniel JB Clark <notifications@github.com>
Reply-To: barnowl/barnowl <reply+ABCERSJHWKOD2D2WEPPPGODLMCA5PEVBNHHQAAAAAFXGMU3Z@reply.github.com>
To: barnowl/barnowl <barnowl@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
----==_mimepart_6ae737d7d9f8_ff12a812024bb
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Six small fixes for bugs in current master (1f65aee), found while reviewing 1.10..master for a Debian package. One commit each, none depends on another. Each commit message explains the bug.
1. `logging.c`: `owl_log_thread_func` created a second `log_context`, overwriting the one `owl_log_init` made and the main thread already posts to, so entries posted before the thread ran were lost (and `owl_log_shutdown` could post to the wrong context).
2. `zephyr_zwrite`: since it was switched to `owl_function_zwrite`, text given with `-m` was replaced by the (possibly empty) message argument.
3. `keys.c`: Alt/Ctrl-Right (`ESC [ 1 ; 3 C` / `5 C`) moved to the previous word and Left to the next; also drops the `B` binding of the removed `alist` command.
4. Logging: a name that sanitizes to the same file as another (e.g. the sender also on the CC line) was written twice; `owl_util_compat_casefold` passed the NULL from `g_utf8_normalize` on invalid UTF-8 to the next glib call.
5. The logging variables moved to Perl but were registered from the `$startup` hook, after the owlconf loads, so `BarnOwl::command("set logging on")` there failed with "Unknown variable"; and `new_variable_full` ignores `default`, so `flush-logs-interval` stayed -1 and the documented 60-minute flush of deferred logs never ran.
6. `Message/Zephyr.pm`: 1.10 also logged incoming personal zephyrs to the `all` file; the Perl logging default (outgoing only) dropped that.
Checked with `make check` (passes) and a live client run (scratch home, hostile and ordinary messages, log files inspected) on Debian 13. Searched this repo's issues and PRs first (`log_context`, `zephyr_zwrite`, `word motion`, `flush-logs-interval`, `log_to_all_file`, `alist`, `compat_casefold`, `logging variables`): no existing issue or PR. Packages built from master plus these commits: https://forgejo.mit.edu/djbclark/barnowl-debian/releases
You can view, comment on, or merge this pull request online at:
https://github.com/barnowl/barnowl/pull/190
-- Commit Summary --
* logging: do not replace log_context in the logger thread
* zephyr_zwrite: keep the message given with -m
* keys: Alt/Ctrl-Right moves forward, Alt/Ctrl-Left backward; drop the alist binding
* logging: write each log file once; compat_casefold survives invalid UTF-8
* logging: register the logging variables before ~/.barnowlconf, and start the flush timer
* Zephyr: log incoming personal zephyrs to the "all" file, as 1.10 did
-- File Changes --
M keys.c (9)
M logging.c (1)
M perl/lib/BarnOwl/DeferredLogging.pm (33)
M perl/lib/BarnOwl/Hooks.pm (4)
M perl/lib/BarnOwl/Logging.pm (7)
M perl/lib/BarnOwl/Message/Zephyr.pm (7)
M util.c (11)
M zwrite.c (3)
-- Patch Links --
https://github.com/barnowl/barnowl/pull/190.patch
https://github.com/barnowl/barnowl/pull/190.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/barnowl/barnowl/pull/190
You are receiving this because you are subscribed to this thread.
Message ID: <barnowl/barnowl/pull/190@github.com>
----==_mimepart_6ae737d7d9f8_ff12a812024bb
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<p dir=3D"auto">Six small fixes for bugs in current master (<a class=3D"c=
ommit-link" data-hovercard-type=3D"commit" data-hovercard-url=3D"https://=
github.com/barnowl/barnowl/commit/1f65aee2011f5e938da110a9dcfe741b0a7c1d0=
3/hovercard" href=3D"https://github.com/barnowl/barnowl/commit/1f65aee201=
1f5e938da110a9dcfe741b0a7c1d03"><tt>1f65aee</tt></a>), found while review=
ing 1.10..master for a Debian package. One commit each, none depends on a=
nother. Each commit message explains the bug.</p>
<ol dir=3D"auto">
<li><code class=3D"notranslate">logging.c</code>: <code class=3D"notransl=
ate">owl_log_thread_func</code> created a second <code class=3D"notransla=
te">log_context</code>, overwriting the one <code class=3D"notranslate">o=
wl_log_init</code> made and the main thread already posts to, so entries =
posted before the thread ran were lost (and <code class=3D"notranslate">o=
wl_log_shutdown</code> could post to the wrong context).</li>
<li><code class=3D"notranslate">zephyr_zwrite</code>: since it was switch=
ed to <code class=3D"notranslate">owl_function_zwrite</code>, text given =
with <code class=3D"notranslate">-m</code> was replaced by the (possibly =
empty) message argument.</li>
<li><code class=3D"notranslate">keys.c</code>: Alt/Ctrl-Right (<code clas=
s=3D"notranslate">ESC [ 1 ; 3 C</code> / <code class=3D"notranslate">5 C<=
/code>) moved to the previous word and Left to the next; also drops the <=
code class=3D"notranslate">B</code> binding of the removed <code class=3D=
"notranslate">alist</code> command.</li>
<li>Logging: a name that sanitizes to the same file as another (e.g. the =
sender also on the CC line) was written twice; <code class=3D"notranslate=
">owl_util_compat_casefold</code> passed the NULL from <code class=3D"not=
ranslate">g_utf8_normalize</code> on invalid UTF-8 to the next glib call.=
</li>
<li>The logging variables moved to Perl but were registered from the <cod=
e class=3D"notranslate">$startup</code> hook, after the owlconf loads, so=
<code class=3D"notranslate">BarnOwl::command("set logging on")</code> th=
ere failed with "Unknown variable"; and <code class=3D"notranslate">new_v=
ariable_full</code> ignores <code class=3D"notranslate">default</code>, s=
o <code class=3D"notranslate">flush-logs-interval</code> stayed -1 and th=
e documented 60-minute flush of deferred logs never ran.</li>
<li><code class=3D"notranslate">Message/Zephyr.pm</code>: 1.10 also logge=
d incoming personal zephyrs to the <code class=3D"notranslate">all</code>=
file; the Perl logging default (outgoing only) dropped that.</li>
</ol>
<p dir=3D"auto">Checked with <code class=3D"notranslate">make check</code=
> (passes) and a live client run (scratch home, hostile and ordinary mess=
ages, log files inspected) on Debian 13. Searched this repo's issues and =
PRs first (<code class=3D"notranslate">log_context</code>, <code class=3D=
"notranslate">zephyr_zwrite</code>, <code class=3D"notranslate">word moti=
on</code>, <code class=3D"notranslate">flush-logs-interval</code>, <code =
class=3D"notranslate">log_to_all_file</code>, <code class=3D"notranslate"=
>alist</code>, <code class=3D"notranslate">compat_casefold</code>, <code =
class=3D"notranslate">logging variables</code>): no existing issue or PR.=
Packages built from master plus these commits: <a href=3D"https://forgej=
o.mit.edu/djbclark/barnowl-debian/releases" rel=3D"nofollow">https://forg=
ejo.mit.edu/djbclark/barnowl-debian/releases</a></p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href=3D'https://github.com/barnowl/barnowl/pull/190'>ht=
tps://github.com/barnowl/barnowl/pull/190</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href=3D"https://github.com/barnowl/barnowl/pull/190/commits/e3ef=
64de8dcd6a7633c03e10343571187d71f703" class=3D"commit-link">e3ef64d</a> =
logging: do not replace log_context in the logger thread</li>
<li><a href=3D"https://github.com/barnowl/barnowl/pull/190/commits/c560=
623b3d0553c0252a8630b3be9074a381ffab" class=3D"commit-link">c560623</a> =
zephyr_zwrite: keep the message given with -m</li>
<li><a href=3D"https://github.com/barnowl/barnowl/pull/190/commits/b2e2=
90e3a8f4f346b9d439399de2f7bef768b647" class=3D"commit-link">b2e290e</a> =
keys: Alt/Ctrl-Right moves forward, Alt/Ctrl-Left backward; drop the alis=
t binding</li>
<li><a href=3D"https://github.com/barnowl/barnowl/pull/190/commits/2e92=
48797d85a6ec59eac872748d30d0a412b592" class=3D"commit-link">2e92487</a> =
logging: write each log file once; compat_casefold survives invalid UTF-8=
</li>
<li><a href=3D"https://github.com/barnowl/barnowl/pull/190/commits/bbcc=
caedb090838fc29417e097de25a883fa7ad3" class=3D"commit-link">bbcccae</a> =
logging: register the logging variables before ~/.barnowlconf, and start =
the flush timer</li>
<li><a href=3D"https://github.com/barnowl/barnowl/pull/190/commits/e77b=
16095120e5b916d5506873660ebb7a248dab" class=3D"commit-link">e77b160</a> =
Zephyr: log incoming personal zephyrs to the "all" file, as 1.1=
0 did</li>
</ul>
<h4 style=3D"display: inline-block">File Changes </h4> <p style=3D"displa=
y: inline-block">(<a href=3D"https://github.com/barnowl/barnowl/pull/190/=
files">8 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href=3D"https://github.com/barnowl/barnowl/pull/190/files#diff-f25=
4975ce31699479fb3ec2c225f9078cd1396897d57ebf8d87a167e5a8f2960">keys.c</a>=
(9)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/barnowl/barnowl/pull/190/files#diff-3e1=
1ac603f47d903919be0620581c8a2c02fd54048bc04a33e3abeaaf80ad8ee">logging.c<=
/a>
(1)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/barnowl/barnowl/pull/190/files#diff-1e1=
9335afb8f2fdf18222889d344f43e87b914ab89af83021b75f7aef9684855">perl/lib/B=
arnOwl/DeferredLogging.pm</a>
(33)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/barnowl/barnowl/pull/190/files#diff-ea6=
d7771166c4d545a530207606af725d9e05bd32ae2503c1edbe41f5191fd56">perl/lib/B=
arnOwl/Hooks.pm</a>
(4)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/barnowl/barnowl/pull/190/files#diff-db0=
ff718361d8ebac4a3b25d4c87bfcc17d56b76cf6d92a5dff02418d2a44eb6">perl/lib/B=
arnOwl/Logging.pm</a>
(7)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/barnowl/barnowl/pull/190/files#diff-03c=
92ff9c5d776def863915b2e5dd4f787034c4aac1b16d948dee7e9cf92b092">perl/lib/B=
arnOwl/Message/Zephyr.pm</a>
(7)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/barnowl/barnowl/pull/190/files#diff-e21=
ac3db1fb1f4c2521d0911da5ca3414412766a9aecad6c4c0cfad5d67b5165">util.c</a>=
(11)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/barnowl/barnowl/pull/190/files#diff-157=
6f78fa9ad6867450cb606fc0db19d692cb35d18f55ad8c7ed27fd943c6994">zwrite.c</=
a>
(3)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href=3D'https://github.com/barnowl/barnowl/pull/190.patch'>https=
://github.com/barnowl/barnowl/pull/190.patch</a></li>
<li><a href=3D'https://github.com/barnowl/barnowl/pull/190.diff'>https:=
//github.com/barnowl/barnowl/pull/190.diff</a></li>
</ul>
<p style=3D"font-size:small;-webkit-text-size-adjust:none;color:#666;">&m=
dash;<br />Reply to this email directly, <a href=3D"https://github.com/ba=
rnowl/barnowl/pull/190?email_source=3Dnotifications&email_token=3DABC=
ERSIFSQUEOCKQLMGDCZ35W4QUPA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2W=
K43UF42TCMBXGU3DOMBYHGTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6=
Y3MNFRWW">view it on GitHub</a>, or <a href=3D"https://github.com/notific=
ations/unsubscribe-auth/ABCERSN5HRUZIJEJPW3EVUT5W4QUPAVCNFSNUABCKJSXA33TN=
F2G64TZHM3TINZTGA4TWSLTON2WKOZWGE2DOMJWG4YDSN5BOYBA">unsubscribe</a>.<br =
/>Triage notifications, keep track of coding agent tasks and review pull =
requests on the go with GitHub Mobile for <a href=3D"https://github.com/n=
otifications/mobile/ios/ABCERSJ76UJAI5SN7NFF5ZT5W4QUPA5CNFSNUABEM5UWIORPF=
5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42TCMBXGU3DOMBYHGTHEZLBONXW5KTTOVRHGY3SNF=
RGKZFFMV3GK3TUVJTG633UMVZF62LPOM">iOS</a> and <a href=3D"https://github.c=
om/notifications/mobile/android/ABCERSNSMBINJ3CIR3K6T3D5W4QUPA5CNFSNUABEM=
5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42TCMBXGU3DOMBYHGTHEZLBONXW5KTTOV=
RHGY3SNFRGKZFFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE">Android</a>. Download it =
today!
<br />You are receiving this because you are subscribed to this thread.<i=
mg src=3D"https://github.com/notifications/beacon/ABCERSLA3JCNVAQWHOLLOXL=
5W4QUPBFCNFSM6AAAAADD6IIYOGWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3J=
MTHQAAAAAFXGMU3ZUZZGKYLTN5XKU43VMJZWG4TJMJSWI.gif" height=3D"1" width=3D"=
1" alt=3D"" /><span style=3D"color: transparent; font-size: 0; display: n=
one; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: =
0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><barn=
owl/barnowl/pull/190</span><span>@</span><span>github</span><span>.</span=
><span>com></span></span></p>
<script type=3D"application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/barnowl/barnowl/pull/190?email_source=3Dnot=
ifications\u0026email_token=3DABCERSL5FLSQNACS6JSOPDD5W4QUPA5CNFSNUABEM5U=
WIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42TCMBXGU3DOMBYHGTHEZLBONXW5KTTOVRH=
GY3SNFRGKZFFMV3GK3TUVNTW2YLJNRPWG3DJMNVQ",
"url": "https://github.com/barnowl/barnowl/pull/190?email_source=3Dnotifi=
cations\u0026email_token=3DABCERSL5FLSQNACS6JSOPDD5W4QUPA5CNFSNUABEM5UWIO=
RPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42TCMBXGU3DOMBYHGTHEZLBONXW5KTTOVRHGY3=
SNFRGKZFFMV3GK3TUVNTW2YLJNRPWG3DJMNVQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
----==_mimepart_6ae737d7d9f8_ff12a812024bb--