|
From: | steve-humphreys |
Subject: | ELisp - Making a list from a function returning a number |
Date: | Thu, 17 Dec 2020 12:42:13 +0100 |
I have written a function to return time as a number so I can set the temporal grid in org-agenda. I was previously using number-sequence until someone fount a problem. Now I have timfutur to give me the next time (time interval "tsk" after time "tim") (tim (number-sequence tstr tend tskp)) So what I have remaining to do is to make a list of numbers representing the times when the agenda grids are displayed. (defun timfutur (tim tsk) (let* ( (thr (/ tim 100)) (tmn (- tim (* thr 100))) (tinc_mn (+ tmn tsk)) (tinc_hr (/ (+ tmn tsk) 60)) (tinc_mn (- tinc_mn (* tinc_hr 60))) (thr_futur (* (+ thr tinc_hr) 100)) (tmn_futur tinc_mn) (tim_out (+ thr_futur tmn_futur)) ) ;; --- body of let ---- tim_out )) ; function returns last form
[Prev in Thread] | Current Thread | [Next in Thread] |