I would like to display the consistency graph in a new line below the task. This way I can use it for quite a long time without covering task letters or breaking the layout

 10:00 ...... TODO Workout in the gy||||*||*||**|||*|||||||

 should be displayed as                     ;;     ^ 
 10:00 ...... TODO Workout in the gym group ;;     |
              ||||*||*||**|||*|||||||       ;; <-- consistency graph

Any ideas on how to make the concistency graph easyer on the eyes (like this)?

  • 1
    The default formatting drives me crazy because of long habit descriptions I have. I have changed the value of org-habit-graph-column to 60 from the default 40. – gregoryg Sep 12 '20 at 16:17

I don't think there is an option for doing that, so if you really want it, you'll have to modify the Org mode sources and carry the patch privately (I doubt very much that this change would be accepted upstream). That means that every time that you want to update, you will have to apply the patch again (and again, and again...)

The patch itself is simple:

diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index f76f0f213..5f2e11518 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -430,6 +430,8 @@ current time."
       (while (not (eobp))
    (let ((habit (get-text-property (point) 'org-habit-p)))
      (when habit
+       (end-of-line)
+       (insert-before-markers "\n")
        (move-to-column org-habit-graph-column t)
        (delete-char (min (+ 1 org-habit-preceding-days

It just adds two lines to the function org-habit-insert-consistency-graphs in org-habit.el and since this function is only called when the agenda is created, it is a fairly safe change.

But as I said, you will have to carry the patch in perpetuity or fork the Org mode sources to create your own. Whether that's worth the bother is up to you to decide.

There are options to reposition the graph on the line and make it shorter or longer: as @gregoryg points out in a comment, you can change the position of the graph by customizing org-habit-graph-column; you can change the length of the graph by customizing org-habit-preceding-days and org-habit-following-days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.