On Sat, Mar 27, 2021 at 9:11 PM [email protected] <[email protected]>
wrote:

I'm not saying anything against what you say, not at all.


Glad to hear it :-)

> I'm just suggesting that the end result might better be named by a
> different name, presumably "rst4".
>

Renaming the command would be confusing make work:

- The rst3 command uses settings whose names start with 'rst3-'.  Why
require people to change 'rst3-' to 'rst4-' in their myLeoSettings.leo file?

- The command works on `@rst` nodes. A new rst4 command should still work
on `@rst` nodes. Why force people to change `@rst` to `@rst4` in their
outlines?

Renaming the command would misstate the coming changes:

- Removing features that almost nobody uses.
- Removing 13 of the original 26 rst3-related settings in leoSettings.leo.

If I had not announced my intentions, probably nobody would have noticed
these changes! I did announce my intentions because:

- It's never good to hide potentially controversial decisions.
- I wanted to subject my thinking to public scrutiny, and get the benefits
from doing so.
- I wanted to keep everyone up to date.

*Summary*

I repeat.  I want now to hear *only* from those who would be seriously
inconvenienced by simplifying Leo's rst3 command.

Edward

P. S. If there *are* those who use the "advanced" features of the rst3
command, they have a simple workaround: open their documentation files with
Leo 6.3 while they transition their documentation.

To help them make that transition, I'll rewrite Leo's "Creating Documents
from Outlines <http://leoeditor.com/tutorial-rst3.html>" Chapter. The new
chapter will discuss how to write scripts to compose `@rst` outlines from
data.

Those scripts are easy! For example, instead of adding the @rst-insert-tree
command, as #1843 <https://github.com/leo-editor/leo-editor/issues/1843>
suggests, the following tested script will show root's tree:

result = []
for p in root.self_and_subtree():
    level = p.level() - root.level()
    indent = ' ' * 2 * level  # Two-space indents.
    result.append(indent + '- ' + p.h + '\n')
s = ''.join(result)

More compactly, using f-strings and generator expressions:

s = ''.join(
    f"{' '*2*(z.level()-root.level())}- {z.h}\n"
        for z in root.self_and_subtree())

This script shows why we should be putting our attention on Leonine
scripting, not faux-enhancements to Leo's rst3 command. Why settle for what
`@rst-insert-tree` would give us? A simple script gives us complete
flexibility to format the tree as we like.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS11MDEgD2r%2BLps9qyOe2HO9070qaFBrEvVa7951nuovJQ%40mail.gmail.com.

Reply via email to