Select Similar Formatting - is it selecting by date?

User avatar
SarsenLintel
Posts: 452
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: 452
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 999 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 999 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 999 times


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

User avatar
KB
Site Admin
Posts: 20005
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: 452
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 970 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 970 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 56 times

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

Tue Dec 26, 2017 10:49 pm Post

Still happening in 3.01 (966).

Here's another example project showing the Style info not saving.

Steps to reproduce:
In the attached project, open the folder in Scrivenings mode
Click into first text line of text.
Edit | Select | Similar Formatting --> everything is selected because it's all the same format

Apply a style, Centred text makes this easy to see --> scroll about, everything is now centred.

Screen Shot 2017-12-26 at 5.28.28 PM.png
Screen Shot 2017-12-26 at 5.28.28 PM.png (23.92 KiB) Viewed 787 times


Close Scriv.
Reopen project.
Look around - now only some things are centred. The non-centred items are back to No Style.

Screen Shot 2017-12-26 at 5.29.04 PM.png
Screen Shot 2017-12-26 at 5.29.04 PM.png (23.83 KiB) Viewed 787 times


For some reason it seems to always be the short sections with just a few words where the style info is not saved. I've tested with a few different styles, both paragraph and character styles, and the same thing happens.

 
Attachments
Untitled.zip
(189.43 KiB) Downloaded 47 times

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

Tue Dec 26, 2017 11:03 pm Post

The other issue: Select Similar Formatting not selecting beyond a particular session boundary is easy to reproduce.

Start a new project, blank template works well.
Start a document in script mode I just tested with the default ScreenPlay Format.
Type a few lines, flip back and forth between a couple script elements.
Close and reopen Scriv.
Type a few more lines in the project,
Select Similar Formatting, and the selection doesn't go beyond the session boundary.

Close and reopen scriv again -- now if you Select Similar formatting it seems to select properly for the existing text, but if you type more new lines, then once again the selection won't go past the boundary of the most recent session.

Screen Shot 2017-12-26 at 6.00.25 PM.png
Screen Shot 2017-12-26 at 6.00.25 PM.png (38.28 KiB) Viewed 787 times





Edit: Well I'm not sure if I've actually provided any more details here, but at least I did fuss with it as promised. :lol:

SarsenLintel wrote:Meanwhile I'll keep fussing with it and see if I can turn up any more details on what's happening.

User avatar
Bridey
Posts: 390
Joined: Wed Nov 22, 2017 2:24 pm
Platform: Mac

Wed Dec 27, 2017 11:48 am Post

FWIW, ditto.

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

Fri Jan 05, 2018 5:29 pm Post

These issues should be fixed for 3.0.2.
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."