After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 369269 - add support for regexp search
add support for regexp search
Status: RESOLVED DUPLICATE of bug 134674
Product: gtksourceview
Classification: Platform
Component: General
git master
Other All
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-02 06:45 UTC by Emmanuel Touzery
Modified: 2008-08-03 00:11 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
the patch I suggest. (11.80 KB, patch)
2006-11-02 06:46 UTC, Emmanuel Touzery
none Details | Review
updated patch (11.79 KB, patch)
2006-11-02 16:08 UTC, Emmanuel Touzery
none Details | Review

Description Emmanuel Touzery 2006-11-02 06:45:35 UTC
I've written a small patch to add regexp search support to GtkSourceView. I'll attach it to this bug report.
It doesn't support multiline regexp search, but I don't think any text editor supports that. It supports case-sensitive and case-insensitive regexp search, using the existing case_sensitive flag of the search.
Comment 1 Emmanuel Touzery 2006-11-02 06:46:19 UTC
Created attachment 75819 [details] [review]
the patch I suggest.

let me know if it's not good for some reason, I can update it if needed.
Comment 2 Emmanuel Touzery 2006-11-02 15:11:27 UTC
Er, sorry the:
if (search_regex == NULL) printf ("WARNING, invalid regex...\n");

is not good at all. Will update the code to return "no match" in the case of an invalid regexp. will update the patch soon. I just forgot about it :-/
Comment 3 Emmanuel Touzery 2006-11-02 16:08:34 UTC
Created attachment 75852 [details] [review]
updated patch

this patch reacts better to invalid regexps: simply say that we didn't find any matches.
Comment 4 Sebastian Pipping 2007-03-21 20:32:02 UTC
(In reply to comment #0)
> [..] It doesn't support multiline regexp search, but I don't
> think any text editor supports that. [..]

EmEditor [1] for example does support multi-line regex for search
and replace. It's proprietary and for Windows though.

[1] http://www.emeditor.com/
Comment 5 Johannes Schmid 2008-01-09 17:31:28 UTC
Ping maintainers on this! There is no real reply on if the patch is good or not and I think it would be really nice to have regex support in GtkSourceView.
Comment 6 Paolo Borelli 2008-01-09 17:44:41 UTC
I am really sorry we have dropped the ball on this one... regex search is *definitely* something we want in gtksourceview, but between an engine rewrite in the last devel cycle and real life in the current one, this patch never even got near to the top of the priority list :-(

Help is very very very welcome.

Another thing that happened in the mean time is that glib has gained a regex library (gregex) that we are happily using in the syntax engine, so gregex is an obvious implementation choice here.
Comment 7 Emmanuel Touzery 2008-01-10 06:47:45 UTC
yes, i also think the patch attachment should be marked obsolete because of that regex engine, but i didn't find how to do it without attaching another patch. i change the name of the bug, though, since the patch is obsolete.
Comment 8 Yevgen Muntyan 2008-08-03 00:11:04 UTC

*** This bug has been marked as a duplicate of 134674 ***