0

No items are showing when I load the agenda view. When I press C-c a, the agenda view menu comes up fine. But hitting a brings up an empty list, and so does t.

M-x describe-variable RET org-agenda-files shows

enter image description here

There are tonnes of TODO items in ~/org/todo.org, eg:

enter image description here

My init is defined in ~/.emacs.d/init.el and I do not have an ~/.emacs. My init.el has only one definition of org-agenda-files.

I really am at a loss as to why this is not working.

Emacs version 26.3 Org version 9.3.1

Not sure what other information might be useful?

I have been using Emacs for a while, but would consider myself a noob with custom configuration and org mode.

UPDATE:

The Messages buffer is showing errors like this:

Press key for agenda command (unrestricted):
org-agenda-get-todos: Wrong type argument: number-or-marker-p, "E"
user-error: Command not allowed in this line [3 times] 

I set debug-on-entry for org-agenda-get-todos, and it shows this in the debug buffer:

Debugger entered--entering a function:
* org-agenda-get-todos()
org-agenda-get-day-entries("~/org/todo.org" (1 21 2020) :todo)
org-todo-list(nil)
funcall-interactively(org-todo-list nil)
call-interactively(org-todo-list)
org-agenda(nil)
funcall-interactively(org-agenda nil)
call-interactively(org-agenda nil nil)
command-execute(org-agenda) 
  • Do any of your TODO items have dates? – NickD Jan 21 at 17:49
  • Yes, I have some with deadlines (eg. DEADLINE: <2020-01-22 Wed> – StevenMurray Jan 21 at 17:53
  • OTOH, t should show all TODO items whether they have dates or not, so there's probably more to the story. – NickD Jan 21 at 17:54
  • Yup, that's why I've been trying both a and t. – StevenMurray Jan 21 at 17:54
  • Can you post your settings? Maybe do M-x org-submit-bug-report but don't send it: just cut and paste your settings into the question. – NickD Jan 21 at 17:59
0

The solution here was that I had the following lines in my ~/.emacs.d/init.el:

(setq org-highest-priority "A")
(setq org-lowest-priority "E")
(setq org-default-priority "B")

But they should have been

(setq org-highest-priority ?A)
(setq org-lowest-priority ?E)
(setq org-default-priority ?B)
| improve this answer | |
  • 1
    I should have suggested that you toggle debug-on-error. That would have given you a stack trace that might have avoided much of the pain you went through. You might want to try it out in any case: reintroduce the bug, say M-x toggle-debug-on-error and try again. This is a useful technique that you should probably have in your emacs toolbox. The other useful technique is to start emacs with the -q option, which avoids loading your init file. If the error is caused by your settings, then this will avoid them. You can then bisect your way through your init file to find out what's wrong. – NickD Jan 24 at 15:19
  • Thanks for the advice! – StevenMurray Jun 23 at 2:46

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.