Proposed: rename grn's `-M` option to `-I` and make groff's `-I` option stop implying `-g` and `-s`

"G. Branden Robinson" <[email protected]> Tue, 28 Apr 2026 22:52:05 -0500
Newsgroups gmane.comp.printing.groff.general
Message-ID <20260429035205.kvk43bigapjuvejs@illithid>
Hi folks,

Yet another minor proposed feature change.  These are coupled (ideally,
in my mind), but would manifest distinguishable changes to code.

Background:

groff(1):

   groff‐specific options
     The following options either do not exist in GNU troff or are
     interpreted differently by groff.
...
     -g       Run grn(1) preprocessor.
...
     -I dir   Works as troff’s option (see below), but also implies -g
              and -s.  groff passes -I options and their arguments to
              soelim(1), troff(1), and output drivers; with the option
              letter changed to -M, it passes the same arguments to
              grn(1).
...
     -s       Run soelim(1) preprocessor.
...
   Transparent options
     The following options are passed as‐is to the formatter program
     troff(1) and described in more detail in its man page.
...
     -I dir   Search dir for input files.

troff(1):

     -I dir   Search the directory dir for files (those named on the
              command line; in psbb, so, and soquiet requests; and in
              “\X'ps: import'”, “\X'ps: file'”, and “\X'pdf: pdfpic'”
              device extension escape sequences).  -I may be specified
              more than once; each dir is searched in the given order.
              To search the current working directory before others, add
              “-I .” at the desired place; it is otherwise searched
              last.  -I works similarly to, and is named for, the
              “include” option of Unix C compilers.

I'll quote the relevant Savannah tickets:

---snip---
grn doesn't already use the option letter "I", and this way we can
parallelize and make consistent all groff commands' use of the option
letter name space in this respect.

I anticipate no withdrawal or deprecation of `-M` in grn.  I don't think
grn has any application nowadays except rendering of historical
documents.  I'm not itching to break forty-year-old Makefiles, for
example.  There's no migration path away from it apart from switching to
a completely different picture format.
...
Turns out Werner already renamed it once, from `-L`.

https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/src/preproc/grn/README?h=1.24.1#n58

I figure we can have GNU grn quietly accept all three.
---end snip---

I proposed to document only `-I` in grn and silently accept the other
two.  This is simple to do.  With that accomplished...

---snip---
If we [do the foregoing], then we can make groff(1)'s `-I` less of a
DWIM interface, and stop dragging preprocessors into the pipeline that
may not be desired.

To date, specifying `-I` is the only way (employing only groff(1)) as a
pipeline manager, a usage we strongly encourage) to get an `-M` option
of the same meaning to grn.

However, we don't know, simply from the user's specification of `-I`,
that they meant to pass a `-M` option to grn.  Maybe they meant it for
soelim(1).  Maybe they don't need preprocessors at all.

Hence this ticket.
---end snip---

Thoughts?  Objections?  Please follow-up to this thread or to the
appropriate Savannah ticket.

https://savannah.gnu.org/bugs/?68277
https://savannah.gnu.org/bugs/?68276

Regards,
Branden
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmnxgF0ACgkQ0Z6cfXEm
bc75sw/5AZf42HdVO7QDJlfWwuogi/HolXQ4GCDK4P5U1I/tYBeXCM/0iFL5Ryiu
LxLV1ijlbY75yMAq7oRVOPhmAJ4CvqULrUGtjC2s/e/S63FQagf7/GI7dwJ6WM4G
TH2vEV6aOZ36yeR6vi3ViizaE3onAW1NkQoW+t0vtjTKV5AjZqslwCthsxf8sZ3m
4aE7dAaZjXJaIH7ckmpc4hrm4ToRV2HwtYzY/slWaqaov2WoXMSwUou9SvaW0+06
rvX47dGDrZ825gAkuMvrfp1fYCSXq0bpjtYSJXm35u65mRYO1JTbf4EOXO7uLjA8
62OdXHajFiovTaSYW8ZXh1xm9paUyLuT9jRgGCPs23WTcZXdQIdq/BdAaOerWetg
b80f9gV3DM3pjrLp8gYLcUPN0HI4dYODJA/jcaRTmlM/TawE9BollbXM63diVoWX
rDiA/GbbI30xmhWFqcgGALgojbcm99aUSzHOBgoySvOFpmr41HenYa60NL8UJv2X
z6wpGZpsj0p19xWWAqLOT7Xi1lfK6fqXUoyVFVEX3NC80mCrCvbqHwOeUxzEqP2X
KW/mZj/mV7KoLpMmvNtowG7gaAVnKbaVcxSIrP32HqwfWSxY8VfFzu9QdJWZCCQo
U8klcI40XKq5N07f2Mm6bDHtkROnj1UpG+MCmD2nhxGTwkGWWCA=
=cY7h
-----END PGP SIGNATURE-----