bugGNU troff - Bugs: bug #57611, [PATCH] tmac/mdoc.tmac-u: Add the...

 
 

bug #57611: [PATCH] tmac/mdoc.tmac-u: Add the file name to the diagnostics

Submitted by:  Bjarni Ingi Gislason <bjarniig>
Submitted on:  Thu 16 Jan 2020 03:23:40 PM UTC  
 
Category:  Macro - mdoc Severity:  1 - Wish
Item Group:  New feature Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 07 Feb 2020 04:13:59 PM UTC, comment #3: 


tmac/doc-*: Add the input file name to diagnostics

      The files "doc-common-u" and "doc-syms-u" contain lines
    to be sent to standard error with "mdoc warning",
    but without the name of the input file.

      Add the file name to the diagnostic.

The whole patch is in the attachment.

--- a/tmac/doc-common-u
+++ b/tmac/doc-common-u

-.        tm mdoc warning: .Os: Unknown BSD version '\$2' (#\n[.c])
+.        tm \n[.F]: mdoc warning: .Os: Unknown BSD version '\$2' (#\n[.c])

-.        tm mdoc warning: .Os: Unknown FreeBSD version '\$2' (#\n[.c])
+.        tm \n[.F]: mdoc warning: .Os: Unknown FreeBSD version '\$2' (#\n[.c])

-.        tm mdoc warning: .Os: Unknown DragonFly version '\$2' (#\n[.c])
+.        tm \n[.F]: mdoc warning: .Os: Unknown DragonFly version '\$2' (#\n[.c])

-.        tm mdoc warning: .Os: Unknown NetBSD version '\$2' (#\n[.c])
+.        tm \n[.F]: mdoc warning: .Os: Unknown NetBSD version '\$2' (#\n[.c])

-.        tm mdoc warning: .Os: Unknown OpenBSD version '\$2' (#\n[.c])
+.        tm \n[.F]: mdoc warning: .Os: Unknown OpenBSD version '\$2' (#\n[.c])

-.        tm mdoc warning: .Os: Unknown Darwin version '\$2' (#\n[.c])
+.        tm \n[.F]: mdoc warning: .Os: Unknown Darwin version '\$2' (#\n[.c])

-.    tm mdoc warning: A .Bl directive has no matching .El (#\n[.c])
+.    tm \n[.F]: mdoc warning: A .Bl directive has no matching .El (#\n[.c])
-.    tm mdoc warning: A .Bd directive has no matching .Ed (#\n[.c])
+.    tm \n[.F]: mdoc warning: A .Bd directive has no matching .Ed (#\n[.c])
-.    tm mdoc warning: A .Bf directive has no matching .Ef (#\n[.c])
+.    tm \n[.F]: mdoc warning: A .Bf directive has no matching .Ef (#\n[.c])
--- a/tmac/doc-syms-u
+++ b/tmac/doc-syms-u

-.          tmc mdoc warning: .At: Unknown AT&T UNIX version
+.          tmc \n[.F]: mdoc warning: .At: Unknown AT&T UNIX version

-.          tmc mdoc warning: .Dx: Unknown DragonFly version
+.          tmc \n[.F]: mdoc warning: .Dx: Unknown DragonFly version

-.          tmc mdoc warning: .Fx: Unknown FreeBSD version
+.          tmc \n[.F]: mdoc warning: .Fx: Unknown FreeBSD version

-.          tmc mdoc warning: .Nx: Unknown NetBSD version
+.          tmc \n[.F]: mdoc warning: .Nx: Unknown NetBSD version

-.        tmc "mdoc warning: .St: Unknown standard abbreviation
+.        tmc "\n[.F]: mdoc warning: .St: Unknown standard abbreviation

-.      tmc "mdoc warning: .Lb: no description for library
+.      tmc "\n[.F]: mdoc warning: .Lb: no description for library

(file #48371)

Bjarni Ingi Gislason <bjarniig>
Tue 04 Feb 2020 07:54:05 AM UTC, comment #2: 

comment #1:

> As it stands, i object to the patch because it is blatantly incomplete.  We should either change all the mdoc diagnostics or none.


Agreed.  I have a similar, wide-ranging project regarding diagnostic messages underway in https://savannah.gnu.org/bugs/?52463 .

> Unless another developer feels like investing a lot of work into this, i think we should close it as "unimportant".  OK?


My preference is to leave it open as a task for whoever's willing to tackle it.  I do not regard it as clutter, but this ticket should serve as a catch-all for all mdoc diagnostics that (should) emit the source filename as part of their complaint.

G. Branden Robinson <gbranden>
Project Administrator
Thu 16 Jan 2020 05:15:22 PM UTC, comment #1: 

As it stands, i object to the patch because it is blatantly incomplete.  We should either change all the mdoc diagnostics or none.

It hardly matters for mdoc(7) input whether the filename is printed or not because it would be extremely bad style for mdoc(7) files to include other files or be included by other files, and i have very rarely seen such inclusions in practice (if ever), so the file the message comes from is simply the one you gave on the command line.

Then again, even though adding the file name makes the messages longer and harder to read and has no significant value, it wouldn't hurt much either.  For real-world manual pages, the vast majority of groff warnings comes directly from troff rather than from the mdoc macros, so it wouldn't add that much noise.

But given the low benefit, i don't feel like doing all that work of making the patch complete.

Unless another developer feels like investing a lot of work into this, i think we should close it as "unimportant".  OK?

Ingo Schwarze <schwarze>
Project Member
Thu 16 Jan 2020 03:23:40 PM UTC, original submission:  

From d07bd25d938b57834076da12b7fbc1422d4617d5 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Thu, 16 Jan 2020 15:09:38 +0000
Subject: [PATCH] tmac/mdoc.tmac-u: Add the file name to the diagnostics

  The name of the file was missing in the text to standard error.

  Add it to make it clear from where the messages originate.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
tmac/doc.tmac-u | 178 ++++++++++++++++++++++++------------------------
1 file changed, 89 insertions(+), 89 deletions(-)

  Compressed patch is in the attachment.

Bjarni Ingi Gislason <bjarniig>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #48371:  groff.bug added by bjarniig (6KiB - application/octet-stream)
file #48239:  tmac.doc.u.patch.gz added by bjarniig (4KiB - application/gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by schwarze (Posted a comment)
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-07 bjarniig Attached File- => Added groff.bug, #48371
    2020-01-16 schwarze Severity3 - Normal => 1 - Wish
        Item GroupNone => New feature
    2020-01-16 bjarniig Attached File- => Added tmac.doc.u.patch.gz, #48239

    Back to the top


    Powered by Savane 3.5