[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-mode time tracking setup integrating with SaaS (Harvest, Toggl,

From: Daryl Manning
Subject: Re: org-mode time tracking setup integrating with SaaS (Harvest, Toggl, Bonsai etc)
Date: Mon, 12 Oct 2020 13:54:13 +0800

Very impressive. I am probably going to steal some of these functions. Thank you.

Is the process you use to get this into jira (via clocktable) automatedx in any way (even copy/paste) or do you have to put things in manually again?


On Sat, Oct 10, 2020 at 5:21 PM Dr. Arne Babenhauserheide <arne_bab@web.de> wrote:

Daryl Manning <dwm+orgmode@wakatara.com> writes:

> Has anyone run across a good integration for doing that or has a blog post
> on their system particularly where they need to track hours/tasks across a
> few clients and projects for consultancy purposes

I don’t do consultancy, but we I need to book for multiple projects at
work. I track my time and projects with org-mode (and found that
whenever I think “this is so small, I don’t need an org-headline for
this”, time gets out of hand). At the end of the week I then book my
time on the corresponding Jira issues using the clocktable in

These are my essential customizations for that:

(use-package org-agenda
  :defer 8
  (alert-default-style 'libnotify)
  (appt-disp-window-function 'alert-for-appt)
  (appt-delete-window-function (lambda ()))
    (:max-duration "12:00" :min-duration 0 :max-gap "0:05" :gap-ok-around
                   ("4:00" "12:00")
                   ((:background "DarkRed")
                    (:foreground "white"))
                   :overlap-face nil :gap-face nil :no-end-time-face nil :long-face nil :short-face nil)))
  (org-agenda-clockreport-parameter-plist (quote (:link t :maxlevel 2 :properties ("Effort"))))
  (org-agenda-start-with-clockreport-mode t)
  ;; Rebuild the reminders everytime the agenda is displayed
  (add-hook 'org-agenda-finalize-hook (lambda () (org-agenda-to-appt t)))
  ;; Run once when Emacs starts
  (org-agenda-to-appt t)
  ;; Activate appointments so we get notifications
  (appt-activate t))

(defun my/org-agenda-show-kanban ()
    (search-forward ":KANBAN:")
    (recenter-top-bottom 0)))

;; KDE: show custom agenda with kanban via f12:
(with-eval-after-load 'org
  (setq org-agenda-custom-commands
        '(("o" "Agenda and TODOs"
            (tags-todo "-notodo" ((org-agenda-block-separator ?-)))
            (tags "KANBAN" ((org-agenda-block-separator ?-)(org-agenda-compact-blocks nil)(org-agenda-overriding-header "")))))))

;; from https://www.emacswiki.org/emacs/TransposeWindows solution by Robert Bost
(defun rotate-windows (arg)
  "Rotate your windows; use the prefix argument to rotate the other direction"
  (interactive "P")
  (if (not (> (count-windows) 1))
      (message "You can't rotate a single window!")
    (let* ((rotate-times (prefix-numeric-value arg))
           (direction (if (or (< rotate-times 0) (equal arg '(4)))
                          'reverse 'identity)))
      (dotimes (_ (abs rotate-times))
        (dotimes (i (- (count-windows) 1))
          (let* ((w1 (elt (funcall direction (window-list)) i))
                 (w2 (elt (funcall direction (window-list)) (+ i 1)))
                 (b1 (window-buffer w1))
                 (b2 (window-buffer w2))
                 (s1 (window-start w1))
                 (s2 (window-start w2))
                 (p1 (window-point w1))
                 (p2 (window-point w2)))
            (set-window-buffer-start-and-point w1 b2 s2 p2)
            (set-window-buffer-start-and-point w2 b1 s1 p1)))))))

(defun agenda-and-todo ()
  (org-agenda nil "o")
  (rotate-windows 1))
;;      systemsettings shortcuts: map f12 to
;;        emacsclient -e '(progn (show-frame)(agenda-and-todo))'
(global-set-key (kbd "<f12>") 'agenda-and-todo)

;; KDE: record new issue with M-f12 (alt f12):
;;      systemsettings shortcuts: map alt f12 to
;;        emacsclient -e '(progn (show-frame)(org-capture))'
(global-set-key (kbd "M-<f12>") 'org-capture)

;; clock into the current task via S-f12 (shift f12). rationale: shift
;; is used to shift from one task to another without clocking out.
(global-set-key (kbd "S-<f12>") 'org-clock-in)

;; KDE: global clock out via M-S-f12 (alt-shift f12):
;;      systemsettings shortcuts: map f12 to
;;        emacsclient -e '(progn (show-frame)(org-clock-out))'
(global-set-key (kbd "M-S-<f12>") 'org-clock-out)

(defun show-frame (&optional frame)
  "Show the current Emacs frame or the FRAME given as argument.

And make sure that it really shows up!"
  ; yes, you have to call this twice. Don’t ask me why…
  ; select-frame-set-input-focus calls x-focus-frame and does a bit of
  ; additional magic.
  (select-frame-set-input-focus (selected-frame))
  (select-frame-set-input-focus (selected-frame)))

I have a dedicated emacs environment for work that I brought over into

Best wishes,
Unpolitisch sein
heißt politisch sein
ohne es zu merken

reply via email to

[Prev in Thread] Current Thread [Next in Thread]