unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* how to integrate org-pomodoro into my daily schedule
@ 2017-10-30 10:42 Sharon Kimble
  0 siblings, 0 replies; only message in thread
From: Sharon Kimble @ 2017-10-30 10:42 UTC (permalink / raw)
  To: help-emacs

[-- 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 --]

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

only message in thread, other threads:[~2017-10-30 10:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-30 10:42 how to integrate org-pomodoro into my daily schedule Sharon Kimble

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).