Select Similar Formatting - is it selecting by date?

User avatar
SarsenLintel
Posts: 421
Joined: Thu Jan 10, 2013 4:46 pm
Platform: Mac + iOS

Wed Dec 06, 2017 9:20 pm Post

I'm seeing some odd things happening with the Select Similar Formatting option.

Today I tried it on a document I had just finished typing - when I selected based off a bit of text at the bottom and then scrolled up I found that the selection didn't go past a certain point, even though the formatting was identical. Selecting text at the top and then scrolling down revealed the same thing. The point where the selection wouldn't go past was the spot where I knocked off last night and then resumed today.

Similarly, if I export and then import and split a document and then edit some of the resulting scrivenings - Select Similar Formatting only selects documents with the same Modified date.

While restarting Scriv seems to have helped in the first instance, no amount of restarts has helped it figure out the similarities after import and split.

If needed I'll try to reproduce with something I can actually screen shot and/or send in if needed, but it might take a few days to get something set up.

User avatar
SarsenLintel
Posts: 421
Joined: Thu Jan 10, 2013 4:46 pm
Platform: Mac + iOS

Thu Dec 07, 2017 4:50 pm Post

Okay, here's some screen shots of what I'm seeing.

The Lipsum text I put in yesterday, the English I quickly typed in this morning. All of it is in script mode just alternating back and forth between two script elements.

As you can see Select Similar Formatting won't select past the the date line in either direction.

Screen Shot 2017-12-07 at 11.37.01 AM.png
Screen Shot 2017-12-07 at 11.37.01 AM.png (133.59 KiB) Viewed 120 times

Screen Shot 2017-12-07 at 11.37.21 AM.png
Screen Shot 2017-12-07 at 11.37.21 AM.png (131.11 KiB) Viewed 120 times


Same result after an Export / Import & Split.

Screen Shot 2017-12-07 at 11.43.14 AM.png
Screen Shot 2017-12-07 at 11.43.14 AM.png (46.18 KiB) Viewed 120 times


And I'm not sure what was happening yesterday, but today restarting Scriv made no difference.

User avatar
KB
Site Admin
Posts: 19190
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Dec 07, 2017 8:18 pm Post

Could you attach a project showing the issue?

The formatting does have to be the same, so text with styles won't be selected along with text without styles even if they look the same (styles being part of the formatting). Modification dates don't have anything to do with it, although saving and reloading can subtly alter certain values in the formatting (something to do with Apple's RTF saving and loading routines) which could possibly (I'm guessing here) mean that something you created before closing and reloading Scrivener might not have exactly the same formatting as text you created in the recent session. That wouldn't be expected behaviour - I'm just guessing at what might be the cause.

If you can send me a project demonstrating the issue, though, I can find out for sure.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

User avatar
SarsenLintel
Posts: 421
Joined: Thu Jan 10, 2013 4:46 pm
Platform: Mac + iOS

Fri Dec 08, 2017 7:43 pm Post

Heh, it is apparently a difficult thing to set up a demonstration of. I had a new test project which was exhibiting exactly the behaviour I described, but on a subsequent reopen of that project - it somehow sorted itself out. :roll:

Meanwhile...
I Import & Split a document.
Used project search to find a subset of the text. Selected all the search results to load into a scrivenings session. Selected all the documents in the editor and applied a style - just the built in emphasis character style, nothing fancy.

Select Similar Formatting at that point looks like this:
Screen Shot 2017-12-08 at 1.28.57 PM.png
Screen Shot 2017-12-08 at 1.28.57 PM.png (25.59 KiB) Viewed 91 times


Close and reopen the project, Select Similar Formatting now looks like this:
Screen Shot 2017-12-08 at 1.30.06 PM.png
Screen Shot 2017-12-08 at 1.30.06 PM.png (27.56 KiB) Viewed 91 times


The ones that aren't highlighted above are apparently No Style, not Emphasis (even though Select Similar Formatting clearly thought they were Emphasis before closing the project).

I had a look at the package contents in Finder and the ones that have No Style did not have the content.styles file saved, only the content.rtf. Also the <$Scr_Cs::0> <!$Scr_Cs::0> tags were missing from the content.rtf . I've applied styles like that after an import & split to over 3000 files now, always with varying levels of success. One common factor is it usually (always?) seems to be the very short files like shown above that have the problem. I don't recall it happening to one that has more than 10 or so words.

I'll attach that here in case it shows you what you need. Meanwhile I'll keep fussing with it and see if I can turn up any more details on what's happening.

Test.scriv.zip
(45.33 KiB) Downloaded 3 times