From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: [PATH] Speedups to org-table-recalculate Date: Sun, 19 Oct 2014 21:57:05 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XfwbE-0002XH-P8 for emacs-orgmode@gnu.org; Sun, 19 Oct 2014 15:57:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XfwbD-0005my-O3 for emacs-orgmode@gnu.org; Sun, 19 Oct 2014 15:57:08 -0400 Received: from mail-qa0-x230.google.com ([2607:f8b0:400d:c00::230]:51291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XfwbD-0005ml-HP for emacs-orgmode@gnu.org; Sun, 19 Oct 2014 15:57:07 -0400 Received: by mail-qa0-f48.google.com with SMTP id dc16so2541806qab.35 for ; Sun, 19 Oct 2014 12:57:05 -0700 (PDT) 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 On Sat, Oct 18, 2014 at 7:11 AM, Nathaniel Flath wrote: > Patches are attached. I am not an expert for all the following comments, please correct me or contradict where necessary. The patches do not apply on current master, so I did not try them out yet. You might want to add a def-edebug-spec like there is one for many other defmacro in Org. Limit lines to max. 80 chars. It will make it easier for the maintainer Bastien to apply the patches when you format them with git including a changelog etc. as described here http://orgmode.org/worg/org-contribute.html > + (if (not all) (message "Re-applying formula to field: %s" (car eq)) > + (org-table-execute-once-per-second log-last-time (message "Re-applying formula to field: %s" (car eq)))) Good idea to still log always when only one table row is recalculated. The doubling of the message makes it more complicated to maintain its string. I suggest to change the macro to allow (org-table-execute-once-per-second (when all log-last-time) ; Log just always when `all' is nil. (message "Re-applying formula to field: %s" (car eq))) Why not test `all' also for the other message with "to field"? > + ,@body > + ))) Parentheses not alone on an own line. > + (and all (org-table-execute-once-per-second log-last-time (message "Re-applying formulas to %d lines...done" cnt)))) Shouldn't this use `log-first-time'? Michael