<feed xmlns='http://www.w3.org/2005/Atom'>
<title>plan9port, branch patch</title>
<subtitle>Plan 9 from User Space (with patches)</subtitle>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/'/>
<entry>
<title>Custom shortcuts and other minor changes</title>
<updated>2026-02-24T21:55:48+00:00</updated>
<author>
<name>bt</name>
<email>bt@rctt.net</email>
</author>
<published>2026-02-20T15:04:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=e14493abb20ab0c808f109bb56aaf141ad08d178'/>
<id>e14493abb20ab0c808f109bb56aaf141ad08d178</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>win: fix spaces in Acme window tag</title>
<updated>2026-02-08T14:47:45+00:00</updated>
<author>
<name>Dmitri Vereshchagin</name>
<email>dmitri.vereshchagin@gmail.com</email>
</author>
<published>2026-02-01T07:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=cb7001c8d27f22f7229be302f53012bb1db52418'/>
<id>cb7001c8d27f22f7229be302f53012bb1db52418</id>
<content type='text'>
Acme adds a space after Look at the end of window tags.  Therefore, the
space before Send is not needed.  The space after Send is for consistency
and convenience.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Acme adds a space after Look at the end of window tags.  Therefore, the
space before Send is not needed.  The space after Send is for consistency
and convenience.
</pre>
</div>
</content>
</entry>
<entry>
<title>devdraw: allow resize in xattach</title>
<updated>2026-02-05T18:26:53+00:00</updated>
<author>
<name>user</name>
<email>user@my.domain</email>
</author>
<published>2026-02-05T16:35:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=a39606e3241540482afd13e93d7f34defa7d74ce'/>
<id>a39606e3241540482afd13e93d7f34defa7d74ce</id>
<content type='text'>
The created window in xattach is missing the StructureNotifyMask,
if the WM does resize the window before mapping (like tiling WMs
do), the client will not get notified (and XGetWindowAttributes
in the same function will not get updated values)

Reproducible by starting acme in e.g. dwm.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The created window in xattach is missing the StructureNotifyMask,
if the WM does resize the window before mapping (like tiling WMs
do), the client will not get notified (and XGetWindowAttributes
in the same function will not get updated values)

Reproducible by starting acme in e.g. dwm.
</pre>
</div>
</content>
</entry>
<entry>
<title>devdraw: repair incomplete repainting</title>
<updated>2026-01-31T14:37:01+00:00</updated>
<author>
<name>MvA</name>
<email>vanattenmark@gmail.com</email>
</author>
<published>2026-01-31T08:08:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=b3741e6ce39cdcdb09485c088034b723ed023b0b'/>
<id>b3741e6ce39cdcdb09485c088034b723ed023b0b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>troff: fix SIGFPE when using modulus operator</title>
<updated>2025-11-09T19:25:48+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2025-11-09T12:38:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=f39a2407b6e6ace6af68e466bfa2f362b9a9dd36'/>
<id>f39a2407b6e6ace6af68e466bfa2f362b9a9dd36</id>
<content type='text'>
I uncovered this problem while writing unit tests for GNU troff's
delimited expression handling.  Plan 9 troff's numeric expression
evaluator handles division by zero but not modulus by zero.

Fixes:
$ echo '.if %0%0% .tm true' | 9 troff
Floating point exception (core dumped)
$ echo '.if 1%0 .tm true' | 9 troff
Floating point exception (core dumped)

After this patch:
$ echo '.if %0%0% .tm true' | 9 troff
x T utf
x res 720 1 1
x init
troff: modulus by zero.; stdin:1
troff: modulus by zero.; stdin:1
x trailer
V0
x stop
$ echo '.if 1%0 .tm true' | 9 troff
x T utf
x res 720 1 1
x init
troff: modulus by zero.; stdin:1
x trailer
V0
x stop
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I uncovered this problem while writing unit tests for GNU troff's
delimited expression handling.  Plan 9 troff's numeric expression
evaluator handles division by zero but not modulus by zero.

Fixes:
$ echo '.if %0%0% .tm true' | 9 troff
Floating point exception (core dumped)
$ echo '.if 1%0 .tm true' | 9 troff
Floating point exception (core dumped)

