[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposed: simplify `mso` request
From: |
G. Branden Robinson |
Subject: |
Proposed: simplify `mso` request |
Date: |
Thu, 22 Feb 2024 14:48:19 -0600 |
I'd like to suggest the attached diff.
What removing this code would do is make the `mso` request no longer
look for "tmac.s" if "s.tmac" is specified as the request's argument,
and vice versa.
Here's my case against.
1. It's needless complexity.
2. The main things you'd need this for are full-service traditional
macro package names on AT&T troff environments, where they're
(sometimes) named "tmac.s", "tmac.an", and so forth.
2a. Except not all AT&T troff environments name them that way. DWB 3.3
troff, for instance stores them without "tmac" in the name at all.
$ ls ~/dwb/lib/macros
an
color
csmacros
mmn
mmt
pictures
ptx
safe
strings.mm
v
view
2b. Usually, full-service macro packages are loaded via the command line
with the `-m` option, which is still supported, and does the
foregoing aggressive search.
3. The `mso` request itself is not portable, but a groff extension. So
this feature is not applicable to the use case of trying to format a
read-only legacy *roff document with groff.
4. If you wanted to hack on a legacy *roff document and use this
feature to load a macro file from the "macro path", you could
equivalently do this.
.mso s.tmac
.mso tmac.s
5. But, you may point out, that will probably throw at least one
warning, for whichever of these files isn't present on the system.
That's harmless, but...
6. As of groff 1.23.0, you can do this.
.msoquiet s.tmac
.msoquiet tmac.s
...which won't throw any diagnostics about missing files.
I therefore think this code has outlived whatever utility it had.
N.B., I have zero intention of killing `mso` altogether, just this weird
feature whereupon failing to open the specified file name, it rewrites
its argument to go looking for a _different_ file name.
Comments?
Regards,
Branden
simpler-mso.diff
Description: Text Data
signature.asc
Description: PGP signature
- Proposed: simplify `mso` request,
G. Branden Robinson <=