From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-01.scc.kit.edu (scc-mailout-kit-01.scc.kit.edu [129.13.231.81]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 838b4b0d for ; Sat, 24 Jun 2017 08:28:38 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-01.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1dOl77-00062X-PV for tech@mdocml.bsd.lv; Sat, 24 Jun 2017 15:28:37 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1dOl77-0000vF-Mv for tech@mdocml.bsd.lv; Sat, 24 Jun 2017 15:28:37 +0200 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1dOl77-0005Xx-I2 for tech@mdocml.bsd.lv; Sat, 24 Jun 2017 15:28:37 +0200 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id 9a12ac66 for ; Sat, 24 Jun 2017 15:28:37 +0200 (CEST) Resent-From: Ingo Schwarze Resent-Date: Sat, 24 Jun 2017 15:28:37 +0200 Resent-Message-ID: <20170624132837.GG39761@athene.usta.de> Resent-To: tech@mdocml.bsd.lv Received: from hekate.usta.de ([172.25.224.1]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1dOfXt-0007ey-4F for schwarze@smtp.usta.de; Sat, 24 Jun 2017 09:31:53 +0200 Received: from localhost ([127.0.0.1] helo=hekate.usta.de) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1dOfXn-0008Mc-8K for schwarze@usta.de; Sat, 24 Jun 2017 09:31:53 +0200 X-Spam-Checker-Version: SpamAssassin 3.3.2-usta (2011-06-06) on hekate.usta.de X-Spam-Level: X-Spam-AWL: () add to X-Spam-Bayes-Hammy: 0.000-+--H*Ad:U*tech, 0.000-+--HX-Google-DKIM-Signature:in-reply-to, 0.000-+--HX-Google-DKIM-Signature:references, 0.000-+--Hx-spam-relays-external:smtp.gmail.com, 0.000-+--mandoc X-Spam-Bayes-Spammy: X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3,URIBL_BLOCKED=0.001,_SPEC_OBFUS=1 autolearn=no version=3.3.2-usta Received: from scc-mailin-cn-01.scc.kit.edu ([141.52.226.150]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1dOfXn-0005Xk-7S for schwarze@usta.de; Sat, 24 Jun 2017 09:31:47 +0200 X-SCC-Debug-Zeilenzahl: 266 X-Scan-Signature: 9a4e6d6dbc5ead35dd50ba4e4dde5470 X-SCC-Spam-Status: no, hits=-1.9 required=5.0 X-SCC-Spam-Level: - X-SCC-RSpam-Status: Action: no action Symbol: FORGED_SENDER(0.30) Symbol: ARC_NA(0.00) Symbol: BAYES_SPAM(0.00) Symbol: TO_DN_SOME(0.00) Symbol: IP_SCORE(0.00) Symbol: RCPT_COUNT_TWO(0.00) Symbol: FROM_NEQ_ENVFROM(0.00) Symbol: TO_MATCH_ENVRCPT_SOME(0.00) Symbol: MX_GOOD(-0.10) Symbol: RCVD_IN_DNSWL_LOW(0.00) Symbol: RCVD_NO_TLS_LAST(0.00) Symbol: DMARC_NA(0.00) Symbol: R_DKIM_ALLOW(-0.20) Symbol: RCVD_COUNT_THREE(0.00) Symbol: PREVIOUSLY_DELIVERED(0.00) Symbol: FROM_HAS_DN(0.00) Symbol: ASN(0.00) Symbol: MIME_GOOD(-0.10) Symbol: R_SPF_NA(0.00) Message-ID: 61002.1498289497@cathet.us hits=-0.1 X-Scan-Server: scc-mailin-cn-01.scc.kit.edu Received: from mail-it0-x22f.google.com ([2607:f8b0:4001:c0b::22f]) by scc-mailin-cn-01.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (envelope-from ) id 1dOfXh-0004mK-VZ for schwarze@usta.de; Sat, 24 Jun 2017 09:31:47 +0200 Received: by mail-it0-x22f.google.com with SMTP id v202so485238itb.1 for ; Sat, 24 Jun 2017 00:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cathet-us.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:in-reply-to:references:comments :mime-version:content-id:date:message-id; bh=8MUxl5o9g+qvcKXaNzreSYGN8aq71VivRNmKXQ7W2ZQ=; b=S42bREDJc7Ifew1sFLqch4aNkfo7QZhYUSv8sDaepk5XoxrXKsoILb3d7no532PShP DbNHQ8eW3s/SXIcmRKV8IdddYbpZDt7ekXIiFan2FL3/AWhqhRvavJyQ0n6xpguIL+VU +wDctOHVpDktYfcdcicK4eRmKwyD8YjkZyLqv1Bm50V+ShC1jOAz3q4BbUpcSE52LsRM zCqxnoRNYZ48hNSLFDzUn+OMWI6W1xl/UTMdEyXOw/7rM8KwLtXWu5+/f0l1bLYxX5TQ Lr4yVEA+UI6BFWk2rrWFbasyRTSdFwOYaN7OBkG1yn/bhINJxgnlfAjXgOtPTpQ5vKKm kmJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :comments:mime-version:content-id:date:message-id; bh=8MUxl5o9g+qvcKXaNzreSYGN8aq71VivRNmKXQ7W2ZQ=; b=tnOS+7CeZM3A5NINu97fV2S8bWBKLwVyGbaPG6wU46eXoQ9aF9TbhQjspV5cWV6Kdp ilO+Hfs431zgpBK1LE+N0PxxEoSqkzR6xHb4TwzplWBnrwTcHUNYZleobC82t2lBSCTl OL5cx18b6AvT6hqKgQZjw+2BmJjclH9YVz/k0/+dIa2q/GdQuydBNdllqgnjBUEHqeAH k82R2vNqtbT3LSiIWzc8FZu+DPbSeF4ngePfuT3dGckgijIKZQEnFmrZRUUpFN2I3gkh GFSc8HNzmwsHqrhZgMVGSOZnsfPjgn0cTqSmI9/tWBxLdqdCRdp/EZtxZUausSjAH6rM pe3A== X-Gm-Message-State: AKS2vOzQr3EJ2JO88ADv+kg7o0CkQPRWwl2pcgfg3fHnXy+yJIA/8cLW DLQVERUVfmw4q+sXB3w= X-Received: by 10.36.22.17 with SMTP id a17mr613765ita.40.1498289499485; Sat, 24 Jun 2017 00:31:39 -0700 (PDT) Received: from cathet.us. (75-161-126-169.albq.qwest.net. [75.161.126.169]) by smtp.gmail.com with ESMTPSA id n65sm4197522itg.23.2017.06.24.00.31.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Jun 2017 00:31:38 -0700 (PDT) Sender: "Anthony J. Bentley" Received: from cathet.us (localhost [127.0.0.1]) by cathet.us. (OpenSMTPD) with ESMTP id 4a80e26b; Sat, 24 Jun 2017 01:31:37 -0600 (MDT) From: "Anthony J. Bentley" To: Ingo Schwarze cc: tech@mdocml.bsd.lv Subject: Re: MT and ME macros In-reply-to: <20170623134418.GA89450@athene.usta.de> References: <81293.1498196746@cathet.us> <20170623134418.GA89450@athene.usta.de> Comments: In-reply-to Ingo Schwarze message dated "Fri, 23 Jun 2017 15:44:18 +0200." X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <65464.1498289497.1@cathet.us> Date: Sat, 24 Jun 2017 01:31:37 -0600 Message-ID: <61002.1498289497@cathet.us> Hi Ingo, Ingo Schwarze writes: > you have OpenBSD but not bsd.lv commit access, right? > So you should better send patches against OpenBSD, such that > i can provide proper OKs. Sure. I only diffed against bsd.lv since man(7) is in the same directory there. > > - UR prints < >, not \(la \(ra. (Sigh...) > > Admittedly, groff prints \(la and \(ra for both .UR and .MT. > For .MT, that is clearly wrong. The SMTP RFC syntax for the > SMTP From:, To:, etc. lines requires the ASCII characters for > enclosing the email address. So we should send a patch to groff. > Do you agree? Yes. > Regarding .UR, i'm on the fence. The is no formal syntax of any > kind for enclosing URIs in angle brackets, or is there? If there > isn't, then maybe typographic angle brackets look nicer than ASCII > ones. Then again, i tend to value consistency with .MT more than > that, so maybe i'd rather move .UR to ASCII delimiters in groff. > But that should be a separate patch sent to groff because it's > maybe more contentious. Do you agree? I don't think typographic angle brackets necessarily look nicer. With typographic double quotes, there are literally centuries of precedent, and ASCII's limitations were a step backward in terms of print quality. But I'm not aware of any precedent for using typographic angle brackets around URIs. RFC 2396 and https://www.w3.org/Addressing/URL/5.1_Wrappers.html both make passing reference to angle brackets, but are clearly referring only to < >. So I would prefer this to be changed in groff as well. It shouldn't be contentious, as UR and MT are clearly related macros. > Do you want to rework your patch according to the hints below, > in order to ultimately commit it yourself? Yes. Take 2: Index: share/man/man7/man.7 =================================================================== RCS file: /cvs/src/share/man/man7/man.7,v retrieving revision 1.47 diff -u -p -r1.47 man.7 --- share/man/man7/man.7 7 May 2017 21:44:33 -0000 1.47 +++ share/man/man7/man.7 24 Jun 2017 07:24:38 -0000 @@ -466,6 +466,20 @@ See also .Sx \&PP , and .Sx \&TP . +.Ss \&ME +End a mailto block. +This is a non-standard GNU extension, included only for compatibility. +See +.Sx \&MT . +.Ss \&MT +Begin a mailto block. +This is a non-standard GNU extension, included only for compatibility. +It has the following syntax: +.Bd -literal -offset indent +.Pf \. Sx \&MT Ar address +link description to be shown +.Pf \. Sx ME +.Ed .Ss \&OP Optional command-line argument. This is a non-standard GNU extension, included only for compatibility. Index: usr.bin/mandoc/man_html.c =================================================================== RCS file: /cvs/src/usr.bin/mandoc/man_html.c,v retrieving revision 1.96 diff -u -p -r1.96 man_html.c --- usr.bin/mandoc/man_html.c 8 Jun 2017 12:54:40 -0000 1.96 +++ usr.bin/mandoc/man_html.c 24 Jun 2017 07:24:38 -0000 @@ -103,6 +103,8 @@ static const struct htmlman __mans[MAN_M { NULL, NULL }, /* EE */ { man_UR_pre, NULL }, /* UR */ { NULL, NULL }, /* UE */ + { man_UR_pre, NULL }, /* MT */ + { NULL, NULL }, /* ME */ }; static const struct htmlman *const mans = __mans - MAN_TH; @@ -227,6 +229,7 @@ print_man_node(MAN_ARGS) case MAN_P: /* reopen .nf in the body. */ case MAN_RS: case MAN_UR: + case MAN_MT: fillmode(h, MAN_fi); break; default: @@ -641,11 +644,17 @@ man_RS_pre(MAN_ARGS) static int man_UR_pre(MAN_ARGS) { + char *cp; n = n->child; assert(n->type == ROFFT_HEAD); if (n->child != NULL) { assert(n->child->type == ROFFT_TEXT); - print_otag(h, TAG_A, "cTh", "Lk", n->child->string); + if (n->tok == MAN_MT) { + mandoc_asprintf(&cp, "mailto:%s", n->child->string); + print_otag(h, TAG_A, "cTh", "Mt", cp); + free(cp); + } else + print_otag(h, TAG_A, "cTh", "Lk", n->child->string); } assert(n->next->type == ROFFT_BODY); Index: usr.bin/mandoc/man_macro.c =================================================================== RCS file: /cvs/src/usr.bin/mandoc/man_macro.c,v retrieving revision 1.84 diff -u -p -r1.84 man_macro.c --- usr.bin/mandoc/man_macro.c 17 Jun 2017 16:47:29 -0000 1.84 +++ usr.bin/mandoc/man_macro.c 24 Jun 2017 07:24:38 -0000 @@ -73,6 +73,8 @@ const struct man_macro __man_macros[MAN_ { in_line_eoln, MAN_BSCOPE }, /* EE */ { blk_exp, MAN_BSCOPE }, /* UR */ { blk_close, MAN_BSCOPE }, /* UE */ + { blk_exp, MAN_BSCOPE }, /* MT */ + { blk_close, MAN_BSCOPE }, /* ME */ }; const struct man_macro *const man_macros = __man_macros - MAN_TH; @@ -214,6 +216,9 @@ blk_close(MACRO_PROT_ARGS) break; case MAN_UE: ntok = MAN_UR; + break; + case MAN_ME: + ntok = MAN_MT; break; default: abort(); Index: usr.bin/mandoc/man_term.c =================================================================== RCS file: /cvs/src/usr.bin/mandoc/man_term.c,v retrieving revision 1.160 diff -u -p -r1.160 man_term.c --- usr.bin/mandoc/man_term.c 17 Jun 2017 13:05:47 -0000 1.160 +++ usr.bin/mandoc/man_term.c 24 Jun 2017 07:24:38 -0000 @@ -126,6 +126,8 @@ static const struct termact __termacts[M { pre_literal, NULL, 0 }, /* EE */ { pre_UR, post_UR, 0 }, /* UR */ { NULL, NULL, 0 }, /* UE */ + { pre_UR, post_UR, 0 }, /* MT */ + { NULL, NULL, 0 }, /* ME */ }; static const struct termact *termacts = __termacts - MAN_TH; Index: usr.bin/mandoc/man_validate.c =================================================================== RCS file: /cvs/src/usr.bin/mandoc/man_validate.c,v retrieving revision 1.101 diff -u -p -r1.101 man_validate.c --- usr.bin/mandoc/man_validate.c 17 Jun 2017 22:40:27 -0000 1.101 +++ usr.bin/mandoc/man_validate.c 24 Jun 2017 07:24:38 -0000 @@ -87,6 +87,8 @@ static const v_check __man_valids[MAN_MA NULL, /* EE */ post_UR, /* UR */ NULL, /* UE */ + post_UR, /* MT */ + NULL, /* ME */ }; static const v_check *man_valids = __man_valids - MAN_TH; @@ -208,7 +210,7 @@ post_UR(CHKARGS) if (n->type == ROFFT_HEAD && n->child == NULL) mandoc_vmsg(MANDOCERR_UR_NOHEAD, man->parse, - n->line, n->pos, "UR"); + n->line, n->pos, roff_name[n->tok]); check_part(man, n); } Index: usr.bin/mandoc/mandoc.1 =================================================================== RCS file: /cvs/src/usr.bin/mandoc/mandoc.1,v retrieving revision 1.125 diff -u -p -r1.125 mandoc.1 --- usr.bin/mandoc/mandoc.1 17 Jun 2017 23:06:43 -0000 1.125 +++ usr.bin/mandoc/mandoc.1 24 Jun 2017 07:24:38 -0000 @@ -1225,6 +1225,7 @@ A .Ic \&Bl , .Ic \&D1 , .Ic \&Dl , +.Ic \&MT , .Ic \&RS , or .Ic \&UR @@ -1360,6 +1361,8 @@ An empty pair of square brackets is show .It Sy "missing resource identifier, using \(dq\(dq" .Pq man The +.Ic \&MT +or .Ic \&UR macro is invoked without any argument. An empty pair of angle brackets is shown. @@ -1712,7 +1715,7 @@ An .Xr mdoc 7 block closing macro, a .Xr man 7 -.Ic \&RE +.Ic \&MT , \&RE or .Ic \&UE macro, an @@ -1746,7 +1749,7 @@ At the end of the document, an explicit block, a .Xr man 7 next-line scope or -.Ic \&RS +.Ic \&MT , \&RS or .Ic \&UR block, an equation, table, or @@ -1918,6 +1921,7 @@ A macro or request is invoked with too m .Bl -dash -offset 2n -width 2n -compact .It .Ic \&Fo , +.Ic \&MT , .Ic \&PD , .Ic \&RS , .Ic \&UR , Index: usr.bin/mandoc/roff.c =================================================================== RCS file: /cvs/src/usr.bin/mandoc/roff.c,v retrieving revision 1.187 diff -u -p -r1.187 roff.c --- usr.bin/mandoc/roff.c 18 Jun 2017 17:35:40 -0000 1.187 +++ usr.bin/mandoc/roff.c 24 Jun 2017 07:24:39 -0000 @@ -328,7 +328,7 @@ const char *__roff_name[MAN_MAX + 1] = { "RE", "RS", "DT", "UC", "PD", "AT", "in", "OP", "EX", "EE", "UR", - "UE", NULL + "UE", "MT", "ME", NULL }; const char *const *roff_name = __roff_name; Index: usr.bin/mandoc/roff.h =================================================================== RCS file: /cvs/src/usr.bin/mandoc/roff.h,v retrieving revision 1.37 diff -u -p -r1.37 roff.h --- usr.bin/mandoc/roff.h 17 Jun 2017 22:40:27 -0000 1.37 +++ usr.bin/mandoc/roff.h 24 Jun 2017 07:24:39 -0000 @@ -473,6 +473,8 @@ enum roff_tok { MAN_EE, MAN_UR, MAN_UE, + MAN_MT, + MAN_ME, MAN_MAX }; -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv