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.1k stars 266 forks source link

Better error messages #262

Open mgiuffrida opened 7 years ago

mgiuffrida commented 7 years ago

As a new user working through orgguide.txt, the Vim and Python error messages from trying out commands are rather daunting.

At least the second example below ends with a more useful suggestion, but the traceback still isn't necessary.

Examples:

[normal mode] type <LocalLeader>d

Error detected while processing :
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Michael\vimfiles\bundle\vim-orgmode\ftplugin\orgmode\_vim.py", lin
e 41, in r
    res = f(*args, **kwargs)
  File "C:\Users\Michael\vimfiles\bundle\vim-orgmode\ftplugin\orgmode\_vim.py", lin
e 61, in r
    res = f(*args, **kwargs)
  File "C:\Users\Michael\vimfiles\bundle\vim-orgmode\ftplugin\orgmode\_vim.py", lin
e 85, in r
    res = f(*args, **kwargs)
  File "C:\Users\Michael\vimfiles\bundle\vim-orgmode\ftplugin\orgmode\plugins\Todo.
py", line 194, in toggle_todo_state
    u'keepalt %s %dsplit org:todo/%d' % (prompt_pos, len(todo_states), d.bufnr)))
vim.error: Vim(python):Traceback (most recent call last):

[normal mode] type <LocalLeader>cat

Error detected while processing :
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Michael\vimfiles\bundle\vim-orgmode\ftplugin\orgmode\plugins\Agend
a.py", line 226, in list_all_todos
    loaded_agendafiles = cls._get_agendadocuments()
  File "C:\Users\Michael\vimfiles\bundle\vim-orgmode\ftplugin\orgmode\plugins\Agend
a.py", line 79, in _get_agendadocuments
    u"No org_agenda_files defined. Use :let "
  File "C:\Users\Michael\vimfiles\bundle\vim-orgmode\ftplugin\orgmode\_vim.py", lin
e 119, in echoe
    vim.command(u_encode(u':echoerr "%s"' % m))
vim.error: Vim(echoerr):No org_agenda_files defined. Use :let g:org_agenda_files=['
~/org/index.org'] to add files to the agenda view. 
jceb commented 7 years ago

Hm, sorry for that. I'm not maintaining vim-orgmode actively anymore and I'm afraid there's currently no workaround for this unsatisfactory behavior.