Skip to content

Commit 8118802

Browse files
committed
Resolve path for default_notes_file to support symlinks.
This fixes an issue where you would end up with two references to the default file when using symlinks, since all other files had their symlinks resolved but not this. This led to having one reference to the full path of the file, and one reference to the symlink, giving symptoms such as duplicate entries in the agenda.
1 parent 6878b99 commit 8118802

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/orgmode/config/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ end
6969
function Config:get_all_files()
7070
local all_filenames = {}
7171
if self.opts.org_default_notes_file and self.opts.org_default_notes_file ~= '' then
72-
local default_full_path = vim.fn.expand(self.opts.org_default_notes_file, ':p')
72+
local default_full_path = vim.fn.resolve(vim.fn.expand(self.opts.org_default_notes_file, ':p'))
7373
table.insert(all_filenames, default_full_path)
7474
end
7575
local files = self.opts.org_agenda_files

0 commit comments

Comments
 (0)