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 339167 - Bookmark search should ignore special characters
Bookmark search should ignore special characters
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Bookmarks
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Marco Pesenti Gritti
Depends on:
Blocks:
 
 
Reported: 2006-04-20 12:24 UTC by Wouter Bolsterlee (uws)
Modified: 2006-06-05 12:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bookmark search stops on punctuation, not just spaces (475 bytes, patch)
2006-05-27 22:13 UTC, Frederic Peters
accepted-commit_now Details | Review
Improved patch (756 bytes, patch)
2006-06-05 11:45 UTC, Wouter Bolsterlee (uws)
none Details | Review

Description Wouter Bolsterlee (uws) 2006-04-20 12:24:16 UTC
1. Bookmark a site under the name "Foo bar (baz)"
2. Type "baz" in te location bar

Expected:
3. The bookmark appears in the list.

Actual:
3. The bookmark does not appear in the list.

This is really annoying, because I have a lot of bookmarks that
have parentheses in the name field, eg.:
- Apache XML Formatting Objects Processor (FOP)
- Bazaar-NG (bzr)
- Someone. S. Fullname (nickname)
Comment 1 Frederic Peters 2006-05-27 22:13:01 UTC
Created attachment 66351 [details] [review]
Bookmark search stops on punctuation, not just spaces

I got hit by the same problem, bookmarking bugs, they appear as:
  Bug 339167 - Bookmark search should ignore special characters (epiphany)

and I hoped to type "epihany" and get the relevant bugs.  It doesn't work because of this bug.

So here is a patch, replacing a check for ' ' by a call to g_ascii_ispunct().
Comment 2 Christian Persch 2006-05-29 22:21:16 UTC
Thanks for the patch!

Please commit to HEAD and gnome-2-14.

I wonder if it would make sense to allow non-ascii punctuation, using g_unichar_ispunct?
Comment 3 Frederic Peters 2006-05-30 09:10:59 UTC
Commited; not testing on g_unichar_ispunct since the code iterates the string char by char, without any knowledge about UTF-8.
Comment 4 Wouter Bolsterlee (uws) 2006-05-31 09:56:32 UTC
My bookmark  "Bla Doxygen Documentation" does not show up when I type "doxygen". Is this related?
Comment 5 Frederic Peters 2006-05-31 11:56:12 UTC
Are you typing the quotes ?  Are the quotes part of the bookmark ?
Comment 6 Wouter Bolsterlee (uws) 2006-06-01 07:36:06 UTC
No quotes at all, Frederic.
Comment 7 Christian Persch 2006-06-01 17:58:54 UTC
Confirming the this as described in comment 4.
Comment 8 Wouter Bolsterlee (uws) 2006-06-01 18:26:07 UTC
Please revert this code in CVS. The previous behaviour, even though it didn't work in all cases, was much better than the current behaviour.
Comment 9 Wouter Bolsterlee (uws) 2006-06-05 11:45:44 UTC
Created attachment 66768 [details] [review]
Improved patch

This patch fixes the aforementioned problems for me.

The first while loop finds the "end" of the current token (search up to the next space/punct char).
The next while loop finds the "start" of the next token (search up to the next NON-space/punct char).
Comment 10 Christian Persch 2006-06-05 11:54:43 UTC
HEAD and gnome-2-14.

Let's keep the bug open for rewriting that with g_unichar_ispunct for propert i18n cleanliness.
Comment 11 Wouter Bolsterlee (uws) 2006-06-05 11:57:49 UTC
2006-06-05  Wouter Bolsterlee  <uws+gnome@xs4all.nl>

        * lib/widgets/ephy-location-entry.c: (keyword_match):
        Improve next-token logic for bookmark completion. Fixes
        #339167 (hopefully for real this time).
Comment 12 Wouter Bolsterlee (uws) 2006-06-05 12:02:32 UTC
Committed to gnome-2-14 branch too.
Comment 13 Wouter Bolsterlee (uws) 2006-06-05 12:10:52 UTC
Christian, I filed #343906 about the unicode support.