reddit / emacs

Org Mode - My (org-habit) habit consistency graph is cutting off my TODO headline text. Can I shift the graph to the right?

Status-Detective-783 · 2022-03-04 23:27
This is my habit: **** TODO I would like this whole line to display. SCHEDULED: <2022-03-04 .+1d> :PROPERTIES: :STYLE: habit :END: Here's what my consistency graph looks like: https://i.imgur.com/eK3wTga.png There's plenty of room to move the consistency graph to the right. How can I do that? GNU Emacs 27.2
nv-elisp · 2022-03-05 00:24
I would check the customization options for Org-habit before asking for help.
gotsreich · 2022-03-05 02:38
(defcustom org-habit-graph-column 40 "The absolute column at which to insert habit consistency graphs. Note that consistency graphs will overwrite anything else in the buffer." :group 'org-habit :type 'integer) Maybe this guy? I found it by going to the org-habit.el file. Dunno if this is obvious or I'm just slow, but here's how I figured out how to do that sorta thing: 1. Go to the scratch file and enter `(require 'org-habit)`. 2. At the end of that line, type `C-j` to execute it. This runs `eval-print-last-sexp`. 3. Put your cursor over `org-habit` and type `M-.` to jump to the source file. This runs `xref-find-definitions`. You can skip the first two steps if you're in your `init.el` file since `org-habit` will already be loaded.
Status-Detective-783 · 2022-03-05 03:05
That was a great execise for me, thanks! I ran through the same steps. The other way I'd do it is through M-x rgrep (which I just learned today).
Status-Detective-783 · 2022-03-05 03:22
Thanks!. I didn't really even know enough to go there. So yes, I went there and set it. But also, now I really FULLY understand /u/gotsreich's answer. The fact that the code has a `(defcustom org-habit-graph-column ...)` entry, that means that I can find and change it via customizations. And if I want, see what the customization does and then do that myself in my init.el file. I guess that should be kind of obvious, but it's a 1 + 1 = 2 moment for me.
nv-elisp · 2022-03-05 03:49
M-x customize-group