bugGNU roff - Bugs: bug #62717, [me] persistence of $s register...

 
 

bug #62717: [me] persistence of $s register undocumented

Submitter:  Dave <barx>
Submitted:  Thu 07 Jul 2022 11:44:11 AM UTC
   
 
Category:  Macro me Severity:  2 - Minor
Item Group:  Documentation Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 06 Oct 2022 01:19:32 PM UTC, comment #4: 


commit 911fffd3595704a864f326d5d23f204e8786d191
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Oct 5 23:42:23 2022 -0500

    doc/meref.me.in: Fix Savannah #62717.

    * doc/meref.me.in (Columnated Output): Document persistence of `$s`
      register value across columnation mode changes.

    Fixes <https://savannah.gnu.org/bugs/?62717>.  Thanks to Dave Kemper for
    the report.


G. Branden Robinson <gbranden>
Group administrator
Wed 24 Aug 2022 05:39:31 AM UTC, comment #3: 

Another .2c documentation change is proposed in bug #62801, so that and this might end up being easier to make in tandem.

Dave <barx>
Group Member
Sun 17 Jul 2022 12:41:06 PM UTC, comment #2: 

Confirmed.


$ cat EXPERIMENTS/gutter.me
.de SENTENCE
Like a dull knife that just ain't cuttin',
you're just talkin' loud and sayin' nothin'.
..
.de TEXT
.  2c \\$1
.  SENTENCE
.  bc
.  SENTENCE
.  1c
.  sp
.  SENTENCE
.  sp
..
.TEXT 10n
.TEXT
.TEXT -7n
.pl \n[nl]u
$ nroff -me EXPERIMENTS/gutter.me







Like  a  dull  knife that          Like a  dull  knife  that
just    ain’t    cuttin’,          just    ain’t    cuttin’,
you’re  just talkin’ loud          you’re just talkin’  loud
and sayin’ nothin’.                and sayin’ nothin’.

Like  a  dull  knife  that  just  ain’t cuttin’, you’re just
talkin’ loud and sayin’ nothin’.

Like a  dull  knife  that          Like  a  dull  knife that
just    ain’t    cuttin’,          just    ain’t    cuttin’,
you’re just talkin’  loud          you’re  just talkin’ loud
and sayin’ nothin’.                and sayin’ nothin’.

Like a dull knife  that  just  ain’t  cuttin’,  you’re  just
talkin’ loud and sayin’ nothin’.

Like  a dull knife that just   Like a dull knife that  just
ain’t cuttin’,  you’re  just   ain’t  cuttin’,  you’re just
talkin’   loud   and  sayin’   talkin’  loud   and   sayin’
nothin’.                       nothin’.

Like  a  dull  knife  that  just  ain’t cuttin’, you’re just
talkin’ loud and sayin’ nothin’.


G. Branden Robinson <gbranden>
Group administrator
Sat 16 Jul 2022 04:23:23 AM UTC, comment #1: 

original submission:

> it's retained and will be used as the gutter of the next call
> to .2c if that call is not given a gutter value.


...or as the starting basis for the calculation if .2c is given a relative gutter value.

The fact that the gutter parameter can be relative at all (a fact that I overlooked earlier) might well imply that $s persists, since only then does the ability to take a relative value make much sense.  While the manual doesn't say what the parameter is relative to, the value of $s is the logical choice.

So one could make the case that the documentation is fine as-is.  But pointing out the above two points might give it extra clarity, since they're currently left to inference.  The -me manual tends toward the terse side but does strive to be complete.  Anyone have thoughts on this?

Dave <barx>
Group Member
Thu 07 Jul 2022 11:44:11 AM UTC, original submission:  

I discovered this potential documentation gap when poking around bug #61671, but it's really a separate issue, one that existed before that bug's commit 01cf10eb and continues to exist after it.

-me's .2c is documented to set the $s register to the space between columns (a.k.a. the gutter).  Once .1c is invoked, though, this value is no longer meaningful, so one might reasonably expect it to be discarded.  But it is not; it's retained and will be used as the gutter of the next call to .2c if that call is not given a gutter value.  (When .2c is given two parameters: before the bug #61671 fix, not specifying a gutter provoked a warning, but worked anyway; after that fix, it works without complaint.)

The manual would seem to be clearer if it expressly stated $s's persistence.

Input to demonstrate the phenomenon:

.2c 10n
These are a bunch of words that say absolutely nothing.
.bc
These are a bunch of words that say absolutely nothing.
.1c
.sp
These are a bunch of words that say absolutely nothing.
.sp
.2c
These are a bunch of words that say absolutely nothing.
.bc
These are a bunch of words that say absolutely nothing.


Dave <barx>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 barx (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-06 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2022-10-06 gbranden StatusConfirmed In Progress
        Assigned toNone gbranden
    2022-07-17 gbranden Severity1 - Wish 2 - Minor
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code