bugGNU roff - Bugs: bug #58746, [PATCH] doc/groff.texi: Mention...

 
 

bug #58746: [PATCH] doc/groff.texi: Mention that .ds with only one argument defines an empty string

Submitter:  Dave <barx>
Submitted:  Sat 11 Jul 2020 10:26:08 AM UTC
   
 
Category:  Core Severity:  3 - Normal
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
   

Sun 05 Feb 2023 07:24:45 AM UTC, comment #2: 

Hmm, back then I hadn't learned how to use `--author` yet.


commit 42626cef932cd3aed4335aa9682112ab3a6d3ecb
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Jul 16 21:30:11 2020 +1000
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Thu Jul 16 21:30:11 2020 +1000

    doc/groff.texi: Document 1-argument .ds behavior.

    * doc/groff.texi (Strings): Document behavior of .ds request when only
      one argument is supplied.  (The string is defined as empty.)  Thanks
      to Dave Kemper for the report and the patch.

    Fixes <https://savannah.gnu.org/bugs/index.php?58746>.


G. Branden Robinson <gbranden>
Group administrator
Thu 16 Jul 2020 12:20:49 PM UTC, comment #1: 

Fixed in 42626cef932cd3aed4335aa9682112ab3a6d3ecb.

G. Branden Robinson <gbranden>
Group administrator
Sat 11 Jul 2020 10:26:08 AM UTC, original submission:  

This is easy to figure out, but the manual may as well spell it out.

As a real-world use case, I recently had need to build up a roff string inside a loop, each iteration appending to the string, a la:

.while CONDITION .ds mystring \\*[mystring] and then some

To avoid a warning, I had to initialize "mystring" before the loop.  I first looked in the manual to find out how to define an empty string; finding no answer there, I tried the obvious thing, and it worked.

"The obvious thing" having such a spotty track record in *roff syntax in general, it's probably worth documenting that this one actually does do what you would hope.  Suggested patch attached.

Dave <barx>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #49462:  empty_string.patch added by barx (1KiB - text/x-patch - doc/groff.texi: add one sentence, improve nearby punctuation)

 

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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-16 gbranden StatusNone Fixed
        Assigned toNone gbranden
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2020-07-11 barx Attached File- Added empty_string.patch, #49462

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code