0
#+startup: logdrawer 
#+SEQ_TODO: URGENT(u!) TODO(t!) SOMEDAY(s!) | DONE(d@) CANCEL(c@)

* Task

** TODO Pay bill
DEADLINE: <2023-02-20 Mon>
:LOGBOOK:
- State "TODO"       from              [2023-01-25 Wed 22:57]
:END:

If I position the cursor on the deadline's date and do M-x org-open-at-point, I get this error:

Debugger entered--Lisp error: (void-variable org-agenda-buffer-name)
  org-follow-timestamp-link()
  org-open-at-point(nil)
  funcall-interactively(org-open-at-point nil)
  call-interactively(org-open-at-point record nil)
  command-execute(org-open-at-point record)
  execute-extended-command(nil "org-open-at-point" "org-open-at-point")
  funcall-interactively(execute-extended-command nil "org-open-at-point" "org-open-at-point")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

If I do M-x org-agenda-month-view, I get this error:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  calendar-gregorian-from-absolute(nil)
  org-agenda-compute-starting-span(nil month nil)
  org-agenda-change-time-span(month nil)
  org-agenda-month-view(nil)
  funcall-interactively(org-agenda-month-view nil)
  call-interactively(org-agenda-month-view record nil)
  command-execute(org-agenda-month-view record)
  execute-extended-command(nil "org-agenda-month-view" "org-agenda-month")
  funcall-interactively(execute-extended-command nil "org-agenda-month-view" "org-agenda-month")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

How to intepret these errors?

7
  • 1
    AFAICS, the only reason for org-agenda-buffer-name to be undefined (i.e. a void variable) is that org-agenda is not loaded. Do M-: (featurep 'org-agenda) to check if the feature has been enabled. If not, M-x load-library RET org-agenda. But you should fix your init file to initialize Org mode properly.
    – NickD
    Jan 26 at 6:21
  • 1
    Starting from emacs -Q, I cannot reproduce the second problem. If org-agenda is not loaded, then Emacs complains that org-agenda-month-view is undefined. If it is loaded, then the command does not raise an error: it just reports No Org agenda currently displayed.
    – NickD
    Jan 26 at 6:26
  • @NickD " But you should fix your init file to initialize Org mode properly. " In this case, this means what?
    – Erwann
    Jan 30 at 16:19
  • It means that you should not have to explicitly load org-agenda: it's hard to be specific without knowing how you install/initialize Org mode, but ideally, you should have all the functions that you need available without having to load anything explicitly. In my case, e.g., my init file contains (require 'org-loaddefs) which is an auto-generated file that contains autoload definitions for everything. There is unfortunately no such facility for variables AFAIK, so this is not a complete solution, but it goes a long way towards solving such problems.
    – NickD
    Jan 30 at 16:43
  • 1
    I didn't look at it in detail, but other than "the definition has to precede the use" problem that the answer on that question identifies (which is a correct answer IMO), there is not much else going on there: just settings of options. In any case, as I mentioned above, this problem is not because of you doing something wrong (so my comment above about fixing your init file was off the mark): it is a bug In Org mode. The workaround I suggested (loading org-agenda) will carry you through until you can update your Org mode to pick up the fix.
    – NickD
    Jan 31 at 2:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.