[OS X TeX] Sync from BBEdit to TexShop

Gray, Gary L euler at psu.edu
Tue Jun 22 16:44:47 EDT 2021


We already have an answer. I have also attached the relevant part of the user manual.

Gary



----------------------------------------------------------
Hi Gary,

Thanks for writing again and in answer to your questions, based on this:

>>> But, I have not tried to implement the reverse syncing,
>>> from BBEdit to TexShop, and it’s not very clear to me
>>> exactly how to go about it, especially since my experience
>>> with AppleScript is quite limited.

>> 1) Can BBEdit issue an applescript command?

Yes, you can run an AppleScript within BBEdit at any time via its Scripts menu or an assigned key shortcut.


>> 2) If not, can BBEdit call a shell script?

Yes, in the exact same manners as above. :-)


>> 3) Suppose the user clicks a spot in a BBEdit file while holding down the command key, or possibly some other key. Can this event a user defined command? Can it trigger 1) or 2)?
>>

Since Command-right click will invoke the contextual menu (as usual for Mac apps) I presume you're referring to a Command-left click and if so, this gesture has no ordinary result _unless_ applied to an URL (in which case BBEdit will attempt to resolve same), but cannot (currently) be bound to any other action.

However, based on the thread below, if you're looking for a convenient way to make an action within BBEdit cause something to happen in an external app, may I suggest you consider making use of BBEdit's event attachment support, such as 'documentDidSave', to perform a scripted action every time you save the frontmost (active) document within BBEdit.

[For complete details, please see the section "Attaching Scripts to Events" in Chapter 13 of the included PDF manual, and you're welcome to share the relevant excerpts with the original inquirer and/or list. :-)

Regards,

Patrick Woolsey

> On Jun 22, 2021, at 3:23 PM, Richard Koch <koch at uoregon.edu> wrote:
>
> David,
>
> I'd also be interested in this. The next version of TeXShop, 4.65, will have enhanced syncing of this sort, particularly for users of ConTeXt. The questions I'd like to see answered are these:
>
>        1) Can BBEdit issue an applescript command?
>
>        2) If not, can BBEdit call a shell script?
>
>        3) Suppose the user clicks a spot in a BBEdit file while holding down the command key, or possibly some other key. Can this event a user defined command? Can it trigger 1) or 2)?
>
> If so, I'll add that information to the 4.65 Changes document.
>
> Richard Koch
>
>> On Jun 22, 2021, at 11:42 AM, David Goldenberg <Goldenberg at biology.utah.edu> wrote:
>>
>> Hi,
>>  In versions 4.24 and 4.25 Richard Koch introduced the ability to sync between TexShop and external editors (4.24) and the reverse (4.25).  Since then, I have been using the sync from TexShop with BBEdit, and it works very well and is much appreciated.  But, I have not tried to implement the reverse syncing, from BBEdit to TexShop, and it’s not very clear to me exactly how to go about it, especially since my experience with AppleScript is quite limited.
>>
>> Has anyone else tried this with BBEdit? Any information would be greatly appreciated.
>>
>> Thanks,
>> David Goldenberg
>> —-
>> School of Biological Sciences
>> University of Utah
>> 257 South 1400 East
>> Salt Lake City, UT  84112-0840
>>
>> E-mail: goldenberg at biology.utah.edu
>> Web page: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgoldenberg.biology.utah.edu%2F&data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WbpoQAc2tXOiz0Hjp9u81UwKVGXQf83yEMOnxyldCQ8%3D&reserved=0
>>
>>
>>
>>
>>
>> ----------- Please Consult the Following Before Posting -----------
>> TeX FAQ: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tex.ac.uk%2Ffaq&data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=J5S3CahvYPjOsOZxfXl5MAjRXAGqN4GXyVlVOHjMUN0%3D&reserved=0
>> List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
>> List Archives: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdir.gmane.org%2Fgmane.comp.tex.macosx&data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=M7POYGVA5WgrAIs%2BO6BZOUvSnMzK%2B9Q6JCBqWlgAfck%3D&reserved=0
>>               https://email.esm.psu.edu/pipermail/macosx-tex/
>> TeX on Mac OS X Website: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmactex-wiki.tug.org%2F&data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=uOynq8xj2i7LJ7BqfK9JGI3Vo4p8RPvEGJN%2F3aPn8Eg%3D&reserved=0
>> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tex.ac.uk%2Ffaq&data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=J5S3CahvYPjOsOZxfXl5MAjRXAGqN4GXyVlVOHjMUN0%3D&reserved=0
> List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
> List Archives: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdir.gmane.org%2Fgmane.comp.tex.macosx&data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=M7POYGVA5WgrAIs%2BO6BZOUvSnMzK%2B9Q6JCBqWlgAfck%3D&reserved=0
>                https://email.esm.psu.edu/pipermail/macosx-tex/
> TeX on Mac OS X Website: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmactex-wiki.tug.org%2F&data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=uOynq8xj2i7LJ7BqfK9JGI3Vo4p8RPvEGJN%2F3aPn8Eg%3D&reserved=0
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20210622/03d33a8e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Scripting BBEdit.pdf
Type: application/pdf
Size: 1340725 bytes
Desc: Scripting BBEdit.pdf
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20210622/03d33a8e/attachment-0001.pdf>


More information about the MacOSX-TeX mailing list