Re: Applescript to replace selected text only using grep pattern

2018-10-19 Thread Christopher Stone
On 10/14/2018, at 23:04, Christian Boyce mailto:mac...@christianboyce.com>> wrote:
> I know you already have an answer but I think it's good to know how to 
> restrict an AppleScript "replace" in BBEdit to the selected text. I had this 
> problem myself once.
> 
> This is how I'd do it (and it works!)


Hey Christian,

That can be simplified a bit.  :)

tell application "BBEdit"
tell selection to replace using "calc(" & its text & " * .625)" options 
{search mode:grep, starting at top:true}
end tell

--
Take Care,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Grep: pattern_2 NOT preceded by pattern_1 (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2)

2018-10-19 Thread F. Alfredo Rego
That was a lame joke (to attempt to convey the power of regexes, for better or 
for worse) and I’m sorry if I scared you ;-)

> On Oct 19, 2018, at 4:23 PM, Christopher Stone  
> wrote:
> 
> On 10/19/2018, at 17:14, F. Alfredo Rego  > wrote:
>> P.S.
>> Your previous suggestion had a slightly undesired side effect: It erased all 
>> of my backups, locally and in the Cloud. Other than this minor 
>> inconvenience, it was a good exercise ;-)
> 
> 
> Hey Alfredo,
> 
> Eh
> 
> How?
> 
> In any case – never test on vital data files...
> 
> --
> Best Regards,
> Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Grep: pattern_2 NOT preceded by pattern_1 (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2)

2018-10-19 Thread Christopher Stone
On 10/19/2018, at 17:14, F. Alfredo Rego mailto:f.alfredor...@gmail.com>> wrote:
> P.S.
> Your previous suggestion had a slightly undesired side effect: It erased all 
> of my backups, locally and in the Cloud. Other than this minor inconvenience, 
> it was a good exercise ;-)


Hey Alfredo,

Eh

How?

In any case – never test on vital data files...

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Grep: pattern_2 NOT preceded by pattern_1 (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2)

2018-10-19 Thread F. Alfredo Rego
Hey Chris,

This works like magic! I even tried variable-length patterns and everything 
works perfectly, without having to deal with the frustratingly annoying 
limitations of negative loo-behind & Co.

Thank you very much. I’m sure many in this group will benefit from your 
successfully crafted work to accomplish this apparently trivial but obviously 
extremely challenging search: 

Find all occurrences of a given pattern that is NOT preceded by some other 
pattern anywhere (whether immediately or not).

Alfredo

P.S.
Your previous suggestion had a slightly undesired side effect: It erased all of 
my backups, locally and in the Cloud. Other than this minor inconvenience, it 
was a good exercise ;-)

For better or for worse, these expressions are VERY powerful and every 
character counts (or doesn’t count).




> On Oct 19, 2018, at 3:35 PM, Christopher Stone  
> wrote:
> 
> On 10/13/2018, at 12:26, F. Alfredo Rego  > wrote:
>> Did you mean to use the same name for both patterns?
> 
> 
> Hey Alfredo,
> 
> No.  That was a goof up.
> 
> I also misplaced a character.
> 
> Try this:
> 
> ^(?>(?:(?!ostracized_string).))*wanted_string.*$
> 
> --
> Best Regards,
> Chris
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or need technical support, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter:  >
> --- 
> 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 bbedit+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to bbedit@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/bbedit 
> .

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Way to stop minimised windows appearing on app focus?

2018-10-19 Thread Christopher Stone
On 10/17/2018, at 13:18, Bruce Van Allen mailto:b...@cruzio.com>> wrote:
> I think that might be an OS thing, not unique to BBEdit. I tried two other 
> apps and they both did the same thing.


Bruce is right.

This even happens in the Finder.

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Grep: pattern_2 NOT preceded by pattern_1 (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2)

2018-10-19 Thread Christopher Stone
On 10/13/2018, at 12:26, F. Alfredo Rego mailto:f.alfredor...@gmail.com>> wrote:
> Did you mean to use the same name for both patterns?


Hey Alfredo,

No.  That was a goof up.

I also misplaced a character.

Try this:

^(?>(?:(?!ostracized_string).))*wanted_string.*$

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


[ANN] BBEdit 12.5 (411039) pre-release

2018-10-19 Thread Rich Siegel

Good morning folks,

We're currently working on a feature update to BBEdit 12, which 
includes a number of new features, as well as fixes for 
previously reported issues.


Testing is currently underway, and we have a stable pre-release 
version ready for use.


Note that this is a _pre-release_ version. The intent is to fix 
bugs and address areas of improvement based on what our 
customers have reported. However, since the software is at this 
point not fully tested, there _may_ be bugs and regressions.


If this prospect makes you nervous, then sticking with the 
public release versions is your best course of action. Nobody 
will be offended if you choose to do so; you're under no 
obligation to install and use anything but a public release. :-)


Complete change notes to date for all the pre-release builds in 
this cycle are available here:


  

The change notes are organized into additions, changes, and 
fixes, and are annotated where appropriate with case numbers. So 
if you recognize a number corresponding to a support case that 
was opened for you, you can now verify that it's been fixed 
correctly. Please take the time to review the changes before 
using the new build -- it'll be worth your time.




version 12.5 (411039)   (2018-10-19)

*   This version of BBEdit requires macOS 10.12.6 or later. It will
not run on previous versions of macOS or Mac OS X.

Additions
-

*   The Open File by Name window now highlights each matching file
name, based on its relationship to the search string.

*   [NFR] The "Commands" panel now highlights the parts of the
command's display name that match the string you typed in, so
that it's (perhaps) clearer to understand why a given 
command is

listed in the results.

Changes
---

*   The command-line tools installer will attempt to install the
tools without requesting administrator credentials; only if this
fails will it prompt you for administrator permissions. 
That way,

if `/usr/local/bin/` exists and is writable by you, no privilege
escalation is required.

Fixes
-

*   [NFR] Fixed regressions in which changes to the "Use custom
highlight colors", "Highlight insertion point" and the custom
highlight colors didn't take effect immediately, didn't correctly
update the UI in the prefs window, or both.

*   [NFR] Fixed bug in which items in folder-backed menus (Scripts,
Text Filters, etc) did not supply correct metadata to the
Commands window, resulting in unexpected search results and
rankings.

*   [NFR] Fixed crash which would occur when trying to use the
Commands window, and either the Scripts or the Text Filters
folders were empty.

*   [355708] Fixed bug in which Option-Tab not only forced the
skipping of placeholder navigation, but also forced
auto-expansion off, so if you had Auto-Expand Tabs turned on,
there was no way to get an auto-expanded Tab inserted if 
the file

contained placeholders.

*   Corrected appearance of Git revision pickers when running in
dark mode on Mojave.

*   Fixed bug in which the progress bar indication was incorrect for
files downloaded via the built-in FTP/SFTP support.

*   [361539] Fixed a bug in the markup syntax checker in which links
that were correctly percent-encoded would be reported as
requiring encoding.

*   Made a change which will hopefully improve the appearance of
buttons in the Find and Multi-File Search windows on computers
with @1x (non-retina) displays.

*fin*

One final note: If you run into a bug in a pre-release version, 
PLEASE DO NOT REPORT THE BUG TO THE LIST. This includes asking 
about whether others have seen the same problem. Instead, please 
send a bug report to  and we will deal 
with it there. This will help us keep the list discussion on 
topic and productive for all list members.


The package can be downloaded from our web server:



Enjoy,

R.

--
Rich Siegel Bare Bones Software, Inc.
  

Someday I'll look back on all this and laugh... until they 
sedate me.


--
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email

"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.