all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sharon Kimble <boudiccas@skimble.plus.com>
To: help-emacs <help-gnu-emacs@gnu.org>
Subject: how to integrate org-pomodoro into my daily schedule
Date: Mon, 30 Oct 2017 10:42:48 +0000	[thread overview]
Message-ID: <874lqghq6v.fsf@skimble.plus.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]


Whilst using emacs and org-mode I regularly clock in and out using this code -

--8<---------------cut here---------------start------------->8---
#+begin_src emacs-lisp
(defun org-clockin ()
  (when (and (string= org-state "IN-PROGRESS")
             (string= org-last-state "TODO")
       (not (string= org-last-state org-state)))
    (org-clock-in)))

(add-hook 'org-after-todo-state-change-hook 'org-clockin)
#+end_src
[2016-04-20 Wed 11:56]
[2017-01-17 Tue 11:49]

#+begin_src emacs-lisp
(defun org-clockout ()
  (when (and (string= org-state "TODO")
             (string= org-last-state "IN-PROGRESS")
       (not (string= org-last-state org-state)))
    (org-clock-out)))

(add-hook 'org-after-todo-state-change-hook 'org-clockout)
#+end_src
--8<---------------cut here---------------end--------------->8---

I now want to auto-log in to "org-pomodoro" when I 'org-clockin' and
obviously auto-log out when I 'org-clockout' but how please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.2, fluxbox 1.3.5-2, emacs 25.3.2, org-mode 9.1.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

                 reply	other threads:[~2017-10-30 10:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=874lqghq6v.fsf@skimble.plus.com \
    --to=boudiccas@skimble.plus.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.