Hi Michael, After taking a further test, it seems that (planner-yesterday) is probably not the function in this case. To put it more specific, for example I have a valid page of today 2007.10.22.muse, but I don't have 2007.10.21.muse, instead I have 2007.10.19.muse. So, I would like a function can find out the most recent valid "yesterday", not just subtract one day from today. Similar to the "tomorrow" function.
Thanks! Xin Michael wrote: > Hi, > > Xin Shi wrote: > >> Hi, >> >> Are there any functions that can put a link for the previous valid and >> next valid day page? It would be very useful in viewing days in >> sequence. For example, there are three files 2007.10.18.muse, >> 2007.10.21.muse, and 2007.10.25.muse. So that in the 2007.10.21.muse: >> (Here the function name is fake). >> >> [[<lisp> (planner-find-previous-valid-day)</lisp>]] will generate the >> link of [[2007.10.18]]. >> >> As the planner-calendar package can already generate the valid day >> pages, it might be possible to do that. >> > maybe you are looking for something like this: > > (defun hmw-pdt () > "Build a new daily planner page." > (let ((cur (planner-get-current-date-filename)) > (today (planner-today))) > (planner-timewarp cur) > (insert > (format > "%s | [[index][Index]] | %s\n\n\n* Tasks\n\n\n\n* Diary\n\n\n\n* > Notes\n" > (planner-yesterday) (planner-tomorrow))) > (planner-timewarp today) > ( setq planner-timewarp-date nil ))) > > (setq planner-day-page-template 'hmw-pdt) > > Michael > > > _______________________________________________ Planner-el-discuss mailing list [email protected] https://mail.gna.org/listinfo/planner-el-discuss
