Subject: Re: Last Call: <draft-ietf-netmod-artwork-folding-07.txt> (Handling Long Lines in Inclusions in Internet-Drafts and RFCs) to Best Current Practice

From: Paul Kyzivat <[email-masked]>
Date: Thu, 1 Aug 2019 20:08:55 -0400

Kent,

On 7/31/19 3:41 PM, Kent Watsen wrote:
> Hi Paul,
> 
> Thanks for your comments!
> 
> 
>> 1) Section 6.2 recommends only using double backslash folding if 
>> single backslash folding doesn't work. But all the examples in section 
>> 9 violate this.
> 
> True, but these example illustrate the algorithm itself, and so seem 
> okay, or is your suggestion to add text stating this?

My suggestion is to use an example that would force the use of double 
backslash folding. This would mean that the the examples wouldn't be for 
the same text, but I don't think that is a problem. This would allow you 
to show the various forms that force use of double backslash folding.

> FWIW, the `rfcfold` script in the appendix of the draft was used on all 
> the examples in Section 9.  By default, the `rfcfold` script follows the 
> recommendation (i.e., single before double), but also accepts a 
> command-line option to specify the folding strategy to use.  For the 
> examples in section 9, this command-line option  was used.
> 
> 
>> 2) Regarding forced folding in section 8.2.1: step 1 (Determine where 
>> the fold will occur) could benefit from some elaboration regarding 
>> lines that require forced folding. In particular, when an input line 
>> flagged for forced folding ends in backslash, then it must indeed be 
>> folded before the last character, while in all other cases it can be 
>> folded at any position prior to the max line length. (While this is 
>> obvious if you think about it, some might miss this.)
> 
> Your comment goes to step 1, are you suggesting a modification such as 
> the following?
> 
> OLD
>      1. Determine where the fold will occur. This location MUST be 
> before or at the desired maximum column.
> 
> NEW
>      1. Determine where the fold will occur. This location MUST be 
> before or at the desired maximum column.  In the case of a forced 
> folding, the location MUST be before or at the end of the line.

Not quite. I think:

      1. Determine where the fold will occur. This location MUST be 
before or at the desired maximum column.  This (of course) MUST be prior 
to the last character on the line. In the case of a forced folding, this 
may precede the desired maximum column.

(Or do you want to allow the degenerate case where the line is folded at 
the end, so the continuation contains nothing?)

>> Also, there should be examples of forced folding.
> 
> Agreed.

If forced folding example(s) are *added* then I think it is fine to 
retain the existing example done both ways.

	Thanks,
	Paul

---

From: Erik Auerswald <[email-masked]>
Date: Fri, 2 Aug 2019 15:22:05 +0200

Hi Paul,

I'll try to elaborate on my understanding of "forced folding" below:

On 02.08.19 02:08, Paul Kyzivat wrote:
>> [...]

If the original text data contains the folding sequence, one line of
that text data ends in a backslash. If such a line is folded before
the backslash, the folded data still contains the folding sequence that
came from the original text data (in addition to the folding sequences
inserted by folding).

As I see it, forced folding would insert a new folding sequence inside
of the original folding sequence.

Example before folding:

foo\
   \bar

Example after folding:

== NOTE: '\\' line wrapping per BCP XX (RFC XXXX) ==

foo\\
\
   \bar

A line that requires forced folding and that is already of maximum
length would be lengthened by forced folding, thus it would need to
be folded twice.

This, of course, shows that unfolding must not recursively try to
unfold an already unfolded part of a line again.

> [...]

I'd say that this degenerate case is required for forced folding to
work.

Thanks,
Erik

---

From: Paul Kyzivat <[email-masked]>
Date: Fri, 2 Aug 2019 12:16:34 -0400

On 8/2/19 9:22 AM, Erik Auerswald wrote:
>>>> 2) Regarding forced folding in section 8.2.1: step 1 (Determine 
>>>> where the fold will occur) could benefit from some elaboration 
>>>> regarding lines that require forced folding. In particular, when an 
>>>> input line flagged for forced folding ends in backslash, then it 
>>>> must indeed be folded before the last character, while in all other 
>>>> cases it can be folded at any position prior to the max line length. 
>>>> (While this is obvious if you think about it, some might miss this.)
> 

