[OS X TeX] Update to 10.9.3 & Applescript TeXShop Macro
Michael Sharpe
msharpe at ucsd.edu
Sat May 17 20:53:42 CEST 2014
On May 17, 2014, at 5:00 AM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>
> On May 16, 2014, at 10:29 PM, Michael Sharpe <msharpe at ucsd.edu> wrote:
>
>>
>> On May 16, 2014, at 7:49 PM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>>
>>>
>>> On May 16, 2014, at 9:41 PM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>>>
>>>>
>>>> On May 16, 2014, at 9:29 PM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>>>>
>>>>>
>>>>> On May 16, 2014, at 7:06 PM, Michael Sharpe <msharpe at ucsd.edu> wrote:
>>>>>
>>>>>>
>>>>>> On May 16, 2014, at 9:25 AM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>>>>>>
>>>>>>> Howdy,
>>>>>>>
>>>>>>> I've used an Applescript Macro in TeXShop to remove auxiliary files for many years. I like it because it's easy to edit and adjust the list of extensions to remove. Unfortunately it is Applescript which, all too often, seems to change syntax. That usually only happens with major OS updates, e.g., OS X 10.8->10.9, but now I'm seeing a problem with my update from OS X 10.9.2->10.9.3. I get a spinning wheel when I execute it and occasionally an error about not finding .tex.
>>>>>>>
>>>>>>> I know we have some Applescript experts on the list and wonder if they could take a look at the macro and see if they can analyse and fix the problem.
>>>>>>>
>>>>>>> <DeleteAllAuxiliaryFiles.plist>
>>>>>>>
>>>>>>
>>>>>> I've attached my reworking of the macro so that it runs quite fast even in a very large folder with about 3000 files. I can't be sure this fixes the problems you were seeing, as it's possible the update to 10.9.3 affected TeXShop's AppleScript interpreter.
>>>>>>
>>>>>> Michael
>>>>>
>>>>> Howdy,
>>>>>
>>>>> This is AMAZING! I had to add the .gz to the end of synctex in the list but it's really amazingly fast and accurate. Thanks!!!
>>>>>
>>>>> Good Luck,
>>>>>
>>>>> Herb Schulz
>>>>> (herbs at wideopenwest dot com)
>>>>
>>>> Howdy,
>>>>
>>>> Actually had to add .gz* to the end of synctex in the list! If you abort you get a .synctex.gx(busy) extension and rm hates the (! :-)
>>>>
>>>> This works amazingly well!
>>>>
>>>> Good Luck,
>>>>
>>>> Herb Schulz
>>>> (herbs at wideopenwest dot com)
>>>
>>> Howdy,
>>>
>>> Sigh... and one more thing. I deleted the section that calls TextEdit. It seemed to open TextEdit no matter what was happening and the dialog box never opened to give me a choice.
>>>
>>
>> The attached version includes the change in the extension list from "synctex" to "synctex.gz*" and fixes a problem with fspec when delete_files_only_with_same_name is set to false. I also deleted a repeated "fls" which was not causing problems except for some puzzlement about repetitions in the list of files to be deleted. I'll look more carefully at the TextEdit problem tomorrow. I would have used TeXShop but for the added complications with its "open" command in "--applescript direct" mode.
>>
>> Michael
>>
>>
>> <DeleteAux.plist>
>
> Howdy,
>
> Must admit I've never used delete_files_only_with_smae_name set to false! :-)
>
> I attach my fudged up version with all the TextEdit commented out and the duplicate fls removed.
>
> <DeleteAllAuxiliaryFiles.plist>
>
I tried without success to replicate the problem you described with TextEdit always opening to show the files to delete. The code says to do this when there are 20 or more such files, which should happen only if delete_files_only_with_same_name is set to false. So, I've left in my newest version, which also includes more error handling for some conditions, and activates TeXShop after opening TextEdit so that the dialog box isn't hidden by another window. Also, just in case someone sets delete_files_only_with_same_name to false, I've deleted "pdf" from the extensions_to_delete list, as that could result in deletion of some of your graphic inclusions. It may make sense to split this into two separate macros, one for "same name" and one for "all in same folder".
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DeleteAllAuxiliaryFiles.plist
Type: application/octet-stream
Size: 3610 bytes
Desc: not available
URL: <http://tug.org/pipermail/macostex-archives/attachments/20140517/7cf897b1/attachment.obj>
More information about the macostex-archives
mailing list