Re: [O] FYI: with-org-today-date macro, helps with testing

2018-10-23 Thread Samuel Wales
i duly saved this macro, didn't think to look for it, and used datefudge(1).

Re: [O] FYI: with-org-today-date macro, helps with testing

2017-07-29 Thread Adam Porter
Thanks, maybe I was up too late to be messing with macros. :)

Re: [O] FYI: with-org-today-date macro, helps with testing

2017-07-29 Thread Kyle Meyer
Adam Porter writes: > Kyle Meyer writes: [...] >> You should be able to simplify the macro body to >> >> `(cl-letf (((symbol-function 'org-today) (lambda () (date-to-day >> ,date >>,@body) > > Hi Kyle, > > I tried that, but it didn't work, so I had to come up with this uglier

Re: [O] FYI: with-org-today-date macro, helps with testing

2017-07-29 Thread Adam Porter
Kyle Meyer writes: > Adam Porter writes: > >> #+BEGIN_SRC elisp >> (defmacro with-org-today-date (date &rest body) >> "Run BODY with the `org-today' function set to return simply DATE. >> DATE should be a date-time string (both date and time must be included)." >> (declare (indent de

Re: [O] FYI: with-org-today-date macro, helps with testing

2017-07-29 Thread Kyle Meyer
Adam Porter writes: > #+BEGIN_SRC elisp > (defmacro with-org-today-date (date &rest body) > "Run BODY with the `org-today' function set to return simply DATE. > DATE should be a date-time string (both date and time must be included)." > (declare (indent defun)) > `(let ((day (date