OK. I was still thinking of it a bit wrong.

>> (Or do you want to allow the degenerate case where the line is folded 
>> at the end, so the continuation contains nothing?)
> 

Yeah, it seems so. It would be silly to do in any other case, but I 
guess it is not forbidden.

But now that I am thinking about this, it occurs to me that maybe the 
two methods can be collapsed into one:

just make the sequence to be inserted for folding be (using ABNF):

"\" %x0C [%x0A] *" " ["\"]

The trailing backslash only needs to be inserted if the character 
following it is a space or backslash. (IOW it is *optional* if the net 
character is *not* space or backslash.)

So, when removing the folding, upon finding ("\" %x0C [%x0A] *" ") you 
remove that and if there is then a backslash remove that too.

	Thanks,
	Paul

---

From: Richard Barnes <[email-masked]>
Date: Fri, 2 Aug 2019 13:22:35 -0500

I have no objection to publishing this document, but the fact that it is
needed is a clear indication that the RFC series has failed to keep up with
the needs of its consumers.  Hopefully the new RSE will be able to address
this disconnect, among others.

--Richard

On Tue, Jul 30, 2019 at 3:44 PM The IESG <[email-masked]> wrote:

>
> The IESG has received a request from the Network Modeling WG (netmod) to
> consider the following document: - 'Handling Long Lines in Inclusions in
> Internet-Drafts and RFCs'
>   <draft-ietf-netmod-artwork-folding-07.txt> as Best Current Practice
>
> The IESG plans to make a decision in the next few weeks, and solicits final
> comments on this action. Please send substantive comments to the
> [email-masked] mailing lists by 2019-08-13. Exceptionally, comments may be
> sent to [email-masked] instead. In either case, please retain the
> beginning of
> the Subject line to allow automated sorting.
>
> Abstract
>
>
>    This document defines two strategies for handling long lines in
>    width-bounded text content.  One strategy is based on the historic
>    use of a single backslash ('\') character to indicate where line-
>    folding has occurred, with the continuation occurring with the first
>    non-space (' ') character on the next line.  The second strategy
>    extends the first strategy by adding a second backslash character to
>    identify where the continuation begins and thereby able to handle
>    cases not supported by the first strategy.  Both strategies use a
>    self-describing header enabling automated reconstitution of the
>    original content.
>
>
>
>
> The file can be obtained via
> https://datatracker.ietf.org/doc/draft-ietf-netmod-artwork-folding/
>
> IESG discussion can be tracked via
> https://datatracker.ietf.org/doc/draft-ietf-netmod-artwork-folding/ballot/
>
>
> No IPR declarations have been submitted directly on this I-D.
>
>
>
>
> _______________________________________________
> IETF-Announce mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/ietf-announce
>

---

From: Kent Watsen <[email-masked]>
Date: Fri, 2 Aug 2019 19:15:13 +0000

Hi Paul,

> But now that I am thinking about this, it occurs to me that maybe the two methods can be collapsed into one:
> 
> The trailing backslash only needs to be inserted if the character following it is a space or backslash. (IOW it is *optional* if the next character is *not* space or backslash.)
> 
> So, when removing the folding, upon finding ("\" %x0C [%x0A] *" ") you remove that and if there is then a backslash remove that too.

Are you suggesting a hybrid approach where, within a folded file, a line may be folded one way one the other based on context?  Would that detract from readability?

FWIW, I just posted -08 that adds forced-folding support to the single-backslash strategy as well as a couple forced folding examples.   

	https://tools.ietf.org/html/draft-ietf-netmod-artwork-folding-08 <https://tools.ietf.org/html/draft-ietf-netmod-artwork-folding-08>

Thank you for requesting these examples, as an issue in the `rfcfold` script was found and fixed.

Kent // as co-author