After this patch:
$ echo '.if %0%0% .tm true' | 9 troff
x T utf
x res 720 1 1
x init
troff: modulus by zero.; stdin:1
troff: modulus by zero.; stdin:1
x trailer
V0
x stop
$ echo '.if 1%0 .tm true' | 9 troff
x T utf
x res 720 1 1
x init
troff: modulus by zero.; stdin:1
x trailer
V0
x stop
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/devdraw: handle X11 selections better</title>
<updated>2025-11-04T12:10:14+00:00</updated>
<author>
<name>Scott Schwartz</name>
<email>scott7z123@gmail.com</email>
</author>
<published>2025-11-04T04:25:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=37cd522b0a79b4f6b2b5d4b8d27667dea44f71d4'/>
<id>37cd522b0a79b4f6b2b5d4b8d27667dea44f71d4</id>
<content type='text'>
x11-screen.c accepts selection targets with the MIME type
"text/plain;charset-UTF8", but it should do so case insensitively. The
current code draws an error when working with xfce4-terminal 1.0.4,
which sends lower case.  To reproduce, run acme, snarf some text, then
paste in the terminal.  acme will report:
acme: cannot handle selection request for 'text/plain;charset=utf-8' (590)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
x11-screen.c accepts selection targets with the MIME type
"text/plain;charset-UTF8", but it should do so case insensitively. The
current code draws an error when working with xfce4-terminal 1.0.4,
which sends lower case.  To reproduce, run acme, snarf some text, then
paste in the terminal.  acme will report:
acme: cannot handle selection request for 'text/plain;charset=utf-8' (590)
</pre>
</div>
</content>
</entry>
<entry>
<title>tmac/tmac.an*: work around formatter bug</title>
<updated>2025-10-26T23:03:55+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2025-10-26T21:33:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=46fbe4cd00252a93e9ffcedb3154b53453d0993e'/>
<id>46fbe4cd00252a93e9ffcedb3154b53453d0993e</id>
<content type='text'>
...when rendering some man pages, such as those of ncurses.

I did not manage (nor seriously attempt) to identify the root cause of
this bug.  ncurses's use of `SH` and `SS` man(7) macros is
unremarkable.[1]  I cannot account for why the less(1) man page renders
fine and ncurses pages like insstr(3) do not.  But render badly they do,
emitting *roff logic as formatted output.

```
$ 9 nroff -man $(man -w insstr) | grep -F .ss | cat -v
     "'''if^GNAME^GSYNOPSIS^G .ss 18 NAME
     "'''if^GSYNOPSIS^GSYNOPSIS^G .ss 18 SYNOPSIS
     "'''if^GDESCRIPTION^GSYNOPSIS^G .ss 18 DESCRIPTION
     "'''if^GRETURN^GSYNOPSIS^G .ss 18 RETURN VALUE
     "'''if^GNOTES^GSYNOPSIS^G .ss 18 NOTES
     "'''if^GEXTENSIONS^GSYNOPSIS^G .ss 18 EXTENSIONS
     "'''if^GPORTABILITY^GSYNOPSIS^G .ss 18 PORTABILITY
     "'''if^GHISTORY^GSYNOPSIS^G .ss 18 HISTORY
     "'''if^GSEE^GSYNOPSIS^G .ss 18 SEE ALSO
```

With this patch:

```
$ 9 nroff -man $(man -w insstr) | grep -F .ss | cat -v | grep . || echo NO OUTPUT
NO OUTPUT
```

I do observe that the problem seems to correspond to the only use in the
package of the old-fashioned `'''` commenting convention _within a macro
definition_.  I have a notion of how GNU troff works, but little about
AT&amp;T troff.  That said, if I were to try to get to the bottom of this
problem, I'd look into if and how the no-break command character is
handled differently in copy mode.  I see nothing in CSTR #54 to suggest
that the command characters have different meanings in copy mode and its
complement.[2]

My solution is to use idiomatic comment syntax inside macro definitions.

[1] https://github.com/ThomasDickey/ncurses-snapshots/blob/d5dc8a4a7c15474652d73dee37d905c8205f6ab4/man/curs_insstr.3x#L47

[2] unnamed in AT&amp;T documentation but which I term "interpretation mode"
    in groff
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...when rendering some man pages, such as those of ncurses.

I did not manage (nor seriously attempt) to identify the root cause of
this bug.  ncurses's use of `SH` and `SS` man(7) macros is
unremarkable.[1]  I cannot account for why the less(1) man page renders
fine and ncurses pages like insstr(3) do not.  But render badly they do,
emitting *roff logic as formatted output.

```
$ 9 nroff -man $(man -w insstr) | grep -F .ss | cat -v
     "'''if^GNAME^GSYNOPSIS^G .ss 18 NAME
     "'''if^GSYNOPSIS^GSYNOPSIS^G .ss 18 SYNOPSIS
     "'''if^GDESCRIPTION^GSYNOPSIS^G .ss 18 DESCRIPTION
     "'''if^GRETURN^GSYNOPSIS^G .ss 18 RETURN VALUE
     "'''if^GNOTES^GSYNOPSIS^G .ss 18 NOTES
     "'''if^GEXTENSIONS^GSYNOPSIS^G .ss 18 EXTENSIONS
     "'''if^GPORTABILITY^GSYNOPSIS^G .ss 18 PORTABILITY
     "'''if^GHISTORY^GSYNOPSIS^G .ss 18 HISTORY
     "'''if^GSEE^GSYNOPSIS^G .ss 18 SEE ALSO
```

