-
Notifications
You must be signed in to change notification settings - Fork 274
GeanyLua: geany.fileinfo: Added a field for single-line comments; all 'comment' fields are renamed as in filetype definition files. #1397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Would "comment" instead of "single" be better? |
Yes, sounds better. Fixed. |
|
If the plan is to eventually use the same names as Geany, should add all three now, |
Changes will be mentioned in the list of changes on the releases page, but I do not know how many users look at the list of changes and will be able to adjust their scripts. On the other hand, new Geany versions are rarely released, and reviewing the list of changes cannot become a tedious chore :) About the length of the name: I thought of using |
It's not about "urgent", but whether renaming the fields will or can be done at all. Would be good for someone with commit privileges to just make a decision. The existing names are not self-explanatory and don't match the names used by Geany. Anyone using them would already have to check (and recheck) documentation for usage. The main reasons to leave them alone are they're shorter and might be used in existing scripts. However, plugins and scripts often require user intervention with new releases, so the change wouldn't really be unexpected. Error messages would prompt users to check documentation for updates. |
@xiota, what do you think about |
Upon further reflection, I now think field names should be switched entirely to the Geany name, immediately dropping the old names.
|
But you're the maintainer, so the final decision should be yours. I changed it and if everything is okay, then I will merge the commits and correct the commit message. |
There are these too...
Too much to change... maybe should minimize changes and revert back. I'm going to think some more about it some more... |
geanylua/glspi_doc.c
Outdated
@@ -321,8 +321,9 @@ static gint glspi_fileinfo(lua_State* L) | |||
} | |||
SetTableStr("type", FileTypeStr(name)); | |||
SetTableStr("desc", FileTypeStr(title)); | |||
SetTableStr("opener", FileTypeStr(comment_open)); | |||
SetTableStr("closer", FileTypeStr(comment_close)); | |||
SetTableStr("comment", FileTypeStr(comment_single)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about following (and associated doc change)? Everything else can stay as-is with no plans to further align names.
SetTableStr("comment_single", FileTypeStr(comment_single));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was having connection problems with github... I think comment_{single,open,close} would be good / final. It's more verbose than previously, but more clear what they are.
8c567d3
to
e74c3a3
Compare
Everything seems to be done. |
LGTM... Ready for @b4n review/action. Tested with script...fileinfo = geany.fileinfo()
if fileinfo then
output = "geany.fileinfo()\n"
output = output .. "name = " .. fileinfo['name'] .. "\n"
output = output .. "path = " .. fileinfo['path'] .. "\n"
output = output .. "ext = " .. fileinfo['ext'] .. "\n"
output = output .. "type = " .. fileinfo['type'] .. "\n"
output = output .. "desc = " .. fileinfo['desc'] .. "\n"
output = output .. "comment_single = " .. fileinfo['comment_single'] .. "\n"
output = output .. "comment_open = " .. fileinfo['comment_open'] .. "\n"
output = output .. "comment_close = " .. fileinfo['comment_close'] .. "\n"
output = output .. "action = " .. fileinfo['action'] .. "\n"
output = output .. "ftid = " .. fileinfo['ftid'] .. "\n"
output = output .. "encoding = " .. fileinfo['encoding'] .. "\n"
if fileinfo['bom'] then
output = output .. "bom = true\n"
else
output = output .. "bom = false\n"
end
if fileinfo['changed'] then
output = output .. "changed = true\n"
else
output = output .. "changed = false\n"
end
if fileinfo['readonly'] then
output = output .. "readonly = true\n"
else
output = output .. "readonly = false\n"
end
geany.status(output)
else
geany.status("geany.fileinfo: nil")
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if backward compatibility doesn't matter. Maybe mention it somewhere I'm the docs?
@b4n, the commit message will be in the list of changes, I don't know what else to add. |
@Skif-off I probably would have added something like "this used to be named |
@b4n, I don't think that makes sense. |
@elextr As the documentation expert... your opinion? |
Sorry can't provide any help.
Cheers
…On Wed, 18 Jun 2025 at 06:43, xiota ***@***.***> wrote:
*xiota* left a comment (geany/geany-plugins#1397)
<#1397 (comment)>
@elextr <https://github.com/elextr> As the documentation expert... your
opinion?
—
Reply to this email directly, view it on GitHub
<#1397 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGGATOD2ZKB4BPHONQ5NBL3EB4VRAVCNFSM6AAAAABUMVX5TWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOBRG43TQMBUGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Skif-off OK if you think that's good it's fine |
… 'comment' fields are renamed as in filetype definition files. Cosmetics (alignment).
From discussion 4174.
It's really strange: we have information about multi-line comments, but no single-line comments. Let's fix this :)