orgmode
orgmode copied to clipboard
NeoVim OrgMode file startup Error
Describe the bug
When opening up a org file I get the following error message
Error detected while processing FileType Autocommands for "org": Error executing lua callback: Vim:E730: using List as a String stack traceback: [C]: in function 'expand' ....config/nvim/plugged/orgmode/lua/orgmode/config/init.lua:73: in function 'get_all_files' ...config/nvim/plugged/orgmode/lua/orgmode/parser/files.lua:24: in function 'load' ...config/nvim/plugged/orgmode/lua/orgmode/parser/files.lua:19: in function 'new' ...jbwalt/.config/nvim/plugged/orgmode/lua/orgmode/init.lua:28: in function 'init' ...jbwalt/.config/nvim/plugged/orgmode/lua/orgmode/init.lua:44: in function 'reload' ...jbwalt/.config/nvim/plugged/orgmode/lua/orgmode/init.lua:61: in function <...jbwalt/.config/nvim/plugged/orgmod e/lua/orgmode/init.lua:60>
If I hit Enter, the error keeps on appearing
Steps to reproduce
nvim example.org
Then the error appears
Expected behavior
It should place me in the org file without any errors
Emacs functionality
No response
Minimal init.lua
-- Load custom tree-sitter grammar for org filetype require('orgmode').setup_ts_grammar()
require'nvim-treesitter.configs'.setup { ensure_installed = { "org", "bash", "ledger", "regex", "sql" }, highlight = { enable = true }, additional_vim_regex_highlighting = {'org'}, }
require('orgmode').setup({ -- win_split_mode = {'float'}, -- org_indent_mode = {'indent'}, -- org_tags_column = {'-80'}, org_agenda_files = {'~/docz/notes/*'}, org_default_notes_file = {'~/docz/notes/notez.org'}, org_capture_templates = { j = { description = 'Journal', template = '%?\n %U', target = '~/docz/notes/journal.org' },
q = {
description = 'Quick-Note',
template = '%?\n %f-%U',
target = '~/docz/notes/refile.org'
}
}
})
Screenshots and recordings
No response
OS / Distro
macOs 12.3.1
Neovim version/commit
NVIM v0.7.2 Build type: Release LuaJIT 2.1.0-beta3 Compiled by brew@Monterey
Additional context
No response
@ps1ph1 please wrap your minimal_init.lua
in two lines of only triple backticks ```
, so it will be formatted properly. To get lua syntax highlighting, add 'lua' to your first backtick line: ```lua
lua << EOF
-- Load custom tree-sitter grammar for org filetype
require('orgmode').setup_ts_grammar()
-- Tree-sitter configuration
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true ,
additional_vim_regex_highlighting = {'org'},
},
ensure_installed = { "org", "bash", "ledger", "regex", "sql" },
}
require('orgmode').setup({
-- win_split_mode = {'float'},
-- org_indent_mode = {'indent'},
-- org_tags_column = {'-80'},
org_agenda_files = {'~/docz/notes/*'},
org_default_notes_file = {'~/docz/notes/notez.org'},
org_capture_templates = {
j = {
description = 'Journal',
template = '%?\n %U',
target = '~/docz/notes/journal.org'
},
q = {
description = 'Quick-Note',
template = '%?\n %f-%U',
target = '~/docz/notes/refile.org'
}
}
})
Error message
Error executing vim.schedule lua callback: .../plugged/orgmode/lua/orgmode/colors/todo_highlighter.lua:55: Vim(append):Error e
xecuting lua callback: Vim:E730: using List as a String
stack traceback:
[C]: in function 'expand'
....config/nvim/plugged/orgmode/lua/orgmode/config/init.lua:73: in function 'get_all_files'
...config/nvim/plugged/orgmode/lua/orgmode/parser/files.lua:24: in function 'load'
...config/nvim/plugged/orgmode/lua/orgmode/parser/files.lua:19: in function 'new'
...jbwalt/.config/nvim/plugged/orgmode/lua/orgmode/init.lua:28: in function 'init'
...jbwalt/.config/nvim/plugged/orgmode/lua/orgmode/init.lua:44: in function 'reload'
...jbwalt/.config/nvim/plugged/orgmode/lua/orgmode/init.lua:61: in function <...jbwalt/.config/nvim/plugged/orgmode/lu
a/orgmode/init.lua:60>
[C]: in function 'cmd'
.../plugged/orgmode/lua/orgmode/colors/todo_highlighter.lua:55: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
stack traceback:
[C]: in function 'cmd'
.../plugged/orgmode/lua/orgmode/colors/todo_highlighter.lua:55: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Press ENTER or type command to continue
Thanks! Did you try different files? Have you been able to open an org file successfully before? If it's just a certain file that fails, it would be great if you could share its contents
This is my first time using neovim org-mode. I used emacs orgmode before but saw there was a variant for Neovim so decided to give it a try.
I get this error no matter what type of file. I even tried it with a new file and still got the same error message. I even tried to open a blank file and still got the same error message.
Are there any plugins that may interfere with org-mode loading correctly?
Could you please run nvim -u <path-to-orgmode-repo>/scripts/minimal_init.lua <your-test-file>
for a quick sanity check? If that works, it's possible that some other plugin is interfering with orgmode
@kristijanhusak
Not sure this is exactly the same bug, but I think vim-orgmode
might be trying to execute (part of) the headline.
Try to open the following file:
* vim: do
The error I get is
Error executing vim.schedule lua callback: ...ged/orgmode.nvim/lua/orgmode/colors/todo_highlighter.lua:55: Vim(filetype):E518: Unknown option: do
stack traceback:
[C]: in function 'cmd'
...ged/orgmode.nvim/lua/orgmode/colors/todo_highlighter.lua:55: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
This only happens if there's something with vim:
in the headline
@Maltimore I pushed the fix for your issue. Vim was reading that as a modeline (see :help modeline
). I disabled modelines in org buffers now.
@ps1ph1 your issue is with the default notes file. It needs to be a string, not table.
Thanks a lot, didn't know about modelines. The fix works perfectly also!
Closing this due to inactivity.