Subject: [netmod] artwork folding: dual support modes?

From: Kent Watsen <[email-masked]>
Date: Mon, 25 Feb 2019 22:21:40 +0000

I had a chat with the tools team recently and, in the course of things, it was implied
that the double backslash approach we have now was both surprising and non-intuitive. 

This got me thinking that we may have thrown the proverbial baby out with the bathwater.
That is, currently we have a header that reads:

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

So why not *also* support a header that reads (note the singe slash):

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

Whereby this second form only supports the folded line continuing on column 1 (no indents).

Thoughts?

Kent // contributor

---

From: "Adrian Farrel" <[email-masked]>
Date: Tue, 26 Feb 2019 22:26:45 -0000

Hey.

I've been having this discussion with Kent off-line, but thought it should
come to the list.

I don't think it is a good idea to have two approaches. While it would be
relatively easy to code for both approaches, it seems to add a degree of
confusion if both have to be handled by the same code (consider deciding
whether leading space characters are to be retained or not, something that
can only be decided when the first non-space character is found), or by
having different code for the two different cases.

It doesn't seem to me that both cases are needed. We can pick one or the
other.

And *if* we want to allow manual folding so that indents can be made to make
the document more human-readable then we have to use a leading '\' on
continuation lines to show which spaces should be stripped and which
retained.

Cheers,

Adrian

From: netmod <[email-masked]> On Behalf Of Kent Watsen
Sent: 25 February 2019 22:22
To: [email-masked]
Subject: [netmod] artwork folding: dual support modes?

I had a chat with the tools team recently and, in the course of things, it
was implied

that the double backslash approach we have now was both surprising and
non-intuitive. 

This got me thinking that we may have thrown the proverbial baby out with
the bathwater.

Whereby this second form only supports the folded line continuing on column
1 (no indents).

Thoughts?

Kent // contributor

---

From: Joel Jaeggli <[email-masked]>
Date: Tue, 26 Feb 2019 22:31:23 -0800

> On Feb 26, 2019, at 14:26, Adrian Farrel <[email-masked]> wrote:
> 
> Hey.
>  
> I’ve been having this discussion with Kent off-line, but thought it should come to the list.
>  
> I don’t think it is a good idea to have two approaches. While it would be relatively easy to code for both approaches, it seems to add a degree of confusion if both have to be handled by the same code (consider deciding whether leading space characters are to be retained or not, something that can only be decided when the first non-space character is found), or by having different code for the two different cases.
>  
> It doesn’t seem to me that both cases are needed. We can pick one or the other.

A single slash has been used to wrap long lines in editors and shells for decades at this point.

and yeah whatever it is one method seems better than two.

>  
> And *if* we want to allow manual folding so that indents can be made to make the document more human-readable then we have to use a leading ‘\’ on continuation lines to show which spaces should be stripped and which retained.
>  
> Cheers,
> Adrian
>  
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

---

From: "Adrian Farrel" <[email-masked]>
Date: Wed, 27 Feb 2019 09:40:31 -0000

Complete agreement, Joel.

What follows may look better in proportional fonts.

With a single slash we can wrap as follows

1234567        9012345

Goes to…

1234567    \

    9012345

…and unwrapping is easy.

However, if I want to manually wrap the line with indentation

The quick brown fox jumps over the lazy dog

..going to…

The quick brown fox\

      jumps over the lazy dog

…I am going to unfold as…

The quick brown fox      jumps over the lazy dog

Conversely, if I resolve this second case by stripping leading spaces I get…

The quick brown foxjumps over the lazy dog

So I have to fold as…

The quick brown fox \

      jumps over the lazy dog

But this causes the first case to unfold as

1234567    9012345

…i.e., with missing spaces.

This is what caused the use of the second slash so…

1234567    \

\    9012345

…and…

The quick brown fox\

     \ jumps over the lazy dog

So, my point is, if and only if we do not care about these “spaces on the fold” cases, we can operate with a single slash.

Cheers,

Adrian

From: Joel Jaeggli <[email-masked]> 
Sent: 27 February 2019 06:31
To: Adrian Farrel <[email-masked]>
Cc: Kent Watsen <[email-masked]>; [email-masked]
Subject: Re: [netmod] artwork folding: dual support modes?

On Feb 26, 2019, at 14:26, Adrian Farrel <[email-masked] <mailto:[email-masked]> > wrote:

Hey.

 

Cheers,

Adrian

From: netmod <[email-masked] <mailto:[email-masked]> > On Behalf Of Kent Watsen
Sent: 25 February 2019 22:22
To: [email-masked] <mailto:[email-masked]> 
Subject: [netmod] artwork folding: dual support modes?

Thoughts?

Kent // contributor

