[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)

2024-04-25 Thread xiota via Github-comments
> `g_file_new_for_uri()` and `g_file_read()` (or > `g_file_read_async()/g_file_read_finish()` It works... ```C #include #include int main() { GFile *file = g_file_new_for_uri("https://geany.org/service/version/;); GError *error = NULL; GFileInputStream *stream = g_file_read(file,

[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)

2024-04-25 Thread elextr via Github-comments
@xiota neat, and simple, although it has one theoretical bug (though unlikely in practice) [hint: what if 32 bytes were returned]. Just for general information, Geany used (a __long__ time ago) to avoid GIO, which is probably why the plugin used libsoup directly. But now GIO is required by

[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)

2024-04-25 Thread elextr via Github-comments
Geany plugins doesn't "freeze" changes, but yes it does slow them down with reviews etc. The benefit though is that it gets access to the Geany packagers to put it in distros if its part of the plugins collection. The real problem is plugins where there is no maintainer for the plugin to

[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)

2024-04-25 Thread elextr via Github-comments
Unfortunately the GIO docs don't say when `g_file_new_from_URI()` and the associated stream was supported (that I could see) but it works on the machine I'm on ATM which is pretty olde. PS I expect not everyone has your alias pkgconf == pkg-config :wink: -- Reply to this email directly or

[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)

2024-04-25 Thread xiota via Github-comments
@manueljordan The procedure would be... to build and install it yourself. It uses webkit2gtk-4.0 or webkit2gtk-4.1. If you use 4.1, it will conflict with some other plugins: webhelper, markdown, updatechecker, geniuspaste. They are being updated, but I wouldn't expect rebuilds on most

[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)

2024-04-25 Thread elextr via Github-comments
I don't know enough about libsoup to sensibly review (and don't have the time to learn), but since Geany uses GIO why not `g_file_new_for_uri()` and `g_file_read()` (or `g_file_read_async()/g_file_read_finish()` to not block the UI) instead of using libsoup directly? -- Reply to this email

[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)

2024-04-25 Thread xiota via Github-comments
Size check is needed if this route is taken for the plugin... That code was intended to check whether `https://` is supported because I saw only `file://` mentioned in the docs. Typical version string is <8 bytes. Even with words like `alpha` or `pre-release`, I figured 32 bytes is enough

[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)

2024-04-25 Thread elextr via Github-comments
@xiota it would be great if you are willing to be maintainer for those plugins, in that case simply make a PR changing the MAINTAINERS file with your details for them. Geanylua is orphaned so thats no problem, and codebrainz has not contributed to Geany or Geany-plugins for many years so

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread elextr via Github-comments
@elextr approved this pull request. LGBI except for one query. > @@ -950,6 +1005,23 @@ gwh_browser_set_uri (GwhBrowser *self, g_free (real_uri); } +gboolean +gwh_browser_set_uri_from_document (GwhBrowser*self, + GeanyDocument *doc) +{ + gchar *uri; +

[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)

2024-04-25 Thread xiota via Github-comments
Submitting a plugin to the geany-plugins collection would require freezing the code, even for bug fixes. I'm not willing to do that for a plugin I actively use, so never submitted it. -- Reply to this email directly or view it on GitHub:

[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)

2024-04-25 Thread xiota via Github-comments
I'm new to meson, but switched my preview plugin over to it. One way it could be done... * Each plugin would have its own `meson.build` and `meson.options` that can be built independently. * The files should require minimal changes between plugins. * Building and testing individual

[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)

2024-04-25 Thread xiota via Github-comments
> Unfortunately the GIO docs don't say when `g_file_new_from_URI()` and the > associated stream was supported (that I could see) but it works on the > machine I'm on ATM which is pretty olde. Looks like it depends on `gvfs`... After uninstalling... ``` $ ./test Error reading uri. ``` > PS I

[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)

2024-04-25 Thread elextr via Github-comments
As @xiota says, the plugin is still a work in progress, but I'm sure they would be happy to have someone testing it. When it is complete they may wish to add it to the plugins collection, in which case they need to raise a PR to add it, like #1331 or #1337, or they may decide to keep it

[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)

2024-04-25 Thread xiota via Github-comments
The "freeze" isn't by explicit policy, but is what has effectively happened to plugins that aren't of primary interest to developers with commit privileges. If it helps facilitate bug fixes and minor improvements, I'm willing to be (interim) maintainer for the Markdown and GeanyLua plugins. I

[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)

2024-04-25 Thread Manuel Jordan Elera via Github-comments
Sounds great and thanks for your efforts. I am not sure what is the procedure of the official project about this specific situation -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1282#issuecomment-2078247569 You are receiving this because you

[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)

2024-04-25 Thread elextr via Github-comments
Yeah, `pkg-config` is the Freedesktop original, `pkgconf` would appear to be a re-implementation. Your distro installs `pkgconf` and links the original command to it so existing scripts will work, if they happen to conform to what `pkgconf` considers "correct". If an existing script fails

[Github-comments] Re: [geany/geany] Geany segfaults after clicking new document 3 or 4 times (#2736)

2024-04-25 Thread Neil Hodgson via Github-comments
`im-ibus.so` is input method (IME) code commonly used for East Asian character entry although it can used be for similar features like diacritic or emoji entry. Fiddling with language or input method settings may improve things. https://en.wikipedia.org/wiki/Intelligent_Input_Bus For a long

[Github-comments] Re: [geany/geany] What do you think about Tree-sitter? (Issue #3858)

2024-04-25 Thread elextr via Github-comments
Parsing is not sufficient for new languages, it needs semantics as well. For example inferred types need semantics like type evaluation of expressions, for example C++ `auto f = 1 + 1.0;` has to know the semantics of mixed type arithmetic `1 + 1.0` to get the result type as `float` and then

[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)

2024-04-25 Thread Colomban Wendling via Github-comments
@b4n commented on this pull request. > @@ -185,15 +191,30 @@ version_compare(const gchar *current_version) } -static void update_check_result_cb(SoupSession *session, -SoupMessage *msg, gpointer user_data) +static gchar *bytes_to_string(GBytes *bytes) +{ +gsize bytes_size =

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread elextr via Github-comments
@elextr commented on this pull request. > @@ -26,9 +26,9 @@ Prominent features Requirements -This plugin requires GTK+ (>= 2.16), GLib (>= 2.16), GIO (>= 2.18), -GdkPixbuf (>= 2.0), WebKitGTK (>= 1.1.18), and obviously Geany (>= 0.20) to -work. If you intend to build it

[Github-comments] Re: [geany/geany-plugins] Markdown: Modify replace_all to avoid infinite loop (PR #1232)

2024-04-25 Thread Colomban Wendling via Github-comments
@b4n approved this pull request. I extracted the old and new code an tested a bit, and that also works great. FWIW, if somebody didn't catch what the issue was (as in fact it's not mentioned anywhere but "infinite loop"): if the replacement contains the search term, it'll be replaced

[Github-comments] Re: [geany/geany-plugins] When the "Markdown" plug-in is enabled, opening a markdown file containing "@@markdown@@" always freezes. (#936)

2024-04-25 Thread Colomban Wendling via Github-comments
Closed #936 as completed via #1232. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/936#event-12607573756 You are receiving this because you are subscribed to this thread. Message ID:

[Github-comments] Re: [geany/geany-plugins] Markdown: Modify replace_all to avoid infinite loop (PR #1232)

2024-04-25 Thread Colomban Wendling via Github-comments
Merged #1232 into master. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1232#event-12607573353 You are receiving this because you are subscribed to this thread. Message ID:

[Github-comments] [geany/geany-plugins] New IncDec plugin for Geany (PR #1337)

2024-04-25 Thread cresto sylvain via Github-comments
IncDec is a plugin for Geany that provides shortcuts to increment an decrement number at the cursor, or to the right of the cursor (on the same line). By default, typing Shift-+ will increment the next number, and typing Shift-- will decrement the next number. You can also increment and

[Github-comments] Re: [geany/geany-plugins] Markdown: Modify replace_all to avoid infinite loop (PR #1232)

2024-04-25 Thread Colomban Wendling via Github-comments
Oopsie, I didn't check the OP, only the commit message :confused: -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1232#issuecomment-2077050321 You are receiving this because you are subscribed to this thread. Message ID:

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread Colomban Wendling via Github-comments
@b4n commented on this pull request. > @@ -26,9 +26,9 @@ Prominent features Requirements -This plugin requires GTK+ (>= 2.16), GLib (>= 2.16), GIO (>= 2.18), -GdkPixbuf (>= 2.0), WebKitGTK (>= 1.1.18), and obviously Geany (>= 0.20) to -work. If you intend to build it yourself,

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread Colomban Wendling via Github-comments
@b4n commented on this pull request. > @@ -26,9 +26,9 @@ Prominent features Requirements -This plugin requires GTK+ (>= 2.16), GLib (>= 2.16), GIO (>= 2.18), -GdkPixbuf (>= 2.0), WebKitGTK (>= 1.1.18), and obviously Geany (>= 0.20) to -work. If you intend to build it yourself,

[Github-comments] Re: [geany/geany-plugins] Markdown: Add support for webkit2gtk-4.1 (PR #1335)

2024-04-25 Thread Colomban Wendling via Github-comments
@b4n approved this pull request. LGTM and seems to work fine here. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1335#pullrequestreview-2022078950 You are receiving this because you are subscribed to this thread. Message ID:

[Github-comments] Re: [geany/geany-plugins] Markdown: Modify replace_all to avoid infinite loop (PR #1232)

2024-04-25 Thread elextr via Github-comments
@b4n said: > if the replacement contains the search term, it'll be replaced recursively > forever (infinite loop + steady memory growth). @xiota said: > replace_all searches for needle starting from the beginning of haystack. If > replacement contains needle, the result is an infinite loop.

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread xiota via Github-comments
@xiota commented on this pull request. > @@ -26,9 +26,9 @@ Prominent features Requirements -This plugin requires GTK+ (>= 2.16), GLib (>= 2.16), GIO (>= 2.18), -GdkPixbuf (>= 2.0), WebKitGTK (>= 1.1.18), and obviously Geany (>= 0.20) to -work. If you intend to build it

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread elextr via Github-comments
@elextr commented on this pull request. > @@ -26,9 +26,9 @@ Prominent features Requirements -This plugin requires GTK+ (>= 2.16), GLib (>= 2.16), GIO (>= 2.18), -GdkPixbuf (>= 2.0), WebKitGTK (>= 1.1.18), and obviously Geany (>= 0.20) to -work. If you intend to build it

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread elextr via Github-comments
@elextr commented on this pull request. > @@ -26,9 +26,9 @@ Prominent features Requirements -This plugin requires GTK+ (>= 2.16), GLib (>= 2.16), GIO (>= 2.18), -GdkPixbuf (>= 2.0), WebKitGTK (>= 1.1.18), and obviously Geany (>= 0.20) to -work. If you intend to build it

[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)

2024-04-25 Thread xiota via Github-comments
I have a plugin that shows a [preview](https://github.com/xiota/geany-preview) of several lightweight markup types... It needs refactoring... but works well enough. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1282#issuecomment-2077438240

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread Colomban Wendling via Github-comments
@b4n commented on this pull request. > @@ -26,9 +26,9 @@ Prominent features Requirements -This plugin requires GTK+ (>= 2.16), GLib (>= 2.16), GIO (>= 2.18), -GdkPixbuf (>= 2.0), WebKitGTK (>= 1.1.18), and obviously Geany (>= 0.20) to -work. If you intend to build it yourself,

[Github-comments] Re: [geany/geany-plugins] New IncDec plugin for Geany (PR #1337)

2024-04-25 Thread cresto sylvain via Github-comments
@scresto09 pushed 1 commit. 7615fdcdeae24739d65ddf42554fcaf48a380d82 Update README and geany-plugins.nsi files -- View it on GitHub: https://github.com/geany/geany-plugins/pull/1337/files/1a06f6b2c2336da69fbfa1a035d6f4640cfd6f4f..7615fdcdeae24739d65ddf42554fcaf48a380d82 You are receiving this

[Github-comments] Re: [geany/geany-plugins] Markdown: Add support for webkit2gtk-4.1 (PR #1335)

2024-04-25 Thread Colomban Wendling via Github-comments
Merged #1335 into master. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1335#event-12612366928 You are receiving this because you are subscribed to this thread. Message ID:

[Github-comments] Re: [geany/geany-plugins] Vimode: Fix cursor hang with folded lines (PR #1326)

2024-04-25 Thread Jiří Techet via Github-comments
I'm not sure this is the correct way to address the issue. I think we should take the folds into account and perform the motion commands on top of the visible lines instead of the document lines. I tried to replace this PR with https://github.com/geany/geany-plugins/pull/1338 Please let me

[Github-comments] Re: [geany/geany-plugins] Vimode: fix cursor position after using undo (PR #1328)

2024-04-25 Thread cresto sylvain via Github-comments
Sure, here's an example: Open a 5 line file Move the cursor to line 2 press "2dd" to delete 2 lines press "u" to cancel With a real VIM, the cursor stays on line 2 With Geany Vimode not patched, the cursor goes to the last line -- Reply to this email directly or view it on GitHub:

[Github-comments] [geany/geany-plugins] vimode: Handle folded lines correctly (PR #1338)

2024-04-25 Thread Jiří Techet via Github-comments
This PR addresses some issues of the plugin with folded lines - see the individual commits. Id also like to automatically set the cursor position when a block gets folded to be set on the visible line (and not hidden somewhere inside the fold) but right now I dont know how to correctly react

[Github-comments] Re: [geany/geany-plugins] Vimode: fix cursor position after using undo (PR #1328)

2024-04-25 Thread Jiří Techet via Github-comments
Seems to make sense, just curious when the problem exactly happens - could you give an example when the output of the plugin differs from vim? -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1328#issuecomment-2077625275 You are receiving this

[Github-comments] Re: [geany/geany-plugins] Vimode: Added folding support (PR #1327)

2024-04-25 Thread Jiří Techet via Github-comments
Looks good in general, but I think folding should work when the cursor is anywhere in the block, not just on the fold point (vim seems to work this way). I played with it a little and came up with something like this: ```C static gint prepare_fold(CmdParams *p) { /* foldparent of the

[Github-comments] [geany/geany-plugins] codenav/goto_file: Fix use-after-free crash (PR #1339)

2024-04-25 Thread George Katevenis via Github-comments
Hi, this PR fixes a use-after-free in codenavs go-to-file. (which often results in a crash) ## Problem: ### How to reproduce 1. Run geany from command line, to observe error messages 2. Enable codenav plugin, open some document (to allow use of go-to tool) 3. Trigger go-to-file tool (e.g. via

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread Colomban Wendling via Github-comments
@b4n commented on this pull request. > @@ -26,9 +26,9 @@ Prominent features Requirements -This plugin requires GTK+ (>= 2.16), GLib (>= 2.16), GIO (>= 2.18), -GdkPixbuf (>= 2.0), WebKitGTK (>= 1.1.18), and obviously Geany (>= 0.20) to -work. If you intend to build it yourself,

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread Colomban Wendling via Github-comments
@b4n pushed 5 commits. 52ab3ebefc8fdf805b081bac74efaec442c82529 webhelper: Use modern GObject private data 9f420e09447cc2f8a57e4880dfa99bebc67734e7 webhelper: Replace use of deprecated GtkVBox with GtkBox 3edea3f891cdbe241d63d2b4b37ef4c5eea035c4 webhelper: Remove use of deprecated

[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)

2024-04-25 Thread Colomban Wendling via Github-comments
And voila, I got plagued with another round of cleanups :) -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#issuecomment-2078136827 You are receiving this because you are subscribed to this thread. Message ID: