Hi all-- I'd like to extend my time tracking to some activities outside of emacs. More specifically, I'd like to be prompted to log a note in the active time clock block whenever I change to an application outside of emacs. I'm trying to be honest with myself about why I move from one application to another (the difference between "needed a reference from Zotero" and "got bored so went to check the score of the baseball game"). In Mac OS X, I switch applications using the Command-Tab key sequence. I suspect that the solution to my problem involves writing some applescript that fires a call to emacsclient every time Command-Tab is pressed, or perhaps every time the focused application changes. I think the relevant command line call will be something like emacsclient -e "(progn (org-clock-goto) (org-add-note))" But maybe other people have better ideas for this part of the solution. Perhaps calling a remember template with the current clock as its target (using whichever function drives `C-2 C-c C-c' in the remember buffer) would be better? Unfortunately, I know nothing of applescript and haven't turned up any promising leads in web searches. I know I've seen some applescript posted to this list before, so someone out there must know something about it. Any chance one of you folks has an idea about how to implement this functionality? Alternatively, does emacs have something like an `emacs-loses-focus-hook'? I don't see anything using `M-x apropos' or `M-x apropos-variable' for "focus", but perhaps I'm looking in the wrong place. Thanks for any comments, /au -- Austin Frank http://aufrank.net GPG Public Key (D7398C2F): http://aufrank.net/personal.asc