[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
Someone could run the test program on windows or mac to find out. I no longer have (easy) access to either. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078735830 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
Well, I interpret the very first words in the readme "GVfs is a userspace virtual filesystem implementation for GIO" to mean its part of GIO. IIUC it provides the implementations for the abstract file/URL/dbus stream operations in GIO and thats why you get an error if its not installed and you try to read anything other than a local file. Never mind, its was worth a try, and thanks for writing that test program. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078728259 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
It is separate from GIO. This is the project page: https://gitlab.gnome.org/GNOME/gvfs Debian package, appears to be `gvfs-backends` -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078714133 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
> Looks like it depends on gvfs... After uninstalling... Well, IIUC GVFS is _part_ of GIO (not to be confused with GnomeVFS), so if its uninstalled its not surprising parts of GIO don't work. But that probably means reading URLs won't work on Windows, dunno about Macos, so back to the soup I guess :stuck_out_tongue_winking_eye: -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078709049 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
I use whatever is provided by the package manager. Even on Debian, pkg-config is a dummy package that redirects to pkgconf. Their stance doesn't seem particularly "aggressive" in context because they call out "passive-aggressive people who try to argue with us". Seems they probably had some people who opened numerous issues reporting closely related problems that they were told multiple times are not bugs. It would be like... what if someone opened multiple issues for Geany complaining that it doesn't support various Qt6 features despite being told multiple times that they aren't bugs? Eventually, those complaints could be considered intentionally disruptive, and people who "insist" on continuing need to be cut off. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078702112 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
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 because it depends on some edge case in `pkg-config` tough. And very aggressive about it they are, "if someone insists on fixing such a non-bug, this constitutes a violation of our [Code of Conduct](https://gitea.treehouse.systems/ariadne/pkgconf/src/branch/master/CODE_OF_CONDUCT.md), which may be addressed by banning from this repository". -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078675523 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
> 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 expect not everyone has your alias pkgconf == pkg-config 😉 On my computer, `pkg-config` is the symlink. Looks like [pkgconf](https://gitea.treehouse.systems/ariadne/pkgconf) and [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/) are different projects. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078657909 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
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 view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078637852 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)
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 plugins would become easier. * Each plugin folder would be symlinked or moved to a `subprojects` folder. This is a meson specified folder that cannot be renamed. * The main plugins folder would have a `meson.build` that imports subprojects based on whether the feature is enabled. * For convenience and compatibility, meson can be wrapped with makefiles. If there's interest, I can set up a trial with a few plugins. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1282#issuecomment-2078632550 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)
@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 @frlan the plugins collection maintainer will probably let you take over (putting words in his mouth :-). As for Geany-plugins autotools build, yeah the infrastructure is "complex" and only a few people are good at it. I am not aware of any attempts to make a meson build for plugins, the guy who made it for Geany (and insists its "experimental" despite several distros and msys using it ;-) has stated that he will not be doing it for plugins. The Geany meson build is sort of a translation of the autotools build and still uses a few autotools, so trying to do that for plugins would be likely to be a horror. And again the problem is who changes the builds for plugins that have no maintainers. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1282#issuecomment-2078615014 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
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 for the test. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078600197 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)
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 don't actively use them, but am interested in keeping them functional. In terms of collection infrastructure, autotools is very slow. I noticed that geany supports building with meson. Has similar work been done for geany plugins? -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1282#issuecomment-2078593982 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)
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 create or review the bugfixes, other people who are not really invested in the plugin may eventually make or review minimal fixes to keep it alive, but grudgingly and slowly. That is the case with the markdown plugin. Only the collection infrastructure is meant to be supported by the Geany-plugins devs, the plugins are the work of individuals or small groups so if they disappear everything grinds to a halt for that plugin. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1282#issuecomment-2078584935 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)
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: https://github.com/geany/geany-plugins/issues/1282#issuecomment-2078576837 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)
@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 distros until the next release. Looks like Peppermint is based on Debian Bookworm, so I'd expect the [build instructions](https://github.com/xiota/geany-preview/blob/main/docs/Building_on_Linux.md) to work with minimal changes. If not, feel free to open a new issue on the project page. In terms of features, it's basically complete. I don't intend to turn it into a general web browser. The problem is the code isn't very maintainable. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1282#issuecomment-2078571791 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
@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 Geany so its available to the plugin. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078565593 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
> `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, NULL, &error); if (!error) { printf("No error.\n"); guint8 *buffer = NULL; gsize size = 0; buffer = (guint8 *)g_malloc(32); gboolean success = g_input_stream_read_all((GInputStream *)stream, buffer, 32, &size, NULL, &error); if (success) { buffer[size] = '\0'; printf("Data: %s\n", buffer); } else { printf("Error reading stream.\n"); } } else { printf("Error reading uri.\n"); } return 0; } ``` ```bash $ gcc test.c -o test $(pkgconf --libs gio-2.0) $(pkgconf --cflags gio-2.0) $ ./test No error. Data: 2.0.0 ``` -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078546850 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
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 directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#issuecomment-2078454585 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)
@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; + + /* document must exist on disk */ + if (! doc || ! doc->real_path) +return FALSE; + + uri = g_strconcat ("file://", doc->file_name, NULL); Why test doc->real_path above and use untested doc->file_name here? Shouldn't this use the path? -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#pullrequestreview-2023836790 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)
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 separate and arrange for distro packaging and updating themselves. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1282#issuecomment-2078381736 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)
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 are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)
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:
[Github-comments] Re: [geany/geany-plugins] Various small WebHelper improvements (PR #1295)
@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, you will need to get the development +This plugin requires GTK3, GLib (>= 2.22), GIO (>= 2.18), GdkPixbuf (>= 2.0), +WebKit2GTK (either API 4.0 or 4.1), and obviously Geany (>= 0.20) to work. Probably -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#discussion_r1580097533 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)
@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 g_thread_init() 9eb5d4630a1449d8c4ea13926631f23f447f85fe webhelper: Replace deprecated g_value_set_char() 8b17184e6a2eecfd598367d9f9783e9abbcd984f webhelper: Update minimal requirements -- View it on GitHub: https://github.com/geany/geany-plugins/pull/1295/files/8ee8a92a9eb7276ae210e376e0b80d271f885162..8b17184e6a2eecfd598367d9f9783e9abbcd984f You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] [geany/geany-plugins] codenav/goto_file: Fix use-after-free crash (PR #1339)
Hi, this PR fixes a use-after-free in codenav's 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 shortcut) 4. Write `/` 5. Cancel & close dialog 6. Trigger go-to-file again 7. Write `a` -> You will likely see an assertion fail in the output, or if you are lucky geany will crash altogether: `gtk_entry_completion_set_model: assertion 'model == NULL || GTK_IS_TREE_MODEL (model)' failed` Valgrind shows an invalid read to previously freed memory:``` Invalid read of size 8 at 0x4DD5820: UnknownInlinedFun (gtkentrycompletion.c:1224) by 0x4DD5820: gtk_entry_completion_set_model (gtkentrycompletion.c:1220) by 0xE2E89F3: directory_check (goto_file.c:166) by 0x5A6B72F: g_closure_invoke (gclosure.c:834) by 0x5A9AC1A: signal_emit_unlocked_R.isra.0 (gsignal.c:3961) by 0x5A8B7A1: signal_emit_valist_unlocked (gsignal.c:3520) by 0x5A8BCAF: g_signal_emit_by_name (gsignal.c:3624) by 0x4DBAC29: end_change.lto_priv.0 (gtkentry.c:2941) by 0x4DC6576: gtk_entry_real_insert_text.lto_priv.0 (gtkentry.c:5401) by 0x5A6B72F: g_closure_invoke (gclosure.c:834) by 0x5A9AF49: signal_emit_unlocked_R.isra.0 (gsignal.c:3928) by 0x5A8B7A1: signal_emit_valist_unlocked (gsignal.c:3520) by 0x5A8BCAF: g_signal_emit_by_name (gsignal.c:3624) Address 0xd42b8e0 is 96 bytes inside a block of size 136 free'd at 0x48468CF: free (vg_replace_malloc.c:985) by 0x5A90164: g_type_free_instance (gtype.c:2023) by 0x5A7A732: g_object_unref (gobject.c:4475) by 0x48E5AC9: run_kb (keybindings.c:1334) by 0x48E5AC9: run_kb (keybindings.c:1325) by 0x48E67E4: on_key_press_event (keybindings.c:1396) by 0x4CFA6CC: _gtk_marshal_BOOLEAN__BOXED.part.0 (gtkmarshalers.c:84) by 0x5A6B72F: g_closure_invoke (gclosure.c:834) by 0x5A9A895: signal_emit_unlocked_R.isra.0 (gsignal.c:3888) by 0x5A8B094: signal_emit_valist_unlocked (gsignal.c:3533) by 0x5A8B9D6: g_signal_emit_valist (gsignal.c:3263) by 0x5A8BA93: g_signal_emit (gsignal.c:3583) by 0x4FC2CD4: gtk_widget_event_internal.part.0.lto_priv.0 (gtkwidget.c:7812) Block was alloc'd at at 0x484A993: calloc (vg_replace_malloc.c:1595) by 0x5B2651A: g_malloc0 (gmem.c:133) by 0x5A96F1B: g_type_create_instance (gtype.c:1923) by 0x5A7CB10: g_object_new_internal.part.0 (gobject.c:2603) by 0x5A7E0C6: UnknownInlinedFun (gobject.c:2600) by 0x5A7E0C6: g_object_new_with_properties (gobject.c:2766) by 0x5A7F009: g_object_new (gobject.c:2412) by 0x4E56A25: gtk_list_store_new (gtkliststore.c:426) by 0xE2E8573: build_file_list (goto_file.c:111) by 0xE2E86A7: menu_item_activate (goto_file.c:285) by 0x48E5AC9: run_kb (keybindings.c:1334) by 0x48E5AC9: run_kb (keybindings.c:1325) by 0x48E67E4: on_key_press_event (keybindings.c:1396) by 0x4CFA6CC: _gtk_marshal_BOOLEAN__BOXED.part.0 (gtkmarshalers.c:84) Invalid read of size 8 at 0x5A92C79: g_type_check_instance_is_a (gtype.c:4133) by 0x4DD5836: UnknownInlinedFun (gtkentrycompletion.c:1224) by 0x4DD5836: gtk_entry_completion_set_model (gtkentrycompletion.c:1220) by 0xE2E89F3: directory_check (goto_file.c:166) by 0x5A6B72F: g_closure_invoke (gclosure.c:834) by 0x5A9AC1A: signal_emit_unlocked_R.isra.0 (gsignal.c:3961) by 0x5A8B7A1: signal_emit_valist_unlocked (gsignal.c:3520) by 0x5A8BCAF: g_signal_emit_by_name (gsignal.c:3624) by 0x4DBAC29: end_change.lto_priv.0 (gtkentry.c:2941) by 0x4DC6576: gtk_entry_real_insert_text.lto_priv.0 (gtkentry.c:5401) by 0x5A6B72F: g_closure_invoke (gclosure.c:834) by 0x5A9AF49: signal_emit_unlocked_R.isra.0 (gsignal.c:3928) by 0x5A8B7A1: signal_emit_valist_unlocked (gsignal.c:3520) Address 0xd42b8e0 is 96 bytes inside a block of size 136 free'd at 0x48468CF: free (vg_replace_malloc.c:985) by 0x5A90164: g_type_free_instance (gtype.c:2023) by 0x5A7A732: g_object_unref (gobject.c:4475) by 0x48E5AC9: run_kb (keybindings.c:1334) by 0x48E5AC9: run_kb (keybindings.c:1325) by 0x48E67E4: on_key_press_event (keybindings.c:1396) by 0x4CFA6CC: _gtk_marshal_BOOLEAN__BOXED.part.0 (gtkmarshalers.c:84) by 0x5A6B72F: g_closure_invoke (gclosure.c:834) by 0x5A9A895: signal_emit_unlocked_R.isra.0 (gsignal.c:3888) by 0x5A8B094: signal_emit_valist_unlocked (gsignal.c:3533) by 0x5A8B9D6: g_signal_emit_valist (gsignal.c:3263) by 0x5A8BA93: g_signal_emit (gsignal.c:3583) by 0x4FC2CD4: gtk_widget_event_internal.part.0.lto_priv.0 (gtkwidget.c:7812) Block was alloc'd at at 0x484A993: calloc (vg_replace_malloc.c:1595) by 0x5B2651A: g_malloc0 (gmem.c:133) by 0x5A96F1B: g_type_create_instance (gtype.c:1923) by 0x5A7CB10: g_object_new_internal.part.0 (gobject.c:2603) by 0x5A7E0C6: UnknownInlinedFun (gobject.c:2600) by 0x5A7E0C6: g_object_new_with_properties (gobject.c:2766) by 0x5A7F009: g_object_new (gobject.c:2412) by 0x4E56A25: gtk_list_sto
[Github-comments] Re: [geany/geany-plugins] Vimode: Added folding support (PR #1327)
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 next line */ gint line = SSM(p->sci, SCI_GETFOLDPARENT, p->line + 1, 0); if (p->line == line) ; /* we are already on the fold point line */ else { /* foldparent of the current line */ line = SSM(p->sci, SCI_GETFOLDPARENT, p->line, 0); } if (line != -1) { /* move the cursor on the visible line before the fold */ gint pos = SSM(p->sci, SCI_POSITIONFROMLINE, line, 0); SET_POS_NOX(p->sci, pos, TRUE); } return line; } void cmd_toggle_fold(CmdContext *c, CmdParams *p) { gint line = prepare_fold(p); if (line != -1) SSM(p->sci, SCI_FOLDLINE, (uptr_t) line, SC_FOLDACTION_TOGGLE); } ``` If the code looks OK to you and works as expected, could you update all the folding functions similarly to `cmd_toggle_fold()` above? In addition, these aren't exactly "edit" commands and should be placed in a separate file. Could you create `fold.c/h`, add them to `Makefile.am` and move all these commands there? -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1327#issuecomment-2077794940 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Vimode: fix cursor position after using undo (PR #1328)
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: https://github.com/geany/geany-plugins/pull/1328#issuecomment-2077765572 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Markdown: Add support for webkit2gtk-4.1 (PR #1335)
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 position after using undo (PR #1328)
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 because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Vimode: Fix cursor hang with folded lines (PR #1326)
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 know what you think about the changes. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1326#issuecomment-2077621344 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] [geany/geany-plugins] vimode: Handle folded lines correctly (PR #1338)
This PR addresses some issues of the plugin with folded lines - see the individual commits. I'd 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 don't know how to correctly react to the fold events - see https://sourceforge.net/p/scintilla/bugs/2438/ @scresto09 Do the changes look OK to you and does the plugin behave correctly with them? You can view, comment on, or merge this pull request online at: https://github.com/geany/geany-plugins/pull/1338 -- Commit Summary -- * vimode: Take into account folded lines when moving cursor * vimode: Ensure that the line with the cursor is expanded after performing a command -- File Changes -- M vimode/src/cmd-runner.c (1) M vimode/src/cmds/motion.c (58) M vimode/src/excmd-runner.c (2) M vimode/src/utils.c (9) M vimode/src/utils.h (1) -- Patch Links -- https://github.com/geany/geany-plugins/pull/1338.patch https://github.com/geany/geany-plugins/pull/1338.diff -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1338 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] New IncDec plugin for Geany (PR #1337)
@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 because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Consider to add a plugin to support Asciidoctor (Issue #1282)
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 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)
@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 yourself, you will need to get the development +This plugin requires GTK3, GLib (>= 2.22), GIO (>= 2.18), GdkPixbuf (>= 2.0), +WebKit2GTK (either API 4.0 or 4.1), and obviously Geany (>= 0.20) to work. Well, do we need to list all those things individually? I would expect a new enough webkit2gtk will require newer versions of Glib, GTK3, etc than the plugin. So wherever a builder gets their webkit2gtk-dev from should have the right parts automatically ... won't it? -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#discussion_r1579598013 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)
@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 yourself, you will need to get the development +This plugin requires GTK3, GLib (>= 2.22), GIO (>= 2.18), GdkPixbuf (>= 2.0), +WebKit2GTK (either API 4.0 or 4.1), and obviously Geany (>= 0.20) to work. What was the first version of Geany supporting GTK 2.x? Is it necessary to mention Geany version? -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#discussion_r1579595352 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)
@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, you will need to get the development +This plugin requires GTK3, GLib (>= 2.22), GIO (>= 2.18), GdkPixbuf (>= 2.0), +WebKit2GTK (either API 4.0 or 4.1), and obviously Geany (>= 0.20) to work. Damned :smile: Simple to add, yes, but simple to figure out, not so much. I sometimes wish there was a generic tool that can *reliably* scan the code an tell me "ok, you need libfoo >= 1.2.3 (because of $reason), libbar 42.0 (because of $othereason), …", but well. I had a script that did something like that ad-hoc grepping GTK documentation and the code to try and get an idea, but not sure if it still works, and it never was truly reliable. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#discussion_r1579574079 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)
@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 yourself, you will need to get the development +This plugin requires GTK3, GLib (>= 2.22), GIO (>= 2.18), GdkPixbuf (>= 2.0), +WebKit2GTK (either API 4.0 or 4.1), and obviously Geany (>= 0.20) to work. Well, you updated requirements in README as part of #1336, which is what prompted me to mention it here and on the markdown PR, so its all your own fault :grin: And you had already made changes to README here so it seemed pretty simple to add. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#discussion_r1579477539 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)
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] Re: [geany/geany-plugins] When the "Markdown" plug-in is enabled, opening a markdown file containing "@@markdown@@" always freezes. (#936)
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)
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] [geany/geany-plugins] New IncDec plugin for Geany (PR #1337)
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 decrement number many times by typing Shift-*. The number can be at the cursor, or to the right of the cursor (on the same line). Numbers can be negative and positive, and can be in decimal or hexadecimal format (hexadecimal number start with 0x). You can customize those defaults keys on the preferences, under the Keybindings tab by setting the *IncDec* keybinding. An item *Increment or Decrement number* is also added in the Editor Popup Menu, it can be hidden by changing the Plugins Preferences. You can view, comment on, or merge this pull request online at: https://github.com/geany/geany-plugins/pull/1337 -- Commit Summary -- * IncDec is a plugin for Geany that provides shortcuts to increment and decrement -- File Changes -- M Makefile.am (4) A build/incdec.m4 (11) M configure.ac (1) A incdec/AUTHORS (1) A incdec/COPYING (674) A incdec/ChangeLog (0) A incdec/Makefile.am (4) A incdec/NEWS (0) A incdec/README (50) A incdec/src/Makefile.am (16) A incdec/src/incdec-plugin.c (504) -- Patch Links -- https://github.com/geany/geany-plugins/pull/1337.patch https://github.com/geany/geany-plugins/pull/1337.diff -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1337 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)
@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. Those seem to say the same to me, and "infinite loop" (at least until it runs out of memory :-) sounds like the issue, sounds like furious agreement :-D -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1232#issuecomment-2076883362 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)
@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, you will need to get the development +This plugin requires GTK3, GLib (>= 2.22), GIO (>= 2.18), GdkPixbuf (>= 2.0), +WebKit2GTK (either API 4.0 or 4.1), and obviously Geany (>= 0.20) to work. > but pretending it will work with any Geany pre-GTK3 is wrong. Good point. Well, what about you opening a "update plugins requirements" PR after having checked and updated them all? :grin: Though, if I find the time (maybe tonight? who knows) I'll try and do that for this one. But I don't love seeing this endlessly delayed for basically unrelated stuff… although I laid that on myself given the PR title, didn't I? -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#discussion_r1579248405 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)
@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 recursively forever (infinite loop + steady memory growth). FWIW, I tested using this program: ```c #include #include #include #include #if 0 /* old */ static void replace_all(GString *haystack, const gchar *needle, const gchar *replacement) { gchar *ptr; gsize needle_len = strlen(needle); /* For each occurrence of needle in haystack */ while ((ptr = strstr(haystack->str, needle)) != NULL) { goffset offset = ptr - haystack->str; g_string_erase(haystack, offset, needle_len); g_string_insert(haystack, offset, replacement); } } #else /* new */ static void replace_all(GString *haystack, const gchar *needle, const gchar *replacement) { gchar *ptr; gsize needle_len = strlen(needle); gsize replacement_len = strlen(replacement); goffset offset = 0; /* For each occurrence of needle in haystack */ while ((ptr = strstr(haystack->str + offset, needle)) != NULL) { offset = ptr - haystack->str; g_string_erase(haystack, offset, needle_len); g_string_insert(haystack, offset, replacement); offset += replacement_len; } } #endif int main(void) { #define TEST_REPLACE_ALL(hs, s, r, ex)\ G_STMT_START { \ GString *haystack_ = g_string_new(hs);\ replace_all(haystack_, s, r); \ g_assert_cmpstr(haystack_->str, ==, ex); \ g_string_free(haystack_, TRUE); \ } G_STMT_END TEST_REPLACE_ALL("hello", "a", "b", "hello"); TEST_REPLACE_ALL("hallo", "a", "b", "hbllo"); TEST_REPLACE_ALL("foobarbaz", "ba", "BA", "fooBArBAz"); TEST_REPLACE_ALL("ababab", "ba", "BA", "aBABAb"); TEST_REPLACE_ALL("ababab", "ab", "AB", "ABABAB"); TEST_REPLACE_ALL("foobarbaz", "o", "oo", "fbarbaz"); #undef TEST_REPLACE_ALL return 0; } ``` -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1232#pullrequestreview-2022127572 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)
@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 yourself, you will need to get the development +This plugin requires GTK3, GLib (>= 2.22), GIO (>= 2.18), GdkPixbuf (>= 2.0), +WebKit2GTK (either API 4.0 or 4.1), and obviously Geany (>= 0.20) to work. I thought it might have been a typo 0.2 vs 2.0 ;-) Don't forget that the plugin READMEs go to the plugins.geany.org site, probably doesn't have to be 2.0 but pretending it will work with any Geany pre-GTK3 is wrong. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#discussion_r1579233070 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)
@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, you will need to get the development +This plugin requires GTK3, GLib (>= 2.22), GIO (>= 2.18), GdkPixbuf (>= 2.0), +WebKit2GTK (either API 4.0 or 4.1), and obviously Geany (>= 0.20) to work. Who knows? As mentioned, I didn't properly review those numbers just yet. Geany dep is likely to be closer to 0.20 than 2.0 though. Others like GTK3 or GLib might be higher. But I don't plan in fiddling with that for the moment, because it's less trivial than what I feel it gains, and can be done at a later point. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#discussion_r1579217448 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] Markdown: Add support for webkit2gtk-4.1 (PR #1335)
@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] updatechecker: Port to libsoup3 and small other fixes (PR #1336)
@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 = g_bytes_get_size(bytes); +gchar *str = g_malloc(bytes_size + 1); +memcpy(str, g_bytes_get_data(bytes, NULL), bytes_size); Yeah that's exactly the reason: the bytes have no reason to be NUL-terminated, as it's from reading the raw data from the webserver (and does not explicitly add a NUL itself from what I can gather). So this helper is to make it a C string, not really caring if there's a NUL earlier because a valid response won't have one anyway. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1336#discussion_r1579201225 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany] What do you think about Tree-sitter? (Issue #3858)
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 bind that type to `f`. New languages like Julia and Rust and Go, many functional languages like Haskell and Ocaml and retrofits to languages like C++ and Java provide capabilities like this. Type evaluation of expressions requires full knowledge of visibility, what parts of the system libraries and user code is visible at the point of `set(a, 1);` to decide which `set()` function is going to be called (there are lots of `set()` functions in libraries and user code), and so what the return type is, so it can be used in `auto a1 = set(a, 1);` as the type of `a1`. It needs more than a parser to perform these computations. The current technology solving it is the Language Server Protocol which is a way for the IDE to send the work to a separate process that contains most of the compiler except the code generation so the workload of a compiler does not interrupt the UI. Many language projects are providing LSP compliant servers, like clangd from the clang C/C++ compiler project or gopls from the Go language project. There is work in progress to integrate such servers with Geany. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/3858#issuecomment-2076701349 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany] Geany segfaults after clicking new document 3 or 4 times (#2736)
`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 time one of the reasons to avoid Wayland was to avoid IME problems. This issue may be a sign that the tide has turned in favour of Wayland. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/2736#issuecomment-2076588876 You are receiving this because you are subscribed to this thread. Message ID: