Re: BBEdit from the command line and disk browser?

2019-02-10 Thread Christopher Stone
On 02/10/2019, at 23:27, @lbutlr mailto:krem...@kreme.com>> 
wrote:
> $(cd so,e/directory; ls -ls $(grep -l "foo bar"))
> 
> The second version is much more readable and obvious as to what is going on, 
> and the backpacks quickly get out of hand as you spawn more sub shells.


Hey Lewis,

Yes, I agree.

I rarely ever use backticks in Bash, although I've been known to do so in Perl.

>> bbedit -s 'What file is required?'
> 
> Yes? Works exactly as I expect and as the man page says; what are you 
> expecting to happen with that command?
> 
> -s, --worksheet
>   Create a new shell worksheet file with the specified name, unless
>   such a file exists already, in which case it will be opened.


On 02/10/2019, at 08:48, @lbutlr mailto:krem...@kreme.com>> 
wrote:
> When the BBEdit man page says "the specified files" for a flag, it means that 
> a file is required. (FSVO of the word file)

bbedit -s 'What file is required?'

If the file does not exist then the worksheet is created as named, but no file 
is written to disk.

However Cmd-S will save it to the working directory.

--
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: BBEdit from the command line and disk browser?

2019-02-10 Thread Christopher Stone
On 02/10/2019, at 19:47, 'Jeffrey Jones' via BBEdit Talk 
mailto:bbedit@googlegroups.com>> wrote:
> Parentheses around shell commands create a "sub-shell".


Hey Jeffry,

Many thanks.

Your explanation was cogent and informative.

--
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: BBEdit from the command line and disk browser?

2019-02-10 Thread @lbutlr
On 10 Feb 2019, at 13:27, Christopher Stone  wrote:
> On 02/10/2019, at 08:48, @lbutlr  wrote:
>>> These work, but they change the working directory.
>> 
>> Yes, I thought that was what you wanted.
>> 
>>> The whole purpose of my request was to provide a means of opening the 
>>> worksheet to a specific directory without changing the working directory.
>> 
>> Um, Ok, what? They change the working directory *for BBEdit*.
> 
> Hey Lewis,
> 
> Eh?  You're right.  (I thought I tested better than that...)
> 
> Okay, please educate me.
> 
> Why does the parenthetic isolation of the command NOT change the working 
> directory of the shell?

Mr Jones explained that well, so I won't repeat anything.

