help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dope program


From: Byung-Hee HWANG
Subject: Re: dope program
Date: Wed, 06 Jan 2021 18:11:33 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> (defun dope (boxes pills dose &optional from)
>   (interactive "nboxes: \nnpills/box: \nndose/day: ")
>   (let*((days     (/ (* boxes pills) dose))
>         (done     (time-add (when from
>                               (date-to-time (concat from "T00:00+01:00")) )
>                             (days-to-time (1- days)) ))
>         (done-str (format-time-string "%F" done))
>         (get-more (format-time-string "%F"
>                                       (time-add done (days-to-time -10))) ))
>     (insert (format "%s  [%s]   %s" ; don't change
>                     (or from (format-time-string "%F")) get-more done-str) )))
>
> Very useful, and seems to work, just put the output data in
> a text file.

Hellow Emanul,

Sorry i did fail to imagin what this program is. So could you please
more expalin or background? Possibly i would like to feel your mind for
this program "dope". Because i also work for long time day by day with
text files.

Sincerely, Gnus fan Byung-Hee

-- 
^고맙습니다 _和合團結_ 감사합니다_^))//



reply via email to

[Prev in Thread] Current Thread [Next in Thread]