bugGNU troff - Bugs: bug #59481, [PATCH] m4/groff.m4: tweak...

 
 

bug #59481: [PATCH] m4/groff.m4: tweak warnings for missing uchardet library

Submitted by:  Dave <barx>
Submitted on:  Thu 19 Nov 2020 12:03:34 AM UTC  
 
Category:  Preprocessor preconv Severity:  2 - Minor
Item Group:  Build/Installation 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.

 

Sun 14 Mar 2021 05:33:50 AM UTC, comment #3: 

Updated patch attached.  The question in the post cited in comment #2 was never addressed, but based on the reasoning in that post, I went ahead and removed the questionable part of the warning.  Bertrand, please speak up if you have any objection to this.

(file #51057)

Dave <barx>
Project Member
Sat 21 Nov 2020 01:38:56 PM UTC, comment #2: 

Now-bogus patch removed.

New patch pending, awaiting an answer to a question (http://lists.gnu.org/archive/html/groff/2020-11/msg00112.html) to Bertrand about the need for the "preconv might not work properly" part of the first warning.

Dave <barx>
Project Member
Thu 19 Nov 2020 12:20:26 AM UTC, comment #1: 

Serendipity: at the same time I was filing this bug report, Bertrand was filing commit 34130e9f, which solved the primary problem.  The comma splice and the "Could not found" wording remain; I can update the patch, but might wait a bit in case more changes got committed while I was writing this comment.

Dave <barx>
Project Member
Thu 19 Nov 2020 12:03:34 AM UTC, original submission:  

Overview

The attached patch concerns the warnings generated by "configure" on a system that doesn't have a uchardet library.  It slightly alters the text of these warnings.

These warnings were introduced in commit 75c0873c.  As Branden points out (http://lists.gnu.org/archive/html/groff/2020-11/msg00084.html), this commit was in groff 1.22.4 and has garnered no complaint until now, so there is no particular urgency to apply this patch.

The problem

If uchardet is not found, these two warnings appear:

configure:20532: WARNING: uchardet library not found, preconv might not work properly

configure:26790: WARNING:
  uchardet library was not found; preprocessor 'preconv', which uses it to detect
  the input file encoding, might not work properly (to check how and in which
  order 'preconv' tries to determine the file encoding, see its man page).

The vagueness of the phrase "might not work properly" can imply the problem is more serious than it is.  If the warning explained exactly what might not work, users could determine for themselves how serious it is (which, in most cases, is not very: this library's absence only eliminates one method (out of six documented) of determining the input's encoding--and the method in question is an educated guess, so it "might not work" even with the uchardet library).

The solution

The attached patch fixes the first warning by removing the "preconv might not work properly" part altogether.  This one is generated at the time the library's absence is discovered; the consequences of this absence should be saved for the later, more visible, more verbose warning.  (As trivial side effects, this also eliminates the comma splice and keeps the message under 80 columns.)

The second is rewritten to say:

  uchardet library was not found; preprocessor 'preconv' will skip this method
  of attempting to determine the input encoding.  (To check how and in what
  order 'preconv' tries to determine the encoding, see its man page.)

In addition to being more precise about the effect, I've also edited "input file encoding" down to simply "input encoding" (since preconv's input needn't be from a file) and shortened the lines to be under 80 columns.

The patch also corrects one nonstandard English construction in a related warning.

Further refinements welcome.

Dave <barx>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #51057:  groff.m4.patch added by barx (867B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx
  • -email is unavailable- added by barx (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-14 barx Attached File- => Added groff.m4.patch, #51057
        StatusNeed Info => None
        Summarym4/groff.m4: tweak warnings for missing uchardet library => [PATCH] m4/groff.m4: tweak warnings for missing uchardet library
        Carbon-Copy- => Added bgarrigues
    2020-11-21 barx StatusNone => Need Info
        Summary[PATCH] m4/groff.m4: tweak warnings for missing uchardet library => m4/groff.m4: tweak warnings for missing uchardet library
    2020-11-21 barx Attached File#50302 => Removed
    2020-11-19 barx Attached File- => Added groff.m4.patch, #50302

    Back to the top


    Powered by Savane 3.6