From: David Maus <maus.david@gmail.com>
To: Richard Riley <rileyrgdev@googlemail.com>
Cc: Emacs-orgmode mailing list <emacs-orgmode@gnu.org>
Subject: Re: clock based context settings
Date: Wed, 20 Jan 2010 09:30:41 +0100 [thread overview]
Message-ID: <873a21rxe6.wl%maus.david@gmail.com> (raw)
In-Reply-To: <4b562f2a.0c07560a.206e.ffff99b6@mx.google.com>
[-- Attachment #1.1: Type: text/plain, Size: 1255 bytes --]
Hi Richard,
At Tue, 19 Jan 2010 23:16:08 +0100,
Richard Riley wrote:
>
>
> I would like to be able to execute arbitrary elisp when I clock in or
> out of a certain org.item This would be very, very useful for defining
> variables or even keystrokes on a "per project" basis. Ideally it would
> work using inheritance so if an item does not have something then the
> project or file level values would be used.
>
> e.g at the file level:
>
> #+CLOCKINEXEC: (setq curr-url "project1.com")
>
> Or at the org item level
>
> ** touch up picture of the org logo
> :PROPERTIES:
> :CLOCKINEXEC: (setq curr-url "org-mode.com/images")
> :END:
>
> Would others think this might be useful or is there another way/approach
> to achieve something similar?
You could use the org-clock-hooks `org-clock-in-hook',
`org-clock-out-hook' and `org-clock-cancel-hook' in combination with a
function that checks for the desired conditions and sets the variables
accordingly.
A question that came in my mind: What happens if you clock out or
cancel a clock? Are the variables kept or set to a default value? Or
to the value they had before clocking in?
Regards
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... maus.david@gmail.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2010-01-20 8:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 22:16 clock based context settings Richard Riley
2010-01-20 8:30 ` David Maus [this message]
2010-01-20 9:34 ` Richard Riley
2010-01-28 17:42 ` Carsten Dominik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873a21rxe6.wl%maus.david@gmail.com \
--to=maus.david@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=rileyrgdev@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.