diff --git a/lua/orgmode/parser/file.lua b/lua/orgmode/parser/file.lua index 58d91aef2..3051e331e 100644 --- a/lua/orgmode/parser/file.lua +++ b/lua/orgmode/parser/file.lua @@ -153,7 +153,13 @@ function File.load(path, callback) local category = vim.fn.fnamemodify(path, ':t:r') utils.readfile(path):next(vim.schedule_wrap(function(content) return callback(File.from_content(content, category, path, ext == 'org_archive')) - end)) + end)):catch(function(err) + -- Ignore file not found errors + if vim.startswith(err, 'ENOENT') then + return + end + error(err) + end) end ---@param content table