-
-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I am experiencing this bug on Windows using Neovim 0.11.2.
Error:
When I do :Org capture and save the buffer that opens, I get the following error:
E5108: Error executing lua: ...ocal/nvim-data/lazy/orgmode/lua/orgmode/capture/init.lua:203: Invalid buffer id: -1
stack traceback:
[C]: in function 'nvim_buf_set_lines'
...ocal/nvim-data/lazy/orgmode/lua/orgmode/capture/init.lua:203: in function 'action'
.../Local/nvim-data/lazy/orgmode/lua/orgmode/files/file.lua:128: in function 'update'
.../Local/nvim-data/lazy/orgmode/lua/orgmode/files/file.lua:138: in function 'update_sync'
...ocal/nvim-data/lazy/orgmode/lua/orgmode/capture/init.lua:194: in function '_refile_from_capture_buffer'
...ocal/nvim-data/lazy/orgmode/lua/orgmode/capture/init.lua:130: in function <...ocal/nvim-data/lazy/orgmode/lua/orgmode/capture/init.lua:123>
checkhealth
===========================================================================
orgmode: ✅
Orgmode ~
- ✅ OK Treesitter grammar installed (version 2.0.0)
- ✅ OK Setup called
- ✅ OK
org_agenda_filesconfigured - ✅ OK
org_default_notes_fileconfigured - ✅ OK
shellslashis set
Steps to reproduce
Reproduction:
- Go to any buffer
- Run
:Org capture
- Select 't' for task
- Fill in any information (or don't)
- Save with <C-c>
- Error occurs (See error)
- Empty buffer opens in the bottom right corner
- This is focused after removing the error
Note: If I write something to the empty buffer (Last screenshot), the content is saved to the captured file. If I leave it empty, nothing is saved.
Expected behavior
The capture should be saved without throwing an error. Also through org-roam.
Emacs functionality
No response
Minimal init.lua
It works perfectly fine on MacOS, but throws an error on Windows.
{
'nvim-orgmode/orgmode',
tag = "0.7.0",
event = 'VeryLazy',
ft = { 'org' },
dependencies = {
'akinsho/org-bullets.nvim',
'danilshvalov/org-modern.nvim',
{
"lukas-reineke/headlines.nvim",
dependencies = "nvim-treesitter/nvim-treesitter",
opts = {}
},
{
"chipsenkbeil/org-roam.nvim",
tag = "0.2.0",
}
},
config = function()
local notesHomePath = "~/org-roam"
local isWindows = vim.loop.os_uname().sysname == "Windows_NT"
local defaultNotesFile = '/index.org'
local orgAgendaFiles = '/**/*'
if isWindows then
require('orgmode.utils.treesitter.install').compilers = { 'gcc' }
end
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = notesHomePath .. orgAgendaFiles,
org_default_notes_file = notesHomePath .. defaultNotesFile,
ui = {
menu = {
handler = function(data)
require("org-modern.menu"):new({
window = {
margin = { 1, 0, 1, 0 },
padding = { 0, 1, 0, 1 },
title_pos = "center",
border = "single",
zindex = 1000,
},
icons = {
separator = "➜",
},
}):open(data)
end,
},
},
})
require('org-bullets').setup()
require("org-roam").setup({
directory = notesHomePath,
})
end,
}Screenshots and recordings
nvim-orgmode version
0.7.0
OS / Distro
Windows 11
Neovim version/commit
0.11.2
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working