From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: ANN: org-ql agenda block support Date: Thu, 08 Aug 2019 10:07:12 -0500 Message-ID: <87ftmb7l27.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34867) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvk0k-0004Wo-Vp for emacs-orgmode@gnu.org; Thu, 08 Aug 2019 11:07:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvk0j-000105-5c for emacs-orgmode@gnu.org; Thu, 08 Aug 2019 11:07:26 -0400 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:41338 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hvk0i-0000wo-Qh for emacs-orgmode@gnu.org; Thu, 08 Aug 2019 11:07:24 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hvk0d-000Im2-Dl for emacs-orgmode@gnu.org; Thu, 08 Aug 2019 17:07:19 +0200 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: emacs-orgmode@gnu.org Hi friends, FYI, I just pushed a new feature to org-ql: custom agenda blocks. This allows the use of org-ql queries in custom agenda commands. https://github.com/alphapapa/org-ql#function-org-ql-block For example, these two custom commands are equivalent: #+BEGIN_SRC elisp ;; Org Agenda tags-todo version: (setq org-agenda-custom-commands '(("ces" "Custom: Agenda and Emacs SOMEDAY [#A] items" ((tags-todo "PRIORITY=\"A\"+Emacs/!SOMEDAY") (agenda))))) ;; org-ql version: (setq org-agenda-custom-commands '(("ces" "Custom: Agenda and Emacs SOMEDAY [#A] items" ((org-ql-block '(and (todo "SOMEDAY") (tags "Emacs") (priority "A"))) (agenda))))) #+END_SRC However, the org-ql-block version runs in about 1/5th the time (0.7 seconds compared to 3.45 seconds on my collection of org-agenda-files). org-ql started as a prototype for a "next-generation agenda" called org-agenda-ng, but it evolved into its own package, which also provides tools like org-ql-agenda and org-ql-search that provide agenda-like views. Please let me know if you have any feedback. Thanks, Adam