03-11-2014, 11:07 PM | #16 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@arspr: What is dangerous about spaces, as I explained in my previous post, is that they are invisible. You have no way of knowing if they are present in an expression at the trailing edge or not by looking a the expression. Therefore using them can lead to unexpected results.
@everyone else: Pressing Tab to select the first completion is the standard paradigm for how completion popups are supposed to work. In fact, originally calibre completion popups did not do that, but you (as in calibre users) requested it be made to work that way. However, since apparently people really dont like the popups, I will add an option to disable them. |
03-12-2014, 01:27 AM | #17 |
Dead account. Bye
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
@Kovid: It's not dngerous because I know I need those spaces... What it is currently dangerous is the current behaviour, at least for me, where if I forgot to fix the saved find/replace string I could get veeeeeery strange results with a Replace All in a hurry and if I saved and closed without noticing I would break the book.
Nevertheless I am more or less used to it and, even being an automated and quick fix, I've never made a mistake until now. Another hypothetical example. Imagine that somebody is looking for (or replacing with) something with shys. Are you killing the saved strings just because shys are more than difficult to notice? Dont you think that this option could be by far much more "dangerous"? |
Advert | |
|
03-12-2014, 02:10 AM | #18 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It is dangerous regardless of whether you know you need the spaces or not, because there is no way for you to tell that an entry in the completion list has trailing spaces by looking at it. And the same goes for any other invisible character, for all of which you should use an escape code, so that the expression becomes explicit.
The fact that I dont protect you from doing stupid things with soft hyphens is not a reason to not protect you from doing stupid things with spaces. |
03-12-2014, 03:32 AM | #19 |
Night Reader
Posts: 127
Karma: 4314
Join Date: Oct 2010
Location: Rocky Mountains (US)
Device: Sony PRS-650
|
I have used spaces in find/replace operations in text for many years, but I do so very carefully, and as a result, I've been very successful. Especially when editing books, there are enough odd situations with scanned books that I simply don't use Replace All. And by replacing one at a time, I have another double-check, as well, which is that each instance is highlighted, including the spaces, which are often part of what I need to replace with no space. But again, I don't do this as a Replace All operation. I have a specific methodology that I use, and I haven't found searching for and replacing spaces to be stupid at all. In fact, it's often been a great time-saver. But perhaps you were referring more to coding or other such technical tasks, which I don't do.
Thank you for being willing to add the option to disable the popups. |
03-12-2014, 04:15 AM | #20 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I am not saying dont use spaces in searches I am saying dont use trailing spaces. Can you spot the difference between these two searches:
One One Now imagine that you have a list of previously used searches, like the popup in calibre with those two entries. Which one will you pick? And even then, you are free to use trailing spaces, the only limitation calibre places is that when you select an item from the popup list you can be sure it will never have trailing spaces, therefore if you want the trailing spaces you have to insert them by hand after selecting the item from the popup list. That is what arspr is complaining about. |
Advert | |
|
03-12-2014, 06:20 AM | #21 |
Night Reader
Posts: 127
Karma: 4314
Join Date: Oct 2010
Location: Rocky Mountains (US)
Device: Sony PRS-650
|
Thank you for that explanation, Kovid.
As I think about it, I've rarely reused a prior search in any program. Perhaps it's because it often involves spaces to isolate the specific instances I need, but I also find it faster and more accurate to either type it or use the entries I've created in whichever macro program I'm using for the given task. In any case, I'm delighted that you will be adding the option -- it has given me a lift when I really needed one. (I'm old enough to have learned to fully appreciate little things.) Last edited by Under the Covers; 03-12-2014 at 06:27 AM. |
03-12-2014, 09:41 AM | #22 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
If you NEED a trailing (or leading) space use as kovid said '[ ]' or use '\x20' or even '\u0020'
|
03-12-2014, 11:58 AM | #23 | |
Dead account. Bye
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
Hey guys, apologies, specially to Kovid, if my previous posts have seemed harsh or something like that. I just don't like the way spaces and history work and I'm not going to like it in any way. I perfectly understand what Kovid says but, for me, it's much more dangerous "forgetting" about fixing both Find and Replace text boxes than just knowing that the saved searches are the TRUE original used strings (with or without spaces, nbsps, shys or whatever in them).
But as I said: Quote:
Nevertheless, this is a great software, and Kovid designs and codes it the best way he thinks. Period. I fully agree with that even if I don't agree with some of his decisions. Source code is also provided so I'm free, (if capable, what I'm not), to change whatever I want. I'm just saying that if I were the designer/coder I would have done that space management in a different way (or I would have added an option about switching on/off the auto-deletion of those initial/trailing spaces). But I'm not, so I just use the software he has FREELY given us, and I'm truly grateful about that. (Kovid knows about a variant I have in my running Calibre which he doesn't support either... On a general rule, I don't like software making automatic amends to my decisions even if designed to "help" me. Being exact: I don't like being forced to use those automatic amends specially when I want to take the risk of doing exactly the opposite thing.) |
|
03-12-2014, 12:49 PM | #24 |
Bookish
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
|
I think all the above is very valid. Keeping an history can sometimes be handy, sometimes not, especially when you do a lot of editing. Kovid, I do not think you have to add an option to disable it. Just an option to clear it would suffice IMHO. That would also get rid of all typed mistakes which are now also kept.
Just my 2cts. |
03-12-2014, 01:11 PM | #25 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Kovid, much of the above type of problem can be eliminated by the clips function, when added. When you add it, can you make sure it will work in the F/R boxes too, if that is possible. I don't think it did in Sigil.
That way we would be pasting tested searches and replacements. |
03-12-2014, 01:16 PM | #26 | |
Well trained by Cats
Posts: 29,785
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Code:
ebook-edit-history.plist |
|
03-12-2014, 10:35 PM | #27 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@arspr: Dont worry, I am not offended. I dont believe that everyone has to share my opinion.
|
03-13-2014, 03:56 AM | #28 | |
Bookish
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
|
Quote:
One delete too much, and you end up with a corrupted file. That's precise the reason why I asked for a simple "clear" option. Last edited by DrChiper; 03-13-2014 at 04:15 AM. |
|
03-14-2014, 06:45 AM | #29 |
Bookish
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
|
Thanks for the "clear search history" function Kovid! It was not mentioned in the change list but nevertheless there. Appreciated!
|
03-14-2014, 07:15 AM | #30 |
Wizard
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
For me too. +1
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Enable/disable search highlighting | katiez | Library Management | 2 | 12-05-2013 02:42 PM |
Disable indexing (search) = longer battery life! | statethatiamin | Kindle Developer's Corner | 58 | 05-02-2012 07:58 AM |
Disable search-while-typing for authors in Edit Metadata | QuantumBeep | Library Management | 2 | 06-03-2011 12:44 AM |
Search History is getting in my way | RichieTheK | Calibre | 10 | 09-26-2010 09:11 AM |
Search History | joserramon | Calibre | 3 | 12-22-2009 11:15 AM |