[OS X TeX] accidental text clips in TeXShop source files

Bob Kerstetter bkerstetter at mac.com
Fri Jun 23 23:45:56 CEST 2006


Hi Jim,
On Jun 22, 2006, at 5:51 PM, Jim Delany wrote:

> Hi all
>
> I'm a newbie on this list, a regular user of TeXShop and LaTeX, but  
> definitely not a power user. My problem is pretty mundane.
>
> I have some difficulty using a mouse due to a genetic problem known  
> as essential tremor. Sudden hand twitches are fairly frequent. When  
> editing a source file in TeXShop this sometimes creates a text  
> clipping, piece of text in limbo which is likely to end up  
> anywhere. My work-around is to drop the clipping on the desktop out  
> of harm's way.
>
> This only seems to happen in TeXShop, so I suspect it is a feature  
> of that program, but maybe it is part of OS X.
>
> Can anybody tell me how to turn this feature off?  I've checked the  
> Help files, as well as these archives, but I may have overlooked  
> the answer

I don't know how to turn off the feature, but here is an AppleScript  
to clean up the clippings.

Someone on this list wrote this some time ago for cleaning up the  
auxiliary files created by TeX, LaTeX, etc. and I just adapted it for  
textclippings.

If you run it from your home root it will clean up all of your  
directories and subdirectories.

Just drop it into your Scripts folder. You have to select the folder  
after starting the script.

~/Library/Scripts/

This assumes you are using the scripts menu.



(* the on-run handler is activated when the icon of the script is  
double-cicked *)
on run
	set my_folder to (choose folder with prompt "Please choose a  
folder") as alias
	GoCleanUp(my_folder)
end run

(* the on-open handler is activated when a folder is dropped onto the  
script icon *)
on open (drop_folder)
	set my_folder to drop_folder as alias
	GoCleanUp(my_folder)
end open

(* this handler does the actual job *)
on GoCleanUp(my_folder)
	tell application "Finder"
		(* delete the textClippings *)
		delete (every file of my_folder whose name ends with ".textClipping")
		set myFolderList to (every folder of my_folder)
		repeat with myFolder in myFolderList
			my GoCleanUp(myFolder)
		end repeat
	end tell
end GoCleanUp
  
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list