On Friday, April 25, 2025 at 8:19:51 AM UTC+1 Edward K. Ream wrote:

On Thu, Apr 24, 2025 at 5:34 PM Thomas Passin <[email protected]> wrote:


On Thursday, April 24, 2025 at 3:26:20 PM UTC-4 Edward K. Ream wrote:

The revised PR allows *all* characters except for *trailing* whitespace. 
It's up to the user to create a valid path. If a character doesn't make 
sense in a directory name, the OS will say so, so I think there is little 
practical danger in the PR's changes.


What I don't understand is how to know if a given space is a trailing 
space.  It used to be, didn't it, that a headline could have text after the 
path of an @path directive.  I never used it like that but I have been 
under the impression that it did.  


Thomas, you have asked exactly the right questions!

Imo, "truncating" an @path directive at a space (or any other character not 
matched by the legacy regex) was an unintentional Easter Egg. The directives 
reference 
<https://leo-editor.github.io/leo-editor/directives.html#path-path> makes 
no mention of this truncation. Rather, the documentation clearly implies 
that path is *everything* following the @path.

If so, text following a space that was intended to have been a trailing 
space would get included into the path.  The obvious cure is not to allow 
any text after the path.  Is this going to be a new restriction, or has it 
always been like that?


This question is the crux of the PR's dilemma. The PR does what Leo's 
legacy code *intended,* but yes, you could say that the PR creates a new 
restriction.

*Summary*

The question I have been asking myself is, does the PR create a breaking 
change? Yes, in theory it does. In practice, not so much. My tentative plan:

- Update the first comment of the PR in light of this discussion.
- Include the PR in the list of significant changes to Leo, both in the 
release notes and in the "What's new" section.

Edward


I'm not 100% sure I understand your intention here.

You seem to be saying (if I am not mistaken) that you plan to allow 
trailing characters in an @path directive ... and that these will be 
reflected in the created directory name. Is that correct?

I am probably fairly agnostic about these sort of changes - since I would 
strongly try to avoid creating directories like this if at all possible.

'However' I do have a vague "It would be nice if"  IWBNI you could have a 
trailing comment in in an @path headline. This of course implies some way 
of delimiting the comment ... and this probably clashes with what you are 
trying to achieve with the directory characters.

Since I have only just thought of this IWBNI I don't see it as a strong 
objection. I'd just like whatever is chosen to be clearly documented (as I 
am sure it will be)

    J^n





-- 
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 visit 
https://groups.google.com/d/msgid/leo-editor/1b09fe81-7891-4388-ac6f-3e66b960f071n%40googlegroups.com.

Reply via email to