On Mon, Jun 2, 2025 at 4:40 AM jkn <[email protected]> wrote:

 how do I determine the language in effect for a given (or current) node?
>

Good question. Leo 6.8.4 (PR #4334
<https://github.com/leo-editor/leo-editor/pull/4324>) contains significant
changes in this area:

-  Deprecates c.scanAllDirectives and many directives-related functions in
leoGlobals.py.
-  Adds *new getters*, including  c.getLanguage(p).

So my recommended answer is language = c.getLanguage(p).

Replace p by c.p to get the language in effect for the current node
(position).

The definition of c.getLanguage is non-trivial :-)

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/CAMF8tS0feyBXL16m37_4tOA9UMYjqCcC-cGCuRdTpcwTut%3D-pw%40mail.gmail.com.

Reply via email to