From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Speeding up agenda custom command with org-agenda-earlier & org-agenda-later Date: Fri, 22 Jun 2018 22:49:23 +0200 Message-ID: <87o9g2bl7w.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWSzs-00064n-0S for emacs-orgmode@gnu.org; Fri, 22 Jun 2018 16:49:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWSzn-0003Ch-4y for emacs-orgmode@gnu.org; Fri, 22 Jun 2018 16:49:32 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:33577) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fWSzm-0003CJ-V0 for emacs-orgmode@gnu.org; Fri, 22 Jun 2018 16:49:27 -0400 In-Reply-To: (Zongheng Yang's message of "Wed, 20 Jun 2018 15:24:42 -0700") 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" To: Zongheng Yang Cc: "emacs-orgmode@gnu.org" Hello, Zongheng Yang writes: > Here's an agenda custom command that acts as the main interface I interact > with org (in fact, emacs :)). > > (setq org-agenda-custom-commands > '(("c" "Simple agenda view" > ((agenda "") > (tags "PRIORITY=\"A\"" > ((org-agenda-files '("~/org/work.org" "~/org/ideas.org")) > (org-agenda-skip-function '(org-agenda-skip-entry-if > 'todo 'done)) > (org-agenda-overriding-header "High-priority tasks:") > )) > (tags-todo "PRIORITY=\"C\"" > ((org-agenda-files '("~/org/work.org" "~/org/ > ideas.org")) > (org-agenda-overriding-header "Long-term:"))) > (alltodo "" > ((org-agenda-skip-function > '(or (zongheng-org-skip-subtree-if-priority ?A) > (zongheng-org-skip-subtree-if-priority ?C) > (org-agenda-skip-if nil '(scheduled deadline)))) > (org-agenda-overriding-header "Other tasks:"))) > )))) > > After I get into this view, I frequently issue many "org-agenda-earlier" & > "org-agenda-later" commands, often in a back-and-forth fashion, to inspect > what I've done around certain periods. > > In such a use case, it seems there's *no reason to not cache results*. > Without such caching currently *the latency of switching is really high*; > with such a caching, I'm happy to pay an one-time latency/CPU cost for the > first command, as long as successive commands can be sped up. > > Is a feature like this planned? I don't think is it planned. Feel free to implement it, if you want to. I consider Org agenda in dire need of rewriting, though. for better scalability and easier maintenance. Regards, -- Nicolas Goaziou