Follow-up Comment #35, bug #58736 (project groff):
[comment #34 comment #34:] > First stumbling block: your 58736.diff appears to not be against git HEAD but against your locally modified version of the tree: > > > $ patch -p1 < 58736.diff > patching file ChangeLog > Hunk #1 FAILED at 1. > 1 out of 1 hunk FAILED -- saving rejects to file ChangeLog.rej > patching file tmac/e.tmac > Hunk #3 FAILED at 2159. > 1 out of 3 hunks FAILED -- saving rejects to file tmac/e.tmac.rej > > > I'll see if I can apply the changes manually, assuming nothing in this patch is dependent on uncommitted changes to e.tmac. Urp, sorry about that. Here's the history of that file since I last pushed to master. $ git log --patch --reverse origin..master tmac/e.tmac commit d8bf04bebeca3546dc6d75e0c0cf325843b82e21 Author: G. Branden Robinson <[email protected]> Date: Sun Sep 25 22:34:10 2022 -0500 [me]: Fix code style nit. * tmac/e.tmac: Explicitly initialize and annotate internal register `?f`. diff --git a/tmac/e.tmac b/tmac/e.tmac index e215b111c..a3b529c3e 100644 --- a/tmac/e.tmac +++ b/tmac/e.tmac @@ -2148,6 +2148,7 @@ .@R ?b\" \" pending floating keep at page bottom? .@R ?C\" \" at chapter header? .@R ?e\" \" in equation? +.@R ?f\" \" inside footnote? .@R ?H\" \" suppress headers and footers next page? .@R ?I\" \" has the header trap been sprung? .@R ?N\" \" numbering with shorter line length? commit 4eeba76c6c2aaf1900b1047f017f03257935ad62 Author: G. Branden Robinson <[email protected]> Date: Sun Sep 25 22:46:54 2022 -0500 [me]: Fix Savannah #58736. * tmac/e.tmac: Initialize new register `_f`, the value of `$m` (column count) of the previous pending footnote, to zero, meaning there is no previous pending footnote. (@o): Emit diagnostic when flushing footnotes into a different column layout then the pending footnote last added. Set `_f` to zero. ((f): Emit diagnostic when enqueueing footnote using a different column layout than the previous pending footnote used. Set `_f` to `$m`. Fixes <https://savannah.gnu.org/bugs/?58736>. Thanks to Dave Kemper for the report and discussion. diff --git a/tmac/e.tmac b/tmac/e.tmac index a3b529c3e..9a222ec54 100644 --- a/tmac/e.tmac +++ b/tmac/e.tmac @@ -411,7 +411,12 @@ .wh -\\n(_Bu @r .if \\n(?n \ . nm \\n(ln +.if \\n(_f \ +. if !\\n(_f=\\n($m \ +. @err writing \\n($m-column footnote in \\n(_f-column \ +layout .|f +.nr _f 0 .if \\n(?n \ . nm .fi @@ -1600,6 +1605,11 @@ . .de (f \" *** begin footnote .if "\\n(.z"|f" .do @err footnotes cannot be nested +.if \\n(_f \ +. if !\\n(_f=\\n($m \ +. @err queueing \\n($m-column footnote after \ +\\n(_f-column footnote +.nr _f \\n($m .ie "\\n(.z"" \ \{\ . nr _D \\n(dn @@ -2149,6 +2159,7 @@ .@R ?C\" \" at chapter header? .@R ?e\" \" in equation? .@R ?f\" \" inside footnote? +.@R _f\" \" column count of previous footnote .@R ?H\" \" suppress headers and footers next page? .@R ?I\" \" has the header trap been sprung? .@R ?N\" \" numbering with shorter line length? commit af34450ffc7cf157627e81ffed043e412bd18620 Author: G. Branden Robinson <[email protected]> Date: Wed Sep 28 02:33:40 2022 -0500 [me]: Consistently call `@err` macro with `do`. * tmac/e.tmac (@o, n2, sk (f, ++): Do it. This prevents failure to call the diagnostic message macro when running in compatibility mode. diff --git a/tmac/e.tmac b/tmac/e.tmac index 9a222ec54..f00711577 100644 --- a/tmac/e.tmac +++ b/tmac/e.tmac @@ -413,8 +413,8 @@ . nm \\n(ln .if \\n(_f \ . if !\\n(_f=\\n($m \ -. @err writing \\n($m-column footnote in \\n(_f-column \ -layout +. do @err writing \\n($m-column footnote in \ +\\n(_f-column layout .|f .nr _f 0 .if \\n(?n \ @@ -642,7 +642,7 @@ layout . rr |l .\} . el \ -. @err invalid numeric argument to 'n2': '\\$1' +. do @err invalid numeric argument to 'n2': '\\$1' .\} .el \ \{\ @@ -696,7 +696,7 @@ layout . .de sk \" *** leave a blank page (next page) .if \\n(.$>0 \ -. @err ignoring argument(s) to 'sk' +. do @err ignoring argument(s) to 'sk' .nr ?s 1 .. . @@ -1607,7 +1607,7 @@ layout .if "\\n(.z"|f" .do @err footnotes cannot be nested .if \\n(_f \ . if !\\n(_f=\\n($m \ -. @err queueing \\n($m-column footnote after \ +. do @err queueing \\n($m-column footnote after \ \\n(_f-column footnote .nr _f \\n($m .ie "\\n(.z"" \ @@ -1920,7 +1920,7 @@ layout .if "\\$1"AB" \ . nr _0 5 \" abstract .if \\n(_0=0 \ -. @err invalid segment type to '++': '\\$1' +. do @err invalid segment type to '++': '\\$1' .nr ?R 0 .if \\n(_0>10 \ \{\ _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?58736> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
