jceb / vim-orgmode

Text outlining and task management for Vim based on Emacs' Org-Mode
http://www.vim.org/scripts/script.php?script_id=3642
Other
3.12k stars 266 forks source link

agenda view shows nothing #227

Closed Bruno-Sosa closed 8 years ago

Bruno-Sosa commented 8 years ago

Whenever I type -caa (where - is my localleader) I get the following message:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/xxxx/.vim/ftplugin/orgmode/plugins/Agenda.py", line 152, in list_next_week
    last_date = raw_agenda[0].active_date
IndexError: list index out of range

I can't figure it out. I looked at the mentioned line, and where raw_agenda is defined. ORGMODE.agenda_manager is imported from here, which calls AgendaManager(). Looking at the imports leads me to where .get_next_week_and_active_todo is defined. (yes the todos are active and within this week, it works fine in emacs org-mode) It is being called with agenda_documents, which is defined here. I have no idea whatcls is or what is calling list_next_week in the first place

Bruno-Sosa commented 8 years ago

I sorry if I mixed up my terminology, as I'm not a programmer (know a bit a python, but definitely not OOP). I'm running Arch Linux if that helps.

Ron89 commented 8 years ago

I fixed the out of range problem with a simple fix few days ago. Please update and see if the issue still exists?

The main reason is when there is no matched agenda, raw_agenda is empty. Yet the empty array was not handled properly.

Ron89 commented 8 years ago

Also, you also need to setup your agenda files with let g:org_agenda_files=['list', 'of'. 'files'], e.g.,

  let g:org_agenda_files=['~/research_Documents/research/journal.org', '~/projects/todo-list.org']
Bruno-Sosa commented 8 years ago

ok thank you! I did set my agenda files, but since I just started I choose only one. To update I download from here and unzip it to ~/.vim/ right? Since what I installed from vim.org is from 2015 apparently

Ron89 commented 8 years ago

Oh, no. The new changes are not released yet. I suggest you use vim-plug to install it. vim-plug is a good plugin-manager.

Add the line

Plug 'jceb/vim-orgmode'

In your .vimrc after installing vim-plug and invoke

:PlugInstall
Bruno-Sosa commented 8 years ago

ha, ok guess one more package won't hurt :) (at least its minimalist) Thank you anyways.