Dave
2020-07-11 10:26:11 UTC
URL:
<https://savannah.gnu.org/bugs/?58746>
Summary: [PATCH] doc/groff.texi: Mention that .ds with only
one argument defines an empty string
Project: GNU troff
Submitted by: barx
Submitted on: Sat 11 Jul 2020 05:26:08 AM CDT
Category: Core
Severity: 3 - Normal
Item Group: Documentation
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
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.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sat 11 Jul 2020 05:26:08 AM CDT Name: empty_string.patch Size: 1KiB
By: barx
doc/groff.texi: add one sentence, improve nearby punctuation
<http://savannah.gnu.org/bugs/download.php?file_id=49462>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58746>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
<https://savannah.gnu.org/bugs/?58746>
Summary: [PATCH] doc/groff.texi: Mention that .ds with only
one argument defines an empty string
Project: GNU troff
Submitted by: barx
Submitted on: Sat 11 Jul 2020 05:26:08 AM CDT
Category: Core
Severity: 3 - Normal
Item Group: Documentation
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
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.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sat 11 Jul 2020 05:26:08 AM CDT Name: empty_string.patch Size: 1KiB
By: barx
doc/groff.texi: add one sentence, improve nearby punctuation
<http://savannah.gnu.org/bugs/download.php?file_id=49462>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58746>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/