OrgAgendaDashboard Key not present in Dictionary Error

47 views
Skip to first unread message

Rodrigo Agerri

unread,
Dec 3, 2013, 2:21:33 PM12/3/13
to vimorg...@googlegroups.com
Hi all, 

First, thanks for the great plugin. I am trying to use the agenda dashboard functions and I got stuck in a problem. Using vim 7.2.411, multiple (17) org agenda files, specified in .vimrc like this: 

let g:agenda_files = split(glob("~/org/*.org"),"\n")

I open vim org/*.org, and if I: 

,aga: The week agenda view is shown with no TODOs 

if I place the cursor on a TODO with specified deadline and then press ,aga I get this error: 

Error detected while processing function OrgAgendaDashboard..<SNR>27_RunCustom..OrgRunAgenda..<SNR>27_MakeAgen
da..OrgMakeDictInherited:
line    4:
E716: Key not present in Dictionary: last_idict_with_tags == 1) || (get_tags == 0)
E15: Invalid expression: (b:v.last_idict_with_tags == 1) || (get_tags == 0)

Any pointers? 

Thanks, 

Rodrigo


Herbert Sitz

unread,
Dec 3, 2013, 5:33:28 PM12/3/13
to vimorg...@googlegroups.com
On Tue, Dec 3, 2013 at 11:21 AM, Rodrigo Agerri <agerri....@gmail.com> wrote:
 Using vim 7.2.411, multiple (17) org agenda files, specified in .vimrc like this: 

let g:agenda_files = split(glob("~/org/*.org"),"\n")

I open vim org/*.org, and if I: 

,aga: The week agenda view is shown with no TODOs 


Rodrigo --

It might help if you can narrow problem down to a simpler setup.  Do you experience same problem when you don't specify any agenda files in vimrc at all  (i.e., comment out the 'let g:agenda_files...' line )?   In that case when you generate first agenda it will give you message telling you it's defaulting to using just the current file.  What happens then?

-- Herb

Rodrigo Agerri

unread,
Dec 4, 2013, 3:52:48 AM12/4/13
to vimorg...@googlegroups.com
Hi Herb,

Thanks for the quick response.

It works fine. It asks to add the current opened org file to the
agenda files, I press enter and it shows me the week agenda correctly.
I do not even need to place the cursor on a TODO with deadline.

Cheers,

Rodrigo
> --
> You received this message because you are subscribed to the Google Groups
> "VimOrganizer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vimorganizer...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Herbert Sitz

unread,
Dec 4, 2013, 1:34:32 PM12/4/13
to vimorg...@googlegroups.com
On Wed, Dec 4, 2013 at 12:52 AM, Rodrigo Agerri <agerri....@gmail.com> wrote:
Hi Herb,

Thanks for the quick response.

It works fine. It asks to add the current opened org file to the
agenda files, I press enter and it shows me the week agenda correctly.
I do not even need to place the cursor on a TODO with deadline.


That's helpful for me to know, but it seems your initial problem still exists.  You should be able to specify that doesn't seem to solve your initial problem.  You should be able to have an agenda files list of many files, all of which are searched when you generate an agenda.

As one step to figure out problem, you could uncomment that g:agenda_files assignment in vimrc and start up again.  Then check what you get for output of:

      echo g:agenda_files

This should be a list of filenames.  If it's an error or empty list (i.e., []) then it means there's something wrong with the way you've constructed your list using the 'split(glob(....' expression.   Do you actually have filenames ending in .org in your '~/org/' directory?

The other thing you could check is if you can open multiple files and use the 'agenda files dashboard' to add them to g:agenda_files list.  This is accessed with the comma-a-f keycombo.  You will need to assign directory list to g:org_agenda_select_dirs if you want to use the 'edit agenda files' choice.

For some more info see help:    :h vimorg-agenda-files.  

HOWEVER, I just noticed an error in the help file, which incorrectly says the agenda dirs variable is g:org_agenda_dirs.  It should be 'g:org_agenda_select_dirs'.  ALSO, at one spot it incorrectly references the agenda files variable as g:org_agenda_files.  That's wrong, you are already using correct reference of g:agenda_files.  (I expect you got that from the sample vimrc file, which had the correct form for assignments of agenda files and agenda dirs variables.)

Please let me know if you do get things working when using multiple agenda files.

Regards,

Herb

Herbert Sitz

unread,
Dec 4, 2013, 1:42:09 PM12/4/13
to vimorg...@googlegroups.com
On Wed, Dec 4, 2013 at 12:52 AM, Rodrigo Agerri <agerri....@gmail.com> wrote:

 I press enter and it shows me the week agenda correctly.
I do not even need to place the cursor on a TODO with deadline.


yes, does not matter where your cursor is.  The agenda search will go through all files in agenda files list searching for matching headings.  The search you were running (Agenda for current week) doesn't necessarily return all TODO items; it returns only headings that have a date specification of current week. 

You could have TODO items that have no date specification at all, in which case you would want to do a TODO search, which is second choice on agenda dashboard 't    List of all TODO entries'.   This search returns headings that are marked with todos, and has nothing to do with date specifications in them.

See :h vimorg-agenda for more info.

Rodrigo Agerri

unread,
Dec 4, 2013, 5:49:29 PM12/4/13
to vimorg...@googlegroups.com
Hi Herbert,

>
> echo g:agenda_files
>

This is fine, it outputs correctly the list.

> This should be a list of filenames. If it's an error or empty list (i.e.,
> []) then it means there's something wrong with the way you've constructed
> your list using the 'split(glob(....' expression. Do you actually have
> filenames ending in .org in your '~/org/' directory?

Yes, I have. I have been using them for the last 3 years with emacs,
but I would like to get it working with vim, to be honest, and your
plugin is very nice.

ls -l org/
total 108
-rw-r--r--. 1 ragerri users 1276 Dec 3 20:07 admin.org
-rw-r--r--. 1 ragerri users 4013 Nov 22 2012 candc.org
-rw-r--r--. 1 ragerri users 11701 Dec 2 17:18 coreference.org
-rw-r--r--. 1 ragerri users 464 Mar 5 2013 mcr.org
-rw-r--r--. 1 ragerri users 273 Jan 28 2013 metaphor.org
-rw-r--r--. 1 ragerri users 1700 Oct 3 14:52 ned.org
-rw-r--r--. 1 ragerri users 6402 Nov 7 16:18 ner.org
-rw-r--r--. 1 ragerri users 741 May 16 2013 newsreader.org
-rw-r--r--. 1 ragerri users 17965 Dec 4 11:09 opener.org
-rw-r--r--. 1 ragerri users 8962 Nov 25 09:50 opennlp.org
-rw-r--r--. 1 ragerri users 3314 Oct 3 14:55 paths.org
-rw-r--r--. 1 ragerri users 2803 Jul 9 16:08 proposals.org
-rw-r--r--. 1 ragerri users 3319 Nov 6 19:17 publications.org
-rw-r--r--. 1 ragerri users 4221 Nov 6 19:17 sentiment.org
-rw-r--r--. 1 ragerri users 2938 Nov 22 2012 smt.org
-rw-r--r--. 1 ragerri users 530 Nov 6 19:17 supervision.org
-rw-r--r--. 1 ragerri users 312 Jul 9 16:08 teaching.org


> The other thing you could check is if you can open multiple files and use
> the 'agenda files dashboard' to add them to g:agenda_files list. This is
> accessed with the comma-a-f keycombo. You will need to assign directory
> list to g:org_agenda_select_dirs if you want to use the 'edit agenda files'
> choice.
>
> For some more info see help: :h vimorg-agenda-files.
>
> HOWEVER, I just noticed an error in the help file, which incorrectly says
> the agenda dirs variable is g:org_agenda_dirs. It should be
> 'g:org_agenda_select_dirs'. ALSO, at one spot it incorrectly references the
> agenda files variable as g:org_agenda_files. That's wrong, you are already
> using correct reference of g:agenda_files. (I expect you got that from the
> sample vimrc file, which had the correct form for assignments of agenda
> files and agenda dirs variables.)

I do this, add the files, the echo of the agenda_files variables is
also fine but I go back to box 1, the week view of the agenda does not
show any dates if I have the cursor on any place and it gives me the
same Dictionary error if placed on a TODO heading.

Same result as by adding the list to the .vimrc.

Thanks,

Rodrigo

Herbert Sitz

unread,
Dec 4, 2013, 6:25:03 PM12/4/13
to vimorg...@googlegroups.com
On Wed, Dec 4, 2013 at 2:49 PM, Rodrigo Agerri <agerri....@gmail.com> wrote:
Yes, I have. I have been using them for the last 3 years with emacs,
but I would like to get it working with vim, to be honest, and your
plugin is very nice.


If these are all files you've initially created in Org-mode I'm wondering if there's some minor incompatibility in formatting.  E.g., in Org-mode I don't think it matters where date specs are, but in VimOrg they all have to be in continuous block immediately following headline:

------- This works in Org-mode -------------------------
* heading 1

:DEADLINE: <2013-12-04 Wed>

------- But you need this in VimOrg ------------------------
* heading 1
:DEADLINE: <2013-12-04 Wed>

One possible fix would be to open each org file individually -- without an agenda files list --- and run an agenda search on it.  If most work but you find error in one or more files, it would be those files that are creating a problem, have some formatting that doesn't fit with VimOrg's requirements.



I do this, add the files, the echo of the agenda_files variables is
also fine but I go back to box 1, the week view of the agenda does not
show any dates if I have the cursor on any place and it gives me the
same Dictionary error if placed on a TODO heading.


I'm not sure what you're doing when you're putting cursor on a certain line to run an agenda search.   Cursor position is generally irrelevant to agenda search, whether in Org-mode or VimOrg.  You don't worry about cursor position in Org-mode do you?  If you do, then maybe you're talking about something different than I'm understanding.

-- Herb

Rodrigo Agerri

unread,
Dec 5, 2013, 3:48:58 AM12/5/13
to vimorg...@googlegroups.com
Hello,

On Thu, Dec 5, 2013 at 12:25 AM, Herbert Sitz <hes...@gmail.com> wrote:
> If these are all files you've initially created in Org-mode I'm wondering if
> there's some minor incompatibility in formatting. E.g., in Org-mode I don't
> think it matters where date specs are, but in VimOrg they all have to be in
> continuous block immediately following headline:
>
> ------- This works in Org-mode -------------------------
> * heading 1
>
> :DEADLINE: <2013-12-04 Wed>
>
> ------- But you need this in VimOrg ------------------------
> * heading 1
> :DEADLINE: <2013-12-04 Wed>

This could be a problem, yes. What about this:

------- This works in Org-mode -------------------------
* heading 1

** TODO blabla
:DEADLINE: <2013-12-04 Wed>

Is this allowed in vim-organizer?

> I'm not sure what you're doing when you're putting cursor on a certain line
> to run an agenda search. Cursor position is generally irrelevant to agenda
> search, whether in Org-mode or VimOrg. You don't worry about cursor
> position in Org-mode do you? If you do, then maybe you're talking about
> something different than I'm understanding.

Nope, I do not do anything with the cursor, I have just noticed that
vim-organizer behaves differently for agenda view if I am on top of a
TODO or when I am not.

Thanks

Rodrigo

Herbert Sitz

unread,
Dec 5, 2013, 12:55:49 PM12/5/13
to vimorg...@googlegroups.com
On Thu, Dec 5, 2013 at 12:48 AM, Rodrigo Agerri <rodrigo...@ehu.es> wrote:
This could be a problem, yes. What about this:

 ------- This works in Org-mode -------------------------
 * heading 1

 ** TODO blabla
 :DEADLINE: <2013-12-04 Wed>

Is this allowed in vim-organizer?


That should work fine.  You can have linespaces after heading if you want, EXCEPT that any metadata must occur in block immediately after heading, with no blank lines within the heading/metadata block.
 
> I'm not sure what you're doing when you're putting cursor on a certain line
> to run an agenda search.   Cursor position is generally irrelevant to agenda
> search, whether in Org-mode or VimOrg.  You don't worry about cursor
> position in Org-mode do you?  If you do, then maybe you're talking about
> something different than I'm understanding.

Nope,  I do not do anything with the cursor, I have just noticed that
vim-organizer behaves differently for agenda view if I am on top of a
TODO or when I am not.


That sounds strange to me, shouldn't be working that way, cursor position is irrelevant.  Maybe you could provide me with a file or some text that displays the issue you're talking about.

-- Herb

Boyd Kelly

unread,
Feb 21, 2014, 1:52:43 PM2/21/14
to vimorg...@googlegroups.com, hes...@gmail.com
Hi I'm a both a vimorganizer and emacs newbie.  I am also getting this error when trying to view the agenda in vim terminal with Vim 7.2 on RH at work and the same issue with Vim 7.4 on Fedora at home.  (Seems to work fine with gvim and emacs org-mode, but not Vim in a terminal)

Error detected while processing function OrgAgendaDashboard..<SNR>34_RunCustom..OrgRunSearch..<SN
R>34_MakeResults..OrgMakeDictInherited:
line    4:
E716: Key not present in Dictionary: last_idict_with_tags == 1) || (get_tags == 0)
E15: Invalid expression: (b:v.last_idict_with_tags == 1) || (get_tags == 0)

This is just with a single simple entry as follows:

-* Financial
-** Personal finance
-*** TODO Pay personal MasterCard
    :DEADLINE: <2014-03-31 Mon +1m>
    :SCHEDULED: <2014-03-10 Mon +1m>

Any suggestions much appreciated!

Boyd

Herbert Sitz

unread,
Feb 21, 2014, 2:47:01 PM2/21/14
to vimorg...@googlegroups.com
Boyd --

I don't test much in Linux terminal and don't have a Linux machine to test on at the moment.  Given that it works in gvim my first thought is that something in vimrc is happening for gvim but not for terminal vim (or vice versa, some difference in way terminal and gvim are treated in vimrc).  Best first thing to check would be to open your file in a new vim terminal instance and then check the output of the ':messages' command.  This should list any errors upon opening of the file.  If there are any, they might point in direction of a fix.

If there are no errors upon opening, then run the agenda command to generate the error, then redo the messages command to see if it lists errors previous to the ones you gave me.  If so, those could be helpful.

-- Herb



Herbert Sitz

unread,
Feb 21, 2014, 2:49:45 PM2/21/14
to vimorg...@googlegroups.com
On Fri, Feb 21, 2014 at 11:47 AM, Herbert Sitz <hes...@gmail.com> wrote:

I don't test much in Linux terminal and don't have a Linux machine to test on at the moment. 

Having said that, I have tested in Linux vim terminals and I think most people who use VimOrganizer use it that way, so this is not expected behavior. . . .


Message has been deleted

Boyd Kelly

unread,
Feb 24, 2014, 7:25:03 PM2/24/14
to vimorg...@googlegroups.com, hes...@gmail.com
Really weird.  I have no problem with a vm running Gentoo.  But both Red Hat and Fedora have caused me hours of grief.

I've tried seemingly everything....  Removed pathogen, tried removing /usr/share/vim74.  Even removed vim rpms and compiled my own and *still* had the same problems, esp with ,aga.  (Where could that be coming from?)  Yet no problems with the same .vimrc ~.vim and ~/gtd files under Gentoo!

Well maybe its time I started learning emacs(which also seems to be working just fine). lol.

boyd

Rodrigo Agerri

unread,
Dec 23, 2014, 11:49:39 AM12/23/14
to vimorg...@googlegroups.com
Hi,

I never came back with this issue. The problem was that I had created
many of these files with emacs org and some of the metadata tags were
not placed immediately after the tag.

Vim organizer is cool.

Thanks,

Rodrigo

Herbert Sitz

unread,
Dec 23, 2014, 12:23:37 PM12/23/14
to vimorg...@googlegroups.com
On Tue, Dec 23, 2014 at 8:49 AM, Rodrigo Agerri <agerri....@gmail.com> wrote:

 The problem was that I had created
many of these files with emacs org and some of the metadata tags were
not placed immediately after the tag.


Sorry about that.  That was probably a bad design decision, should have made it completely org-format compatible from the get go. 

My memory on it is fuzzy, but there was framework in there to automatically convert emacs-style tag lines when loading, and to transparently make them emacs style upon saving in VimOrganizer.  You could try enabling this by setting this variable in your vimrc:

       let g:org_emacs_autoconvert = 1

It adds some overhead, since work is done each time you load and save.  And I'm not sure it's completely trouble free.

Unfortunately, I don't spend time much maintaining VimOrganizer anymore, certainly not improving it, and I generally recommend people use Emacs/Evil for orgmode.  But I do still sometimes edit org files in VimOrganizer.

Regards,

Herb

Reply all
Reply to author
Forward
0 new messages