From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: [PATH] Speedups to org-table-recalculate Date: Mon, 20 Oct 2014 21:41:11 +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]:54829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgIpO-000809-Jv for emacs-orgmode@gnu.org; Mon, 20 Oct 2014 15:41:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgIpN-0005UL-BB for emacs-orgmode@gnu.org; Mon, 20 Oct 2014 15:41:14 -0400 Received: from mail-qa0-x22f.google.com ([2607:f8b0:400d:c00::22f]:49472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgIpN-0005U9-5d for emacs-orgmode@gnu.org; Mon, 20 Oct 2014 15:41:13 -0400 Received: by mail-qa0-f47.google.com with SMTP id cm18so3893286qab.34 for ; Mon, 20 Oct 2014 12:41:12 -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 Mon, Oct 20, 2014 at 3:56 AM, Nathaniel Flath wrote: > Thanks for the review! Updated patches attached. I believe I've fixed > everything you mentioned - Yes, thank you. I tried them out. > let me know if I missed something. > Subject: [PATCH 1/2] org-table.el: Add early return check to > org-table-recalculate > Subject: [PATCH 2/2] org-table.el: Print far fewer messages when recalculating > tables. http://orgmode.org/worg/org-contribute.html says: Line 2 is an empty line. I try to limit my commit subjects to 50 chars which is a rule for some projects and helpful for e. g. git log with certain options. > + (and all (org-table-execute-once-per-second > + log-last-time > + (message > + "Re-applying formulas to full table...(line %d)" > + (setq cnt (1+ cnt))))) Before trying out I have overseen it, setq does not increment on each line any more so it has to move before org-table-execute-once-per-second. Now probably better wrapped in a `when' instead of the original `and' with an added `progn'. > + (org-table-execute-once-per-second > + log-first-time > + (message "Re-applying formulas...done" cnt)) cnt is superfluous. Only during trying out I noticed: This message could still be kept as a feedback at least for single row updates, like e. g. Tab on a row with "#" in the first column, by changing log-first-time to (when all log-first-time). Or more conservative why not leave this message unconditional to avoid that any user could complain for any use case that all feedback messages disappeared like it would be the case for e. g. the typical "C-c C-c" on TBLFM? I think that would be a simple, safe compromise. Otherwise the right but not so simple thing to do would be to log this message for a simple "C-c C-c" on TBLFM and to not log it for only those cases that throw after other feedback messages like e. g. sometimes "C-u C-u C-c C-c" on TBLFM ("Table was already stable"), M-x org-table-iterate-buffer-tables and more. These repetition intensive use cases are the only ones that can profit noticeable from the conditional removal of this last message, aren't they? Michael