orgmode icon indicating copy to clipboard operation
orgmode copied to clipboard

Orgmode api not initialized after startup. Telescope plugin gets error trying to use api.

Open GitMurf opened this issue 1 year ago • 1 comments

Describe the bug

Is it by design that even after setup / loading that orgmode plugin and api do not fully load / initialize until an actual org file is opened?

looks like here that it starts off as initialized = false. So when the telescope orgmode plugin tries to use the files load() api it gets an error of orgmode.files being nil.

https://github.com/nvim-orgmode/orgmode/blob/master/lua/orgmode/init.lua

Is it only fully instantiating with an autocmd on load of an org file or something?

once an org file is opened then the telescope plugin works as expected.

Steps to reproduce

Startup neovim and try using telescope orgmode search or refile commands before opening any org files.

Expected behavior

Orgmode api instantiated and available to use once plugin is loaded. Not requiring you to open an org file first.

Emacs functionality

No response

Minimal init.lua

Used default everything out of the box

Screenshots and recordings

No response

OS / Distro

Windows 11 using lazyvim

Neovim version/commit

Nightly

Additional context

No response

GitMurf avatar Feb 17 '24 02:02 GitMurf

Should be fixed now.

kristijanhusak avatar Feb 17 '24 08:02 kristijanhusak

@kristijanhusak confirmed this fixes it. Thanks!

GitMurf avatar Feb 18 '24 00:02 GitMurf