From e1f7953786ef87392f9356bb02c213d0ede50f17 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 11 Aug 2022 16:44:50 +0100 Subject: (Emacs)+org-clock-report functionality Provides the ability to generate a report in your file, and also an advice which (when a toggle is enabled) regenerates the top level report after clock out. --- Emacs/.config/emacs/config.org | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 3c2571f..8fbeabe 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -2341,17 +2341,32 @@ a very tidy way to manage your time. #+end_src *** Org clock-in Org provides a nice timekeeping system that allows for managing how -much time is taken per task. +much time is taken per task. It even has an extensive reporting +system to see how much time you spend on specific tasks or overall. #+begin_src emacs-lisp (use-package org-clock :after org :straight nil + :init + (defvar +org/clock-out-toggle-report nil + "Non-nil means update the first clock report in the file every +time a clock out occurs.") + :config + (advice-add #'org-clock-out + :after + (proc (interactive) + (if +org/clock-out-toggle-report + (org-clock-report t)))) :general (local-leader :keymaps 'org-mode-map :infix "c" "c" #'org-clock-in - "o" #'org-clock-out)) + "o" #'org-clock-out + "r" #'org-clock-report + "t" (proc (interactive) + (setq-local +org/clock-out-toggle-report + (not +org/clock-out-toggle-report))))) #+end_src ** C/C++ Setup for C and C++ modes via the cc-mode package. C and C++ are -- cgit v1.2.3-13-gbd6f