Sorry, that was incorrect - real patches attached.

On Mon, Dec 1, 2014 at 1:02 AM, Nathaniel Flath <flat0...@gmail.com> wrote:

> Changed it to just a function - you are correct, for this purpose I don't
> need a macro.
>
> On Fri, Nov 21, 2014 at 6:30 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
> wrote:
>
>> Nathaniel Flath <flat0...@gmail.com> 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,
>>
>
>

Attachment: 0001-org-table.el-org-table-recalculate-early-returns(1).patch
Description: Binary data

Attachment: 0001-org-table.el-org-table-recalculate-is-quieter.patch
Description: Binary data

Reply via email to