Skip to content

Journal: get_all_nodes and wiki: Current file is not a valid journal node! #272

@mizhozan

Description

@mizhozan

First of all, thanks for this promising plugin! I tested vimwiki and got frustrated how it interfere with syntax/folding (markdown) and do not do those job well in the case of markdown at least (anti-posix?). Glad to find wiki.vim after file an issue in vimwiki!

I have a problem with custom g:wiki_journal{'date_format'}

let g:wiki_root = '~/Work/Notes'
let g:wiki_filetypes = ['md',  'wiki']
let g:wiki_link_extension = '.md'
let g:wiki_link_target_type = 'md'
let g:wiki_journal = {
          \ 'name': 'Jrn',
          \ 'frequency': 'daily',
          \ 'date_format': {
          \   'daily' : 'D%Y-%m%d',
          \   'weekly' : 'W%y-%V',
          \   'monthly' : 'M%y-%m',
          \ },
          \}

I did this:

  1. <leader>w<leader>w works as expected and create a journal file of the day as expected.

  2. Run :WikiJournalNext and it gave this error:

    Error detected while processing function wiki#journal#go[5]..wiki#journal#get_all_nodes:
    line 1:
    E716: Key not present in Dictionary: ""
    E116: Invalid arguments for function wiki#date#format_to_regex(g:wiki_journal.date_format[a:frq])
    
  3. Run :WikiJournalToWeek

    wiki: Current file is not a valid journal node!
      /run/media/mizho/DTA/Notes/Jrn/D2023-0226.md
    

However, when I removed the daily format it seems working. I guess it's bcz of node_to_timestamp in the function! wiki#journal#go_to_frq(frq) don't parse pattern like D2023-0226 bcz of that D, though not sure.

p.s. updated the issue and separate it from #273 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions