From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATH] Speedups to org-table-recalculate Date: Sat, 06 Dec 2014 00:57:37 +0100 Message-ID: <87sigt1wge.fsf@nicolasgoaziou.fr> References: <87oas9tnlm.fsf@selenimh.mobile.lan> <87oas03ze0.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xx2k1-0004MC-Gd for emacs-orgmode@gnu.org; Fri, 05 Dec 2014 18:57:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xx2jr-0004zy-AZ for emacs-orgmode@gnu.org; Fri, 05 Dec 2014 18:56:53 -0500 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:46093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xx2jr-0004zq-4W for emacs-orgmode@gnu.org; Fri, 05 Dec 2014 18:56:43 -0500 In-Reply-To: (Nathaniel Flath's message of "Mon, 1 Dec 2014 01:15:20 -0500") 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: Michael Brand , org-mode List Nathaniel Flath writes: > Sorry, that was incorrect - real patches attached. Thanks. > +(defun org-table-message-once-per-second (t1 &rest args) > + "If there has been more than one second since T1, display message. > +ARGS are passed as arguments to the 'message' function. Returns > +current time if a message is printed, otherwise returns t1.. If > +T1 is nil, always messages." > + (let ((curtime (current-time))) > + (when (or (not t1) (< 0 (nth 1 (time-subtract curtime t1)))) > + (apply message args) > + curtime)) > + t1) The docstring seems incorrect, as the function always returns T1, no matter if a message is printed or not. > + (setq log-last-time > + (org-table-message-once-per-second > + (when all log-last-time) Nitpick: (and all log-last-time) > + (when all log-last-time) Ditto. > + (when all log-first-time) Ditto. Regards,