After upgrade from Ubuntu 18 to 20 my agenda habits chart now is broken. Any ideas in how to fix that?

Figure 1

Figure 2

  • FWIW, I cannot reproduce this: When the headline is too long, it gets cut off at just the point where the consistency graph starts (at the column specified by org-habit-graph-column). The font looks like a fixed-width font, so that's not the problem. Why are you lines wrapped where they are? And what are the characters between the end of the headline and the beginning of the consistency graph?
    – NickD
    Jun 6 '20 at 15:52
  • Why are you lines wrapped where they are? - Good question! - what are the characters between the end of the headline and the beginning of the consistency graph? - white spaces. I edited my question and added a new figure. Have a look.
    – Felipe
    Jun 7 '20 at 3:04
  • I tested in the Q4OS and I have the same issue. Maybe my .emacs file? My .emacs file can be found here: github.com/felipelalli/micaroni/blob/master/emacs/.emacs
    – Felipe
    Jun 7 '20 at 3:28
  • So does it work properly if you start emacs with -q? And I can see it's white space, but is it just spaces, or does it include tabs?
    – NickD
    Jun 7 '20 at 12:23
  • 1
    Then write a minimal init file to do just the necessary initializations and invoke emacs -q -l /path/to/minimal/init.el file. The object of this is to eliminate the bulk of your init file from consideration. Then if you can get the correct result with the miminal file, you can assert that your real init file is the cause. You can then bisect your way through your init file to discover which part of it causes the problem.
    – NickD
    Jun 7 '20 at 12:38

Thanks to @NickD commentary I was able to figure out the issue.

TL;DL: the problem was with the variable org-habit-graph-column that was set to 80 and I just changed to default (removed the line). I tested with 40 and it worked fine as well. That was the first suspicion of @NickD in his first commentary.

Fortunately I keep track of my .emacs changes in my personal repo. So, I used the git bisect tool to find the bad commit. The bad commit was this one: Improving params of habits introduced in Oct 24, 2018. Maybe this wasn't an issue before because now I have scaled my screen to 150% in the new Ubuntu installation.

The first thing I did was to remove the line with org-habit-graph-column and everything just went fine. Then, I changed others parameters too, just to fit better in the screen, in this commit: Fixing chart in agenda to 150% scale screens (HDPI).

  • 1
    BTW, you can accept your own answer: I don't think you gain any reputation but it has the great advantage of indicating to future visitors that this question has an answer that the OP has found acceptable.
    – NickD
    Jun 8 '20 at 14:03
  • I should have added that you have to wait 48 hours before accepting your own answer.
    – NickD
    Jun 8 '20 at 14:11

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.