Patrick - Thanks. Sorry - I'm stumped at to how the threading and quoting 
works here.
Thanks for the feedback. The need is rather pedestrian - I just create a 
handful of documents a day with one or more lines of time entries at the 
beginning. At the end of the day (or week more like), I need to move the 
individual lines to the end and replace with a single line summary. I just 
want to eliminate the half dozen clicks and keystrokes 30 times a week.

Thanks as well for the assurance that what seemed like a brute-force method 
was not necessarily "wrong".

- eric


On Sunday, August 15, 2021 at 6:37:00 AM UTC-7 Patrick Woolsey wrote:

> On Aug 14, 2021, at 20:17, e2o <[email protected]> wrote:
> > 
> > Oh, excellent stuff - thank you both. Now as I try to figure out how 
> I'll script this, my initial ideas are fairly cumbersome. Yeah, I could 
> bring up the Find dialog, paste in the search criteria and [ ⌘ ⌥ ⌃ G ], but 
> is there a repeatable way using a named saved search or something?
>
> I'm probably missing something here :-) but why is it important that you 
> be able to script this action: do you just want to be able to perform this 
> operation on demand whenever you open a suitable document, or do you want 
> to integrate it into a larger external workflow?
>
> Again, a concrete example with steps would be extremely helpful. :-)
>
> If however a search & replace of the form you describe below:
>
> > find (myInitialLines)(thenEverythingToTheEnd) and replace with \1\2\1
>
>
> *would* do the job then you need only create a text factory which contains 
> a Replace All action with the specified Find and Replace patterns, then 
> save that factory as a _text filter_ and you can assign it a key shortcut 
> to invoke against the current document at any time.
>
>
> > I was hoping a Text Factory would have something as simple as a Find and 
> Copy command, but it seems to insist on a Replace.
>
> For reference, text factories are designed to _transform_ whatever text 
> you apply them to: whether the contents of the current document when run as 
> a _text filter_, or a batch of files when run globally as a _script_, and 
> the advantage of using a text factory is that you can easily define and 
> apply any desired set of actions (i.e. text transformations) with no need 
> for scripting.
>
>
>
> > I guess I could find (myInitialLines)(thenEverythingToTheEnd) and 
> replace with \1\2\1 - which would result in copying my initial non-blank 
> lines to the end of the document - but that seems kinda kludgy.
>
> If that is what you wish to accomplish then I don't see anything at all 
> kludgy about the solution; it's an entirely valid transform.
>
>
> Regards,
>
> Patrick Woolsey
> ==
> Bare Bones Software, Inc. <https://www.barebones.com/>
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/4409094f-ba48-4cfd-ad17-f893eb9aea5cn%40googlegroups.com.

Reply via email to