![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 399
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Restart search shortcut?
I've found the keyboard shortcuts for most of the Search functions (Find, Replace/Find Next, Replace All, etc), but I haven't seen one for "Restart search". Have my eyeballs stopped working?
|
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,507
Karma: 5703586
Join Date: Nov 2009
Device: many
|
There is not one. The search is automatically restarted any time you change the find or replace fields in the FindReplace window. So it is rarely needed unless you want to fully repeat something that was already done.
You can of course hold down the shift and hit the Replace All button to create a table with context where you can choose which rows are applied before. We could register it and add it to Preferences if multiple people would find that useful. But that said, most keyboard heavy users simply move focus to the FindReplace (which does have a keyboard shortcut) and then use Tab or Shift-Tab to move focus to whatever icon they want and use space or enter to trigger it (depending on platform), all without leaving the key board. There are many ways that technique can be applied all throught Sigil. BetterRed is an expert at navigating Sigil fully using the keyboard. He might be a good person to ask. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 399
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Yeah, the reason I ask is because sometimes when I load a new search, it appears not to autmatically reset. I'll load a new search, Count All (and get a match/matches), and then when I try to Find Next, it says I'm at the end of the search already.
|
![]() |
![]() |
![]() |
#4 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,644
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR Last edited by BetterRed; 05-10-2025 at 05:15 PM. |
|
![]() |
![]() |
![]() |
#5 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,507
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Quote:
Perhaps we should automatically perform a restart after a count? You should really try the Filter Replacements, which provides the count and lets you see them in context before doing any Replacements. Since that and Dry-Run was added, I pretty much stopped using Count as it was never truly enough info to see if my search worked as expected or not. I will look into adding an automatic restart after a user runs a count and after a Dry-run if needed for the next release. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 399
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Thanks, KevinH. That would beparticularly helpful for some of my searches that don't have repeatable replacement values (e.g. looking for a common transcription error whereby capital letters are inserted in the middle of words). In those cases I just tend to cylce through the whole document, and make corrections as necessary.
That said, I'll also try to learn how to avail myself more of the Dry-Run feature. |
![]() |
![]() |
![]() |
#7 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 399
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Within Dry-Run is there a way to select/deselect which matches have the run the replacement? Like, a way to exclude false positives by marking them as skipable?
|
![]() |
![]() |
![]() |
#8 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,644
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
redundant
Last edited by BetterRed; 05-10-2025 at 05:15 PM. |
![]() |
![]() |
![]() |
#9 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,321
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Yes.
This is all explained in the Sigil User's Guide. Specifically in the "Filter Replacements (shift-ReplaceAll)" section. It says: Quote:
![]() Cheers! |
|
![]() |
![]() |
![]() |
#10 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 399
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
@Turtle91 - Not rude. Good point. To be honest, I've been on Sigil 0.7.2 for so long (which had no functioning User Guide) that I've gotten used to asking on MR as soon as trial-and-error fails me. Add "what questions to ask" to the long list of my 2.4.2 learning curve!
|
![]() |
![]() |
![]() |
#11 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,507
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Filter Replacements allows you to select which replacements you want. Dry-Run does no replacements at all, just allows you to see what would have happened.
|
![]() |
![]() |
![]() |
#12 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,507
Karma: 5703586
Join Date: Nov 2009
Device: many
|
@ElMiko
I just tested current Sigil master which has no changes in this area from Sigil 2.4.2, and I had no problems doing a count of all the the terms " the " (with a replace of " blah ") across all xhtml files in my Alice in Wonderland test epub and got 1427. I then easily hit find and it moved to the first one. Then tested by Replace All and it nicely replaced them all without a need for a Restart Search being hit at all. Please try this with your Sigil 2.4.2 version and let me know if it works for you. If so, what exactly were you trying to do when you got the message that no further matches were found after doing a count? Please let me know that exact steps you used so that I can recreate the issue and figure out where a fix may still be needed. Update: Tested the same thing with DryRun Replace (Shift-Count) and it nicely worked without a need to Restart the Search, too. So this version of Sigil does not appear to have the issue (needing to Restart Search after a Count) you reported; or does, but I need to know how to see the same thing. Last edited by KevinH; 05-10-2025 at 11:42 AM. |
![]() |
![]() |
![]() |
#13 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 399
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
I don't know if I can describe the exact context of the problem, but I'll try...
I'll do a search for the infamous "die/the" issue (Ctrl+G), starting from the first file in the epub, and manually correcting if and as erroneous "die"s arise, until run out of hits, say on file 6/20. Then I'll load a separate search for words that erroneously insert "d" instead of "tl" (gendy, sofdy, etc.), and Count All, with 12 matches. But when I go to the next match, I'll get the message that i've already reached the end of search... because all of the matches occur on file 7/20 or later. For the record, on relatively clean documents where the regex is only recognizing maybe a dozen matches, I can just kind of tell if the search has not fully run its course by mentally counting how many of the "Count All" matches have been reviewed. But when it's a larger match pool, it's easy to not know if I've legitimately reached the end of the matches or if I'm running into this premature termination issue. |
![]() |
![]() |
![]() |
#14 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,507
Karma: 5703586
Join Date: Nov 2009
Device: many
|
There should be no premature termination issues once you properly set the target group (all html files in this case). And any time you change the search or replace term or any of the controls, a new search is auto started. That said, I will still try to reproduce it.
FWIW, all of what you describe would be better done with Filter Replacements, please give it a try. It should be much faster than your one by one approach with no errors as you can see the change in context before you decide it this is a problem case or not. |
![]() |
![]() |
![]() |
#15 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 399
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Yeah, the issue arises for matches that don't have a predictable replacement value. That is, where there is a common error that can be described as a particular pattern of characters or character-types, but the replacement value is inconsistent across the matches, and therefore can't simply be assigned. (I used the "die/the" example above simply as an illustration of the mechanics, not necessarily the specific search that's generating the issue)
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
to merge an advanced search and a shortcut into one command | reinsley | Library Management | 0 | 12-02-2016 09:54 AM |
How Can I Create A Keyboard Shortcut To Toggle Search Highlighting? | copyrite | Calibre | 7 | 10-16-2014 05:12 PM |
restore previous search box entry on restart | cybmole | Calibre | 2 | 11-22-2011 04:07 AM |
after restart calibre the search is gone | salines | Calibre | 2 | 11-15-2011 02:34 AM |
shortcut for direct dictionary search? | shinew | Amazon Kindle | 9 | 03-04-2009 05:14 AM |