31 votes
Accepted

org-mode: how to generate clock report for hours worked each day?

I think you might consider this to be a partial solution to your question. If you include :step day in your clocktable line then you'll get several clock tables emitted -- one per day for the current ...
Stuart Hickinbottom's user avatar
10 votes

org-mode: how to generate clock report for hours worked each day?

The closest thing I can come out of this was writing your own custom dynamic block. You can read more about it at C-h i g (org)Dynamic blocks. This, however, requires you to know more about Org-mode ...
Lei Zhao's user avatar
  • 421
9 votes

Add "created" timestamp to LOGBOOK

Instead of adding it to the LOGBOOK, it might work better to add it a property. In particular, it's easier to get the created time out that way. This function sets a CREATED property with the ...
erikstokes's user avatar
  • 12.9k
8 votes
Accepted

Function of org-clock-save.el file and Git related question

The file org-save-clock.el is used to store two kinds of information: the active clock if emacs is shut down while a task is active (gets stored in org-clock-stored-resume-clock) the history of the n ...
dfeich's user avatar
  • 1,904
7 votes

How to conveniently insert a clock entry?

I need to do what you describe quite often. My goal is to do everything from the agenda view, i.e. having to go to the org source files as few as possible. In order to insert a colck interval for a ...
dfeich's user avatar
  • 1,904
7 votes
Accepted

Org: Show Clocked Time hour-by-hour

My solution is by no means shorter than the one by Tobias, and I probably would not have written it, had I not been interested in one of the side products: A function which collects me all clock ...
dfeich's user avatar
  • 1,904
6 votes

Org: Show Clocked Time hour-by-hour

The command org-time-sheet defined in the following code does almost what you specified. If you call it interactively with M-x org-time-sheet you can also set the start and the end time. Only clock ...
Tobias's user avatar
  • 33.2k
6 votes

Add "created" timestamp to LOGBOOK