$(command) came along with the POSIX standard and is the same as `command` in 
bash, though the former is favored over the latter (for good reason, but those 
reasons are not important to most people. Here is an example of why most people 
favor the POSIX standard.

`cd /some/directory; ls -ls \`grep -l "foo bar"\` `

$(cd so,e/directory; ls -ls $(grep -l "foo bar"))

The second version is much more readable and obvious as to what is going on, 
and the backpacks quickly get out of hand as you spawn more sub shells.

> If you remove the parentheses the shell's working directory is changed.

Yes.

>> ls -l ~/Downloads | bbedit -s
>> 
>> will dump the list of files in ~/Downloads into bbedit and not change 
>> directory.
> 
> You mean of the shell?

It will not change directory of the shell you are in, nor of the shell 
worksheet BBEdit launches.

> Quite right.
> 
>>> For that matter bbedit -s does NOT work unless text is piped to it.
>> 
>> bbedit -s .
>> 
>> When the BBEdit man page says "the specified files" for a flag, it means 
>> that a file is required. (FSVO of the word file)
> 
> Oh?
> 
> Try:
> 
> bbedit -s 'What file is required?'

Yes? Works exactly as I expect and as the man page says; what are you expecting 
to happen with that command?

-s, --worksheet
   Create a new shell worksheet file with the specified name, unless
   such a file exists already, in which case it will be opened.

-- 
"Reality continues to ruin my life."

-- 
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: Image won't appear

2019-02-10 Thread Bucky Junior
Most web servers are set up with a case-sensitive file system.

My experience is that Mac user file systems are set up case-INsensitive by 
default. In initializing a new system, one can set up the system to be 
case-sensitive.

It is a “gotcha” that has bitten me a number of times.

Best,
Bucky

> On Feb 8, 2019, at 8:46 PM, Greg Raven  wrote:
> 
> Yes, this has happened to me, and every time it has been because of a 
> difference in capitalization between the code reference and the file name. 
> BBEdit will display an image despite a capitalization error, but servers 
> often will not. 
> 
> -- 
> 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: Can't format html when in background?

2019-02-10 Thread Christopher Stone
On 02/10/2019, at 16:24, John Muccigrosso mailto:jmucc...@gmail.com>> wrote:
> I just discovered (I think) that BBEdit won't format an html doc via 
> AppleScript when it's in the background. That means it's necessary to have it 
> "activate" first.


Hey John,

Hmm...  I can confirm.



tell application "BBEdit"
tell front text window

format mode hierarchical ¬
selection only false ¬
normalizing tag case true ¬
normalizing attribute quotes true ¬
with encode entities in attributes

end tell
end tell



If BBEdit is visible in the background this script fails.

NOTE -- BBEdit-Talk is a user-list.  Bug-reports need to go to Bare Bones 
Support.

--
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.


Can't format html when in background?

2019-02-10 Thread John Muccigrosso
I just discovered (I think) that BBEdit won't format an html doc via 
AppleScript when it's in the background. That means it's necessary to have 
it "activate" first.

Is that correct or am I missing something?

TIA.

PS I'd consider this a bug.

-- 
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: BBEdit from the command line and disk browser?

2019-02-10 Thread Christopher Stone
On 02/10/2019, at 08:48, @lbutlr mailto:krem...@kreme.com>> 
wrote:
>> These work, but they change the working directory.
> 
> Yes, I thought that was what you wanted.
> 
>> The whole purpose of my request was to provide a means of opening the 
>> worksheet to a specific directory without changing the working directory.
> 
> Um, Ok, what? They change the working directory *for BBEdit*.


Hey Lewis,

Eh?  You're right.  (I thought I tested better than that...)

Okay, please educate me.

Why does the parenthetic isolation of the command NOT change the working 
directory of the shell?

If you remove the parentheses the shell's working directory is changed.

> I couldn't think of a use for putting the list of files of a directory into a 
> shell worksheet and not changing BBEdit to that directory, but if that is 
> useful, this does that.
> 
> ls -l ~/Downloads | bbedit -s

The `ls` command was simply a demo Rich provided to push text into the 
worksheet.

> ls -l ~/Downloads | bbedit -s
> 
> will dump the list of files in ~/Downloads into bbedit and not change 
> directory.

You mean of the shell?

Quite right.

>> For that matter bbedit -s does NOT work unless text is piped to it.
> 
> bbedit -s .
> 
> When the BBEdit man page says "the specified files" for a flag, it means that 
> a file is required. (FSVO of the word file)

Oh?

Try:

bbedit -s 'What file is required?'

--
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: BBEdit from the command line and disk browser?

2019-02-10 Thread @lbutlr
On 9 Feb 2019, at 15:02, Christopher Stone  wrote:
> On 02/09/2019, at 03:08, @lbutlr  wrote:
>> 
>> $(cd ~/Downloads; ls -l |bbedit -s)
>> 
>> or 
>> 
>> echo 'ls -l' | $(cd ~/Downloads; bbedit -s)
> 
> Hey Lewis,
> 
> These work, but they change the working directory.

Yes, I thought that was what you wanted.

> The whole purpose of my request was to provide a means of opening the 
> worksheet to a specific directory without changing the working directory.

Um, Ok, what? They change the working directory *for BBEdit*.

$ pwd; $(cd ~/Downloads; ls -l |bbedit -s); pwd
/Users/lbutlr
/Users/lbutlr 

I couldn't think of a use for putting the list of files of a directory into a 
shell worksheet and not changing BBEdit to that directory, but if that is 
useful, this does that.

ls -l ~/Downloads | bbedit -s

will dump the list of files in ~/Downloads into bbedit and not change directory.

> For that matter bbedit -s does NOT work unless text is piped to it.

bbedit -s .

When the BBEdit man page says "the specified files" for a flag, it means that a 
file is required. (FSVO of the word file)

-- 
No man is free who is not master of himself

-- 
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.


distraction free

2019-02-10 Thread Keith Irwin
I thought I’d write a little script to set BBEdit into distraction free mode:

So far I can:

- Hide the nav and gutter and sidebar line numbers
- Set the wrap mode I like
- Set magnification, smart quotes, etc

via AppleScript.

However, I can’t:

- hide the text status bar (the bottom thing), 
- or the right-side scroll bar.

- The Text Window properties have a “show status bar” prop — setting this 
generates an error.

- Prefs -> Appearance -> Text Status Bar: unchecking all works — AppleScript 
accessible?

Question: Is there a way to revert the right-side scroll bar to “auto hide” 
like all the other windows on macOS? (I tried unchecking 'show spelling' or 
‘find' ticks — no go. Couldn’t find an Expert Pref for it either.)

Question: Is there a way to change preferences via AppleScript? Do I need to 
use System Events with key commands or guess property names? (They don’t show 
up in Script Debugger’s explorer or object model).

Thanks for any help!

Keith
version 12.6 (412025, 64-bit, sandboxed)

-- 
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.