_______________________________________________
netmod mailing list
[email-masked] <mailto:[email-masked]> 
https://www.ietf.org/mailman/listinfo/netmod

---

From: "Rob Wilton (rwilton)" <[email-masked]>
Date: Wed, 27 Feb 2019 10:09:51 +0000

Hi Adrian,

I mostly agree with your last sentence.

I think that if you always preserve whitespace then a single slash is fine.  I.e. the single slash just breaks the line, and I think that this matches how editors, programming languages, etc normally behave.

What I’m not keen on is using a single slash, and then automatically stripping leading whitespace on the line following a slash.

If we want to have control of layout and be able to strip extra whitespace then my argument is that it is better to be explicit, and using two slashes is one way of achieving this.

Thanks,
Rob

From: netmod <[email-masked]> On Behalf Of Adrian Farrel
Sent: 27 February 2019 09:41
To: 'Joel Jaeggli' <[email-masked]>
Cc: [email-masked]
Subject: Re: [netmod] artwork folding: dual support modes?

1234567        9012345

Goes to…

1234567    \
    9012345

…and unwrapping is easy.

..going to…

The quick brown fox\
      jumps over the lazy dog

So I have to fold as…

The quick brown fox \
      jumps over the lazy dog

1234567    9012345

1234567    \
\    9012345

…and…

The quick brown fox\

Cheers,
Adrian

From: Joel Jaeggli <[email-masked]<mailto:[email-masked]>>
Sent: 27 February 2019 06:31
To: Adrian Farrel <[email-masked]<mailto:[email-masked]>>
Cc: Kent Watsen <[email-masked]<mailto:[email-masked]>>; [email-masked]<mailto:[email-masked]>
Subject: Re: [netmod] artwork folding: dual support modes?

On Feb 26, 2019, at 14:26, Adrian Farrel <[email-masked]<mailto:[email-masked]>> wrote:

Hey.

Cheers,
Adrian

From: netmod <[email-masked]<mailto:[email-masked]>> On Behalf Of Kent Watsen
Sent: 25 February 2019 22:22
To: [email-masked]<mailto:[email-masked]>
Subject: [netmod] artwork folding: dual support modes?

Thoughts?

Kent // contributor

_______________________________________________
netmod mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/netmod

---

From: Kent Watsen <[email-masked]>
Date: Wed, 27 Feb 2019 16:30:56 +0000

All,

There seems to be some confusion.  My original message said:

To be clear, if indents are desired, I strongly support using the double-backslash approach and
do not recommend any other approach.  

The tools team weren't looking at an indented example.  They were looking at an example where
all the continuation lines occurred on column 1.   Their surprising/non-intuitive comment stems
from only that experience.

Some additional thinking behind this:  I believe that tooling/automation will do the folding most 
of the time, and smart-indents are unlikely, thus the common-case will be to begin the continuation
line on column 1, in which case the second '\' character is not needed.   

I'm hoping to optimize for this common case scenario.

I do not agree that having having two folding approaches is an issue.   I would like to see this 
BCP have the broadest appeal possible.

Kent // contributor

> On Feb 27, 2019, at 5:09 AM, Rob Wilton (rwilton) <[email-masked]> wrote:
> 
> Hi Adrian,
>  
> From: netmod <[email-masked] <mailto:[email-masked]>> On Behalf Of Adrian Farrel
> To: 'Joel Jaeggli' <[email-masked] <mailto:[email-masked]>>
> Cc: [email-masked] <mailto:[email-masked]>
> From: Joel Jaeggli <[email-masked] <mailto:[email-masked]>> 
> To: Adrian Farrel <[email-masked] <mailto:[email-masked]>>
> Cc: Kent Watsen <[email-masked] <mailto:[email-masked]>>; [email-masked] <mailto:[email-masked]>
> On Feb 26, 2019, at 14:26, Adrian Farrel <[email-masked] <mailto:[email-masked]>> wrote:
>  
> Hey.
>  
> From: netmod <[email-masked] <mailto:[email-masked]>> On Behalf Of Kent Watsen
> https://www.ietf.org/mailman/listinfo/netmod <https://www.ietf.org/mailman/listinfo/netmod>
>  
> https://www.ietf.org/mailman/listinfo/netmod <https://www.ietf.org/mailman/listinfo/netmod>

---

From: Joel Jaeggli <[email-masked]>
Date: Wed, 27 Feb 2019 10:15:00 -0800

Sent from my iPhone

> On Feb 27, 2019, at 08:30, Kent Watsen <[email-masked]> wrote:
> 

It comes up due to the rigor required to preserve white space. In that sense it is very closely related to interpretation of tabs or the requirement to avoid them entirely. IMHO we should be rigorous about the preservation of whites space in folded artwork so my preference should reflect that. I’m not convinced that if one rigorous that the second slash is required.