nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.

Home Page:https://nvim-orgmode.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loading org file causes expected string, got table error

schultzter opened this issue · comments

Describe the bug

When I load an org file I get the error message:
image

Using a simple org file:
image

Steps to reproduce

Open the following org file:

* This is the first header
  
  This is a paragraph in the first section

** TODO This needs to get done :tag1:tag2:
   SCHEDULED: <2023-11-04 Sat 16:00>
*** HEADING

Expected behavior

No errors!

Emacs functionality

No response

Minimal init.lua

require("nvim-treesitter.install").command_extra_args = {
  curl = { "-k" },
}
require('nvim-treesitter.configs').setup({
  highlight = {
    enable = true; 
    disable = {'org'}, 
    additional_vim_regex_highlighting = {'org'},
  }, 
  ensure_installed = {'org'},
})
require('orgmode').setup_ts_grammar() 
require('orgmode').setup({
  org_agenda_files = {'~/Documents/Notes/*'},
  org_default_notes_file = {'~Documents/Notes/refile.org'} 
})

Screenshots and recordings

No response

OS / Distro

Windows 11

Neovim version/commit

0.9.5

Additional context

No response

There's a similar error when I press Tab on a heading to collapse or expand it:
image

Something's wrong with your org_capture_template configuration. Can you paste that part of your config?

Thanks. I never changed that config - where would I find it?

Your org_default_notes_file should be a string, not a table. This is the correct config:

require('orgmode').setup({
  org_agenda_files = {'~/Documents/Notes/*'},
  org_default_notes_file = '~Documents/Notes/refile.org'
})

Perfect! Thank you.