#!/bin/csh -f # Show names of existing emacs autosave files, and optionally prompt to delete # them. Good for cleaning up any that got left behind when I said No after # Aquamacs asked whether to save my changes. #ls -FlartR /var/folders/cT/cTpAPWp0HAy1lMqO3iQ9g++++TI/-Tmp-/ #ls -FlartR /var/folders/*/*/-Tmp-/ |& grep Users # The following shows the full paths better, to make it easier to delete them. #find /var/folders -name "*Users*" |& grep Users #if ("$1" == "del") then # find /var/folders -name "*Users*" -ok rm -v "{}" ";" #endif # Note: Change this location if it ever changes in my .emacs file. if (! -d ~/temp/emacs/autosaves) then # Create ~/temp/emacs/autosaves folder to hold emacs autosave files # in case it doesn't already exist. Emacs does NOT create it otherwise, # and so all autosaves fail. echo "Creating ~/temp/emacs/autosaves folder..." mkdir -pv ~/temp/emacs/autosaves endif find ~/temp/emacs/autosaves/ -name "*#*" if ("$1" == "del") then find ~/temp/emacs/autosaves/ -name "*#*" -ok rm -v "{}" ";" endif