With this patch:

```
$ 9 nroff -man $(man -w insstr) | grep -F .ss | cat -v | grep . || echo NO OUTPUT
NO OUTPUT
```

I do observe that the problem seems to correspond to the only use in the
package of the old-fashioned `'''` commenting convention _within a macro
definition_.  I have a notion of how GNU troff works, but little about
AT&amp;T troff.  That said, if I were to try to get to the bottom of this
problem, I'd look into if and how the no-break command character is
handled differently in copy mode.  I see nothing in CSTR #54 to suggest
that the command characters have different meanings in copy mode and its
complement.[2]

My solution is to use idiomatic comment syntax inside macro definitions.

[1] https://github.com/ThomasDickey/ncurses-snapshots/blob/d5dc8a4a7c15474652d73dee37d905c8205f6ab4/man/curs_insstr.3x#L47

[2] unnamed in AT&amp;T documentation but which I term "interpretation mode"
    in groff
</pre>
</div>
</content>
</entry>
<entry>
<title>nroff: bad symbold definition on command line.</title>
<updated>2025-10-10T18:34:02+00:00</updated>
<author>
<name>Dan Cross</name>
<email>cross@gajendra.net</email>
</author>
<published>2025-10-10T18:33:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=499efb270d7d5e841b51fc1a44400da54ba58361'/>
<id>499efb270d7d5e841b51fc1a44400da54ba58361</id>
<content type='text'>
`-DTDEVNAME=...` should be `-DNDEVNAME=...`.  We've been
defaulting for "37", probably forever.

Signed-off-by: Dan Cross &lt;cross@gajendra.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`-DTDEVNAME=...` should be `-DNDEVNAME=...`.  We've been
defaulting for "37", probably forever.

Signed-off-by: Dan Cross &lt;cross@gajendra.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tmac/tmac.an*: support `lq`, `rq` strings</title>
<updated>2025-10-10T17:44:47+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2025-08-24T16:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=e5b5757e640371974d2e70144c8e59c6a5b613f6'/>
<id>e5b5757e640371974d2e70144c8e59c6a5b613f6</id>
<content type='text'>
The `lq` and `rq` strings are not a groffism, but _almost_ universally
portable to man(7) renderers.

They originate in 4BSD (1980).[1]  They entered Unix System V with SVR4
(1988 or 1989).[2]  mandoc(1) has supported them since its inception.[3]

* tmac/tmac.an:
* tmac/tmac.antimes: Do it.  Use U+201C and U+201D if the output device
  is "utf", otherwise define them as `` and ''.  Don't define them as
  `"` because that breaks when interpolating the strings in macro
  arguments.[4]

[1] https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/lib/tmac/tmac.an.new
[2]
https://github.com/ryanwoodsmall/oldsysv/blob/e68293af91e2dc39f5f29c20d7e429f9e0cabc75/sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/an#L46
[3] https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mandoc/predefs.in?rev=1.1&amp;content-type=text/x-cvsweb-markup
[4] https://www.gnu.org/software/groff/manual/groff.html.node/Calling-Macros.html

   "For the (neutral) double quote, you have recourse to an obscure
   syntactical feature of AT&amp;T troff. ..."
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `lq` and `rq` strings are not a groffism, but _almost_ universally
portable to man(7) renderers.

They originate in 4BSD (1980).[1]  They entered Unix System V with SVR4
(1988 or 1989).[2]  mandoc(1) has supported them since its inception.[3]

* tmac/tmac.an:
* tmac/tmac.antimes: Do it.  Use U+201C and U+201D if the output device
  is "utf", otherwise define them as `` and ''.  Don't define them as
  `"` because that breaks when interpolating the strings in macro
  arguments.[4]

[1] https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/lib/tmac/tmac.an.new
[2]
https://github.com/ryanwoodsmall/oldsysv/blob/e68293af91e2dc39f5f29c20d7e429f9e0cabc75/sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/an#L46
[3] https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mandoc/predefs.in?rev=1.1&amp;content-type=text/x-cvsweb-markup
[4] https://www.gnu.org/software/groff/manual/groff.html.node/Calling-Macros.html

   "For the (neutral) double quote, you have recourse to an obscure
   syntactical feature of AT&amp;T troff. ..."
</pre>
</div>
</content>
</entry>
<entry>
<title>devdraw: work around XWayland pointer warping</title>
<updated>2025-10-09T23:37:41+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2025-10-09T23:37:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=19263a10717840901efc6b1cc2f802e7f5173c55'/>
<id>19263a10717840901efc6b1cc2f802e7f5173c55</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
