From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: [PATH] Speedups to org-table-recalculate Date: Mon, 8 Dec 2014 13:56:51 +0100 Message-ID: References: <87oas9tnlm.fsf@selenimh.mobile.lan> <87oas03ze0.fsf@nicolasgoaziou.fr> <87sigt1wge.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxxrz-0000RC-Bw for emacs-orgmode@gnu.org; Mon, 08 Dec 2014 07:56:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xxxrx-0004fa-7V for emacs-orgmode@gnu.org; Mon, 08 Dec 2014 07:56:55 -0500 Received: from mail-qc0-x234.google.com ([2607:f8b0:400d:c01::234]:62666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxxrx-0004fL-2p for emacs-orgmode@gnu.org; Mon, 08 Dec 2014 07:56:53 -0500 Received: by mail-qc0-f180.google.com with SMTP id i8so3346419qcq.25 for ; Mon, 08 Dec 2014 04:56:51 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nathaniel Flath Cc: org-mode List Hi Nathaniel The macro did not set the time to nil, the current function does when t1 is nil but I think it must not. This led me to the following ideas, sorry for not thinking enough earlier: Why not change the macro's (setq ,t1 curtime) to a function's (set t1 curtime), still conditional as it was in the macro and call the function with "'log-*-time", quoted? Why not factor out the action from the function that would then only return whether any action has to be taken and in consequence also factor out the sometimes needed test for "all"? (when (or (not all) (org-once-per-second 'log-*-time)) (message [...])) The function would not have to test t1 for nil anymore. In my opinion this functionality should go into org-macs.el, hence omitting "-table-" in the function name. Michael