MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   To clear permanently the F&R memory? (https://www.mobileread.com/forums/showthread.php?t=179281)

roger64 05-25-2012 04:41 AM

To clear permanently the F&R memory?
 
Hi

I use some regex from time to time and I like to keep them handy in the Sigil F&R memory. It's easily done because it can hold as many as 14 searches.

However, sometimes we have to perform additional searches and after that the F&R memory remains cluttered with these new search items.

I'd like to know how to purge permanently the F&R memory.
- Ideally, to make a partial purge, so as to delete permamently the unwanted search items and keep only the "good" ones, i.e. the ones that interest me.
- At least there should be a way to make a full purge and erase permanently all items?

DiapDealer 05-25-2012 09:53 AM

You're talking registry entries there (on Windows). "Find" is a string type that could be edited manually, but "Replace" is a binary key.

HKCU->Software->Strahinja Markovic->Sigil->find_replace.

NOTE: I am not suggesting that editing the Windows registry is a casual thing to do. If you're uneasy browsing around the various registry entries... that's a good sign that you have no business being in there.

roger64 05-25-2012 11:14 AM

I am an old Linux user, and I distinctly remember having typed some odd commands at times, though probably nothing so arcane as a Windows registry key for sure... :D

Thanks for your tip, I'll have a look here and report back.

roger@lmde64 ~ $ locate Strahinja
/home/roger/.config/Strahinja Markovic
/home/roger/.config/Strahinja Markovic/Sigil.conf
/home/roger/.local/share/data/Strahinja Markovic
/home/roger/.local/share/data/Strahinja Markovic/Sigil
/home/roger/.local/share/data/Strahinja Markovic/Sigil/dictionaries

Found in the first file:

.../...

[find_replace]
find_strings="<p class=\"let\">([A-Z])", font-family:LinuxLibertineOCRegular, " sgc-1"
replace_strings="<p class=\"let\"><span class=\"let1\"><span class=\"let2\">\\1</span></span>", font-family: 'LinuxLibertineOCRegular',
search_mode=20
look_where=10
search_direction=0

.../...

Yep, this way it's easy to remove selectively search and replace strings. Solved.

Thanks again.

DiapDealer 05-25-2012 11:54 AM

Quote:

I am an old Linux user, and I distinctly remember having typed some odd commands at times, though probably nothing so arcane as a Windows registry key for sure...
Sorry... that's what I get for assuming.
I thought of adding the Linux config location to my post, but I was lazy and figured it wouldn't likely be applicable. :o

roger64 05-25-2012 12:18 PM

You were statistically right. :)

It would perhaps be about time to give to this "Strahinja Markovic" folder another name more easy to find.

meme 05-25-2012 02:25 PM

The folder location will change in the next release.

As for deleting the entries permanently you'll have to edit the configuration file or registration keys. But is it really worth it. If you have common ones, just select them again on a test file and they'll move to the top.

The more permanent solution of saving searches will have to wait a little longer.

roger64 05-25-2012 04:59 PM

@meme

Thanks you for your info.

Jabby 05-28-2012 11:17 PM

Query
 
Am I understanding this correctly. Windows 7 keeps the F&R past search strings in the registry? How large is it allowed to get?

Regards - John

PeterT 05-28-2012 11:44 PM

Quote:

Originally Posted by DiapDealer (Post 2092838)
You're talking registry entries there (on Windows). "Find" is a string type that could be edited manually, but "Replace" is a binary key.

HKCU->Software->Strahinja Markovic->Sigil->find_replace.

I just took a look on mine; both find_strings and replace_strings are REG_MULTI_SZ which as far as I know has no limit in size.

DiapDealer 05-29-2012 11:32 AM

I've never seen more than 15 entries in my "find_strings" (registry or conf-file).
I emptied it once just to make sure I wasn't giving bum advice, but to be perfectly frank... I don't see any advantage in clearing it. You never have to look at the list if you don't want to, and the most recent will always be on top if you do look. *shrugs*

theducks 05-29-2012 11:43 AM

Quote:

Originally Posted by DiapDealer (Post 2096833)
I've never seen more than 15 entries in my "find_strings" (registry or conf-file).
I emptied it once just to make sure I wasn't giving bum advice, but to be perfectly frank... I don't see any advantage in clearing it. You never have to look at the list if you don't want to, and the most recent will always be on top if you do look. *shrugs*

IMHO It is to get rid of the ones you got really wrong :eek: and really made you :swear: when it ruined your work ( :bulb2: Always Save before you do a Replace All )

DiapDealer 05-29-2012 12:04 PM

Quote:

Originally Posted by theducks (Post 2096847)
IMHO It is to get rid of the ones you got really wrong :eek: and really made you :swear: when it ruined your work

OK, I suppose I can see the advantage under those circumstances. :D

I guess I don't really use the saved searches feature that much; because I've been burned by selecting the wrong one (that looked like the right one). And because I try so many that the one I might need again has almost certainly been "pushed out" already. It's not like I could ever populate the list with my 5 most common searches and just leave it that way.

The majority of the time, my F&R work is being typed freehand... "on the fly" so to speak. ;)

kiwidude 05-29-2012 01:09 PM

It gets a little too "keen" on adding stuff to the saved search list too I find. Quite often I find that multiple of those precious 15 slots have been "used up" by the original text that got pasted into the Find box - e.g. with the original chapter number/style names before I got to the next step of replacing with my regex characters.

I suspect it is to do with using ctrl+F in an attempt to "load" the search box with a new selection. Which only works intermittently btw - you can select a multiline piece of text in code view, hit ctrl+F and cross your fingers that the text you selected appears in the Find box for editing, rather than it trying to do a find on just a portion of it like an opening <p> tag.

meme 05-29-2012 02:08 PM

It will add an entry to the list only if its not an exact match for an existing entry. But if you are selecting and finding, then yeah, they'll get added too and push your regex down.

Its not intermittently failing to load your text from a Ctrl+F - its got a hard-coded limit so that if you are over 100 characters then it won't load it into the find box.

That does seem a bit low - and something a bit larger might be a reasonable setting if the use case is to load then edit it down to a simpler regex.

Oh, this isn't the saved searches feature, its just the Find history or the Replace history ;)

DiapDealer 05-29-2012 02:50 PM

Quote:

Originally Posted by meme (Post 2096990)
Oh, this isn't the saved searches feature, its just the Find history or the Replace history ;)

Just poor wording on my part. :)

But anyway... the way I constantly fiddle with my regexps to fine-tune the results (for each individual book) makes the F&R history a little too volatile to be very useful to me. It ends up being filled with expressions that almost find what I want them to (my fault, not Sigil's). ;)


All times are GMT -4. The time now is 10:52 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.