On Thu, Apr 24, 2025 at 9:46 AM Thomas Passin <[email protected]> wrote:

> Since we expect the @path directive to be able to point to an actual
> existing directory, I think it has to allow spaces.
>

I agree.  Thanks for raising all these issues.

With spaces, I suppose that the paths would have to be quoted so that they
> are delimited.
>

Actually, not. Leo already calls g.stripPathCruft to *remove* various kinds
of quotes. That has never been a problem.

I do not think that wild card path characters need to be (or should be)
> supported; if included, then Leo would not know how to create a
> non-existing path, and they would never occur in already-existing paths.
>

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.

Note that by default Leo never creates non-existent paths automatically.

> Actually, there are several characters that Windows doesn't allow in
> paths.  According to ChatGPT they are <>:"/\\|?*
>

Tests show that allowing all characters is not a problem in this context.

I don't like the idea of allowing other non-printing characters even if the
> OS would allow them because a user would have no way of knowing what the
> right character is supposed to be. I don't suppose they occur very often in
> the wild for just this reason.
>

I discuss this question in the revised first comment of the PR. As you
imply, in practice these edge cases won't occur. Furthermore, the PR can't
reasonably be called a breaking change.

Edward

-- 
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/CAMF8tS2NtApBbzYLjp9-TA1%3D_d2fMx0J0mN95Sb-qn_1Op8U1A%40mail.gmail.com.

Reply via email to