Reputation: 993
I am trying to use org-mode agenda view again. When I run M-x org-todo-list, I get an empty *Org Agenda* and the minibuffer displays
Wrong number of arguments: (0 . 0), 2
I am running org-version 9.1.9 on
System Info :computer:(javascript rust html csv c-c++ git shell spell-checking ivy emacs-lisp markdown org)
These lines are in my .spacemacs file:
(setq org-todo-keywords '((sequence "TODO" "NEXT" "PROG" "HOLD" "WAIT" "|" "DONE" "CNCL")))
'(org-agenda-files
(quote
("~/Documents/developer/editors/emacs/demo/tasks.org" "~/Documents/tasks/tasks.org")))
Both tasks.org files contain nodes with statuses that are not DONE.
Same error from interactive with debug mode on:
(custom-set-variables
'(org-agenda-files (quote ("~/Documents/developer/editors/emacs/demo/tasks.org")))
)
Backtrace is:
Debugger entered--Lisp error: (wrong-number-of-arguments (0 . 0) 2)
org-get-tags(nil nil)
org-agenda-get-todos()
org-agenda-get-day-entries("~/Documents/developer/editors/emacs/demo/tasks.org" (10 4 2019) :todo)
org-todo-list(nil)
funcall-interactively(org-todo-list nil)
call-interactively(org-todo-list record nil)
command-execute(org-todo-list record)
#f(compiled-function (cmd) #<bytecode 0x2601e49>)("org-todo-list")
ivy-call()
ivy-read("M-x " ("eval-last-sexp" "toggle-debug-on-error" "org-version" "org-agenda-file-to-front" "org-publish-current-file" "org-publish" "eval-buffer" "recentf-cleanup" "elisp-index-search" "org-display-inline-images" "diff" "org-lint" "clean-buffer-list" "org-publish-project" "spacemacs/search-ack" "cd" "5x5" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "s" "rsh" "sdb" "xdb" "calc" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "mail" "mpuz" "ping" "smex" "talk" "term" ...) :predicate nil :require-match t :history counsel-M-x-history :action #f(compiled-function (cmd) #<bytecode 0x2601e49>) :sort nil :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
counsel-M-x()
funcall-interactively(counsel-M-x)
call-interactively(counsel-M-x nil nil)
command-execute(counsel-M-x)
A similar error was reported on Org agenda "wrong number of arguments" error running org-version 9.2.1 (I am running org-version 9.1.9).
Any help is appreciated.
UPDATE 1:
C-u M-x org-reload loaded org-version 9.2.4 and then org-todo-list worked as intended.
When I restarted emacs, org-version 9.1.9 loaded, and agenda view got the same error again.
I was not able to install the latest org-version 9.2.6 as described on https://emacs.stackexchange.com/questions/53107/how-to-update-org-mode-via-package-manager
Upvotes: 0
Views: 875
Reputation: 1
I had the exact same issue: spacemacs, Emacs 26.2, startup loads org-mode version 9.1.9 and agenda mode is broken, org-reload gets me version 9.2.4 and everything works but it didn't persist across restarts. It was driving me insane.
I noticed this question here that suggested that loading other packages could be invoking (require 'org)
. So I went through and found that I had
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
(require 'mu4e)
in my .spacemacs
, which I had copied over with the mu4e config from a pre-spacemacs .emacs
file. Commenting out these two lines fixed the problem! Org now loads version 9.2.4 on startup and agenda mode works.
Upvotes: 0
Reputation: 73
UPDATE 1:
C-u M-x org-reload loaded org-version 9.2.4 and then org-todo-list worked as intended.
Thanks! This C-u M-x org-reload worked for me as well after I encountered this error on emacs 26.3. Originally I was using built-in org 9.1.9 and hit this issue. I used melpa to get 9.4.5 20210405 but wasn't able to actually get it to run until I found your answer. So thank you :)
later edit: So I realized this didn't persist across restarts of emacs. The reason why was because my ~/.emacs file contained (require 'org)
, which was causing emacs to load the built-in org package, rather than the newer one downloaded from melpa. Simply removing (require 'org)
from my .emacs resolved the problem, now it loads the newer version of org automatically.
Upvotes: 0