From: netmod <[email protected]> on behalf of William Lupton 
<[email protected]>
Sent: 09 November 2020 09:38
To: NetMod WG
Cc: [email protected]
Subject: Re: [netmod] [Tools-discuss] reflow of YANG descriptions, and general 
YANG format annoyances

I ensured that I have the latest version of the Emacs YANG mode, and find that 
M-q works well to wrap description strings, but...

  1.  Should I expect intelligent behaviour of RET and TAB when within a 
description (or other) string? I find that (in this context) RET positions the 
cursor at the start of the line, and TAB does nothing. Ideally RET might 
position the cursor at the indentation point of the previous line, or one 
character past the opening quote if this was the first line.
  2.  Wrapping (quite reasonably) can't handle cases where the author didn't in 
fact intend line breaks to be inserted. The most common cases are probably (a) 
not using a blank line as a paragraph break, (b) text was further indented 
(which often implies literal text), or (c) text started with * (or -, ...) and 
was to be interpreted as a list item.

I don't believe that RFCs 7950 and 8407 say anything about paragraph 
formatting, but most NETMOD YANG does seem to adhere to the convention that 
paragraphs should be separated by blank lines. Perhaps this could be made into 
a stronger convention?

As for the other cases (further indentation -> literal, and */- mean list 
items), of course this is getting back to the markdown discussion. I believe 
that when this has come up before the discussion has died for want of clear 
standards. However I do believe that it would be very useful to define some 
layout conventions (or rules) that allow automated reflow and other formatting, 
and personally I would take it further than just the three points that I have 
mentioned! It doesn't have to be called 'markdown'...

<tp>
In the category of general annoyance, rather than the points above, the IETF 
has abolished the page number.  Look at recent RFC and pagination has vanished. 
 The justification is that RFC are now available in different format and that 
page numbers are not consistent across the format so they must be eliminated.

This came up on RFC Interest and I asked how to reference a piece of text and 
was told that you include lots of section numbers.  I asked about 50-page YANG 
modules with no sections but this is a requirement that has escaped the 
tool-makers.  One suggestion was to include lots of numbered sub-headings, 
another to include separate sourcecode elements with an anchor for each.
One passing comment was that with v3 xml the extraction code should not be 
needed any more.  I do not understand but expect that there will be interesting 
times.

Tom Petch

William

On Sat, 7 Nov 2020 at 05:07, Carsten Bormann 
<[email protected]<mailto:[email protected]>> wrote:
On 2020-11-07, at 01:06, Michael Richardson 
<[email protected]<mailto:mcr%[email protected]>> wrote:
>
> M-q reflowed a paragraph, but made it too long with 76 columns wide.

Is your .emacs setting fill-column to a non-standard value?

C-x f 69 RET

or put

// -*- fill-column: 69 -*-

into the first line of your YANG file (in a comment)
or better

(add-hook 'yang-mode-hook
          '(lambda () (set-fill-column 69)))

in your .emacs.

Grüße, Carsten

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

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to