[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATH] Speedups to org-table-recalculate
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [PATH] Speedups to org-table-recalculate |
Date: |
Sat, 22 Nov 2014 00:30:31 +0100 |
Nathaniel Flath <address@hidden> writes:
> OK, I think I fixed that.
Thanks.
I didn't verify it compiles, but your macro still looks suspicious.
> +(defmacro org-table-execute-once-per-second (t1 &rest body)
> + "If there has been more than one second since T1, execute BODY.
> +Updates T1 to 'current-time' if this condition is met. If T1 is
> +nil, always execute body."
> + `(let ((t1 ,t1))
> + (if t1
> + (let ((curtime (current-time)))
> + (when (< 0 (nth 1 (time-subtract curtime t1)))
> + (setq t1 curtime)
> + ,@body))
> + ,@body)))
You shouldn't splice BODY twice in your macro. Also, I don't get why you
need to (setq t1 curtime).
Do you need a macro at all for this task? ISTM you only need to display
a message conditionally and update a time value.
Regard,
- Re: [O] [PATH] Speedups to org-table-recalculate, Nathaniel Flath, 2014/11/09
- Re: [O] [PATH] Speedups to org-table-recalculate, Michael Brand, 2014/11/09
- Re: [O] [PATH] Speedups to org-table-recalculate, Nathaniel Flath, 2014/11/12
- Re: [O] [PATH] Speedups to org-table-recalculate, Michael Brand, 2014/11/12
- Re: [O] [PATH] Speedups to org-table-recalculate, Nathaniel Flath, 2014/11/14
- Re: [O] [PATH] Speedups to org-table-recalculate, Michael Brand, 2014/11/14
- Re: [O] [PATH] Speedups to org-table-recalculate, Nathaniel Flath, 2014/11/14
- Re: [O] [PATH] Speedups to org-table-recalculate, Michael Brand, 2014/11/14
- Re: [O] [PATH] Speedups to org-table-recalculate, Nicolas Goaziou, 2014/11/14
- Re: [O] [PATH] Speedups to org-table-recalculate, Nathaniel Flath, 2014/11/21
- Re: [O] [PATH] Speedups to org-table-recalculate,
Nicolas Goaziou <=