emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* application switching hook
@ 2009-06-02 19:04 Austin Frank
  0 siblings, 0 replies; only message in thread
From: Austin Frank @ 2009-06-02 19:04 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1737 bytes --]

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

[-- Attachment #1.2: Type: application/pgp-signature, Size: 193 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-02 19:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-02 19:04 application switching hook Austin Frank

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).