From mboxrd@z Thu Jan 1 00:00:00 1970 From: Austin Frank Subject: application switching hook Date: Tue, 02 Jun 2009 15:04:10 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0042974860==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MBZHs-0003BC-Bq for emacs-orgmode@gnu.org; Tue, 02 Jun 2009 15:04:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MBZHn-00035W-Ab for emacs-orgmode@gnu.org; Tue, 02 Jun 2009 15:04:39 -0400 Received: from [199.232.76.173] (port=40351 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBZHn-00035H-4n for emacs-orgmode@gnu.org; Tue, 02 Jun 2009 15:04:35 -0400 Received: from main.gmane.org ([80.91.229.2]:52236 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MBZHl-0005h1-Vv for emacs-orgmode@gnu.org; Tue, 02 Jun 2009 15:04:34 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MBZHi-0002km-4J for emacs-orgmode@gnu.org; Tue, 02 Jun 2009 19:04:30 +0000 Received: from colossus.cvs.rochester.edu ([128.151.80.181]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Jun 2009 19:04:30 +0000 Received: from austin.frank by colossus.cvs.rochester.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Jun 2009 19:04:30 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============0042974860== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable 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 =2D-=20 Austin Frank http://aufrank.net GPG Public Key (D7398C2F): http://aufrank.net/personal.asc --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAkold6sACgkQlHMl2/XbR4EBngCgyERVs1Jf3FcQzHuGri22tyw6 S3sAoJtTLdffjeIu723vfU5PEQhthiGC =zSfn -----END PGP SIGNATURE----- --=-=-=-- --===============0042974860== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0042974860==--