You can accomplish this by tracking TODO state changes. Specifically, if you add a timestamp to the TODO (setq org-todo-keywords '((sequence "TODO(t!)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELED(c@)")))...
Tyler's user avatar
  • 22.3k
5 votes
Accepted

Rounding time up to multiple of x in when using org-clock

I had to do something similar at work and I solved it by calling the clocktable with a (calc) formula: #+BEGIN: clocktable :maxlevel 3 :block 2017-10-24 :formula "$2=$3;t::$3=if($2 == 0, string(\"\"),...
Fabian's user avatar
  • 196
5 votes
Accepted

How to conveniently insert a clock entry?

I wanted to do this again recently and I just hacked together a simple function which asks for the beginning and the end of the desired clock entry (defun jx/insert-custom-clock-entry () (...
xji's user avatar
  • 2,635
5 votes
Accepted

Time tracking and reporting with cross-cutting concerns in org-mode

This is straightforward by using the :tags option in clocktable lines, and I use this to do something similar to you. I have a separate org file (clock.org in my case), which just contains clock ...
Stuart Hickinbottom's user avatar
4 votes
Accepted

Can I use ido-mode for org-clock-select-task?

I use the following snippet to select a recently clocked task with ido: (defun org-clock-in-select () (interactive) (let (res) (dolist (i org-clock-history) (with-current-buffer (...
mutbuerger's user avatar
  • 3,494
4 votes
Accepted

How to get an audible feedback when the current task is overrun?

As Tyler's answer suggests, org-clock-sound will help org to make an audible feedback for this scenario. However, it is highly probable that lost in the init file there is this line of code ...
asiegf's user avatar
  • 175
4 votes

Save an org-mode buffer when I clock in/out of a task

org-clock-in and org-clock-out have "hooks" associated with them --- lists of extra functions that run whenever you clock in/out. You can add your own functions (which will be called with no arugment)...
erikstokes's user avatar
  • 12.9k
3 votes
Accepted

How to write a complex function for binding on a global hotkey?

You should probably look at the documentation of orgmode agenda views before coding your own todo list. There is already a global TODO list available. See also the variable org-agenda-files. ...
Tobias's user avatar
  • 33.2k
3 votes
Accepted

How to create table of time distribution by tags in Org Mode?

Based on this Gist: https://gist.github.com/tsu-nera/d9ffa6a51a6e7bdb957b Add it to init.el: (require 'org-table) (require 'org-clock) (defun clocktable-by-tag/shift-cell (n) (let ((str "")) (...
Valeriy's user avatar
  • 377
3 votes

How to get an audible feedback when the current task is overrun?

The function org-clock-notify-once-if-expired appears to play a sound, if you have a sound configured in the variable org-clock-sound. That would give you a single audible notification after you first ...
Tyler's user avatar
  • 22.3k
3 votes

Org-clock-report sort by time

#+BEGIN: clocktable :scope subtree :maxlevel 2 :sort (3 . ?n) #+END: you can set the sort column and sort by number.
carlos's user avatar
  • 161
3 votes
Accepted

How can I get a plain string with the clocked time and the estimate effort for the current task clocked-in?

You can use org-minutes-to-clocksum-string to format your time. Here is modified version of the code. (defun shackra/task-clocked-time () "Return a string with the clocked time and effort, if any" ...
Yasushi Shoji's user avatar
3 votes

persistent org-mode clock-in history

Org-Mode also includes this feature by default. You can set org-clock-persist to 'history to save the clock entry history when closing emacs. Or set it to t to also save the running clock when Emacs ...
fpiper's user avatar
  • 491
3 votes
Accepted

Reminds to clock out or just clock out when there has a clock running

I use the following in my init file to solve exactly this problem. I probably cribbed this from somewhere myself but it's been so long I can't remember the source. (defun my/org-clock-query-out () "...
Stuart Hickinbottom's user avatar
3 votes
Accepted

Save an org-mode buffer when I clock in/out of a task

Emacs has cool feature - defadvice. You can surround any function with your own operation. In this case, something along the lines of (add-hook 'org-mode-hook (lambda () (...
Konstantin Levinski's user avatar
3 votes

How can i prevent current clocked task from showing in modeline?

You can set the variable org-clock-clocked-in-display. The docstring reads: Documentation: When clocked in for a task, Org can display the current task and accumulated time in the mode line and/or ...
skrytebane's user avatar
3 votes
Accepted

Automatically clock in when I switch task mode to "in progress"

Figured it out. Much simpler than the linked solution. (add-hook 'org-after-todo-state-change-hook 'org-clock-todo-change) (defun org-clock-todo-change () (if (string= ...
ChasingUG's user avatar
2 votes
Accepted

Sum efforts in org-mode agenda, excluding specific tags

This is a somewhat clunky work-around that accomplishes the desired effect. I used org-trigger-hook to have a switch of a keyword to ASSIGNED trigger a function that changes the property "Effort" to ...
hartshoj's user avatar
  • 497
2 votes

How can I get a plain string with the clocked time and the estimate effort for the current task clocked-in?

Maybe, the following is sufficient for your task. You should be able to adapt it to your purpose since it is more concise than the original version. (defun shackra/task-clocked-time () "Return a ...
Tobias's user avatar
  • 33.2k
2 votes
Accepted

Org-clock-report sort by time

You can define your own :formatter for clocktables. Such a formatter can sort the table data to your likings and delegate further formatting to the formatter determined by org-clock-clocktable-...
Tobias's user avatar
  • 33.2k
2 votes
Accepted

How to clock-out current org-task before exit from Emacs?

Solution: (setq org-main-file "~/orgmode/main.org") (defun valeriy/exit () (with-current-buffer (find-file-noselect org-main-file) (save-excursion (org-clock-out nil t) ...
Valeriy's user avatar
  • 377
2 votes
Accepted

Before first headline at position XX in buffer - Unable to update org-clock-table

You can only use the subtree scope if you're in a headline. Out of a headline you could use :scope file or file-with-archives.
dakra's user avatar
  • 406
2 votes

Org: including clock-out timestamp in clock table report

I am not quite sure what exactly you want: (a) the date the task was completed or (b) the last clock-out date. These are not necessarily the same. I have no solution for (b), but can provide one for (...
Fabian's user avatar
  • 196

Only top scored, non community-wiki answers of a minimum length are eligible