From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qKCfA+Lvg1/EXQAA0tVLHw (envelope-from ) for ; Mon, 12 Oct 2020 05:55:46 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id qD0bO+Hvg18xfwAA1q6Kng (envelope-from ) for ; Mon, 12 Oct 2020 05:55:45 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 57D569401CD for ; Mon, 12 Oct 2020 05:55:44 +0000 (UTC) Received: from localhost ([::1]:38182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRqoA-0000Du-Gi for larch@yhetil.org; Mon, 12 Oct 2020 01:55:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRqnO-0000CU-Er for emacs-orgmode@gnu.org; Mon, 12 Oct 2020 01:54:54 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:37101) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kRqnL-0000m5-QL for emacs-orgmode@gnu.org; Mon, 12 Oct 2020 01:54:54 -0400 Received: by mail-pg1-x535.google.com with SMTP id h6so13234681pgk.4 for ; Sun, 11 Oct 2020 22:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wakatara.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Ju2kIcrHB/sp5kfmuftDZ2mopUBLNFacotfBu504nk8=; b=sxiPpvuwt0lQXTJApp2OQSbNSPNVjN9fveufmdsxLu6cbwd+1gDBMlP9qGKVMTyV8b HNuhUpfDJ9PiHCyEXgA7ZjkORLbr2EHa22xagksAvrQi8IowwSJGiXgfTFk0CcjCEQ6s mbcEFuhX1noI/39ePjFDsV+X9c2FKq6rXrDYVEpLXltEuOtrLsvI5cBPPC6I6F1LSDUX FPzRlKca35TT72zJIQaJECHdln8zVjr/smX+F5I631WWadEdQmt9LN84XVOiA02XXK3y R7fsMAbbiaZc1g/nCBoBjcvHdaTGIo+yFyk5CAeNbhgPIRF4yDcX6aEUES8lidtz2lWv Rxjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Ju2kIcrHB/sp5kfmuftDZ2mopUBLNFacotfBu504nk8=; b=CJRPldbL2lCWp4nIZEEKjngcAjaU0a4w5rs3I63zg19mLjhaAr1Il5ZHIJWs/Y1YqC 3+fxdGQrngaAA3hgwY1MaNA9xS/ZFkK53jrflOm1cvtq+uZoEB7JHTRW0Ors7dL/jE1r U63+0ud49wKarDimK/QLi8MnvWkS05L1pApuAg3wpzVhU0/aIJ5VBL7SNo7SDUkaMxkM 7pOAmxezFqgb9hhmruS2y8mShOoOKAJEQNY6XkBbcdQTnc7pz9AStDQTov7O62GNAbjf BkxJGy7D3bkdFcbxeqAceWeI27bTpMfqSiTMyGRo1ckj2WoKDCCQjuQWrYEZQ/o0RxXu o8xw== X-Gm-Message-State: AOAM530RGQRQLFUbQe/6qAI4tzCCSEAol7tdZN9T2E0/JyoiEDyncP3Z O1fFQQzmMkHxInevOV5GI97xmx6BuL4TlaQVC+XIRMxArJjd6Q== X-Google-Smtp-Source: ABdhPJzlsRGaaAv3K6wB3hpkpIOtgJy2j7EQPRcGad++D9lqBee/D5bljAzinn7YALOR/0EF3c9zmkYv4KBuvv7IEtI= X-Received: by 2002:a17:90b:891:: with SMTP id bj17mr17807520pjb.44.1602482089077; Sun, 11 Oct 2020 22:54:49 -0700 (PDT) MIME-Version: 1.0 References: <87pn5q308s.fsf@web.de> In-Reply-To: <87pn5q308s.fsf@web.de> From: Daryl Manning Date: Mon, 12 Oct 2020 13:54:13 +0800 Message-ID: Subject: Re: org-mode time tracking setup integrating with SaaS (Harvest, Toggl, Bonsai etc) To: Org-mode Content-Type: multipart/alternative; boundary="000000000000adcb1d05b172ef60" Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=daryl@wakatara.com; helo=mail-pg1-x535.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=wakatara.com header.s=google header.b=sxiPpvuw; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.21 X-TUID: jArELMQ/pglY --000000000000adcb1d05b172ef60 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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? Daryl. On Sat, Oct 10, 2020 at 5:21 PM Dr. Arne Babenhauserheide wrote: > > Daryl Manning 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 acros= s > a > > few clients and projects for consultancy purposes > > I don=E2=80=99t do consultancy, but we I need to book for multiple projec= ts at > work. I track my time and projects with org-mode (and found that > whenever I think =E2=80=9Cthis is so small, I don=E2=80=99t need an org-h= eadline for > this=E2=80=9D, 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 > agenda-view. > > These are my essential customizations for that: > > (use-package org-agenda > :defer 8 > :custom > (alert-default-style 'libnotify) > (appt-disp-window-function 'alert-for-appt) > (appt-delete-window-function (lambda ())) > (org-agenda-clock-consistency-checks > (quote > (:max-duration "12:00" :min-duration 0 :max-gap "0:05" :gap-ok-around > ("4:00" "12:00") > :default-face > ((: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) > :config > ;; 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 () > (interactive) > (save-excursion > (search-forward ":KANBAN:") > (org-agenda-goto) > (org-narrow-to-subtree) > (show-all) > (fit-window-to-buffer) > (widen) > (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" > ((agenda) > (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 () > (interactive) > (org-agenda nil "o") > (delete-other-windows) > (my/org-agenda-show-kanban) > (rotate-windows 1)) > ;; systemsettings shortcuts: map f12 to > ;; emacsclient -e '(progn (show-frame)(agenda-and-todo))' > (global-set-key (kbd "") '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-") '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-") '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-") '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!" > (raise-frame) > ; yes, you have to call this twice. Don=E2=80=99t ask me why=E2=80=A6 > ; 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 > homeoffice. > > Best wishes, > Arne > -- > Unpolitisch sein > hei=C3=9Ft politisch sein > ohne es zu merken > --000000000000adcb1d05b172ef60 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Very impressive. I am probably going to steal some of= these functions. Thank you.

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

Daryl.


On Sat, Oct 10, 2020 at 5:21 PM Dr. Arn= e 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 acro= ss a
> few clients and projects for consultancy purposes

I don=E2=80=99t 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 =E2=80=9Cthis is so small, I don=E2=80=99t need an org-hea= dline for
this=E2=80=9D, time gets out of hand). At the end of the week I then book m= y
time on the corresponding Jira issues using the clocktable in
agenda-view.

These are my essential customizations for that:

(use-package org-agenda
=C2=A0 :defer 8
=C2=A0 :custom
=C2=A0 (alert-default-style 'libnotify)
=C2=A0 (appt-disp-window-function 'alert-for-appt)
=C2=A0 (appt-delete-window-function (lambda ()))
=C2=A0 (org-agenda-clock-consistency-checks
=C2=A0 =C2=A0(quote
=C2=A0 =C2=A0 (:max-duration "12:00" :min-duration 0 :max-gap &qu= ot;0:05" :gap-ok-around
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("= ;4:00" "12:00")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:defau= lt-face
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((:bac= kground "DarkRed")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (:for= eground "white"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:overl= ap-face nil :gap-face nil :no-end-time-face nil :long-face nil :short-face = nil)))
=C2=A0 (org-agenda-clockreport-parameter-plist (quote (:link t :maxlevel 2 = :properties ("Effort"))))
=C2=A0 (org-agenda-start-with-clockreport-mode t)
=C2=A0 :config
=C2=A0 ;; Rebuild the reminders everytime the agenda is displayed
=C2=A0 (add-hook 'org-agenda-finalize-hook (lambda () (org-agenda-to-ap= pt t)))
=C2=A0 ;; Run once when Emacs starts
=C2=A0 (org-agenda-to-appt t)
=C2=A0 ;; Activate appointments so we get notifications
=C2=A0 (appt-activate t))

(defun my/org-agenda-show-kanban ()
=C2=A0 (interactive)
=C2=A0 (save-excursion
=C2=A0 =C2=A0 (search-forward ":KANBAN:")
=C2=A0 =C2=A0 (org-agenda-goto)
=C2=A0 =C2=A0 (org-narrow-to-subtree)
=C2=A0 =C2=A0 (show-all)
=C2=A0 =C2=A0 (fit-window-to-buffer)
=C2=A0 =C2=A0 (widen)
=C2=A0 =C2=A0 (recenter-top-bottom 0)))

;; KDE: show custom agenda with kanban via f12:
(with-eval-after-load 'org
=C2=A0 (setq org-agenda-custom-commands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 '(("o" "Agenda and TODOs&quo= t;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((agenda)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (tags-todo "-notodo" ((= org-agenda-block-separator ?-)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (tags "KANBAN" ((org-ag= enda-block-separator ?-)(org-agenda-compact-blocks nil)(org-agenda-overridi= ng-header "")))))))

;; from https://www.emacswiki.org/emacs/TransposeWin= dows solution by Robert Bost
(defun rotate-windows (arg)
=C2=A0 "Rotate your windows; use the prefix argument to rotate the oth= er direction"
=C2=A0 (interactive "P")
=C2=A0 (if (not (> (count-windows) 1))
=C2=A0 =C2=A0 =C2=A0 (message "You can't rotate a single window!&q= uot;)
=C2=A0 =C2=A0 (let* ((rotate-times (prefix-numeric-value arg))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(direction (if (or (< rotate-ti= mes 0) (equal arg '(4)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 'reverse 'identity)))
=C2=A0 =C2=A0 =C2=A0 (dotimes (_ (abs rotate-times))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (dotimes (i (- (count-windows) 1))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let* ((w1 (elt (funcall direction (wind= ow-list)) i))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(w2 (elt (fun= call direction (window-list)) (+ i 1)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(b1 (window-b= uffer w1))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(b2 (window-b= uffer w2))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s1 (window-s= tart w1))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s2 (window-s= tart w2))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(p1 (window-p= oint w1))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(p2 (window-p= oint w2)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (set-window-buffer-start-and-poin= t w1 b2 s2 p2)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (set-window-buffer-start-and-poin= t w2 b1 s1 p1)))))))


(defun agenda-and-todo ()
=C2=A0 (interactive)
=C2=A0 (org-agenda nil "o")
=C2=A0 (delete-other-windows)
=C2=A0 (my/org-agenda-show-kanban)
=C2=A0 (rotate-windows 1))
;;=C2=A0 =C2=A0 =C2=A0 systemsettings shortcuts: map f12 to
;;=C2=A0 =C2=A0 =C2=A0 =C2=A0 emacsclient -e '(progn (show-frame)(agend= a-and-todo))'
(global-set-key (kbd "<f12>") 'agenda-and-todo)

;; KDE: record new issue with M-f12 (alt f12):
;;=C2=A0 =C2=A0 =C2=A0 systemsettings shortcuts: map alt f12 to
;;=C2=A0 =C2=A0 =C2=A0 =C2=A0 emacsclient -e '(progn (show-frame)(org-c= apture))'
(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):
;;=C2=A0 =C2=A0 =C2=A0 systemsettings shortcuts: map f12 to
;;=C2=A0 =C2=A0 =C2=A0 =C2=A0 emacsclient -e '(progn (show-frame)(org-c= lock-out))'
(global-set-key (kbd "M-S-<f12>") 'org-clock-out)

(defun show-frame (&optional frame)
=C2=A0 "Show the current Emacs frame or the FRAME given as argument.
And make sure that it really shows up!"
=C2=A0 (raise-frame)
=C2=A0 ; yes, you have to call this twice. Don=E2=80=99t ask me why=E2=80= =A6
=C2=A0 ; select-frame-set-input-focus calls x-focus-frame and does a bit of=
=C2=A0 ; additional magic.
=C2=A0 (select-frame-set-input-focus (selected-frame))
=C2=A0 (select-frame-set-input-focus (selected-frame)))


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

Best wishes,
Arne
--
Unpolitisch sein
hei=C3=9Ft politisch sein
ohne es zu merken
--000000000000adcb1d05b172ef60--