-
-
Notifications
You must be signed in to change notification settings - Fork 163
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Attempting to use the org_refile
keybinding (<Leader>or
) inside an org file triggers this exception:
[orgmode] ...cal/share/nvim/lazy/orgmode/lua/orgmode/capture/init.lua:290: attempt to index field '_window' (a nil value)
I don't really have a better stack trace unfortunately.
Steps to reproduce
- Copy my
minimal_init.lua
- run
mkdir org
in directory (to create theorg_agenda_files
path fromminimal_init.lua
) - run
nvim -u minimal_init.lua
- Open and save
org/projects.org
- Hit
<Leader>oct
to capture a task (will be saved toorg/refile.org
thanks toorg_default_notes_file
setting) - Open
org/refile.org
- Select task and hit
<Leader>or
to refile - Tab complete the destination to select
projects.org/
(Not sure why it has a trailing slash) - Hitting enter triggers the exception
Expected behavior
Successfully able to move item to other org file
Emacs functionality
No response
Minimal init.lua
For the minimal_init.lua
, I merely added the org_agenda_files
and org_default_notes_file
settings.
local tmp_dir = vim.env.TMPDIR or vim.env.TMP or vim.env.TEMP or "/tmp"
local nvim_root = tmp_dir .. "/nvim_orgmode"
local lazy_root = nvim_root .. "/lazy"
local lazypath = lazy_root .. "/lazy.nvim"
-- Install lazy.nvim if not already installed
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
}
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{
"nvim-orgmode/orgmode",
dependencies = {
{ "nvim-treesitter/nvim-treesitter", lazy = true },
},
event = "VeryLazy",
config = function()
-- Load treesitter grammar for org
require("orgmode").setup_ts_grammar()
-- Setup treesitter
require("nvim-treesitter.configs").setup {
highlight = {
enable = true,
},
ensure_installed = { "org" },
}
-- Setup orgmode
require("orgmode").setup {
org_agenda_files = "./org/**/*",
org_default_notes_file = "./org/refile.org",
}
end,
},
}, {
root = lazy_root,
lockfile = nvim_root .. "/lazy.json",
install = {
missing = false,
},
})
require("lazy").sync {
wait = true,
show = false,
}
Screenshots and recordings
No response
OS / Distro
Debian 11 (Bullseye)
Neovim version/commit
0.9.0
Additional context
It seems like this line of code (orgmode/lua/orgmode/capture/init.lua:290
) was recently added in #670
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working