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'... William On Sat, 7 Nov 2020 at 05:07, Carsten Bormann <[email protected]> wrote: > On 2020-11-07, at 01:06, Michael Richardson <[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] > https://www.ietf.org/mailman/listinfo/netmod >
_______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
