Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-18-2011, 08:57 AM   #1
atjnjk
Zealot
atjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enough
 
Posts: 105
Karma: 554
Join Date: Oct 2008
Device: none
Tag Completion

I have some tags like this: !not finished, +favourite, -deleted,... After typing "!", "+" or "-" as first character, the tag completion didn't appear (Tags start with alphabetical character work just fine). I created ticket #9028 and kovidgoyal said it worked for him. I think there is something wrong in my configuration but I don't know what is. Could anyone check this and/or have the same problem? Thank you very much.
atjnjk is offline   Reply With Quote
Old 02-18-2011, 09:19 AM   #2
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,465
Karma: 986493
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
+ works fine ! and - do not work.
user_none is offline   Reply With Quote
 
Advertisement
Old 02-18-2011, 10:48 AM   #3
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,773
Karma: 1212746
Join Date: Jan 2010
Location: France
Device: Many android devices
The problem is that ICU's sort_key (ICU == International Components for Unicode, sort_key == the unicode sort key generator) orders the list differently from ASCII order, putting '!' and '+' after '-' instead of before it. Calibre tells the Qt completer that the list is ordered, so unless the search gets lucky (the binary search hits exactly), the out-of-order items are never found. The same problem exists with accented characters like é, because ascii and ICU disagree about the order.

Two possible solutions:

1) change to an ascii ordering. Not sure this will really work in the face of non-ansi (larger than 255) unicode characters.

2) Tell the completer that the list is not ordered (c.setModelSorting(QCompleter.UnsortedModel). This works because the completer scans for a match, but will be somewhat more costly if the completion list is very long. My guess is that unless the list is in excess of hundreds of thousands, the performance penalty won't be visible.

I leave it to the owners of completer.py to decide what to do.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug Tracker not returning completion on entering tickets DoctorOhh Calibre 1 02-07-2011 01:08 PM
Tag Synchronization ccowie Calibre 2 08-27-2010 08:41 PM
Tag behavior... guyanonymous Calibre 1 11-29-2009 03:57 PM
Google announces completion of Bodleian & other Oxford libraries PD book scans AnemicOak News 2 03-27-2009 12:46 AM
'Keep' tag? AnemicOak Amazon Kindle 13 03-17-2009 05:19 PM


All times are GMT -4. The time now is 06:43 AM.


MobileRead.com is a privately owned, operated and funded community.