01-06-2012, 12:41 PM | #31 | |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Quote:
The other is Find. For this it makes sense to start the Find Next from where your cursor is - even if in the middle of a line. And since you aren't using wrap-around, to search from the cursor to the end of the document. Same with Find Previous (from the cursor) and Replace Next/Previous. Clearly you do search from the cursor sometimes - if I just have a line like "Say hello and hello and hello again" and you do a search for just "hello" then you will find the first one, and a Find next will find the next one, etc. But a search for ".*hello" won't match anything if your cursor is not at the start of the line. So maybe the ".*" is just a special case. It wasn't anything I needed to use, just a test. If its just a choice about different approaches then I think the others who use Sigil more need to comment. But it does look odd to me when it looks like it should match, but doesn't. |
|
01-06-2012, 04:19 PM | #32 |
Evangelist
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
|
I've had a few instances of searching not matching things which it should, I havent taken notice of the cursor position however. I will try to remember next time. I do think that checking the search strategy would be a wise idea, ideally it should always search entire document(s), nothing position based.
I also recall an issue with replacing/removing css using CDATA in the header of pages, it seems to be regenerated as soon as it is removed - rather annoying if you have already moved it into the stylesheet. If you manually remove it then it seems to be happy. I will try make a reproducible example of this. |
Advert | |
|
01-06-2012, 06:37 PM | #33 | |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Quote:
If you mean it should wrap around, that has its own issues (do you highlight something that spans from the end to the start of the document, or do you just prompt to search from the start...). |
|
01-06-2012, 06:39 PM | #34 |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Minor item since it doesn't affect users, but if you run sigil from the command line so that you see error messages, you get messages like this when switching to CSS or Image tabs since signals are being connected for them when the tab type doesn't support them:
Code:
Warning: Object::connect: No such slot ImageTab::Undo() Warning: Object::connect: (sender name: 'actionUndo') Warning: Object::connect: No such slot ImageTab::Redo() Warning: Object::connect: (sender name: 'actionRedo') Warning: Object::connect: No such slot ImageTab::Cut() Warning: Object::connect: (sender name: 'actionCut') Warning: Object::connect: No such slot ImageTab::Copy() Warning: Object::connect: (sender name: 'actionCopy') Warning: Object::connect: No such slot ImageTab::Paste() Warning: Object::connect: (sender name: 'actionPaste') |
01-06-2012, 06:49 PM | #35 | |
Well trained by Cats
Posts: 29,784
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:
Search forward should respect position. Search Backward should respect position. Search should Never Wrap as it would negate Start Position (especially with 'All' ) I commonly use S&R to find all AFTER the only one to leave alone. |
|
Advert | |
|
01-06-2012, 06:58 PM | #36 | |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Quote:
So basically it does a count (entire document) then uses the cursor position to determine which match is closest (forward or backward directional searching). This is instead of starting a new search from the cursor position and ignoring everything before. |
|
01-06-2012, 06:58 PM | #37 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
This has been there for the longest time and other then not being very pretty it doesn't hurt anything.
|
01-06-2012, 08:10 PM | #38 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
|
01-07-2012, 03:52 AM | #39 | ||
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Quote:
I'm with you for 2 1/2 points: For Current File or All HTML Files: Search Forward should respect position, always. No wrap is ok as it is, although the option of a dialog to start at beginning (of file/files) would be ok. If it doesn't consistently respect position it will be confusing. Search Backward should respect position, always Replace Forward should respect position, always Replace Backward should respect position, always But: Count (All) should count everything in the document(s) irrespective of position. i.e. as if the cursor was at the start. (Replace) All should replace everything in the document(s) irrespective of position. Unless I'm missing something, this is how Sigil does Count All, Replace All at the moment. It does not depend on position. I understand the use case for Replace All Forward (e.g. author's names/titles), but then I think a separate Replace Forward button would be needed (or some other dropdown/checkbox option). Count All/Replace All should do just that - ALL, not just some. Quote:
|
||
01-07-2012, 09:54 AM | #40 |
Well trained by Cats
Posts: 29,784
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Sigil does something that no other editor I have ever used does: It works on a SET of documents (sections).
All needs to have many meanings. It all depends on context. Count (informational), should count Current: the entire current tab (html, CSS, NCX, OPF) contents or Count All: All Text (HTML). No cursor start point, start at the first file in the Text section in the Book browser to the last file in the Text section. I disagree that Search(& Replace) should ever wrap. Instead of Wrap, have a tick: 'Start at First (file/line, depending on mode:current or All HTML)'. the default is start from here this adds some confusion as to what happens with the next file in the sequence (All HTML Mode). The reason for using All rather than just repeating Replace Next is quantity So let me toss an idea An ALL repeat Limiter setting (default infinite). Repeat: n occurrences on This Tab, Repeat n Tabs, Repeat n NEXT occurrences, Where n is a spin wheel count |
01-07-2012, 12:29 PM | #41 | |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Quote:
Regardless of the options, its a separate issue from searching from the cursor position forward (or sometime searching from the closest previously cached entry). Whatever is done it must be consistent and obvious. Interesting that you list Count with no cursor start point, yet for find/replace its configurable. If there is a global tickbox, then it needs to apply to everything (e.g. from cursor should be both for Count or Replace). I'm not so keen on a spinwheel, but if you are really looking for something like this level of control, then the dropdown could be expanded without adding to the size of the F&R box, e.g. Look in
It would apply to Find, Replace, Count, Replace All for consistency. Find /Replace Previous is a complication - should start of file also be end of file, or just not find anything if current file from start of file selected. Or is it sensible to change this to a couple of checkboxes - a little quicker to operate (a tick is one move, select dropdown and change to value is two), e.g.: [] Look in all HTML files [] Find from start of file Of course its up to user_none - I can imagine this close to .5 that he wouldn't want to change much. |
|
01-07-2012, 02:22 PM | #42 |
Evangelist
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
|
I still have no idea why the regex mode can be used in anything besides the codeview.
And when using regex, it's still best to not use any cursor position. For normal text searching, then I think that should work as it currently does. |
01-07-2012, 02:42 PM | #43 | |
Well trained by Cats
Posts: 29,784
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:
True these could be done in CV, but some folk scare easily (But would these folk even dare to use scary REGEX ) |
|
01-07-2012, 02:54 PM | #44 | |
Zealot
Posts: 114
Karma: 5246
Join Date: Jul 2010
Device: none
|
Quote:
- Firefox: "Reached end of Page, continued from top" on the FindBar - KWrite: "Reached bottom, continued from top" on the status bar. |
|
01-07-2012, 03:00 PM | #45 | |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Quote:
Why is it best with regex not to use a cursor position? Maybe I'm just missing something. (Obviously cursor position has to be taken into account at some point, otherwise find next will always just find the same text as the find will always start from the beginning of the file...) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Beta for BB? | FF2 | Amazon Kindle | 2 | 05-28-2011 10:21 AM |
BETA TESTER | The Terminator | Kobo Reader | 1 | 12-14-2010 10:23 PM |
Beta Beta Test of Major New Features | Starson17 | Calibre | 45 | 05-17-2010 10:55 AM |
0.6 out of beta? | Nate the great | Calibre | 3 | 07-17-2009 02:45 AM |