fix(gotodate): use proper option to determine note creation

This commit is contained in:
Thomas Lambert
2023-02-03 16:06:19 +01:00
parent 61e7cd0ae3
commit cdbb40de49
2 changed files with 8 additions and 8 deletions

View File

@@ -206,15 +206,15 @@ telekasten.setup({opts})
Default: `true` Default: `true`
*telekasten.settings.daily* *telekasten.settings.dailies*
daily: ~ dailies: ~
Path to your daily notes, to separate them from 'normal' notes. Path to your daily notes, to separate them from 'normal' notes.
Accepts absolute path or sub-directory name. Accepts absolute path or sub-directory name.
Default: '~/zettelkasten/daily' Default: '~/zettelkasten/daily'
*telekasten.settings.weekly* *telekasten.settings.weeklies*
weekly: ~ weeklies: ~
Path to your weekly notes, to separate them from 'normal' notes. Path to your weekly notes, to separate them from 'normal' notes.
Accepts absolute path or sub-directory name. Accepts absolute path or sub-directory name.
@@ -317,7 +317,7 @@ telekasten.setup({opts})
Default: true Default: true
*telekasten.settings.weeklies_create_nonexisting* *telekasten.settings.weeklies_create_nonexisting*
weekliesdailies_create_nonexisting: ~ weeklies_create_nonexisting: ~
Flag that determines whether this week's note should always be created Flag that determines whether this week's note should always be created
if not present. Also, whether weekly notes should be created when if not present. Also, whether weekly notes should be created when
opening them via the calendar. opening them via the calendar.

View File

@@ -1777,8 +1777,8 @@ local function GotoDate(opts)
if if
(fexists ~= true) (fexists ~= true)
and ( and (
(opts.follow_creates_nonexisting == true) (opts.dailies_create_nonexisting == true)
or M.Cfg.follow_creates_nonexisting == true or M.Cfg.dailies_create_nonexisting == true
) )
then then
create_note_from_template( create_note_from_template(
@@ -1839,7 +1839,7 @@ local function GotoToday(opts)
local today = os.date(dateformats.date) local today = os.date(dateformats.date)
opts.date_table = os.date("*t") opts.date_table = os.date("*t")
opts.date = today opts.date = today
opts.follow_creates_nonexisting = true -- Always use template if GotoToday opts.dailies_create_nonexisting = true -- Always use template for GotoToday
GotoDate(opts) GotoDate(opts)
end end