tag:support.multimarkdown.com,2013-02-12:/discussions/problems-v4/2649-feature-request-automatic-ordered-list-numbersMultiMarkdown Software, LLC: Discussion 2018-12-09T21:38:01Ztag:support.multimarkdown.com,2013-02-12:Comment/465573792018-11-27T14:09:58Z2018-11-27T14:09:58ZFeature Request: Automatic Ordered List Numbers<div><p>When changing indentation the numbers don't automatically update, which makes it hard to keep track of my numbered lists.</p>
<p>I really like the automatic ordered lists in Typora: <a href="https://typora.io">https://typora.io</a></p>
<p>Can you do something similar? It's really frustrating when I'm editing a big outline that the numbers don't match up.</p>
<p>Workaround: convert list type for each list will renumber ... can there be an automatic option so I don't have to toggle every list in my outline or book?</p></div>Paul Solttag:support.multimarkdown.com,2013-02-12:Comment/465573792018-11-27T14:13:28Z2018-11-27T14:13:29ZFeature Request: Automatic Ordered List Numbers<div><p>The cleanup feature doesn't renumber starting with 1.</p>
<p>That would be a requirement of this feature.</p>
<p>Sites like GitHub don't like it when the ordered list starts with a non-1 digit, which messes up formating if I copy/paste from Multimarkdown Composer</p></div>Paul Solttag:support.multimarkdown.com,2013-02-12:Comment/465573792018-11-29T17:43:16Z2018-11-29T17:43:16ZFeature Request: Automatic Ordered List Numbers<div><p>Paul,</p>
<p>My concern with this is two fold:</p>
<ol>
<li>
<p>While typing, there is sometimes a "transition" phase where<br>
something that should be a list isn't, or something that should not be a<br>
list is. I worry that modifying numbering without being asked could<br>
cause trouble during these transitions.</p>
</li>
<li>
<p>The list clean up routine is relatively complex, and I worry about<br>
undiscovered bugs (you may have even been the one to report the last<br>
list related bug??) I believe there has only been one such bug in the<br>
last 6-9 months (??), but that does not guarantee the absence of any<br>
other bugs. Applying the list cleanup for every change in a list could<br>
expose users to these bugs much more frequently, if they exist.</p>
</li>
<li>
<p>(I know I said there were only two... ;) -- I'm not convinced that<br>
forcing consistent numbering on everyone is the right thing to do. Some<br>
Markdown processors do allow custom numbering, which would break if I<br>
forced consistency. And yes, I could make this optional, but I hate<br>
adding preferences unless truly necessary.</p>
</li>
</ol>
<p>As it currently stands:</p>
<ol>
<li>
<p>As you note, if you modify an enumerated list such that numbering<br>
becomes inconsistent, you can toggle to a bulleted list and back, and<br>
the number is fixed. When you append items to the list, they<br>
automatically start with the proper numbering.</p>
</li>
<li>
<p>If you're not sure whether you have any inaccurate lists in your<br>
document, you can always select all and Clean up Selected Lists. This<br>
will reapply consistent numbering to all lists in your document.</p>
</li>
</ol>
<p>I'm not saying this will never become an automatic feature, but I worry<br>
about doing it prematurely.</p>
<p>F-</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/465573792018-11-29T17:49:34Z2018-11-29T17:49:35ZFeature Request: Automatic Ordered List Numbers<div><p>Ok, so the toggle list type is the easiest way to do this from a hotkey, so I don't need to dig into menus. That's going to be my workaround. Toggling the list type works great, and it gets the sublists to renumber too.</p>
<p>The cleanup list/all has corrupted my documents before ... so I don't trust it.</p>
<p>Smart Number Indenting</p>
<p>It's just annoying that when I indent, it doesn't reset the number to 1. I don't need you to auto renumber all the time, but I would like "smart number" indenting.</p>
<p>Feature Request: Can you make indent right make the number go back to 1?</p>
<p>Then if the automatic numbering keeps incrementing that will make me happy.</p>
<p>Right now, it just keeps counting up when I indent, throwing off all the numbering in the entire document. I'd like it to at least number things sequentially based on level of indentation.</p>
<p>Unindent should revert to the next number in the list (if there is a list).<br>
Indent should restart list item at 1.</p>
<p>Would that work?</p></div>Paul Solttag:support.multimarkdown.com,2013-02-12:Comment/465573792018-11-29T18:08:18Z2018-11-29T18:08:18ZFeature Request: Automatic Ordered List Numbers<div><blockquote>
<p>Ok, so the toggle list type is the easiest way to do this from a hotkey, so I don't need to dig into menus. That's going to be my workaround. Toggling the list type works great, and it gets the sublists to renumber too.</p>
<p>The cleanup list/all has corrupted my documents before ... so I don't trust it.</p>
</blockquote>
<p>That's what you were asking me to do with every keystroke, and why I<br>
didn't want to do it. ;) (The renumbering algorithm is part of the<br>
list clean up algorithm, which is also called when toggling list types.)</p>
<p>That said, the cleanup list feature has no existing <em>known</em> bugs, so it<br>
should be usable now. Certainly if you find any troublesome edge cases,<br>
I want to know.</p>
<p>But I'm not ready to force it on everyone while they edit lists.</p>
<blockquote>
<p>Smart Number Indenting</p>
<p>It's just annoying that when I indent, it doesn't reset the number to 1. I don't need you to auto renumber all the time, but I would like "smart number" indenting.</p>
<p>Feature Request: Can you make indent right make the number go back to 1?</p>
<p>Then if the automatic numbering keeps incrementing that will make me happy.</p>
<p>Right now, it just keeps counting up when I indent, throwing off all the numbering in the entire document. I'd like it to at least number things sequentially based on level of indentation.</p>
<p>Unindent should revert to the next number in the list (if there is a list).<br>
Indent should restart list item at 1.</p>
<p>Would that work?</p>
</blockquote>
<p>This would still require using the clean list algorithm, exposing you to<br>
the risk of undiscovered bugs, as above.</p>
<p>To summarize:</p>
<ol>
<li>
<p>All the options you discuss end in the same clean up code ("all<br>
roads lead to Rome")</p>
</li>
<li>
<p>After latest edge-case bug fix, I have not had any further reports<br>
of issues in the algorithm (but absence of evidence is not evidence of<br>
absence, sadly).</p>
</li>
<li>
<p>I trust the code enough to use it when called, but I am hesitant to<br>
force it with every keystroke.</p>
</li>
<li>
<p>At some point in the future, I am open to reconsidering this, though<br>
my concern then will be performance (is the code fast enough to run with<br>
each keystroke?) That will be easy enough to test.</p>
</li>
</ol>
<p>F-</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/465573792018-11-29T18:10:51Z2018-11-29T18:10:52ZFeature Request: Automatic Ordered List Numbers<div><p>Does the change list type use the cleanup code?</p>
<p>I'll keep using that feature, since it's the easiest and has a shortcut.<br>
The other doesn't.</p>
<p>-Paul</p></div>Paul Solttag:support.multimarkdown.com,2013-02-12:Comment/465573792018-11-29T18:12:18Z2018-11-29T18:12:18ZFeature Request: Automatic Ordered List Numbers<div><p>Have you setup any unit tests to verify different inputs?</p>
<p>I think that'd be the best way to establish confidence.</p>
<p>Create a test for any new bug/fix you do to the output.</p>
<p>Be able to "change text", insert the cursor, or select elements in the test<br>
to see what the actual algorithms do.</p>
<p>-Paul</p></div>Paul Solttag:support.multimarkdown.com,2013-02-12:Comment/465573792018-11-29T18:15:37Z2018-11-29T18:15:37ZFeature Request: Automatic Ordered List Numbers<div><p>Yes -- the list modification commands trigger the list clean-up as the<br>
last step. For example, toggling a list type only changes the first<br>
item in the list, and then it relies on clean-up to change the remaining<br>
items.</p>
<p>F-</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/465573792018-11-29T18:20:03Z2018-11-29T18:20:03ZFeature Request: Automatic Ordered List Numbers<div><p>Already done. But this only covers bugs in situations I know about, not<br>
in situations that don't fit my expectations.... Which is the problem.</p>
<p>If only all you users would use the program in the exact same way I do,<br>
there would be so much less difficulty..... ;)</p>
<p>MMD itself has a large and growing suite of integration tests (included<br>
in the Github repo.) The text engine I use in Composer has a large<br>
number of unit tests embedded. But the range of things people try is so<br>
much larger than I can imagine -- things that work fine in English break<br>
in CJK languages. People writing using different styles and formatting<br>
conventions stumble across weird edge cases that I would not think of in<br>
a million years.</p>
<p>All I can do is keep refining and collecting instances that break to<br>
avoid repeating the same mistakes in the future.</p>
<p>At least it's interesting.... ;)</p>
<p>F-</p></div>Fletchertag:support.multimarkdown.com,2013-02-12:Comment/465573792018-11-29T18:22:52Z2018-11-29T18:22:53ZFeature Request: Automatic Ordered List Numbers<div><p>Awesome. =)</p>
<p>-Paul</p></div>Paul Solt