The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Steffen Nurpmeso <steffen@sdaoden.eu>
To: tuhs@tuhs.org
Subject: [TUHS] Re: Trying to date "A Supplemental Document For Awk"
Date: Thu, 29 Jun 2023 21:03:12 +0200	[thread overview]
Message-ID: <20230629190312.OzHE3%steffen@sdaoden.eu> (raw)
In-Reply-To: <CAFH29toi4aFfGY7g+SndAPz6ndjk8j+LKZOGfnd2GQGnrNXKhw@mail.gmail.com>

Rich Salz wrote in
 <CAFH29toi4aFfGY7g+SndAPz6ndjk8j+LKZOGfnd2GQGnrNXKhw@mail.gmail.com>:
 |A perl script to inuit likely roff options as definitely a neat Unix hack.

The "problem" is that the "shebang" line used for UNIX man'uals on
at least a few ("newer" <> post Y2K) systems has never been
extended in plain *roff terms, for general macro things.  Ie that

   For example, newer man(1)s read the first line of the manual and
   check for a syntax <^'\" >followed by concat of [egprtv]+ (and in
   fact  *join in* $MANROFFSEQ environment [egprtv]+)
                while getopts 'egprtv' preproc_arg; do
                        case "${preproc_arg}" in
                        e)      pipeline="$pipeline | $EQN" ;;
                        g)      GRAP  ;; # Ignore for compatibility.
                        p)      pipeline="$pipeline | $PIC" ;;
                        r)      pipeline="$pipeline | $REFER" ;;
                        t)      pipeline="$pipeline | $TBL" ;;
                        v)      pipeline="$pipeline | $VGRIND" ;;
                        *)      usage ;;
                        esac

Of course, most roff's do not have that "super process" that groff
actually is, for one, so you have to formulate pipelines anyway.
And then roff is dead for the young.  Generally speaking.

It is only a pity in my opinion because the most widely used
implementation (GNU roff) actually does "magic" already and
anyway, namely in its preconv(1), which does

       preconv tries to find the input encoding with the following algorithm.
       ...
       2.     Otherwise, check whether the input starts with a Byte Order Mark
              (BOM, see below).  If found, use it.

       3.     Otherwise, check whether there is a known coding tag (see below)
              in either the first or second input line.  If found, use it.
       ...
       5.     If everything fails[.]


And 3. is then

  [.]supports the coding tag convention (with some restrictions)
  as used by GNU Emacs and XEmacs[.]
  ...
  .\" -*- mode: troff; coding: latin-2 -*-

But possibly the future brings not only integrative and truthful
western white men, but also a roff which "can".  The former
i doubt, the latter i can still hope for.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

  reply	other threads:[~2023-06-29 19:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28  6:26 [TUHS] " Aharon Robbins
2023-06-28  6:45 ` [TUHS] " arnold
2023-06-28 17:48 ` Adam Sampson
2023-06-28 18:03   ` KenUnix
2023-06-28 18:38     ` Clem Cole
2023-06-28 23:47       ` Greg 'groggy' Lehey
2023-06-29  1:59         ` Stuff Received
2023-06-29  6:27           ` segaloco via TUHS
2023-06-29  6:41             ` Andrew Hume
2023-06-29  6:45               ` Noel Hunt
2023-06-29  6:48                 ` Andrew Hume
2023-06-29  6:50                   ` arnold
2023-06-29  6:44             ` Noel Hunt
2023-06-29 14:02             ` G. Branden Robinson
2023-06-29 13:45           ` G. Branden Robinson
2023-06-29 13:34         ` G. Branden Robinson
2023-06-29 13:47           ` Rich Salz
2023-06-29 19:03             ` Steffen Nurpmeso [this message]
2023-06-29  1:04     ` Bakul Shah
2023-06-29  0:26 ` Jeremy C. Reed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230629190312.OzHE3%steffen@sdaoden.eu \
    --to=steffen@sdaoden.eu \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).