Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.groff.bug > #1804

[bug #58162] unicode.tmac re-enables compatibility mode

From "G. Branden Robinson" <INVALID.NOREPLY@gnu.org>
Newsgroups gnu.groff.bug
Subject [bug #58162] unicode.tmac re-enables compatibility mode
Date 2020-04-11 23:59 -0400
Message-ID <mailman.52.1586663998.3066.bug-groff@gnu.org> (permalink)
References <20200412-035507.sv108747.38919@savannah.gnu.org> <20200412-035731.sv108747.26283@savannah.gnu.org> <20200412-035954.sv108747.29715@savannah.gnu.org>

Show all headers | View raw


Follow-up Comment #2, bug #58162 (project groff):

I have a voodoo doll of Savannah and I am burning it, slowly.

---

John Gardner noticed the following regression test failure (for a different
software project) on groff git HEAD relative to groff 1.22.4 (which does not
have this bug).


*Command:*
printf '.ds FOO BAR\n\\*[FOO]' | groff -C -Tutf8 | head -n1

*Expected output:*
FOO]

*Actual output:*
BAR


He also identified the cause:


>From a glance, it looks like the `.C` register is being set twice: once by the
calling tty.tmac, and again by unicode.tmac.


So the saved register value was being clobbered.

The real problem here, contrary to my initial thoughts on the mailing list
thread, is not the save/restore approach but a namespace problem.  A common
pattern in macro files and in the man pages in the tree is to just save the .C
register in a register named _C.  This fails as soon as nesting happens.

A while back I ground through all the man pages to make them save to
uniquely-named registers, but out of timidity I did not the stuff in the tmac
directory, where it actually would have done more good.  When I added
save/restore to this file in 2019, I cautiously copied examples from the same
directory.  But they were bad examples in this respect!

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58162>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/

Back to gnu.groff.bug | Previous | Next | Find similar


Thread

[bug #58162] unicode.tmac re-enables compatibility mode "G. Branden Robinson" <INVALID.NOREPLY@gnu.org> - 2020-04-11 23:59 -0400

csiph-web