We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1d6eff commit 185f54eCopy full SHA for 185f54e
lua/orgmode/parser/file.lua
@@ -151,9 +151,18 @@ function File.load(path, callback)
151
return callback(nil)
152
end
153
local category = vim.fn.fnamemodify(path, ':t:r')
154
- utils.readfile(path):next(vim.schedule_wrap(function(content)
155
- return callback(File.from_content(content, category, path, ext == 'org_archive'))
156
- end))
+ utils
+ .readfile(path)
+ :next(vim.schedule_wrap(function(content)
157
+ return callback(File.from_content(content, category, path, ext == 'org_archive'))
158
+ end))
159
+ :catch(function(err)
160
+ -- Ignore file not found errors
161
+ if vim.startswith(err, 'ENOENT') then
162
+ return
163
+ end
164
+ error(err)
165
+ end)
166
167
168
---@param content table
0 commit comments