I would be happy to investigate the issue given it is reproducible.
Could you provide me with .properties and Lua startup files so that I could see the problem myself?
P.S. Last week I spent many hours working on "my version" of extman.lua (which is my startup script) and I have a dozen of Lua commands in the Tools menu. During that week I was saving the startup script very frequently yet never saw the '> Lua: error checking global scope for command' message. And yes, I'm using SciTE with those patches being discussed.
Last edit: Shmuel Zeigerman 2020-06-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here are my user config files, although they are quite messy and hardly a minimal reproducible case. I didn't notice the problem until I was using a Lua script to prototype some new drawing features. The "error checking global scope for command" happens on both Windows and macOS.
As SciTE v4.4.3 (June 03) does not have EOLAnnotations feature, I've built the latest Scintilla and SciTE commits (June 17). The menu item "ShowEOLAnnotations" works for me now. But unfortunately I'm still unable to reproduce the problem.
I insert various print calls into the startup script, save it, see it automatically printing what I inserted ... but no error message, ever. I wonder if there exists a a step-by-step sequence to reproduce the error...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This change causes problems when a parsing failure occurs. No functions will be found in the script after the parsing failure even if the script is fixed and reloaded. This differs from older versions such as 4.3.2.
With this Lua startup script and properties set up like the earlier example:
functionBug()print('bug')--~ x:y=1end
Initially the script works correctly. Uncomment the commented line to produce x:y=1. Save will show an error:
C:\Users\Neil/SciTEStartup.lua:3: function arguments expected near '='
>Lua: error occurred while loading startup script
Running Bug will also show an error:
> Lua: error checking global scope for command 'Bug'
Undo to restore the comment to produce --~ x:y=1. Save. Run Bug:
> Lua: error checking global scope for command 'Bug'
There appears to be no way to return Lua to working.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Committed as [7cd4be].
Related
Commit: [7cd4be]
Committed as [7cd4be].
Related
Commit: [7cd4be]
This patch causes problems when saving the Lua startup script and its reloading. There will often be error messages like:
Changes to the script are ignored.
Hunks 2 and 3 of the patch (pushing "buffer", and
lua_pop(2)) must be restored to avoid the error and make reloading work.I would be happy to investigate the issue given it is reproducible.
Could you provide me with .properties and Lua startup files so that I could see the problem myself?
P.S. Last week I spent many hours working on "my version" of extman.lua (which is my startup script) and I have a dozen of Lua commands in the Tools menu. During that week I was saving the startup script very frequently yet never saw the '> Lua: error checking global scope for command' message. And yes, I'm using SciTE with those patches being discussed.
Last edit: Shmuel Zeigerman 2020-06-26
Here are my user config files, although they are quite messy and hardly a minimal reproducible case. I didn't notice the problem until I was using a Lua script to prototype some new drawing features. The "error checking global scope for command" happens on both Windows and macOS.
Thank you for the files!
As SciTE v4.4.3 (June 03) does not have EOLAnnotations feature, I've built the latest Scintilla and SciTE commits (June 17). The menu item "ShowEOLAnnotations" works for me now. But unfortunately I'm still unable to reproduce the problem.
I insert various print calls into the startup script, save it, see it automatically printing what I inserted ... but no error message, ever. I wonder if there exists a a step-by-step sequence to reproduce the error...
Options | Open Lua Startup Script
Add "Bug" function:
Options | Open User Options File
Add "Bug" to the tool menu:
Exit SciTE
Start SciTE
View | Output
Tools | Bug
Output:
Options | Open Lua Startup Script
Edit "Bug" function, changing "earth" to "venus"
File | Save
Tools | Bug
Output:
Thanks for the instructions, they helped greatly.
The patch is attached.
Committed as [c4b1e3].
Related
Commit: [c4b1e3]
[c4b1e3]
Related
Commit: [c4b1e3]
This change causes problems when a parsing failure occurs. No functions will be found in the script after the parsing failure even if the script is fixed and reloaded. This differs from older versions such as 4.3.2.
With this Lua startup script and properties set up like the earlier example:
Initially the script works correctly. Uncomment the commented line to produce
x:y=1. Save will show an error:Running Bug will also show an error:
Undo to restore the comment to produce
--~ x:y=1. Save. Run Bug:There appears to be no way to return Lua to working.
Thanks for the detailed description.
The patch is attached.
Committed fix as [60f2e0].
Related
Commit: [60f2e0]
Committed fix as [60f2e0].
Related
Commit: [60f2e0]