On Sun, Apr 6, 2025 at 4:41 AM Edward K. Ream <[email protected]> wrote:

> PR #4324 <https://github.com/leo-editor/leo-editor/pull/4324> rewrites
the code that handles Leo's directives.

Some clarifications:

I rewrote by *cutting and pasting code* from the old framework to the new.
I intended to change *nothing* about how the new code actually works.
Changes might come later, in one or more much smaller PRs.

I didn't mean to imply that all @<file> nodes *should *contain @comment,
@delims or @encoding directives!

Far from it. It's probably best to avoid these three directives. Some
details:

- Leo's default file encoding is c.config.default_derived_file_encoding or
'utf-8'.
  That is, *@string default-file-encoding* (utf-8) is the default when no
@encoding directive applies.

- Python defaults to 'utf-8' encoding, so there is no need for a Python
encoding line
<https://docs.python.org/3/reference/lexical_analysis.html#encoding-declarations>
unless you use some other encoding.

- @comment and @delims are dangerous directives
<https://leo-editor.github.io/leo-editor/directives.html#part-4-dangerous-directives>.
Avoid them if at all possible.

All questions and comments are welcome.

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/CAMF8tS21ckDH4GVusdqKA9hctEGi96rm_isMhJq54Uc2sV18Gg%40mail.gmail.com.

Reply via email to