Bug 264560 - Give mandoc a -V option to provide volume name
Summary: Give mandoc a -V option to provide volume name
Status: Closed Not Accepted
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-08 23:29 UTC by Steve Kargl
Modified: 2022-06-10 16:41 UTC (History)
2 users (show)

See Also:


Attachments
diff of mandoc with -V option (4.94 KB, patch)
2022-06-08 23:29 UTC, Steve Kargl
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Kargl freebsd_committer freebsd_triage 2022-06-08 23:29:29 UTC
Created attachment 234568 [details]
diff of mandoc with -V option

The mandoc command is hardcioded to specify a FreeBSD manpage.  I use mandoc and mdoc(7) for my personal projects.  This gives the odd appearance of 

% mandoc tier.1 | head -1
TIER(1)                 FreeBSD General Commands Manual                TIER(1)

which is not what I want.  So, I hacked up mandoc to accept a -V option.

% mandoc -V "Steve's Menagerie" tier.1 | head -1
TIER(1)                        Steve's Menagerie                       TIER(1)

Please commit.
Comment 1 Cameron Katri 2022-06-09 03:44:10 UTC
Hey Kargl,

I have encountered this too and have a thread where I talked about adding a similar option with upstream here: https://marc.info/?t=163328341400001 and an open revision to fix the titles here: https://reviews.freebsd.org/D32297.
Comment 2 Steve Kargl freebsd_committer freebsd_triage 2022-06-09 03:55:59 UTC
(In reply to Cameron Katri from comment #1)
Thanks for the heads up, Cameron.  I did not realize someone else had taken a shot at this.  I'm married to my patch, so if you or someone else has something better I'll take a look.

It did occur to me after I submitted the patch that adding a .Vl macro would also work.  The top of a file would be

.Vl "Private Library Manual"
.Dd June 8, 2022
.Dt TDI 1
.Sh NAME
Comment 3 Cameron Katri 2022-06-09 04:06:33 UTC
(In reply to Steve Kargl from comment #2)
> I'm married to my patch, so if you or someone else has something better I'll take a look.
You could always submit it to upstream, you could probably be able to find a more compelling reason to add it than I did. 

> It did occur to me after I submitted the patch that adding a .Vl macro would also work.  The top of a file would be
I do not think FreeBSD should be adding new mdoc(7) macros willy-nilly. This should belong in the FreeBSD tree, if anything you should propose that macro to either mandoc or groff, Schwarze is very fast at responding to the mandoc mailing list, I am not sure about the groff maintainers though.
Comment 4 Steve Kargl freebsd_committer freebsd_triage 2022-06-09 04:33:31 UTC
(In reply to Cameron Katri from comment #3)

Whoops.  Meant to write "I'm NOT married ..."

If the FreeBSD committers don't like that patch.  It's not a big deal to me.  I'll simply maintain another patch for my use.
Comment 5 Steve Kargl freebsd_committer freebsd_triage 2022-06-10 16:41:04 UTC
It is clear from the discussion of freebsd-hackers@freebsd.org that deviating from upstream will not happen.